mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
![David Woodhouse](/assets/img/avatar_default.png)
On the Maple board, the AMD8111 IDE is in legacy mode... except that it appears on IRQ 20 instead of IRQ 15. For drivers/ide this was handled by the architecture's "pci_get_legacy_ide_irq()" function, but in libata we just hard-code the numbers 14 and 15. This patch provides asm-powerpc/libata-portmap.h which maps the IRQ as appropriate, having added a pci_dev argument to the ATA_{PRIM,SECOND}ARY_IRQ macros. There's probably a better way to do this -- especially if we observe that the _only_ case in which this seemingly-generic "pci_get_legacy_ide_irq()" function returns anything other than 14 and 15 for primary and secondary respectively is the case of the AMD8111 on the Maple board -- couldn't we handle that with a special case in the pata_amd driver, or perhaps with a PCI quirk for Maple to switch it into native mode during early boot and assign resources properly? Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
12 lines
334 B
C
12 lines
334 B
C
#ifndef __ASM_POWERPC_LIBATA_PORTMAP_H
|
|
#define __ASM_POWERPC_LIBATA_PORTMAP_H
|
|
|
|
#define ATA_PRIMARY_CMD 0x1F0
|
|
#define ATA_PRIMARY_CTL 0x3F6
|
|
#define ATA_PRIMARY_IRQ(dev) pci_get_legacy_ide_irq(dev, 0)
|
|
|
|
#define ATA_SECONDARY_CMD 0x170
|
|
#define ATA_SECONDARY_CTL 0x376
|
|
#define ATA_SECONDARY_IRQ(dev) pci_get_legacy_ide_irq(dev, 1)
|
|
|
|
#endif
|