diff options
Diffstat (limited to 'drivers/ide/arm/rapide.c')
| -rw-r--r-- | drivers/ide/arm/rapide.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index 1747b2358775..43057e0303c8 100644 --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c | |||
| @@ -11,6 +11,10 @@ | |||
| 11 | 11 | ||
| 12 | #include <asm/ecard.h> | 12 | #include <asm/ecard.h> |
| 13 | 13 | ||
| 14 | static struct const ide_port_info rapide_port_info = { | ||
| 15 | .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, | ||
| 16 | }; | ||
| 17 | |||
| 14 | static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base, | 18 | static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base, |
| 15 | void __iomem *ctrl, unsigned int sz, int irq) | 19 | void __iomem *ctrl, unsigned int sz, int irq) |
| 16 | { | 20 | { |
| @@ -44,25 +48,26 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
| 44 | goto release; | 48 | goto release; |
| 45 | } | 49 | } |
| 46 | 50 | ||
| 47 | hwif = ide_find_port(); | 51 | memset(&hw, 0, sizeof(hw)); |
| 48 | if (hwif) { | 52 | rapide_setup_ports(&hw, base, base + 0x818, 1 << 6, ec->irq); |
| 49 | memset(&hw, 0, sizeof(hw)); | 53 | hw.chipset = ide_generic; |
| 50 | rapide_setup_ports(&hw, base, base + 0x818, 1 << 6, ec->irq); | 54 | hw.dev = &ec->dev; |
| 51 | hw.chipset = ide_generic; | ||
| 52 | hw.dev = &ec->dev; | ||
| 53 | 55 | ||
| 54 | ide_init_port_hw(hwif, &hw); | 56 | hwif = ide_find_port(); |
| 57 | if (hwif == NULL) { | ||
| 58 | ret = -ENOENT; | ||
| 59 | goto release; | ||
| 60 | } | ||
| 55 | 61 | ||
| 56 | hwif->host_flags = IDE_HFLAG_MMIO; | 62 | ide_init_port_hw(hwif, &hw); |
| 57 | default_hwif_mmiops(hwif); | 63 | default_hwif_mmiops(hwif); |
| 58 | 64 | ||
| 59 | idx[0] = hwif->index; | 65 | idx[0] = hwif->index; |
| 60 | 66 | ||
| 61 | ide_device_add(idx, NULL); | 67 | ide_device_add(idx, &rapide_port_info); |
| 62 | 68 | ||
| 63 | ecard_set_drvdata(ec, hwif); | 69 | ecard_set_drvdata(ec, hwif); |
| 64 | goto out; | 70 | goto out; |
| 65 | } | ||
| 66 | 71 | ||
| 67 | release: | 72 | release: |
| 68 | ecard_release_resources(ec); | 73 | ecard_release_resources(ec); |
