diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-08 11:52:05 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-08 11:52:05 -0500 |
commit | 53846574799884a04a4498f6342400d5c1423c79 (patch) | |
tree | a8e554e019a5982c788f62b92cf8cfeaa8a1c8c8 /drivers/ide/pmac.c | |
parent | 1a659880ee755d96eeabe64bded059abed6d5ef5 (diff) |
ide: build-fix for CONFIG_BLK_DEV_IDEDMA_PMAC=n
IDE pmac host driver build fails with CONFIG_BLK_DEV_IDEDMA_PMAC=n
as reported by Kamalesh:
> drivers/ide/pmac.c: In function 'pmac_ide_set_pio_mode':
> drivers/ide/pmac.c:527: error: implicit declaration of function 'kauai_lookup_timing'
> drivers/ide/pmac.c:527: error: 'shasta_pio_timings' undeclared (first use in this function)
> drivers/ide/pmac.c:527: error: (Each undeclared identifier is reported only once
> drivers/ide/pmac.c:527: error: for each function it appears in.)
> drivers/ide/pmac.c:534: error: 'kauai_pio_timings' undeclared (first use in this function)
> drivers/ide/pmac.c: In function 'pmac_ide_do_resume':
> drivers/ide/pmac.c:914: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
> drivers/ide/pmac.c: At top level:
> drivers/ide/pmac.c:1007: error: 'pmac_ide_init_dma' undeclared here (not in a function)
> drivers/ide/pmac.c: In function 'pmac_ide_setup_device':
> drivers/ide/pmac.c:1107: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
> drivers/ide/pmac.c: In function 'pmac_ide_macio_attach':
> drivers/ide/pmac.c:1209: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
> drivers/ide/pmac.c:1210: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
> make[2]: *** [drivers/ide/pmac.o] Error 1
Fix it by removing the superfluous config option.
Reported-and-tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pmac.c')
-rw-r--r-- | drivers/ide/pmac.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 2e19d6298536..7c481bb56fab 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
@@ -66,7 +66,6 @@ typedef struct pmac_ide_hwif { | |||
66 | struct macio_dev *mdev; | 66 | struct macio_dev *mdev; |
67 | u32 timings[4]; | 67 | u32 timings[4]; |
68 | volatile u32 __iomem * *kauai_fcr; | 68 | volatile u32 __iomem * *kauai_fcr; |
69 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
70 | /* Those fields are duplicating what is in hwif. We currently | 69 | /* Those fields are duplicating what is in hwif. We currently |
71 | * can't use the hwif ones because of some assumptions that are | 70 | * can't use the hwif ones because of some assumptions that are |
72 | * beeing done by the generic code about the kind of dma controller | 71 | * beeing done by the generic code about the kind of dma controller |
@@ -74,8 +73,6 @@ typedef struct pmac_ide_hwif { | |||
74 | */ | 73 | */ |
75 | volatile struct dbdma_regs __iomem * dma_regs; | 74 | volatile struct dbdma_regs __iomem * dma_regs; |
76 | struct dbdma_cmd* dma_table_cpu; | 75 | struct dbdma_cmd* dma_table_cpu; |
77 | #endif | ||
78 | |||
79 | } pmac_ide_hwif_t; | 76 | } pmac_ide_hwif_t; |
80 | 77 | ||
81 | enum { | 78 | enum { |
@@ -222,8 +219,6 @@ static const char* model_name[] = { | |||
222 | #define KAUAI_FCR_UATA_RESET_N 0x00000002 | 219 | #define KAUAI_FCR_UATA_RESET_N 0x00000002 |
223 | #define KAUAI_FCR_UATA_ENABLE 0x00000001 | 220 | #define KAUAI_FCR_UATA_ENABLE 0x00000001 |
224 | 221 | ||
225 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
226 | |||
227 | /* Rounded Multiword DMA timings | 222 | /* Rounded Multiword DMA timings |
228 | * | 223 | * |
229 | * I gave up finding a generic formula for all controller | 224 | * I gave up finding a generic formula for all controller |
@@ -413,8 +408,6 @@ static int pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq); | |||
413 | static void pmac_ide_selectproc(ide_drive_t *drive); | 408 | static void pmac_ide_selectproc(ide_drive_t *drive); |
414 | static void pmac_ide_kauai_selectproc(ide_drive_t *drive); | 409 | static void pmac_ide_kauai_selectproc(ide_drive_t *drive); |
415 | 410 | ||
416 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
417 | |||
418 | #define PMAC_IDE_REG(x) \ | 411 | #define PMAC_IDE_REG(x) \ |
419 | ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x))) | 412 | ((void __iomem *)((drive)->hwif->io_ports.data_addr + (x))) |
420 | 413 | ||
@@ -584,8 +577,6 @@ pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
584 | pmac_ide_do_update_timings(drive); | 577 | pmac_ide_do_update_timings(drive); |
585 | } | 578 | } |
586 | 579 | ||
587 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
588 | |||
589 | /* | 580 | /* |
590 | * Calculate KeyLargo ATA/66 UDMA timings | 581 | * Calculate KeyLargo ATA/66 UDMA timings |
591 | */ | 582 | */ |
@@ -786,7 +777,6 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2, | |||
786 | drive->name, speed & 0xf, *timings); | 777 | drive->name, speed & 0xf, *timings); |
787 | #endif | 778 | #endif |
788 | } | 779 | } |
789 | #endif /* #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
790 | 780 | ||
791 | static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | 781 | static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) |
792 | { | 782 | { |
@@ -804,7 +794,6 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
804 | tl[0] = *timings; | 794 | tl[0] = *timings; |
805 | tl[1] = *timings2; | 795 | tl[1] = *timings2; |
806 | 796 | ||
807 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
808 | if (speed >= XFER_UDMA_0) { | 797 | if (speed >= XFER_UDMA_0) { |
809 | if (pmif->kind == controller_kl_ata4) | 798 | if (pmif->kind == controller_kl_ata4) |
810 | ret = set_timings_udma_ata4(&tl[0], speed); | 799 | ret = set_timings_udma_ata4(&tl[0], speed); |
@@ -817,7 +806,7 @@ static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed) | |||
817 | ret = -1; | 806 | ret = -1; |
818 | } else | 807 | } else |
819 | set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed); | 808 | set_timings_mdma(drive, pmif->kind, &tl[0], &tl[1], speed); |
820 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 809 | |
821 | if (ret) | 810 | if (ret) |
822 | return; | 811 | return; |
823 | 812 | ||
@@ -1008,9 +997,7 @@ static const struct ide_port_info pmac_port_info = { | |||
1008 | .chipset = ide_pmac, | 997 | .chipset = ide_pmac, |
1009 | .tp_ops = &pmac_tp_ops, | 998 | .tp_ops = &pmac_tp_ops, |
1010 | .port_ops = &pmac_ide_port_ops, | 999 | .port_ops = &pmac_ide_port_ops, |
1011 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
1012 | .dma_ops = &pmac_dma_ops, | 1000 | .dma_ops = &pmac_dma_ops, |
1013 | #endif | ||
1014 | .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | | 1001 | .host_flags = IDE_HFLAG_SET_PIO_MODE_KEEP_DMA | |
1015 | IDE_HFLAG_POST_SET_MODE | | 1002 | IDE_HFLAG_POST_SET_MODE | |
1016 | IDE_HFLAG_MMIO | | 1003 | IDE_HFLAG_MMIO | |
@@ -1182,7 +1169,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1182 | pmif->regbase = regbase; | 1169 | pmif->regbase = regbase; |
1183 | pmif->irq = irq; | 1170 | pmif->irq = irq; |
1184 | pmif->kauai_fcr = NULL; | 1171 | pmif->kauai_fcr = NULL; |
1185 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | 1172 | |
1186 | if (macio_resource_count(mdev) >= 2) { | 1173 | if (macio_resource_count(mdev) >= 2) { |
1187 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) | 1174 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) |
1188 | printk(KERN_WARNING "ide-pmac: can't request DMA " | 1175 | printk(KERN_WARNING "ide-pmac: can't request DMA " |
@@ -1192,7 +1179,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1192 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); | 1179 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); |
1193 | } else | 1180 | } else |
1194 | pmif->dma_regs = NULL; | 1181 | pmif->dma_regs = NULL; |
1195 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | 1182 | |
1196 | dev_set_drvdata(&mdev->ofdev.dev, pmif); | 1183 | dev_set_drvdata(&mdev->ofdev.dev, pmif); |
1197 | 1184 | ||
1198 | memset(&hw, 0, sizeof(hw)); | 1185 | memset(&hw, 0, sizeof(hw)); |
@@ -1300,9 +1287,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1300 | 1287 | ||
1301 | base = ioremap(rbase, rlen); | 1288 | base = ioremap(rbase, rlen); |
1302 | pmif->regbase = (unsigned long) base + 0x2000; | 1289 | pmif->regbase = (unsigned long) base + 0x2000; |
1303 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
1304 | pmif->dma_regs = base + 0x1000; | 1290 | pmif->dma_regs = base + 0x1000; |
1305 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
1306 | pmif->kauai_fcr = base; | 1291 | pmif->kauai_fcr = base; |
1307 | pmif->irq = pdev->irq; | 1292 | pmif->irq = pdev->irq; |
1308 | 1293 | ||
@@ -1434,8 +1419,6 @@ out: | |||
1434 | return error; | 1419 | return error; |
1435 | } | 1420 | } |
1436 | 1421 | ||
1437 | #ifdef CONFIG_BLK_DEV_IDEDMA_PMAC | ||
1438 | |||
1439 | /* | 1422 | /* |
1440 | * pmac_ide_build_dmatable builds the DBDMA command list | 1423 | * pmac_ide_build_dmatable builds the DBDMA command list |
1441 | * for a transfer and sets the DBDMA channel to point to it. | 1424 | * for a transfer and sets the DBDMA channel to point to it. |
@@ -1723,13 +1706,6 @@ static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, | |||
1723 | 1706 | ||
1724 | return 0; | 1707 | return 0; |
1725 | } | 1708 | } |
1726 | #else | ||
1727 | static int __devinit pmac_ide_init_dma(ide_hwif_t *hwif, | ||
1728 | const struct ide_port_info *d) | ||
1729 | { | ||
1730 | return -EOPNOTSUPP; | ||
1731 | } | ||
1732 | #endif /* CONFIG_BLK_DEV_IDEDMA_PMAC */ | ||
1733 | 1709 | ||
1734 | module_init(pmac_ide_probe); | 1710 | module_init(pmac_ide_probe); |
1735 | 1711 | ||