ahci: Add support for non-PCI devices
Subsystems (2)
v2 cover ahci: Add support for non-PCI devices
Hi all,
Thanks for the feedback on the previous patches!
Here comes v2:
- Patches 1-8 dropped as they are in libata-dev.git;
- Patches 'ahci: Move generic code into libahci' and 'ahci: Export generic AHCI symbols' were merged into one.
- We no longer touch Kconfig when not needed.
- libahci.h renamed to ahci.h.
- Some cosmetic fixes.
Thanks,
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2
PATCH v2 1/2 ahci: Move generic code into libahci
This patch should contain no functional changes, just moves code around.
--- drivers/ata/Makefile | 2 +- drivers/ata/ahci.c | 2271 +------------------------------------------------ drivers/ata/ahci.h | 332 +++++++ drivers/ata/libahci.c | 2079 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 2413 insertions(+), 2271 deletions(-) create mode 100644 drivers/ata/ahci.h create mode 100644 drivers/ata/libahci.c
drivers/ata/Makefile +1 -1
@@ -1,7 +1,7 @@ obj-$(CONFIG_ATA) += libata.o -obj-$(CONFIG_SATA_AHCI) += ahci.o +obj-$(CONFIG_SATA_AHCI) += ahci.o libahci.o obj-$(CONFIG_SATA_SVW) += sata_svw.o obj-$(CONFIG_ATA_PIIX) += ata_piix.o obj-$(CONFIG_SATA_PROMISE) += sata_promise.o
drivers/ata/ahci.c +1 -2270
2,369 lines not on this page · raw message
drivers/ata/ahci.h new file +332 -0
332 lines not on this page · raw message
drivers/ata/libahci.c new file +2079 -0
291 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.0
Part of the diff is not shown here. View the raw message.
PATCH v2 2/2 ahci: Add platform driver
In reply to Anton VorontsovThis can be used for AHCI-compatible interfaces implemented inside System-On-Chip solutions, or AHCI devices connected via localbus.
--- drivers/ata/Kconfig | 8 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_platform.c | 191 +++++++++++++++++++++++++++++++++++++++++ include/linux/ahci_platform.h | 29 ++++++ 4 files changed, 229 insertions(+), 0 deletions(-) create mode 100644 drivers/ata/ahci_platform.c create mode 100644 include/linux/ahci_platform.h
drivers/ata/Kconfig +8 -0
@@ -65,6 +65,14 @@ config SATA_AHCI If unsure, say N. +config SATA_AHCI_PLATFORM + tristate "Platform AHCI SATA support" + help + This option enables support for Platform AHCI Serial ATA + controllers. + + If unsure, say N. + config SATA_SIL24 tristate "Silicon Image 3124/3132 SATA support" depends on PCI
drivers/ata/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-$(CONFIG_ATA) += libata.o obj-$(CONFIG_SATA_AHCI) += ahci.o libahci.o +obj-$(CONFIG_SATA_AHCI_PLATFORM)+= ahci_platform.o libahci.o obj-$(CONFIG_SATA_SVW) += sata_svw.o obj-$(CONFIG_ATA_PIIX) += ata_piix.o obj-$(CONFIG_SATA_PROMISE) += sata_promise.o
drivers/ata/ahci_platform.c new file +191 -0
191 lines not on this page · raw message
include/linux/ahci_platform.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* AHCI SATA platform driver +* +* Copyright 2004-2005 Red Hat, Inc. +* Jeff Garzik <[email protected]> +* Copyright 2010 MontaVista Software, LLC. +* Anton Vorontsov <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2, or (at your option) +* any later version. +*/ + +#ifndef _AHCI_PLATFORM_H +#define _AHCI_PLATFORM_H + +struct device ; +struct ata_port_info ; + +struct ahci_platform_data { +int (*init)(struct device *dev); +void (*exit)(struct device *dev); +const struct ata_port_info *ata_port_info; +unsigned int force_port_map; +unsigned int mask_port_map; +}; + +#endif /* _AHCI_PLATFORM_H */
Signature · 1 line
1.7.0
Re: [PATCH 2/2] ahci: Add platform driver
Quoted 4 lines · Anton Vorontsov
This can be used for AHCI-compatible interfaces implemented inside System-On-Chip solutions, or AHCI devices connected via localbus.
Signed-off-by Anton Vorontsov<[email protected]>
Quoted 8 lines
--- drivers/ata/Kconfig | 8 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_platform.c | 191 +++++++++++++++++++++++++++++++++++++++++ include/linux/ahci_platform.h | 29 ++++++ 4 files changed, 229 insertions(+), 0 deletions(-)create mode 100644
drivers/ata/ahci_platform.ccreate mode 100644include/linux/ahci_platform.h
applied 1-2 to #upstream
Thanks for this work, this will give me the kick-in-the-pants necessary to move forward on mv-ahci and acard-ahci.
Jeff
Re: [PATCH 2/2] ahci: Add platform driver
Quoted 14 lines · Jeff Garzik
Quoted 4 lines · Anton Vorontsov
This can be used for AHCI-compatible interfaces implemented inside System-On-Chip solutions, or AHCI devices connected via localbus.
Signed-off-by Anton Vorontsov<[email protected]>Quoted 8 lines
--- drivers/ata/Kconfig | 8 ++ drivers/ata/Makefile | 1 + drivers/ata/ahci_platform.c | 191 +++++++++++++++++++++++++++++++++++++++++ include/linux/ahci_platform.h | 29 ++++++ 4 files changed, 229 insertions(+), 0 deletions(-) create mode 100644 drivers/ata/ahci_platform.c create mode 100644 include/linux/ahci_platform.h
Quoted 1 line
applied 1-2 to #upstream
Thanks!
Quoted 2 lines
Thanks for this work, this will give me the kick-in-the-pants necessary to move forward on mv-ahci and acard-ahci.
:-)
Signature · 3 lines
Anton Vorontsov email: [email protected] irc://irc.freenode.net/bd2