Skip to contentSkip to conversation

Add support for Designware SATA controller driver

PATCH In review Feng Kan 5 participants 6 messages Apr 29, 2009 – May 1, 2009 libata

lore
Share & tools
lore

Feng Kan

author
#0 lore raw

PATCH 1/2 Add support for Designware SATA controller driver

---
 drivers/ata/Kconfig    |   76 +-
 drivers/ata/Makefile   |    1 +
 drivers/ata/sata_dwc.c | 2047 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2091 insertions(+), 33 deletions(-)
 create mode 100644 drivers/ata/sata_dwc.c
drivers/ata/Kconfig +43 -33
index 0bcf264..5321e47 100644
@@ -72,56 +72,66 @@ config SATA_FSL
 
 	  If unsure, say N.
 
-config ATA_SFF
-	bool "ATA SFF support"
-	default y
+config SATA_DWC
+	tristate "DesignWare Cores SATA support"
+	depends on 460EX
 	help
-	  This option adds support for ATA controllers with SFF
-	  compliant or similar programming interface.
+	  This option enables support for the Synopsys DesignWare Cores SATA
+	  controller.
+	  It can be found on the AMCC 460EX.
 
-	  SFF is the legacy IDE interface that has been around since
-	  the dawn of time.  Almost all PATA controllers have an
-	  SFF interface.  Many SATA controllers have an SFF interface
-	  when configured into a legacy compatibility mode.
+	  If unsure, say N.
 
-	  For users with exclusively modern controllers like AHCI,
-	  Silicon Image 3124, or Marvell 6440, you may choose to
-	  disable this uneeded SFF support.
+config ATA_SFF
+bool "ATA SFF support"
+default y
+help
+  This option adds support for ATA controllers with SFF
+  compliant or similar programming interface.
 
-	  If unsure, say Y.
+  SFF is the legacy IDE interface that has been around since
+  the dawn of time.  Almost all PATA controllers have an
+  SFF interface.  Many SATA controllers have an SFF interface
+  when configured into a legacy compatibility mode.
+
+  For users with exclusively modern controllers like AHCI,
+  Silicon Image 3124, or Marvell 6440, you may choose to
+  disable this uneeded SFF support.
+
+  If unsure, say Y.
 
 if ATA_SFF
 
 config SATA_SVW
-	tristate "ServerWorks Frodo / Apple K2 SATA support"
-	depends on PCI
-	help
-	  This option enables support for Broadcom/Serverworks/Apple K2
-	  SATA support.
+tristate "ServerWorks Frodo / Apple K2 SATA support"
+depends on PCI
+help
+  This option enables support for Broadcom/Serverworks/Apple K2
+  SATA support.
 
-	  If unsure, say N.
+  If unsure, say N.
 
 config ATA_PIIX
-	tristate "Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support"
-	depends on PCI
-	help
-	  This option enables support for ICH5/6/7/8 Serial ATA
-	  and support for PATA on the Intel ESB/ICH/PIIX3/PIIX4 series
-	  host controllers.
+tristate "Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support"
+depends on PCI
+help
+  This option enables support for ICH5/6/7/8 Serial ATA
+  and support for PATA on the Intel ESB/ICH/PIIX3/PIIX4 series
+  host controllers.
 
-	  If unsure, say N.
+  If unsure, say N.
 
 config SATA_MV
-	tristate "Marvell SATA support"
-	help
-	  This option enables support for the Marvell Serial ATA family.
-	  Currently supports 88SX[56]0[48][01] PCI(-X) chips,
-	  as well as the newer [67]042 PCI-X/PCIe and SOC devices.
+tristate "Marvell SATA support"
+help
+  This option enables support for the Marvell Serial ATA family.
+  Currently supports 88SX[56]0[48][01] PCI(-X) chips,
+  as well as the newer [67]042 PCI-X/PCIe and SOC devices.
 
-	  If unsure, say N.
+  If unsure, say N.
 
 config SATA_NV
-	tristate "NVIDIA SATA support"
+tristate "NVIDIA SATA support"
 	depends on PCI
 	help
 	  This option enables support for NVIDIA Serial ATA.
drivers/ata/Makefile +1 -0
index 7f1ecf9..3d41fc7 100644
@@ -18,6 +18,7 @@ obj-$(CONFIG_SATA_MV)		+= sata_mv.o
 obj-$(CONFIG_SATA_INIC162X)	+= sata_inic162x.o
 obj-$(CONFIG_PDC_ADMA)		+= pdc_adma.o
 obj-$(CONFIG_SATA_FSL)		+= sata_fsl.o
+obj-$(CONFIG_SATA_DWC)          += sata_dwc.o
 
 obj-$(CONFIG_PATA_ALI)		+= pata_ali.o
 obj-$(CONFIG_PATA_AMD)		+= pata_amd.o
drivers/ata/sata_dwc.c new file +2047 -0

2,047 lines not on this page · raw message

Signature · 1 line
1.5.5
#1 lore raw

Dear Feng Kan,

Quoted 46 lines · In message <[email protected]> you wrote:
---
 drivers/ata/Kconfig    |   76 +-
 drivers/ata/Makefile   |    1 +
 drivers/ata/sata_dwc.c | 2047 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2091 insertions(+), 33 deletions(-)
 create mode 100644 drivers/ata/sata_dwc.c
drivers/ata/Kconfig +13 -13
index 0bcf264..5321e47 100644
@@ -72,56 +72,66 @@ config SATA_FSL
 
 	  If unsure, say N.
 
-config ATA_SFF
-	bool "ATA SFF support"
-	default y
+config SATA_DWC
+	tristate "DesignWare Cores SATA support"
+	depends on 460EX
 	help
-	  This option adds support for ATA controllers with SFF
-	  compliant or similar programming interface.
+	  This option enables support for the Synopsys DesignWare Cores SATA
+	  controller.
+	  It can be found on the AMCC 460EX.
 
-	  SFF is the legacy IDE interface that has been around since
-	  the dawn of time.  Almost all PATA controllers have an
-	  SFF interface.  Many SATA controllers have an SFF interface
-	  when configured into a legacy compatibility mode.
+	  If unsure, say N.
 
-	  For users with exclusively modern controllers like AHCI,
-	  Silicon Image 3124, or Marvell 6440, you may choose to
-	  disable this uneeded SFF support.
+config ATA_SFF
+bool "ATA SFF support"
+default y
+help
+  This option adds support for ATA controllers with SFF
+  compliant or similar programming interface.
 
-	  If unsure, say Y.

drivers/ata/Kconfig config SATA_FSL · line 101

Quoted 10 lines
drivers/ata/Kconfig +10 -0
+  SFF is the legacy IDE interface that has been around since
+  the dawn of time.  Almost all PATA controllers have an
+  SFF interface.  Many SATA controllers have an SFF interface
+  when configured into a legacy compatibility mode.
+
+  For users with exclusively modern controllers like AHCI,
+  Silicon Image 3124, or Marvell 6440, you may choose to
+  disable this uneeded SFF support.
+
+  If unsure, say Y.

Why are you reformatting exiting, correct help text, into brokenness?

...

Quoted 2 lines
drivers/ata/Kconfig +2 -0
+static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
+{

...

drivers/ata/Kconfig

Quoted 3 lines
drivers/ata/Kconfig +3 -0
+		dev_dbg(ap->dev, "%s non-NCQ cmd interrupt, protocol: %s\n",
+			__func__, prot_2_txt(qc->tf.protocol));
+DRVSTILLBUSY:

^^^^^^^^^^^^^^^^
...

Quoted 1 line

+PROCESS: /* process completed commands */

^^^^^^^^^^^

...

Quoted 1 line

+STILLBUSY:

^^^^^^^^^^^^^
...

Quoted 1 line

+DONE:

^^^^^^^^

etc. Please do not use all-caps identifier names (not even for labels).

...

Quoted 6 lines

+/*******************************************************************************
+ * Function : sata_dwc_port_start
+ * arguments : struct ata_ioports *port
+ * Return value : returns 0 if success, error code otherwise
+ * This function allocates the scatter gather LLI table for AHB DMA
+ ******************************************************************************/

Here and elsewhere: incorrect multiline comment style.

...

drivers/ata/Kconfig

Quoted 3 lines
drivers/ata/Kconfig +3 -0
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mark Miesfeld <[email protected]>");

Should not Mark add his Signed-off-by: line, too?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Conscious is when you are aware of something, and conscience is  when
you wish you weren't.
#2 lore raw

Feng,

Can you just insert my Signed off by line, using Mark Miesfeld <[email protected]>

I always goof up the formatting. If that is okay with you and meets your ethical standards.

--
Mark Miesfeld
[email protected]

Quoted 117 lines · Wolfgang Denk

Dear Feng Kan,

Quoted 46 lines · In message <[email protected]> you wrote:

---
 drivers/ata/Kconfig    |   76 +-
 drivers/ata/Makefile   |    1 +
 drivers/ata/sata_dwc.c | 2047 ++++++++++++++++++++++++++++++++++++++++++++++++

 3 files changed, 2091 insertions(+), 33 deletions(-)

 create mode 100644 drivers/ata/sata_dwc.c

drivers/ata/Kconfig +0 -0
index 0bcf264..5321e47 100644
@@ -72,56 +72,66 @@ config SATA_FSL
 

        If unsure, say N.

drivers/ata/Kconfig +3 -3
-config ATA_SFF
-     bool "ATA SFF support"
-     default y
+config SATA_DWC
+     tristate "DesignWare Cores SATA support"
+     depends on 460EX

      help
-       This option adds support for ATA controllers with SFF
-       compliant or similar programming interface.
+       This option enables support for the Synopsys DesignWare Cores SATA
+       controller.
+       It can be found on the AMCC 460EX.

-       SFF is the legacy IDE interface that has been around since
-       the dawn of time.  Almost all PATA controllers have an
-       SFF interface.  Many SATA controllers have an SFF interface
-       when configured into a legacy compatibility mode.
+       If unsure, say N.

-       For users with exclusively modern controllers like AHCI,
-       Silicon Image 3124, or Marvell 6440, you may choose to
-       disable this uneeded SFF support.

drivers/ata/Kconfig +6 -1
+config ATA_SFF
+bool "ATA SFF support"
+default y
+help
+  This option adds support for ATA controllers with SFF
+  compliant or similar programming interface.
 
-       If unsure, say Y.

drivers/ata/Kconfig config SATA_FSL · line 101

Quoted 10 lines
drivers/ata/Kconfig +10 -0
+  SFF is the legacy IDE interface that has been around since
+  the dawn of time.  Almost all PATA controllers have an
+  SFF interface.  Many SATA controllers have an SFF interface
+  when configured into a legacy compatibility mode.
+
+  For users with exclusively modern controllers like AHCI,
+  Silicon Image 3124, or Marvell 6440, you may choose to
+  disable this uneeded SFF support.
+
+  If unsure, say Y.

Why are you reformatting exiting, correct help text, into brokenness?

...

Quoted 2 lines
drivers/ata/Kconfig +2 -0
+static irqreturn_t sata_dwc_isr(int irq, void *dev_instance)
+{

...

Quoted 3 lines

+             dev_dbg(ap->dev, "%s non-NCQ cmd interrupt, protocol: %s\n",
+                     __func__, prot_2_txt(qc->tf.protocol)); +DRVSTILLBUSY:

^^^^^^^^^^^^^^^^
...

Quoted 1 line

+PROCESS:  /* process completed commands */

^^^^^^^^^^^

...

Quoted 1 line

+STILLBUSY:

^^^^^^^^^^^^^
...

Quoted 1 line

+DONE:

^^^^^^^^

etc.  Please do not use all-caps identifier names (not even for labels).

...

Quoted 6 lines

+/*******************************************************************************
+ * Function : sata_dwc_port_start
+ * arguments : struct ata_ioports *port
+ * Return value : returns 0 if success, error code otherwise
+ * This function allocates the scatter gather LLI table for AHB DMA
+ ******************************************************************************/

Here and elsewhere: incorrect multiline comment style.

...

drivers/ata/Kconfig

Quoted 3 lines
drivers/ata/Kconfig +3 -0
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Mark Miesfeld <[email protected]>");

Should not Mark add his Signed-off-by: line, too?

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Conscious is when you are aware of something, and conscience is  when you wish you weren't.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to Feng Kan
Quoted 7 lines · Feng Kan
---
 drivers/ata/Kconfig    |   76 +-
 drivers/ata/Makefile   |    1 +
 drivers/ata/sata_dwc.c | 2047 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2091 insertions(+), 33 deletions(-)
 create mode 100644 drivers/ata/sata_dwc.c

I don't see a patch 2/2 ?

#4 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 7 lines · Feng Kan
---
 drivers/ata/Kconfig    |   76 +-
 drivers/ata/Makefile   |    1 +
 drivers/ata/sata_dwc.c | 2047 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2091 insertions(+), 33 deletions(-)
 create mode 100644 drivers/ata/sata_dwc.c

I don't see a patch 2/2 ?

Patch 2/2 is just adding the device-tree bits to the platform for this driver to match against, so it's no big deal. However, Feng, we already mentioned that you do a lot of unrelated changes to the Kconfig file that shouldn't be part of this patch, just add the entry for this chip, don't move stuff around in Kconfig, unless I missed a good reason why this is done that way.

Cheers,
Ben.

#5 lore raw
Quoted 6 lines · Benjamin Herrenschmidt

Patch 2/2 is just adding the device-tree bits to the platform for this driver to match against, so it's no big deal. However, Feng, we already mentioned that you do a lot of unrelated changes to the Kconfig file that shouldn't be part of this patch, just add the entry for this chip, don't move stuff around in Kconfig, unless I missed a good reason why this is done that way.

Quite correct -- those drivers/ata/Kconfig changes are bogus.

Jeff