diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 09:38:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 09:38:32 -0400 |
commit | 4c3032d8a4d6c97bd6e02bcab524ef2428d89561 (patch) | |
tree | 4528851a9b04282f602cebb6b2ab4bc677b63259 /drivers/ide/ppc/pmac.c | |
parent | 387750c3bf49c22f6189436032145e2131985076 (diff) |
ide: add struct ide_io_ports (take 3)
* Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
in ide_hwif_t.
* Rename io_ports[] in hw_regs_t to io_ports_array[].
* Use un-named union for 'unsigned long io_ports_array[]' and 'struct
ide_io_ports io_ports' in hw_regs_t.
* Remove IDE_*_OFFSET defines.
v2:
* scc_pata.c build fix from Stephen Rothwell.
v3:
* Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
(Noticed by Andrew Morton)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 185faa0dce94..3cac6b2790dd 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -417,7 +417,7 @@ static void pmac_ide_kauai_selectproc(ide_drive_t *drive); | |||
417 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 417 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ |
418 | 418 | ||
419 | #define PMAC_IDE_REG(x) \ | 419 | #define PMAC_IDE_REG(x) \ |
420 | ((void __iomem *)((drive)->hwif->io_ports[IDE_DATA_OFFSET] + (x))) | 420 | ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x))) |
421 | 421 | ||
422 | /* | 422 | /* |
423 | * Apply the timings of the proper unit (master/slave) to the shared | 423 | * Apply the timings of the proper unit (master/slave) to the shared |
@@ -1086,8 +1086,9 @@ static void __devinit pmac_ide_init_ports(hw_regs_t *hw, unsigned long base) | |||
1086 | int i; | 1086 | int i; |
1087 | 1087 | ||
1088 | for (i = 0; i < 8; ++i) | 1088 | for (i = 0; i < 8; ++i) |
1089 | hw->io_ports[i] = base + i * 0x10; | 1089 | hw->io_ports_array[i] = base + i * 0x10; |
1090 | hw->io_ports[8] = base + 0x160; | 1090 | |
1091 | hw->io_ports.ctl_addr = base + 0x160; | ||
1091 | } | 1092 | } |
1092 | 1093 | ||
1093 | /* | 1094 | /* |