All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support
@ 2016-12-01 18:37 Breno Lima
  2016-12-01 18:37 ` [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig Breno Lima
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Breno Lima @ 2016-12-01 18:37 UTC (permalink / raw)
  To: u-boot

It's not necessary to support USDHC3 in U-Boot as it's being used for
the WLAN.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
---
 board/udoo/neo/neo.c       | 94 +++-------------------------------------------
 include/configs/udoo_neo.h |  1 -
 2 files changed, 6 insertions(+), 89 deletions(-)

diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 7f17469..efe8605 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -81,16 +81,6 @@ static iomux_v3_cfg_t const board_recognition_pads[] = {
 	MX6_PAD_NAND_ALE__GPIO4_IO_0 | BOARD_DETECT_PAD_CFG,
 };
 
-static iomux_v3_cfg_t const usdhc3_pads[] = {
-    /* Configured for WLAN */
-	MX6_PAD_SD3_CLK__USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD3_CMD__USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD3_DATA0__USDHC3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD3_DATA1__USDHC3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD3_DATA2__USDHC3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-	MX6_PAD_SD3_DATA3__USDHC3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const wdog_b_pad = {
 	MX6_PAD_GPIO1_IO13__GPIO1_IO_13 | MUX_PAD_CTRL(WDOG_PAD_CTRL),
 };
@@ -171,91 +161,19 @@ static struct fsl_esdhc_cfg usdhc_cfg[2] = {
 
 int board_mmc_getcd(struct mmc *mmc)
 {
-	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
-	int ret = 0;
-
-	switch (cfg->esdhc_base) {
-	case USDHC2_BASE_ADDR:
-		ret = !gpio_get_value(USDHC2_CD_GPIO);
-		break;
-	}
-
-	return ret;
+	return !gpio_get_value(USDHC2_CD_GPIO);
 }
 
 int board_mmc_init(bd_t *bis)
 {
-#ifndef CONFIG_SPL_BUILD
-	int i, ret;
-
-	/*
-	 * According to the board_mmc_init() the following map is done:
-	 * (U-boot device node)    (Physical Port)
-	 * mmc0                    USDHC2
-	 */
-	for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
-		switch (i) {
-		case 0:
-			imx_iomux_v3_setup_multiple_pads(
-				usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
-			usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
-			gpio_direction_input(USDHC2_CD_GPIO);
-			gpio_direction_output(USDHC2_PWR_GPIO, 1);
-			break;
-		case 1:
-			imx_iomux_v3_setup_multiple_pads(
-				usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
-			usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-			break;
-		default:
-			printf("Warning: you configured more USDHC controllers\
-				(%d) than supported by the board\n", i + 1);
-			return -EINVAL;
-			}
-
-			ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
-			if (ret) {
-				printf("Warning:\
-					failed to initialize mmc dev %d\n", i);
-				return ret;
-			}
-	}
-
-	return 0;
-#else
-	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
-	u32 val;
-	u32 port;
-
-	val = readl(&src_regs->sbmr1);
-
-	if ((val & 0xc0) != 0x40) {
-		printf("Not boot from USDHC!\n");
-		return -EINVAL;
-	}
-
-	port = (val >> 11) & 0x3;
-	printf("port %d\n", port);
-	switch (port) {
-	case 1:
-		imx_iomux_v3_setup_multiple_pads(
-			usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
-		usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
-		usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
-		gpio_direction_input(USDHC2_CD_GPIO);
-		gpio_direction_output(USDHC2_PWR_GPIO, 1);
-		break;
-	case 2:
-		imx_iomux_v3_setup_multiple_pads(
-			usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
-		usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
-		usdhc_cfg[1].esdhc_base = USDHC3_BASE_ADDR;
-		break;
-	}
+	imx_iomux_v3_setup_multiple_pads(usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
+	usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
+	usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
+	gpio_direction_input(USDHC2_CD_GPIO);
+	gpio_direction_output(USDHC2_PWR_GPIO, 1);
 
 	gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
 	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
-#endif
 }
 
 char *board_string(void)
diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index 81e0481..cf75186 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -27,7 +27,6 @@
 
 /* Command definition */
 #define CONFIG_MXC_UART_BASE		UART1_BASE
-#define CONFIG_SYS_FSL_USDHC_NUM	2
 #define CONFIG_SYS_MMC_ENV_DEV		0  /*USDHC2*/
 
 /* Linux only */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig
  2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
@ 2016-12-01 18:37 ` Breno Lima
  2016-12-05 16:37   ` Fabio Estevam
  2016-12-16  9:12   ` Stefano Babic
  2016-12-01 18:37 ` [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string() Breno Lima
                   ` (5 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Breno Lima @ 2016-12-01 18:37 UTC (permalink / raw)
  To: u-boot

It's not necessary to define the processor in the defconfig file.

The preferred method to select the SoC is via Kconfig file.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
---
 arch/arm/cpu/armv7/mx6/Kconfig | 1 +
 configs/udoo_neo_defconfig     | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index a81d944..091b522 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -203,6 +203,7 @@ config TARGET_UDOO
 config TARGET_UDOO_NEO
 	bool "UDOO Neo"
 	select SUPPORT_SPL
+	select MX6SX
 
 config TARGET_WANDBOARD
 	bool "wandboard"
diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
index 3304afb..f88820c 100644
--- a/configs/udoo_neo_defconfig
+++ b/configs/udoo_neo_defconfig
@@ -11,7 +11,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_SPL=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6SX"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string()
  2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
  2016-12-01 18:37 ` [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig Breno Lima
@ 2016-12-01 18:37 ` Breno Lima
  2016-12-05 16:37   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  2016-12-01 18:37 ` [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option Breno Lima
                   ` (4 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Breno Lima @ 2016-12-01 18:37 UTC (permalink / raw)
  To: u-boot

Change board_string() function to static because it's being used locally.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
---
 board/udoo/neo/neo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index efe8605..cfeed6f 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -176,7 +176,7 @@ int board_mmc_init(bd_t *bis)
 	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
 }
 
-char *board_string(void)
+static char *board_string(void)
 {
 	switch (get_board_value()) {
 	case UDOO_NEO_TYPE_BASIC:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option
  2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
  2016-12-01 18:37 ` [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig Breno Lima
  2016-12-01 18:37 ` [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string() Breno Lima
@ 2016-12-01 18:37 ` Breno Lima
  2016-12-05 16:38   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  2016-12-01 18:37 ` [U-Boot] [PATCH 5/6] udoo_neo: Remove console option Breno Lima
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Breno Lima @ 2016-12-01 18:37 UTC (permalink / raw)
  To: u-boot

It's not necessary to define the mmcautodetect as it is not used anywhere.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
---
 include/configs/udoo_neo.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index cf75186..164980f 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -40,7 +40,6 @@
 	"ip_dyn=yes\0" \
 	"mmcdev=0\0" \
 	"mmcrootfstype=ext4\0" \
-	"mmcautodetect=no\0" \
 	"findfdt="\
 		"if test $board_name = BASIC; then " \
 			"setenv fdt_file imx6sx-udoo-neo-basic.dtb; fi; " \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] udoo_neo: Remove console option
  2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
                   ` (2 preceding siblings ...)
  2016-12-01 18:37 ` [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option Breno Lima
@ 2016-12-01 18:37 ` Breno Lima
  2016-12-05 16:38   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  2016-12-01 18:37 ` [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support Breno Lima
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 18+ messages in thread
From: Breno Lima @ 2016-12-01 18:37 UTC (permalink / raw)
  To: u-boot

It's not necessary to define the console option as we use the distro config.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
---
 include/configs/udoo_neo.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index 164980f..1b7a03f 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -32,7 +32,6 @@
 /* Linux only */
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"console=ttymxc0,115200\0" \
 	"fdt_high=0xffffffff\0" \
 	"initrd_high=0xffffffff\0" \
 	"fdt_file=undefined\0" \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support
  2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
                   ` (3 preceding siblings ...)
  2016-12-01 18:37 ` [U-Boot] [PATCH 5/6] udoo_neo: Remove console option Breno Lima
@ 2016-12-01 18:37 ` Breno Lima
  2016-12-05 16:38   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  2016-12-05 16:37 ` [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Fabio Estevam
  2016-12-16  9:12 ` Stefano Babic
  6 siblings, 2 replies; 18+ messages in thread
From: Breno Lima @ 2016-12-01 18:37 UTC (permalink / raw)
  To: u-boot

Add thermal support on the Kconfig file.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
---
 arch/arm/cpu/armv7/mx6/Kconfig | 2 ++
 include/configs/udoo_neo.h     | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
index 091b522..aa4a476 100644
--- a/arch/arm/cpu/armv7/mx6/Kconfig
+++ b/arch/arm/cpu/armv7/mx6/Kconfig
@@ -204,6 +204,8 @@ config TARGET_UDOO_NEO
 	bool "UDOO Neo"
 	select SUPPORT_SPL
 	select MX6SX
+	select DM
+	select DM_THERMAL
 
 config TARGET_WANDBOARD
 	bool "wandboard"
diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
index 1b7a03f..0357631 100644
--- a/include/configs/udoo_neo.h
+++ b/include/configs/udoo_neo.h
@@ -88,4 +88,6 @@
 #define CONFIG_ENV_SIZE			SZ_8K
 #define CONFIG_ENV_IS_IN_MMC
 
+#define CONFIG_IMX_THERMAL
+
 #endif				/* __CONFIG_H */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support
  2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
                   ` (4 preceding siblings ...)
  2016-12-01 18:37 ` [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support Breno Lima
@ 2016-12-05 16:37 ` Fabio Estevam
  2016-12-16  9:12 ` Stefano Babic
  6 siblings, 0 replies; 18+ messages in thread
From: Fabio Estevam @ 2016-12-05 16:37 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 1, 2016 at 4:37 PM, Breno Lima <breno.lima@nxp.com> wrote:
> It's not necessary to support USDHC3 in U-Boot as it's being used for
> the WLAN.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig
  2016-12-01 18:37 ` [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig Breno Lima
@ 2016-12-05 16:37   ` Fabio Estevam
  2016-12-16  9:12   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Fabio Estevam @ 2016-12-05 16:37 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 1, 2016 at 4:37 PM, Breno Lima <breno.lima@nxp.com> wrote:
> It's not necessary to define the processor in the defconfig file.
>
> The preferred method to select the SoC is via Kconfig file.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string()
  2016-12-01 18:37 ` [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string() Breno Lima
@ 2016-12-05 16:37   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Fabio Estevam @ 2016-12-05 16:37 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 1, 2016 at 4:37 PM, Breno Lima <breno.lima@nxp.com> wrote:
> Change board_string() function to static because it's being used locally.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option
  2016-12-01 18:37 ` [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option Breno Lima
@ 2016-12-05 16:38   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Fabio Estevam @ 2016-12-05 16:38 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 1, 2016 at 4:37 PM, Breno Lima <breno.lima@nxp.com> wrote:
> It's not necessary to define the mmcautodetect as it is not used anywhere.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] udoo_neo: Remove console option
  2016-12-01 18:37 ` [U-Boot] [PATCH 5/6] udoo_neo: Remove console option Breno Lima
@ 2016-12-05 16:38   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Fabio Estevam @ 2016-12-05 16:38 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 1, 2016 at 4:37 PM, Breno Lima <breno.lima@nxp.com> wrote:
> It's not necessary to define the console option as we use the distro config.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support
  2016-12-01 18:37 ` [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support Breno Lima
@ 2016-12-05 16:38   ` Fabio Estevam
  2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Fabio Estevam @ 2016-12-05 16:38 UTC (permalink / raw)
  To: u-boot

On Thu, Dec 1, 2016 at 4:37 PM, Breno Lima <breno.lima@nxp.com> wrote:
> Add thermal support on the Kconfig file.
>
> Signed-off-by: Breno Lima <breno.lima@nxp.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support
  2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
                   ` (5 preceding siblings ...)
  2016-12-05 16:37 ` [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Fabio Estevam
@ 2016-12-16  9:12 ` Stefano Babic
  6 siblings, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2016-12-16  9:12 UTC (permalink / raw)
  To: u-boot

On 01/12/2016 19:37, Breno Lima wrote:
> It's not necessary to support USDHC3 in U-Boot as it's being used for
> the WLAN.
> 
> Signed-off-by: Breno Lima <breno.lima@nxp.com>
> ---
>  board/udoo/neo/neo.c       | 94 +++-------------------------------------------
>  include/configs/udoo_neo.h |  1 -
>  2 files changed, 6 insertions(+), 89 deletions(-)
> 
> diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
> index 7f17469..efe8605 100644
> --- a/board/udoo/neo/neo.c
> +++ b/board/udoo/neo/neo.c
> @@ -81,16 +81,6 @@ static iomux_v3_cfg_t const board_recognition_pads[] = {
>  	MX6_PAD_NAND_ALE__GPIO4_IO_0 | BOARD_DETECT_PAD_CFG,
>  };
>  
> -static iomux_v3_cfg_t const usdhc3_pads[] = {
> -    /* Configured for WLAN */
> -	MX6_PAD_SD3_CLK__USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX6_PAD_SD3_CMD__USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX6_PAD_SD3_DATA0__USDHC3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX6_PAD_SD3_DATA1__USDHC3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX6_PAD_SD3_DATA2__USDHC3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -	MX6_PAD_SD3_DATA3__USDHC3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> -};
> -
>  static iomux_v3_cfg_t const wdog_b_pad = {
>  	MX6_PAD_GPIO1_IO13__GPIO1_IO_13 | MUX_PAD_CTRL(WDOG_PAD_CTRL),
>  };
> @@ -171,91 +161,19 @@ static struct fsl_esdhc_cfg usdhc_cfg[2] = {
>  
>  int board_mmc_getcd(struct mmc *mmc)
>  {
> -	struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc->priv;
> -	int ret = 0;
> -
> -	switch (cfg->esdhc_base) {
> -	case USDHC2_BASE_ADDR:
> -		ret = !gpio_get_value(USDHC2_CD_GPIO);
> -		break;
> -	}
> -
> -	return ret;
> +	return !gpio_get_value(USDHC2_CD_GPIO);
>  }
>  
>  int board_mmc_init(bd_t *bis)
>  {
> -#ifndef CONFIG_SPL_BUILD
> -	int i, ret;
> -
> -	/*
> -	 * According to the board_mmc_init() the following map is done:
> -	 * (U-boot device node)    (Physical Port)
> -	 * mmc0                    USDHC2
> -	 */
> -	for (i = 0; i < CONFIG_SYS_FSL_USDHC_NUM; i++) {
> -		switch (i) {
> -		case 0:
> -			imx_iomux_v3_setup_multiple_pads(
> -				usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
> -			usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
> -			gpio_direction_input(USDHC2_CD_GPIO);
> -			gpio_direction_output(USDHC2_PWR_GPIO, 1);
> -			break;
> -		case 1:
> -			imx_iomux_v3_setup_multiple_pads(
> -				usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
> -			usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
> -			break;
> -		default:
> -			printf("Warning: you configured more USDHC controllers\
> -				(%d) than supported by the board\n", i + 1);
> -			return -EINVAL;
> -			}
> -
> -			ret = fsl_esdhc_initialize(bis, &usdhc_cfg[i]);
> -			if (ret) {
> -				printf("Warning:\
> -					failed to initialize mmc dev %d\n", i);
> -				return ret;
> -			}
> -	}
> -
> -	return 0;
> -#else
> -	struct src *src_regs = (struct src *)SRC_BASE_ADDR;
> -	u32 val;
> -	u32 port;
> -
> -	val = readl(&src_regs->sbmr1);
> -
> -	if ((val & 0xc0) != 0x40) {
> -		printf("Not boot from USDHC!\n");
> -		return -EINVAL;
> -	}
> -
> -	port = (val >> 11) & 0x3;
> -	printf("port %d\n", port);
> -	switch (port) {
> -	case 1:
> -		imx_iomux_v3_setup_multiple_pads(
> -			usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
> -		usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
> -		usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
> -		gpio_direction_input(USDHC2_CD_GPIO);
> -		gpio_direction_output(USDHC2_PWR_GPIO, 1);
> -		break;
> -	case 2:
> -		imx_iomux_v3_setup_multiple_pads(
> -			usdhc3_pads, ARRAY_SIZE(usdhc3_pads));
> -		usdhc_cfg[1].sdhc_clk = mxc_get_clock(MXC_ESDHC3_CLK);
> -		usdhc_cfg[1].esdhc_base = USDHC3_BASE_ADDR;
> -		break;
> -	}
> +	imx_iomux_v3_setup_multiple_pads(usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
> +	usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
> +	usdhc_cfg[0].esdhc_base = USDHC2_BASE_ADDR;
> +	gpio_direction_input(USDHC2_CD_GPIO);
> +	gpio_direction_output(USDHC2_PWR_GPIO, 1);
>  
>  	gd->arch.sdhc_clk = usdhc_cfg[0].sdhc_clk;
>  	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
> -#endif
>  }
>  
>  char *board_string(void)
> diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
> index 81e0481..cf75186 100644
> --- a/include/configs/udoo_neo.h
> +++ b/include/configs/udoo_neo.h
> @@ -27,7 +27,6 @@
>  
>  /* Command definition */
>  #define CONFIG_MXC_UART_BASE		UART1_BASE
> -#define CONFIG_SYS_FSL_USDHC_NUM	2
>  #define CONFIG_SYS_MMC_ENV_DEV		0  /*USDHC2*/
>  
>  /* Linux only */
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig
  2016-12-01 18:37 ` [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig Breno Lima
  2016-12-05 16:37   ` Fabio Estevam
@ 2016-12-16  9:12   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2016-12-16  9:12 UTC (permalink / raw)
  To: u-boot

On 01/12/2016 19:37, Breno Lima wrote:
> It's not necessary to define the processor in the defconfig file.
> 
> The preferred method to select the SoC is via Kconfig file.
> 
> Signed-off-by: Breno Lima <breno.lima@nxp.com>
> ---
>  arch/arm/cpu/armv7/mx6/Kconfig | 1 +
>  configs/udoo_neo_defconfig     | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
> index a81d944..091b522 100644
> --- a/arch/arm/cpu/armv7/mx6/Kconfig
> +++ b/arch/arm/cpu/armv7/mx6/Kconfig
> @@ -203,6 +203,7 @@ config TARGET_UDOO
>  config TARGET_UDOO_NEO
>  	bool "UDOO Neo"
>  	select SUPPORT_SPL
> +	select MX6SX
>  
>  config TARGET_WANDBOARD
>  	bool "wandboard"
> diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig
> index 3304afb..f88820c 100644
> --- a/configs/udoo_neo_defconfig
> +++ b/configs/udoo_neo_defconfig
> @@ -11,7 +11,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
>  CONFIG_SPL_ENV_SUPPORT=y
>  CONFIG_SPL_WATCHDOG_SUPPORT=y
>  CONFIG_SPL=y
> -CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6SX"
> +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg"
>  CONFIG_HUSH_PARSER=y
>  CONFIG_CMD_BOOTZ=y
>  # CONFIG_CMD_IMLS is not set
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string()
  2016-12-01 18:37 ` [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string() Breno Lima
  2016-12-05 16:37   ` Fabio Estevam
@ 2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2016-12-16  9:13 UTC (permalink / raw)
  To: u-boot

On 01/12/2016 19:37, Breno Lima wrote:
> Change board_string() function to static because it's being used locally.
> 
> Signed-off-by: Breno Lima <breno.lima@nxp.com>
> ---
>  board/udoo/neo/neo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
> index efe8605..cfeed6f 100644
> --- a/board/udoo/neo/neo.c
> +++ b/board/udoo/neo/neo.c
> @@ -176,7 +176,7 @@ int board_mmc_init(bd_t *bis)
>  	return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
>  }
>  
> -char *board_string(void)
> +static char *board_string(void)
>  {
>  	switch (get_board_value()) {
>  	case UDOO_NEO_TYPE_BASIC:
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option
  2016-12-01 18:37 ` [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option Breno Lima
  2016-12-05 16:38   ` Fabio Estevam
@ 2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2016-12-16  9:13 UTC (permalink / raw)
  To: u-boot

On 01/12/2016 19:37, Breno Lima wrote:
> It's not necessary to define the mmcautodetect as it is not used anywhere.
> 
> Signed-off-by: Breno Lima <breno.lima@nxp.com>
> ---
>  include/configs/udoo_neo.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
> index cf75186..164980f 100644
> --- a/include/configs/udoo_neo.h
> +++ b/include/configs/udoo_neo.h
> @@ -40,7 +40,6 @@
>  	"ip_dyn=yes\0" \
>  	"mmcdev=0\0" \
>  	"mmcrootfstype=ext4\0" \
> -	"mmcautodetect=no\0" \
>  	"findfdt="\
>  		"if test $board_name = BASIC; then " \
>  			"setenv fdt_file imx6sx-udoo-neo-basic.dtb; fi; " \
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 5/6] udoo_neo: Remove console option
  2016-12-01 18:37 ` [U-Boot] [PATCH 5/6] udoo_neo: Remove console option Breno Lima
  2016-12-05 16:38   ` Fabio Estevam
@ 2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2016-12-16  9:13 UTC (permalink / raw)
  To: u-boot

On 01/12/2016 19:37, Breno Lima wrote:
> It's not necessary to define the console option as we use the distro config.
> 
> Signed-off-by: Breno Lima <breno.lima@nxp.com>
> ---
>  include/configs/udoo_neo.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
> index 164980f..1b7a03f 100644
> --- a/include/configs/udoo_neo.h
> +++ b/include/configs/udoo_neo.h
> @@ -32,7 +32,6 @@
>  /* Linux only */
>  #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
>  #define CONFIG_EXTRA_ENV_SETTINGS \
> -	"console=ttymxc0,115200\0" \
>  	"fdt_high=0xffffffff\0" \
>  	"initrd_high=0xffffffff\0" \
>  	"fdt_file=undefined\0" \
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support
  2016-12-01 18:37 ` [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support Breno Lima
  2016-12-05 16:38   ` Fabio Estevam
@ 2016-12-16  9:13   ` Stefano Babic
  1 sibling, 0 replies; 18+ messages in thread
From: Stefano Babic @ 2016-12-16  9:13 UTC (permalink / raw)
  To: u-boot

On 01/12/2016 19:37, Breno Lima wrote:
> Add thermal support on the Kconfig file.
> 
> Signed-off-by: Breno Lima <breno.lima@nxp.com>
> ---
>  arch/arm/cpu/armv7/mx6/Kconfig | 2 ++
>  include/configs/udoo_neo.h     | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig
> index 091b522..aa4a476 100644
> --- a/arch/arm/cpu/armv7/mx6/Kconfig
> +++ b/arch/arm/cpu/armv7/mx6/Kconfig
> @@ -204,6 +204,8 @@ config TARGET_UDOO_NEO
>  	bool "UDOO Neo"
>  	select SUPPORT_SPL
>  	select MX6SX
> +	select DM
> +	select DM_THERMAL
>  
>  config TARGET_WANDBOARD
>  	bool "wandboard"
> diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h
> index 1b7a03f..0357631 100644
> --- a/include/configs/udoo_neo.h
> +++ b/include/configs/udoo_neo.h
> @@ -88,4 +88,6 @@
>  #define CONFIG_ENV_SIZE			SZ_8K
>  #define CONFIG_ENV_IS_IN_MMC
>  
> +#define CONFIG_IMX_THERMAL
> +
>  #endif				/* __CONFIG_H */
> 
Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=====================================================================
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
=====================================================================

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-12-16  9:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-01 18:37 [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Breno Lima
2016-12-01 18:37 ` [U-Boot] [PATCH 2/6] udoo_neo: Move MX6SX configuration to Kconfig Breno Lima
2016-12-05 16:37   ` Fabio Estevam
2016-12-16  9:12   ` Stefano Babic
2016-12-01 18:37 ` [U-Boot] [PATCH 3/6] udoo_neo: Staticize board_string() Breno Lima
2016-12-05 16:37   ` Fabio Estevam
2016-12-16  9:13   ` Stefano Babic
2016-12-01 18:37 ` [U-Boot] [PATCH 4/6] udoo_neo: Remove mmcautodetect option Breno Lima
2016-12-05 16:38   ` Fabio Estevam
2016-12-16  9:13   ` Stefano Babic
2016-12-01 18:37 ` [U-Boot] [PATCH 5/6] udoo_neo: Remove console option Breno Lima
2016-12-05 16:38   ` Fabio Estevam
2016-12-16  9:13   ` Stefano Babic
2016-12-01 18:37 ` [U-Boot] [PATCH 6/6] udoo_neo: Add thermal support Breno Lima
2016-12-05 16:38   ` Fabio Estevam
2016-12-16  9:13   ` Stefano Babic
2016-12-05 16:37 ` [U-Boot] [PATCH 1/6] udoo_neo: Remove USDHC3 support Fabio Estevam
2016-12-16  9:12 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.