|
@@ -323,11 +323,14 @@ int sata_init(void)
|
|
{
|
|
{
|
|
struct ccsr_ahci __iomem *ccsr_ahci;
|
|
struct ccsr_ahci __iomem *ccsr_ahci;
|
|
|
|
|
|
|
|
+#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->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
|
|
|
|
|
|
|
|
+#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->ptc, AHCI_PORT_TRANS_CFG);
|
|
out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
|
|
@@ -335,6 +338,7 @@ int sata_init(void)
|
|
|
|
|
|
ahci_init((void __iomem *)CONFIG_SYS_SATA1);
|
|
ahci_init((void __iomem *)CONFIG_SYS_SATA1);
|
|
scsi_scan(false);
|
|
scsi_scan(false);
|
|
|
|
+#endif
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|