Skip to contentSkip to conversation

fsl_sata: Add the workaround for errata SATA-A001

PATCH Superseded Dave Liu 3 participants 5 messages Apr 9, 2010 – Apr 12, 2010 Block layer

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Dave Liu

author
#0 lore raw

PATCH v2 1/2 fsl_sata: Add the workaround for errata SATA-A001

After power on, the SATA host controller of P1022 Rev1 is configured in legacy mode instead of the expected enterprise mode.

Software needs to clear bit[28] of HControl register to change to enterprise mode after bringing the host offline.

---
* address the second comments from Kumar.

 drivers/block/fsl_sata.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
drivers/block/fsl_sata.c +21 -0
index abcda6f..cdc009f 100644
@@ -21,6 +21,7 @@
 #include <common.h>
 #include <command.h>
 #include <asm/io.h>
+#include <asm/processor.h>
 #include <malloc.h>
 #include <libata.h>
 #include <fis.h>
@@ -191,6 +192,26 @@ int init_sata(int dev)
 	/* Wait the controller offline */
 	ata_wait_register(&reg->hstatus, HSTATUS_ONOFF, 0, 1000);
 
+#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
+	/* For P1022/1013 Rev1.0 silicon, after power on SATA host
+	 * controller is configured in legacy mode instead of
+	 * the expected enterprise mode. software needs to clear
+	 * bit[28] of HControl register to change to enterprise
+	 * mode from legacy mode.
+	 */
+	{
+		u32 svr = get_svr();
+		if (IS_SVR_REV(svr, 1, 0) &&
+		    ((SVR_SOC_VER(svr) == SVR_P1022) ||
+		     (SVR_SOC_VER(svr) == SVR_P1022_E) ||
+		     (SVR_SOC_VER(svr) == SVR_P1013) ||
+		     (SVR_SOC_VER(svr) == SVR_P1013_E))) {
+			out_le32(&reg->hstatus, 0x20000000);
+			out_le32(&reg->hcontrol, 0x00000100);
+		}
+	}
+#endif
+
 	/* Set the command header base address to CHBA register to tell DMA */
 	out_le32(&reg->chba, (u32)cmd_hdr & ~0x3);
 
Signature · 1 line
1.6.4
Applied
#1 lore raw

PATCH v2 1/2 fsl_sata: Add the workaround for errata SATA-A001

Quoted 6 lines · Dave Liu

After power on, the SATA host controller of P1022 Rev1 is configured in legacy mode instead of the expected enterprise mode.

Software needs to clear bit[28] of HControl register to change to enterprise mode after bringing the host offline.

Quoted 6 lines

---
* address the second comments from Kumar.

drivers/block/fsl_sata.c | 21 +++++++++++++++++++++

1 files changed, 21 insertions(+), 0 deletions(-)

applied to 85xx

- k

#2 lore raw

PATCH v2 1/2 fsl_sata: Add the workaround for errata SATA-A001

Dear Kumar Gala,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 6 lines · Dave Liu

After power on, the SATA host controller of P1022 Rev1 is configured in legacy mode instead of the expected enterprise mode.

Software needs to clear bit[28] of HControl register to change to enterprise mode after bringing the host offline.

Quoted 8 lines
Quoted 6 lines

---
* address the second comments from Kumar.

drivers/block/fsl_sata.c | 21 +++++++++++++++++++++

1 files changed, 21 insertions(+), 0 deletions(-)

applied to 85xx

Sorry, but NAK.

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: wd at denx.de
Few people do business well who do nothing else.
                                       -- Philip Earl of Chesterfield
#3 lore raw

PATCH v2 1/2 fsl_sata: Add the workaround for errata SATA-A001

Quoted 19 lines · Wolfgang Denk

Dear Kumar Gala,

Quoted 16 lines · In message <[email protected]> you wrote:
Quoted 12 lines · Dave Liu

After power on, the SATA host controller of P1022 Rev1 is configured in legacy mode instead of the expected enterprise mode.

Software needs to clear bit[28] of HControl register to change to enterprise mode after bringing the host offline.

---
* address the second comments from Kumar.

drivers/block/fsl_sata.c | 21 +++++++++++++++++++++

1 files changed, 21 insertions(+), 0 deletions(-)
Quoted 7 lines
Quoted 1 line

applied to 85xx

Sorry, but NAK.

Best regards,

Wolfgang Denk

dropped, Dave please fix up.

- k

#4 lore raw

PATCH v2 1/2 fsl_sata: Add the workaround for errata SATA-A001

In reply to Dave Liu

Dear Dave Liu,

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

After power on, the SATA host controller of P1022 Rev1 is configured in legacy mode instead of the expected enterprise mode.

Software needs to clear bit[28] of HControl register to change to enterprise mode after bringing the host offline.

...

drivers/block/fsl_sata.c int init_sata(int dev) · line 201

Quoted 7 lines
drivers/block/fsl_sata.c +7 -0
+#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
+	/* For P1022/1013 Rev1.0 silicon, after power on SATA host
+	 * controller is configured in legacy mode instead of
+	 * the expected enterprise mode. software needs to clear
+	 * bit[28] of HControl register to change to enterprise
+	 * mode from legacy mode.
+	 */

Please see comment to previous version.

Best regards,

Wolfgang Denk

Signature · 4 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: wd at denx.de
A mouse is an elephant built by the Japanese.