ARM: mvebu: define board_ahci_enable() for A38x
authorBaruch Siach <baruch@tkos.co.il>
Sun, 24 Mar 2019 11:27:43 +0000 (13:27 +0200)
committerStefan Roese <sr@denx.de>
Fri, 12 Apr 2019 05:04:18 +0000 (07:04 +0200)
This allows the ahci_mvebu driver to do A38x platform specific
configuration at initialization.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
arch/arm/mach-mvebu/cpu.c

index 919d05c88c7724113c512e53ae5f97a427dba1c0..5d3f553b5dd34e1135bd0a22130a3f6a5d27eae2 100644 (file)
@@ -501,7 +501,6 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#ifdef CONFIG_SCSI_AHCI_PLAT
 #define AHCI_VENDOR_SPECIFIC_0_ADDR    0xa0
 #define AHCI_VENDOR_SPECIFIC_0_DATA    0xa4
 
@@ -545,11 +544,19 @@ static void ahci_mvebu_regret_option(void __iomem *base)
        writel(0x80, base + AHCI_VENDOR_SPECIFIC_0_DATA);
 }
 
-void scsi_init(void)
+int board_ahci_enable(void)
 {
-       printf("MVEBU SATA INIT\n");
        ahci_mvebu_mbus_config((void __iomem *)MVEBU_SATA0_BASE);
        ahci_mvebu_regret_option((void __iomem *)MVEBU_SATA0_BASE);
+
+       return 0;
+}
+
+#ifdef CONFIG_SCSI_AHCI_PLAT
+void scsi_init(void)
+{
+       printf("MVEBU SATA INIT\n");
+       board_ahci_enable();
        ahci_init((void __iomem *)MVEBU_SATA0_BASE);
 }
 #endif