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 /include/asm-cris/arch-v10 | |
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 'include/asm-cris/arch-v10')
-rw-r--r-- | include/asm-cris/arch-v10/ide.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/asm-cris/arch-v10/ide.h b/include/asm-cris/arch-v10/ide.h index ea34e0d0a388..5366e6239328 100644 --- a/include/asm-cris/arch-v10/ide.h +++ b/include/asm-cris/arch-v10/ide.h | |||
@@ -59,22 +59,19 @@ static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port, u | |||
59 | int i; | 59 | int i; |
60 | 60 | ||
61 | /* fill in ports for ATA addresses 0 to 7 */ | 61 | /* fill in ports for ATA addresses 0 to 7 */ |
62 | 62 | for (i = 0; i <= 7; i++) { | |
63 | for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { | 63 | hw->io_ports_array[i] = data_port | |
64 | hw->io_ports[i] = data_port | | ||
65 | IO_FIELD(R_ATA_CTRL_DATA, addr, i) | | 64 | IO_FIELD(R_ATA_CTRL_DATA, addr, i) | |
66 | IO_STATE(R_ATA_CTRL_DATA, cs0, active); | 65 | IO_STATE(R_ATA_CTRL_DATA, cs0, active); |
67 | } | 66 | } |
68 | 67 | ||
69 | /* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */ | 68 | /* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */ |
70 | 69 | hw->io_ports.ctl_addr = data_port | | |
71 | hw->io_ports[IDE_CONTROL_OFFSET] = data_port | | ||
72 | IO_FIELD(R_ATA_CTRL_DATA, addr, 6) | | 70 | IO_FIELD(R_ATA_CTRL_DATA, addr, 6) | |
73 | IO_STATE(R_ATA_CTRL_DATA, cs1, active); | 71 | IO_STATE(R_ATA_CTRL_DATA, cs1, active); |
74 | 72 | ||
75 | /* whats this for ? */ | 73 | /* whats this for ? */ |
76 | 74 | hw->io_ports.irq_addr = 0; | |
77 | hw->io_ports[IDE_IRQ_OFFSET] = 0; | ||
78 | } | 75 | } |
79 | 76 | ||
80 | static inline void ide_init_default_hwifs(void) | 77 | static inline void ide_init_default_hwifs(void) |