Create libahci. Move Marvell support to mv-ahci.
PATCH 1/3 Create libahci. Move Marvell support to mv-ahci.
Sagar -- libahci should help you implement AHCI on the amba bus, too (with modification...)
commit 8c773549b08a54f7d418a5e06b19d92f87f59aaf
Author: Jeff Garzik <[email protected]> Date: Sun Apr 12 10:24:42 2009 -0400
libata: Move Marvell AHCI to separate driver 'mv-ahci'. Create 'libahci'.
Move AHCI common code into new kernel module "libahci".
Move Marvell-specific code into new driver "mv-ahci".
drivers/ata/Kconfig | 13 drivers/ata/Makefile | 3 drivers/ata/ahci.c | 2004 -------------------------------------------------- drivers/ata/ahci.h | 283 +++++++ drivers/ata/libahci.c | 1737 +++++++++++++++++++++++++++++++++++++++++++ drivers/ata/mv-ahci.c | 375 +++++++++ 6 files changed, 2429 insertions(+), 1986 deletions(-)
drivers/ata/Kconfig +13 -0
@@ -111,6 +111,15 @@ config ATA_PIIX If unsure, say N. +config SATA_MV_AHCI + tristate "Marvell AHCI support (6121, 6145)" + depends on PCI + help + This option enables support for AHCI-like chips + from Marvell: 6121, 6145. + + If unsure, say N. + config SATA_MV tristate "Marvell SATA support" help
@@ -118,6 +127,10 @@ config SATA_MV Currently supports 88SX[56]0[48][01] PCI(-X) chips, as well as the newer [67]042 PCI-X/PCIe and SOC devices. + This does NOT include support for AHCI-like chips from + Marvell, notably: 6121, 6145. Use the mv-ahci (SATA_MV_AHCI) + driver for that. + If unsure, say N. config SATA_NV
drivers/ata/Makefile +2 -1
@@ -1,7 +1,7 @@ obj-$(CONFIG_ATA) += libata.o -obj-$(CONFIG_SATA_AHCI) += ahci.o +obj-$(CONFIG_SATA_AHCI) += libahci.o ahci.o obj-$(CONFIG_SATA_SVW) += sata_svw.o obj-$(CONFIG_ATA_PIIX) += ata_piix.o obj-$(CONFIG_SATA_PROMISE) += sata_promise.o
@@ -14,6 +14,7 @@ obj-$(CONFIG_SATA_SIS) += sata_sis.o obj-$(CONFIG_SATA_SX4) += sata_sx4.o obj-$(CONFIG_SATA_NV) += sata_nv.o obj-$(CONFIG_SATA_ULI) += sata_uli.o +obj-$(CONFIG_SATA_MV_AHCI) += libahci.o mv-ahci.o obj-$(CONFIG_SATA_MV) += sata_mv.o obj-$(CONFIG_SATA_INIC162X) += sata_inic162x.o obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
drivers/ata/ahci.c +19 -1985
2,120 lines not on this page · raw message
drivers/ata/ahci.h new file +283 -0
283 lines not on this page · raw message
drivers/ata/libahci.c new file +1737 -0
557 lines not on this page · raw message
drivers/ata/mv-ahci.c new file +375 -0
375 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
PATCH 2/3 mv-ahci: Add PATA support
commit d632e5b7039a7cdeb375eb787a00b5e4a7b90a32
Author: Jeff Garzik <[email protected]> Date: Sun Apr 12 12:55:19 2009 -0400
mv-ahci: Add Marvell PATA support
drivers/ata/ahci.h | 9 drivers/ata/libahci.c | 72 ++----- drivers/ata/mv-ahci.c | 498 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 520 insertions(+), 59 deletions(-)
drivers/ata/ahci.h +9 -0
@@ -211,6 +211,9 @@ struct ahci_port_priv { unsigned int ncq_saw_dmas:1; unsigned int ncq_saw_sdb:1;u32 intr_mask;/* interrupts to enable */ + +int mvp_selected; +struct ahci_em_priv em_priv[AHCI_MAX_SLOTS ];/* enclosure management info per PM slot */ };
@@ -273,6 +276,12 @@ extern ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val)extern ssize_t ahci_activity_show (struct ata_device *dev,char *buf);extern void ahci_print_info (struct ata_host *host);extern void ahci_port_intr (struct ata_port *ap); +extern void ahci_fill_cmd_slot (struct ahci_port_priv *pp,unsigned int tag,u32 opts); +extern unsigned int ahci_fill_sg (struct ata_queued_cmd *qc,void *cmd_tbl); +extern int ahci_deinit_port (struct ata_port *ap,const char **emsg); +extern void ahci_port_init (struct pci_dev *pdev,struct ata_port *ap, +int port_no,void __iomem *mmio, +void __iomem *port_mmio);#ifdef CONFIG_PM extern int ahci_port_suspend (struct ata_port *ap,pm_message_t mesg);
drivers/ata/libahci.c +21 -51
161 lines not on this page · raw message
drivers/ata/mv-ahci.c +490 -8
567 lines not on this page · raw message
PATCH 3/3 New 'acard-ahci' driver for Acard ATP8620 support
In reply to Jeff Garzikcommit b40bffe7cfe8bb592018026bbcf2719fc11ca8f2
Author: Jeff Garzik <[email protected]> Date: Sun Apr 12 13:14:19 2009 -0400
libata: Add new 'acard-ahci' driver for ACard ATP8620 chips
drivers/ata/Kconfig | 9 + drivers/ata/Makefile | 1 drivers/ata/acard-ahci.c | 350 +++++++++++++++++++++++++++++++++++++++++++++++ drivers/ata/ahci.c | 94 ------------ drivers/ata/ahci.h | 3 drivers/ata/libahci.c | 98 +++++++++++++ 6 files changed, 462 insertions(+), 93 deletions(-)
drivers/ata/Kconfig +9 -0
@@ -55,6 +55,15 @@ config SATA_AHCI If unsure, say N. +config SATA_ACARD_AHCI + tristate "ACard AHCI variant (ATP 8620)" + depends on PCI + help + This option enables support for AHCI-like chips + from ACard: 8620 + + 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) += libahci.o ahci.o +obj-$(CONFIG_SATA_ACARD_AHCI) += libahci.o acard-ahci.o obj-$(CONFIG_SATA_SVW) += sata_svw.o obj-$(CONFIG_ATA_PIIX) += ata_piix.o obj-$(CONFIG_SATA_PROMISE) += sata_promise.o
drivers/ata/acard-ahci.c new file +350 -0
350 lines not on this page · raw message
drivers/ata/ahci.c +1 -93
107 lines not on this page · raw message
drivers/ata/ahci.h +3 -0
@@ -236,6 +236,8 @@ static inline int ahci_nr_ports(u32 cap)return (cap &0x1f ) +1 ; } +extern struct ata_port_operations ahci_base_ops; +extern void ahci_postreset (struct ata_link *link,unsigned int *class);extern void ahci_qc_prep (struct ata_queued_cmd *qc);extern void ahci_freeze (struct ata_port *ap);
@@ -276,6 +278,7 @@ extern ssize_t ahci_activity_store(struct ata_device *dev, enum sw_activity val)extern ssize_t ahci_activity_show (struct ata_device *dev,char *buf);extern void ahci_print_info (struct ata_host *host);extern void ahci_port_intr (struct ata_port *ap); +extern irqreturn_t ahci_interrupt (int irq,void *dev_instance);extern void ahci_fill_cmd_slot (struct ahci_port_priv *pp,unsigned int tag,u32 opts);extern unsigned int ahci_fill_sg (struct ata_queued_cmd *qc,void *cmd_tbl);extern int ahci_deinit_port (struct ata_port *ap,const char **emsg);
drivers/ata/libahci.c +98 -0
101 lines not on this page · raw message
cover libahci and friends
In reply to Jeff GarzikThis patchset creates libahci, as mentioned in the recent NVMHCI thread:
http://marc.info/?l=linux-kernel&m=123947130114037&w=2
Although these changes help set the groundwork for NVMHCI support, they are also more immediately useful in three cases:
- Marvell PATA support. Marvell 6101, 6121, 6145 (and others?) added a PATA support to an existing AHCI SATA design. The controller supports both PATA and SATA. SATA is compatible with AHCI. PATA uses new DMA data structures and reset methods.
- ACard support. ATP 8620 is a 99% AHCI clone, that primarily differs in its DMA data structures.
- non-PCI support. Sagar Borikar posted some preliminary work, getting AHCI going on a non-PCI bus. My libahci work should hopefully assist Sagar. http://marc.info/?l=linux-ide&m=123807608819226&w=2
Regards,
Jeff
Re: [PATCH 0/3] libahci and friends
Quoted 3 lines · Jeff Garzik
This patchset creates libahci, as mentioned in the recent NVMHCI thread:
http://marc.info/?l=linux-kernel&m=123947130114037&w=2
This is stored on the 'libahci' branch ofgit://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev.git