[ide] shrink hw_regs_t

sata_[misc,scr] and priv are write-only
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 52b266dd
......@@ -871,12 +871,11 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
* the MMIO layout isnt the same as the the standard port
* based I/O
*/
memset(&hw, 0, sizeof(hw_regs_t));
hw.priv = addr;
base = (unsigned long)addr;
if(ch)
base = (unsigned long)addr;
if (ch)
base += 0xC0;
else
base += 0x80;
......@@ -901,16 +900,16 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
hw.io_ports[IDE_IRQ_OFFSET] = 0;
if (pdev_is_sata(dev)) {
base = (unsigned long) addr;
if(ch)
base += 0x80;
hw.sata_scr[SATA_STATUS_OFFSET] = base + 0x104;
hw.sata_scr[SATA_ERROR_OFFSET] = base + 0x108;
hw.sata_scr[SATA_CONTROL_OFFSET]= base + 0x100;
hw.sata_misc[SATA_MISC_OFFSET] = base + 0x140;
hw.sata_misc[SATA_PHY_OFFSET] = base + 0x144;
hw.sata_misc[SATA_IEN_OFFSET] = base + 0x148;
if (pdev_is_sata(dev)) {
base = (unsigned long)addr;
if (ch)
base += 0x80;
hwif->sata_scr[SATA_STATUS_OFFSET] = base + 0x104;
hwif->sata_scr[SATA_ERROR_OFFSET] = base + 0x108;
hwif->sata_scr[SATA_CONTROL_OFFSET] = base + 0x100;
hwif->sata_misc[SATA_MISC_OFFSET] = base + 0x140;
hwif->sata_misc[SATA_PHY_OFFSET] = base + 0x144;
hwif->sata_misc[SATA_IEN_OFFSET] = base + 0x148;
}
hw.irq = hwif->pci_dev->irq;
......@@ -918,11 +917,6 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
memcpy(&hwif->hw, &hw, sizeof(hw));
memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports));
if (is_sata(hwif)) {
memcpy(hwif->sata_scr, hwif->hw.sata_scr, sizeof(hwif->hw.sata_scr));
memcpy(hwif->sata_misc, hwif->hw.sata_misc, sizeof(hwif->hw.sata_misc));
}
hwif->irq = hw.irq;
base = (unsigned long) addr;
......
......@@ -256,10 +256,7 @@ typedef struct hw_regs_s {
int irq; /* our irq number */
int dma; /* our dma entry */
ide_ack_intr_t *ack_intr; /* acknowledge interrupt */
void *priv; /* interface specific data */
hwif_chipset_t chipset;
unsigned long sata_scr[SATA_NR_PORTS];
unsigned long sata_misc[SATA_NR_PORTS];
} hw_regs_t;
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment