mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
armv8: layerscape: sata: refine port register configuration
Sata registers PP2C and PP3C are used to control the configuration of the PHY control OOB timing for the COMINIT/COMWAKE parameters respectively. Calculate those parameters from port clock frequency. Overwrite those registers with calculated values to get better OOB timing. Signed-off-by: Tang Yuantian <andy.tang@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
parent
fa60abc6e6
commit
1b76f3b8ab
2 changed files with 8 additions and 0 deletions
|
@ -341,6 +341,8 @@ int sata_init(void)
|
||||||
#ifdef CONFIG_SYS_SATA2
|
#ifdef CONFIG_SYS_SATA2
|
||||||
ccsr_ahci = (void *)CONFIG_SYS_SATA2;
|
ccsr_ahci = (void *)CONFIG_SYS_SATA2;
|
||||||
out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
|
out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
|
||||||
|
out_le32(&ccsr_ahci->pp2c, AHCI_PORT_PHY2_CFG);
|
||||||
|
out_le32(&ccsr_ahci->pp3c, AHCI_PORT_PHY3_CFG);
|
||||||
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
||||||
out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
|
out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
|
||||||
#endif
|
#endif
|
||||||
|
@ -348,6 +350,8 @@ int sata_init(void)
|
||||||
#ifdef CONFIG_SYS_SATA1
|
#ifdef CONFIG_SYS_SATA1
|
||||||
ccsr_ahci = (void *)CONFIG_SYS_SATA1;
|
ccsr_ahci = (void *)CONFIG_SYS_SATA1;
|
||||||
out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
|
out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
|
||||||
|
out_le32(&ccsr_ahci->pp2c, AHCI_PORT_PHY2_CFG);
|
||||||
|
out_le32(&ccsr_ahci->pp3c, AHCI_PORT_PHY3_CFG);
|
||||||
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
||||||
out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
|
out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
|
||||||
|
|
||||||
|
@ -368,6 +372,8 @@ int sata_init(void)
|
||||||
/* Disable SATA ECC */
|
/* Disable SATA ECC */
|
||||||
out_le32((void *)CONFIG_SYS_DCSR_DCFG_ADDR + 0x520, 0x80000000);
|
out_le32((void *)CONFIG_SYS_DCSR_DCFG_ADDR + 0x520, 0x80000000);
|
||||||
out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
|
out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
|
||||||
|
out_le32(&ccsr_ahci->pp2c, AHCI_PORT_PHY2_CFG);
|
||||||
|
out_le32(&ccsr_ahci->pp3c, AHCI_PORT_PHY3_CFG);
|
||||||
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
||||||
out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
|
out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,8 @@ struct cpu_type {
|
||||||
|
|
||||||
/* ahci port register default value */
|
/* ahci port register default value */
|
||||||
#define AHCI_PORT_PHY_1_CFG 0xa003fffe
|
#define AHCI_PORT_PHY_1_CFG 0xa003fffe
|
||||||
|
#define AHCI_PORT_PHY2_CFG 0x28184d1f
|
||||||
|
#define AHCI_PORT_PHY3_CFG 0x0e081509
|
||||||
#define AHCI_PORT_TRANS_CFG 0x08000029
|
#define AHCI_PORT_TRANS_CFG 0x08000029
|
||||||
#define AHCI_PORT_AXICC_CFG 0x3fffffff
|
#define AHCI_PORT_AXICC_CFG 0x3fffffff
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue