diff options
Diffstat (limited to 'drivers/ide/h8300/ide-h8300.c')
-rw-r--r-- | drivers/ide/h8300/ide-h8300.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c index ae37ee58bae2..20fad6d542cc 100644 --- a/drivers/ide/h8300/ide-h8300.c +++ b/drivers/ide/h8300/ide-h8300.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | #include <asm/irq.h> | 9 | #include <asm/irq.h> |
10 | 10 | ||
11 | #define DRV_NAME "ide-h8300" | ||
12 | |||
11 | #define bswap(d) \ | 13 | #define bswap(d) \ |
12 | ({ \ | 14 | ({ \ |
13 | u16 r; \ | 15 | u16 r; \ |
@@ -176,6 +178,10 @@ static inline void hwif_setup(ide_hwif_t *hwif) | |||
176 | hwif->output_data = h8300_output_data; | 178 | hwif->output_data = h8300_output_data; |
177 | } | 179 | } |
178 | 180 | ||
181 | static const struct ide_port_info h8300_port_info = { | ||
182 | .host_flags = IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_NO_DMA, | ||
183 | }; | ||
184 | |||
179 | static int __init h8300_ide_init(void) | 185 | static int __init h8300_ide_init(void) |
180 | { | 186 | { |
181 | hw_regs_t hw; | 187 | hw_regs_t hw; |
@@ -183,6 +189,8 @@ static int __init h8300_ide_init(void) | |||
183 | int index; | 189 | int index; |
184 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 190 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
185 | 191 | ||
192 | printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n"); | ||
193 | |||
186 | if (!request_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8, "ide-h8300")) | 194 | if (!request_region(CONFIG_H8300_IDE_BASE, H8300_IDE_GAP*8, "ide-h8300")) |
187 | goto out_busy; | 195 | goto out_busy; |
188 | if (!request_region(CONFIG_H8300_IDE_ALT, H8300_IDE_GAP, "ide-h8300")) { | 196 | if (!request_region(CONFIG_H8300_IDE_ALT, H8300_IDE_GAP, "ide-h8300")) { |
@@ -192,22 +200,17 @@ static int __init h8300_ide_init(void) | |||
192 | 200 | ||
193 | hw_setup(&hw); | 201 | hw_setup(&hw); |
194 | 202 | ||
195 | hwif = ide_find_port(); | 203 | hwif = ide_find_port_slot(&h8300_port_info); |
196 | if (hwif == NULL) { | 204 | if (hwif == NULL) |
197 | printk(KERN_ERR "ide-h8300: IDE I/F register failed\n"); | ||
198 | return -ENOENT; | 205 | return -ENOENT; |
199 | } | ||
200 | 206 | ||
201 | index = hwif->index; | 207 | index = hwif->index; |
202 | ide_init_port_data(hwif, index); | ||
203 | ide_init_port_hw(hwif, &hw); | 208 | ide_init_port_hw(hwif, &hw); |
204 | hwif_setup(hwif); | 209 | hwif_setup(hwif); |
205 | hwif->host_flags = IDE_HFLAG_NO_IO_32BIT; | ||
206 | printk(KERN_INFO "ide%d: H8/300 generic IDE interface\n", index); | ||
207 | 210 | ||
208 | idx[0] = index; | 211 | idx[0] = index; |
209 | 212 | ||
210 | ide_device_add(idx, NULL); | 213 | ide_device_add(idx, &h8300_port_info); |
211 | 214 | ||
212 | return 0; | 215 | return 0; |
213 | 216 | ||