
-----Original Message----- From: Tang Yuantian-B29983 Sent: Thursday, August 20, 2015 6:52 AM To: Kushwaha Prabhakar-B32579 prabhakar@freescale.com; Sun York- R58495 yorksun@freescale.com Cc: u-boot@lists.denx.de; Wang Huan-B18965 alison.wang@freescale.com Subject: RE: [PATCH v2] arm/ls1021a: Add sata support on qds and twr board
-----Original Message----- From: Kushwaha Prabhakar-B32579 Sent: Wednesday, August 19, 2015 8:54 PM To: Tang Yuantian-B29983; Sun York-R58495 Cc: u-boot@lists.denx.de; Wang Huan-B18965 Subject: RE: [PATCH v2] arm/ls1021a: Add sata support on qds and twr board
Regards, Prabhakar
-----Original Message----- From: Tang Yuantian-B29983 Sent: Wednesday, August 19, 2015 10:17 AM To: Kushwaha Prabhakar-B32579; Sun York-R58495 Cc: u-boot@lists.denx.de; Wang Huan-B18965 Subject: RE: [PATCH v2] arm/ls1021a: Add sata support on qds and twr board
-----Original Message----- From: Kushwaha Prabhakar-B32579 Sent: Wednesday, August 19, 2015 12:15 PM To: Tang Yuantian-B29983; Sun York-R58495 Cc: u-boot@lists.denx.de; Wang Huan-B18965 Subject: RE: [PATCH v2] arm/ls1021a: Add sata support on qds and twr board
-----Original Message----- From: Tang Yuantian-B29983 Sent: Wednesday, August 19, 2015 8:01 AM To: Sun York-R58495 Cc: u-boot@lists.denx.de; Kushwaha Prabhakar-B32579; Wang Huan-
B18965
Subject: RE: [PATCH v2] arm/ls1021a: Add sata support on qds and twr
board
> +#ifdef CONFIG_SYS_FSL_ERRATUM_A008407 > +#define SATA_ECC_REG_ADDR 0x20220520 > + unsigned int __iomem *ecc_reg = (void
*)SATA_ECC_REG_ADDR;
#endif > + > + out_le32(&ccsr_ahci->ppcfg, 0xa003fffe); > + out_le32(&ccsr_ahci->pp2c, 0x28183411); > + out_le32(&ccsr_ahci->pp3c, 0x0e081004); > + out_le32(&ccsr_ahci->pp4c, 0x00480811); > + out_le32(&ccsr_ahci->pp5c, 0x192c96a4); > + out_le32(&ccsr_ahci->ptc, 0x08000025);
It looks to be SoC specific configuration. It should be in soc files not in board files.
On other LS platforms we only need to set one register which is out_le32(&ccsr_ahci->ppcfg, 0xa003fffe). There are did much same settings about sata between LS platforms. I thought about merging all the LS sata initialization together. Please see the patch: http://patchwork.ozlabs.org/patch/497983/ But I didn't see much benefit this way. So I send the sata patch one platform to another.
Problem is not with solution. Problem is with the place. This SoC errata fix but in board file. It should be in arch/arm/cpu/armv7
OK, I will put it under arch/arm/cpu/armv7/, just like what I did in SDK.
Regards, Yuantian
This workaround can also go in FSL-SATA driver.
--prabhakar