aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ide.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:23 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:23 -0400
commit2dde7861afa23cd59db83515cb0b810b92b220aa (patch)
treee2cfda1c75d2157fde3801d29e2bcbebf1d5a129 /include/linux/ide.h
parent26042d058ba21305aeb8ac92e4b1483dbec642ac (diff)
ide: rework PowerMac media-bay support (take 2)
Rework PowerMac media-bay support in such way that instead of un/registering the IDE interface we un/register IDE devices: * Add ide_port_scan() helper for probing+registerering devices on a port. * Rename ide_port_unregister_devices() to __ide_port_unregister_devices(). * Add ide_port_unregister_devices() helper for unregistering devices on a port. * Add 'ide_hwif_t *cd_port' to 'struct media_bay_info', pass 'hwif' instead of hwif->index to media_bay_set_ide_infos() and use it to setup 'cd_port'. * Use ide_port_unregister_devices() instead of ide_unregister() and ide_port_scan() instead of ide_register_hw() in media_bay_step(). * Unexport ide_register_hw() and make it static. v2: * Fix build by adding <linux/ide.h> include to <asm-powerpc/mediabay.h>. (Reported by Michael/Kamalesh/Andrew). Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'include/linux/ide.h')
-rw-r--r--include/linux/ide.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/ide.h b/include/linux/ide.h
index f9449ecd79d9..9aaad7e70593 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -189,10 +189,6 @@ struct hwif_s * ide_find_port(unsigned long);
189void ide_init_port_data(struct hwif_s *, unsigned int); 189void ide_init_port_data(struct hwif_s *, unsigned int);
190void ide_init_port_hw(struct hwif_s *, hw_regs_t *); 190void ide_init_port_hw(struct hwif_s *, hw_regs_t *);
191 191
192struct ide_drive_s;
193int ide_register_hw(hw_regs_t *, void (*)(struct ide_drive_s *),
194 struct hwif_s **);
195
196static inline void ide_std_init_ports(hw_regs_t *hw, 192static inline void ide_std_init_ports(hw_regs_t *hw,
197 unsigned long io_addr, 193 unsigned long io_addr,
198 unsigned long ctl_addr) 194 unsigned long ctl_addr)
@@ -1204,6 +1200,8 @@ void ide_undecoded_slave(ide_drive_t *);
1204 1200
1205int ide_device_add_all(u8 *idx, const struct ide_port_info *); 1201int ide_device_add_all(u8 *idx, const struct ide_port_info *);
1206int ide_device_add(u8 idx[4], const struct ide_port_info *); 1202int ide_device_add(u8 idx[4], const struct ide_port_info *);
1203void ide_port_unregister_devices(ide_hwif_t *);
1204void ide_port_scan(ide_hwif_t *);
1207 1205
1208static inline void *ide_get_hwifdata (ide_hwif_t * hwif) 1206static inline void *ide_get_hwifdata (ide_hwif_t * hwif)
1209{ 1207{