diff options
author | Srikanth Srinivasan <srikanth.srinivasan@freescale.com> | 2010-01-06 15:04:49 +0800 |
---|---|---|
committer | Scott Sweeny <scott.sweeny@timesys.com> | 2010-09-29 17:32:28 -0400 |
commit | ba2c05a72faf66fd23063cf066d8500539eb4e1c (patch) | |
tree | 1795d2ccd0cdc12884dc3d85d9499f25ebec8678 /board/freescale/p1022ds/p1022ds.c | |
parent | a2e96efa3ba3850e51e969ee5d8f1a104548fc9c (diff) |
fixed for sata errata
On P1022, the data snoop bit (in the sata ip) is at bit 28.
Account for this. Additionally, change the mode to enterprise mode
since on reset, it is in legacy mode.
Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Diffstat (limited to 'board/freescale/p1022ds/p1022ds.c')
-rw-r--r-- | board/freescale/p1022ds/p1022ds.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/p1022ds/p1022ds.c b/board/freescale/p1022ds/p1022ds.c index 1cc04f4ca53..39c441009e8 100644 --- a/board/freescale/p1022ds/p1022ds.c +++ b/board/freescale/p1022ds/p1022ds.c @@ -183,6 +183,8 @@ phys_size_t fixed_sdram(void) int misc_init_r(void) { u8 tmp_val; + fsl_sata_reg_t *sata1_reg = (fsl_sata_reg_t *)CONFIG_SYS_MPC85xx_SATA1_ADDR; + fsl_sata_reg_t *sata2_reg = (fsl_sata_reg_t *)CONFIG_SYS_MPC85xx_SATA2_ADDR; /* Enable the TFP410 Encoder (I2C address 0x38) */ @@ -207,6 +209,16 @@ int misc_init_r(void) /* p1022ds_diu_init(); */ /* #endif */ + /* Changing the SATA controller to operate in enterprise mode + * By default, on Rev 1, it comes up in "legacy" mode. + */ +#ifdef CONFIG_P1022_LEGACY_ERRATUM_WORKAROUND + out_le32(&sata1_reg->hstatus, 0x20000000); + out_le32(&sata1_reg->hcontrol, 0x00000100); + out_le32(&sata2_reg->hstatus, 0x20000000); + out_le32(&sata2_reg->hcontrol, 0x00000100); +#endif + return 0; } |