]> git.sur5r.net Git - u-boot/commitdiff
ARM: zynqmp: Wire up SATA for the board
authorMichal Simek <michal.simek@xilinx.com>
Thu, 23 Jul 2015 11:27:40 +0000 (13:27 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 28 Jul 2015 09:56:27 +0000 (11:56 +0200)
Enable SATA for the ZynqMP targets.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/include/asm/arch-zynqmp/hardware.h
board/xilinx/zynqmp/zynqmp.c
include/configs/xilinx_zynqmp.h
include/configs/xilinx_zynqmp_ep.h

index 5d191e848cca1db0075840f96861ae60ad13e926..7640eabad13e2ad6138aa490520d749bc48f96b5 100644 (file)
@@ -25,6 +25,8 @@
 #define ZYNQ_SDHCI_BASEADDR0   0xFF160000
 #define ZYNQ_SDHCI_BASEADDR1   0xFF170000
 
+#define ZYNQMP_SATA_BASEADDR   0xFD0C0000
+
 #define ZYNQMP_CRL_APB_BASEADDR        0xFF5E0000
 #define ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT       0x1000000
 
index fb43cb0b9aa26d682e7be090c9f638cc5841b13f..88fe3e844f5b19f5a7062b5517746dc91a5329ff 100644 (file)
@@ -7,6 +7,8 @@
 
 #include <common.h>
 #include <netdev.h>
+#include <ahci.h>
+#include <scsi.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
@@ -51,6 +53,14 @@ void reset_cpu(ulong addr)
 {
 }
 
+#ifdef CONFIG_SCSI_AHCI_PLAT
+void scsi_init(void)
+{
+       ahci_init((void __iomem *)ZYNQMP_SATA_BASEADDR);
+       scsi_scan(1);
+}
+#endif
+
 int board_eth_init(bd_t *bis)
 {
        u32 ret = 0;
index 9ed8771ff50744e9f67efaa846012be34c2669ac..68853b64de539a9591f950684f98533c8bcc72ca 100644 (file)
 # define CONFIG_SYS_EEPROM_SIZE                        (64 * 1024)
 #endif
 
+#ifdef CONFIG_AHCI
+#define CONFIG_LIBATA
+#define CONFIG_SCSI_AHCI
+#define CONFIG_SCSI_AHCI_PLAT
+#define CONFIG_SYS_SCSI_MAX_SCSI_ID    1
+#define CONFIG_SYS_SCSI_MAX_LUN                1
+#define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
+                                        CONFIG_SYS_SCSI_MAX_LUN)
+#define CONFIG_CMD_SCSI
+#endif
+
 #define CONFIG_FIT
 #define CONFIG_FIT_VERBOSE       /* enable fit_format_{error,warning}() */
 
index 40a110dab2fda7972e9dc1d5cdf589c2c945dfd2..c872f7ce8aaca3752b0964c80d94e9d9f7ec9b8d 100644 (file)
@@ -20,6 +20,7 @@
 #define CONFIG_ZYNQ_I2C0
 #define CONFIG_SYS_I2C_ZYNQ
 #define CONFIG_ZYNQ_EEPROM
+#define CONFIG_AHCI
 
 #include <configs/xilinx_zynqmp.h>