ata: Generic platform_device libata driver, take 2.
PATCH 1/1 ata: Generic platform_device libata driver, take 2.
This is the second attempt at a generic platform_device libata driver, attempting to take in to account issues raised by Matthias Fuchs and rmk.
Changes in this version include adding a small pata_platform.h header for the private data (which at the moment is limited to a register shift that's needed by ARM), though other things can be added in here if platforms start having other needs.
At the moment this takes care of the IDE needs across some PPC and SH, and with this change, hopefully ARM as well. H8300 should still be trivial to move over to this.
Comments?
--
drivers/ata/Kconfig | 9 + drivers/ata/Makefile | 1 drivers/ata/pata_platform.c | 295 ++++++++++++++++++++++++++++++++++++++++++ include/linux/pata_platform.h | 13 + 4 files changed, 318 insertions(+)
drivers/ata/Kconfig +9 -0
@@ -483,6 +483,15 @@ config PATA_WINBOND If unsure, say N. +config PATA_PLATFORM + tristate "Generic platform device PATA support" + depends on EMBEDDED + help + This option enables support for generic directly connected ATA + devices commonly found on embedded systems. + + If unsure, say N. + endif endmenu
drivers/ata/Makefile +1 -0
@@ -53,6 +53,7 @@ obj-$(CONFIG_PATA_VIA) += pata_via.o obj-$(CONFIG_PATA_WINBOND) += pata_sl82c105.o obj-$(CONFIG_PATA_SIS) += pata_sis.o obj-$(CONFIG_PATA_TRIFLEX) += pata_triflex.o +obj-$(CONFIG_PATA_PLATFORM) += pata_platform.o # Should be last but one libata driver obj-$(CONFIG_ATA_GENERIC) += ata_generic.o # Should be last libata driver
drivers/ata/pata_platform.c new file +295 -0
295 lines not on this page · raw message
include/linux/pata_platform.h new file +13 -0
@@ -0,0 +1,13 @@ +#ifndef __LINUX_PATA_PLATFORM_H +#define __LINUX_PATA_PLATFORM_H + +struct pata_platform_info { +/* +* I/O port shift, for platforms with ports that are +* constantly spaced and need larger than the 1-byte +* spacing used by ata_std_ports(). +*/ +unsigned int ioport_shift; +}; + +#endif /* __LINUX_PATA_PLATFORM_H */
Quoted 7 lines · Paul Mundt
This is the second attempt at a generic
platform_devicelibata driver, attempting to take in to account issues raised by Matthias Fuchs and rmk.Changes in this version include adding a small
pata_platform.hheader for the private data (which at the moment is limited to a register shift that's needed by ARM), though other things can be added in here if platforms start having other needs.
Thanks, this will enable me to use this code on ARM.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 4 lines · Russell King
Quoted 3 lines · Paul Mundt
This is the second attempt at a generic
platform_devicelibata driver, attempting to take in to account issues raised by Matthias Fuchs and rmk.
Quoted 9 lines
Quoted 4 lines
Changes in this version include adding a small
pata_platform.hheader for the private data (which at the moment is limited to a register shift that's needed by ARM), though other things can be added in here if platforms start having other needs.Thanks, this will enable me to use this code on ARM.
Acked-by Russell King <[email protected]>
Andrew, can you add this to -mm? No one has raised any other objections to this particular patch, and without it, IDE on most SH boards is a no-go.