Skip to contentSkip to conversation

wandboard: enable SATA with imx6q

PATCH New Gilles Chanteperdrix 3 participants 3 messages Jun 9, 2016 – Jun 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wandboard: enable SATA with imx6q

---
 board/wandboard/wandboard.c |  6 ++++++
 include/configs/wandboard.h | 12 ++++++++++++
 2 files changed, 18 insertions(+)
board/wandboard/wandboard.c +6 -0
index 4ce74cd..8340dd1 100644
@@ -345,6 +345,12 @@ int board_early_init_f(void)
 #if defined(CONFIG_VIDEO_IPUV3)
 	setup_display();
 #endif
+#ifdef CONFIG_CMD_SATA
+	/* Only mx6q wandboard has SATA */
+	if (is_cpu_type(MXC_CPU_MX6Q))
+		setup_sata();
+#endif
+
 	return 0;
 }
 
include/configs/wandboard.h +12 -0
index 99f5c0c..92af6543 100644
@@ -28,6 +28,18 @@
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE		UART1_BASE
 
+/* SATA Configs */
+
+#define CONFIG_CMD_SATA
+#ifdef CONFIG_CMD_SATA
+#define CONFIG_DWC_AHSATA
+#define CONFIG_SYS_SATA_MAX_DEVICE	1
+#define CONFIG_DWC_AHSATA_PORT_ID	0
+#define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
+#define CONFIG_LBA48
+#define CONFIG_LIBATA
+#endif
+
 /* Command definition */
 #define CONFIG_CMD_BMODE
 
Signature · 1 line
2.8.2
#1 lore raw

PATCH 1/1 wandboard: enable SATA with imx6q

Hi Gilles,

Quoted 36 lines · Gilles Chanteperdrix
---
 board/wandboard/wandboard.c |  6 ++++++
 include/configs/wandboard.h | 12 ++++++++++++
 2 files changed, 18 insertions(+)
board/wandboard/wandboard.c +6 -0
index 4ce74cd..8340dd1 100644
@@ -345,6 +345,12 @@ int board_early_init_f(void)
 #if defined(CONFIG_VIDEO_IPUV3)
 	setup_display();
 #endif
+#ifdef CONFIG_CMD_SATA
+	/* Only mx6q wandboard has SATA */
+	if (is_cpu_type(MXC_CPU_MX6Q))
+		setup_sata();
+#endif
+
 	return 0;
 }
 
include/configs/wandboard.h +5 -0
index 99f5c0c..92af6543 100644
@@ -28,6 +28,18 @@
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE		UART1_BASE
 
+/* SATA Configs */
+
+#define CONFIG_CMD_SATA
+#ifdef CONFIG_CMD_SATA
+#define CONFIG_DWC_AHSATA

include/configs/wandboard.h line 45

Quoted 10 lines
include/configs/wandboard.h +7 -0
+#define CONFIG_SYS_SATA_MAX_DEVICE	1
+#define CONFIG_DWC_AHSATA_PORT_ID	0
+#define CONFIG_DWC_AHSATA_BASE_ADDR	SATA_ARB_BASE_ADDR
+#define CONFIG_LBA48
+#define CONFIG_LIBATA
+#endif
+
 /* Command definition */
 #define CONFIG_CMD_BMODE
 

Fine with me - I applied to -next branch.

Added Fabio in CC as board maintainer - I van still change before this flows into master branch.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw

PATCH 1/1 wandboard: enable SATA with imx6q

Hi Stefano,

Quoted 4 lines · Stefano Babic

Fine with me - I applied to -next branch.

Added Fabio in CC as board maintainer - I van still change before this flows into master branch.

Looks good: