libata: rework legacy handling to remove much of the cruft
A message that is not in the archive (sent off-list or not yet received): [email protected]
Review
Quoted 8 lines · Linux Kernel Mailing List
(quoted diff) +7
-0+#define ATA_PRIMARY_CMD 0x1F0 +#define ATA_PRIMARY_CTL 0x3F6 +#define ATA_PRIMARY_IRQ 14 + +#define ATA_SECONDARY_CMD 0x170 +#define ATA_SECONDARY_CTL 0x376 +#define ATA_SECONDARY_IRQ 15
Please, don't do this. We've only just cleaned up the serial driver to get rid of crap like this -- we _don't_ want to do it like this.
We should register the non-discoverable devices as platform devices (or of_devices, or something), and not just hardcode stuff like this in asm/foo.h headers.
Signature · 1 line
dwmw2
Ar Llu, 2006-09-25 am 11:14 +0100, ysgrifennodd David Woodhouse:
Quoted 3 lines
We should register the non-discoverable devices as platform devices (or
of_devices, or something), and not just hardcode stuff like this inasm/foo.hheaders
That would be too late. Those "constants"[1] are part of the actual PCI bus setup. I have some patches to push most of them into drivers/pci/quirks.c. We cannot use platform devices for this in most cases because we already have a device for it - the PCI one.
In the non PCI case we can use platform devices and we do, but the platform device itself has to know what I/O ports are being used so you end up back with the "constants".
The old IDE layer works this way too except that it doesn't use platform devices at all.
Alan
[1] as in "constants aren't, variables won't"