All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK
@ 2018-07-25 22:25 Lukasz Majewski
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 1/9] ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from exynos_dwmci_get_config() Lukasz Majewski
                   ` (8 more replies)
  0 siblings, 9 replies; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

This patch series provides following improvements to Odroid XU3:
- Fix sdr_timing problem with DW_MMC running with DM
- Clean up the defconfig file
- Allow default booting via SD card
- Fix potential memory leak when running under DM (DW_MMC)
Travis-CI: https://travis-ci.org/lmajewski/u-boot-dfu/builds/408080614


Lukasz Majewski (9):
  ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from
    exynos_dwmci_get_config()
  ARM: Odroid XU3: config: Disable SDHCI support in the Odroid XU3
  ARM: Odroid XU3: Enable driver model support for MMC (DM_MMC)
  ARM: Odroid XU3: Fix autoboot.cmd to use ${mmcbootdev} instead of
    hardcoded 0
  ARM: Odroid XU3: Adjust BOOT_TARGET_DEVICES to allow booting from SD
    card (mmc2)
  ARM: Odroid XU3: MAINTAINERS: Add a co-maintainer for OdroidXU3
  ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC
    (sdr_timing)
  ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in
    DM MMC
  ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD
    card

 board/samsung/common/bootscripts/autoboot.cmd |  6 ++---
 board/samsung/smdk5420/MAINTAINERS            |  1 +
 configs/odroid-xu3_defconfig                  |  3 +--
 drivers/mmc/exynos_dw_mmc.c                   | 37 +++++++++++++++------------
 include/configs/exynos5-common.h              |  1 +
 include/configs/odroid_xu3.h                  |  7 +++--
 6 files changed, 32 insertions(+), 23 deletions(-)

-- 
2.11.0

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

* [U-Boot] [PATCH v1 1/9] ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from exynos_dwmci_get_config()
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-27  3:06   ` Anand Moon
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 2/9] ARM: Odroid XU3: config: Disable SDHCI support in the Odroid XU3 Lukasz Majewski
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

This commit prevents memory leak when this function is used with DM_MMC
as the struct dwmci_exynos_priv_data is already allocated by DM.

It is necessary for NON DM aware devices to allocate this struct first.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 drivers/mmc/exynos_dw_mmc.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 865fdf4dbba0..49c4f7634830 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -146,17 +146,11 @@ static int do_dwmci_init(struct dwmci_host *host)
 }
 
 static int exynos_dwmci_get_config(const void *blob, int node,
-					struct dwmci_host *host)
+				   struct dwmci_host *host,
+				   struct dwmci_exynos_priv_data *priv)
 {
 	int err = 0;
 	u32 base, timing[3];
-	struct dwmci_exynos_priv_data *priv;
-
-	priv = malloc(sizeof(struct dwmci_exynos_priv_data));
-	if (!priv) {
-		pr_err("dwmci_exynos_priv_data malloc fail!\n");
-		return -ENOMEM;
-	}
 
 	/* Extract device id for each mmc channel */
 	host->dev_id = pinmux_decode_periph_id(blob, node);
@@ -167,7 +161,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
 
 	if (host->dev_index > 4) {
 		printf("DWMMC%d: Can't get the dev index\n", host->dev_index);
-		free(priv);
 		return -EINVAL;
 	}
 
@@ -178,7 +171,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
 	base = fdtdec_get_addr(blob, node, "reg");
 	if (!base) {
 		printf("DWMMC%d: Can't get base address\n", host->dev_index);
-		free(priv);
 		return -EINVAL;
 	}
 	host->ioaddr = (void *)base;
@@ -188,7 +180,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
 	if (err) {
 		printf("DWMMC%d: Can't get sdr-timings for devider\n",
 				host->dev_index);
-		free(priv);
 		return -EINVAL;
 	}
 
@@ -208,14 +199,13 @@ static int exynos_dwmci_get_config(const void *blob, int node,
 	host->bus_hz = fdtdec_get_int(blob, node, "bus_hz", 0);
 	host->div = fdtdec_get_int(blob, node, "div", 0);
 
-	host->priv = priv;
-
 	return 0;
 }
 
 static int exynos_dwmci_process_node(const void *blob,
 					int node_list[], int count)
 {
+	struct dwmci_exynos_priv_data *priv;
 	struct dwmci_host *host;
 	int i, node, err;
 
@@ -224,11 +214,20 @@ static int exynos_dwmci_process_node(const void *blob,
 		if (node <= 0)
 			continue;
 		host = &dwmci_host[i];
-		err = exynos_dwmci_get_config(blob, node, host);
+
+		priv = malloc(sizeof(struct dwmci_exynos_priv_data));
+		if (!priv) {
+			pr_err("dwmci_exynos_priv_data malloc fail!\n");
+			return -ENOMEM;
+		}
+
+		err = exynos_dwmci_get_config(blob, node, host, priv);
 		if (err) {
 			printf("%s: failed to decode dev %d\n", __func__, i);
+			free(priv);
 			return err;
 		}
+		host->priv = priv;
 
 		do_dwmci_init(host);
 	}
@@ -266,7 +265,8 @@ static int exynos_dwmmc_probe(struct udevice *dev)
 	struct dwmci_host *host = &priv->host;
 	int err;
 
-	err = exynos_dwmci_get_config(gd->fdt_blob, dev_of_offset(dev), host);
+	err = exynos_dwmci_get_config(gd->fdt_blob, dev_of_offset(dev), host,
+				      priv);
 	if (err)
 		return err;
 	err = do_dwmci_init(host);
-- 
2.11.0

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

* [U-Boot] [PATCH v1 2/9] ARM: Odroid XU3: config: Disable SDHCI support in the Odroid XU3
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 1/9] ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from exynos_dwmci_get_config() Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-27  3:07   ` Anand Moon
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 3/9] ARM: Odroid XU3: Enable driver model support for MMC (DM_MMC) Lukasz Majewski
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

The Exynos5422 is solely using DW MMC IP block to support eMMC/SD devices,
hence the SDHCI code doesn't need to be compiled it.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 configs/odroid-xu3_defconfig | 2 --
 1 file changed, 2 deletions(-)

diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index 5943c19cf9b3..6398c2cd0d6a 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -30,8 +30,6 @@ CONFIG_ADC=y
 CONFIG_ADC_EXYNOS=y
 CONFIG_DFU_MMC=y
 CONFIG_MMC_DW=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_S5P=y
 CONFIG_NETDEVICES=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x5000000
-- 
2.11.0

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

* [U-Boot] [PATCH v1 3/9] ARM: Odroid XU3: Enable driver model support for MMC (DM_MMC)
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 1/9] ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from exynos_dwmci_get_config() Lukasz Majewski
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 2/9] ARM: Odroid XU3: config: Disable SDHCI support in the Odroid XU3 Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-27  3:07   ` Anand Moon
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 4/9] ARM: Odroid XU3: Fix autoboot.cmd to use ${mmcbootdev} instead of hardcoded 0 Lukasz Majewski
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

This commit enables support for DW_MMC running with driver model.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 configs/odroid-xu3_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index 6398c2cd0d6a..632542d98420 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -29,6 +29,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_ADC=y
 CONFIG_ADC_EXYNOS=y
 CONFIG_DFU_MMC=y
+CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_NETDEVICES=y
 CONFIG_SMC911X=y
-- 
2.11.0

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

* [U-Boot] [PATCH v1 4/9] ARM: Odroid XU3: Fix autoboot.cmd to use ${mmcbootdev} instead of hardcoded 0
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
                   ` (2 preceding siblings ...)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 3/9] ARM: Odroid XU3: Enable driver model support for MMC (DM_MMC) Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-27  3:09   ` Anand Moon
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 5/9] ARM: Odroid XU3: Adjust BOOT_TARGET_DEVICES to allow booting from SD card (mmc2) Lukasz Majewski
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

This commit adjusts the autoboot.cmd file to use ${mmcbootdev} instead of
hardcoded value 0.

This is necessary to allow booting this board from the SD card.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 board/samsung/common/bootscripts/autoboot.cmd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/samsung/common/bootscripts/autoboot.cmd b/board/samsung/common/bootscripts/autoboot.cmd
index 1faed8ba0c1a..11c724c4e095 100644
--- a/board/samsung/common/bootscripts/autoboot.cmd
+++ b/board/samsung/common/bootscripts/autoboot.cmd
@@ -74,15 +74,15 @@ setenv boot_img "
 
 #### Routine: autoboot - choose proper boot path
 setenv autoboot "
-if test -e mmc 0:${mmcbootpart} Image.itb; then
+if test -e mmc ${mmcbootdev}:${mmcbootpart} Image.itb; then
 	echo Found kernel image: Image.itb;
 	run setboot_fit;
 	run boot_img;
-elif test -e mmc 0:${mmcbootpart} zImage; then
+elif test -e mmc ${mmcbootdev}:${mmcbootpart} zImage; then
 	echo Found kernel image: zImage;
 	run setboot_zimg;
 	run boot_img;
-elif test -e mmc 0:${mmcbootpart} uImage; then
+elif test -e mmc ${mmcbootdev}:${mmcbootpart} uImage; then
 	echo Found kernel image: uImage;
 	run setboot_uimg;
 	run boot_img;
-- 
2.11.0

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

* [U-Boot] [PATCH v1 5/9] ARM: Odroid XU3: Adjust BOOT_TARGET_DEVICES to allow booting from SD card (mmc2)
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
                   ` (3 preceding siblings ...)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 4/9] ARM: Odroid XU3: Fix autoboot.cmd to use ${mmcbootdev} instead of hardcoded 0 Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-27  3:10   ` Anand Moon
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 6/9] ARM: Odroid XU3: MAINTAINERS: Add a co-maintainer for OdroidXU3 Lukasz Majewski
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

This change is necessary to allow booting the Odroid XU3 from SD card
after enabling the DM_MMC support.

After this change the SD card mmc IP block is correctly enumerated as mmc2
(and not as mmc1 as in the legacy code).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 include/configs/exynos5-common.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index a7621fc701b2..cd2a9046afec 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -138,6 +138,7 @@
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 1) \
 	func(MMC, mmc, 0) \
+	func(MMC, mmc, 2) \
 	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
-- 
2.11.0

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

* [U-Boot] [PATCH v1 6/9] ARM: Odroid XU3: MAINTAINERS: Add a co-maintainer for OdroidXU3
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
                   ` (4 preceding siblings ...)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 5/9] ARM: Odroid XU3: Adjust BOOT_TARGET_DEVICES to allow booting from SD card (mmc2) Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 7/9] ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC (sdr_timing) Lukasz Majewski
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 board/samsung/smdk5420/MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/samsung/smdk5420/MAINTAINERS b/board/samsung/smdk5420/MAINTAINERS
index 590a1140b07e..31c00360f287 100644
--- a/board/samsung/smdk5420/MAINTAINERS
+++ b/board/samsung/smdk5420/MAINTAINERS
@@ -11,6 +11,7 @@ F:	configs/peach-pi_defconfig
 
 ODROID-XU3 BOARD
 M:	Jaehoon Chung <jh80.chung@samsung.com>
+M:	Lukasz Majewski <lukma@denx.de>
 S:	Maintained
 F:	board/samsung/smdk5420/
 F:	include/configs/odroid_xu3.h
-- 
2.11.0

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

* [U-Boot] [PATCH v1 7/9] ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC (sdr_timing)
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
                   ` (5 preceding siblings ...)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 6/9] ARM: Odroid XU3: MAINTAINERS: Add a co-maintainer for OdroidXU3 Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-27  3:12   ` Anand Moon
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 8/9] ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC Lukasz Majewski
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card Lukasz Majewski
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

By convention for DM_MMC the host->priv is used to store struct udevice
*dev pointer.

Unfortunately, the legacy Exynos DW MMC code uses this field to
store pointer to dwmci_exynos_priv_data struct
Hence, we do need to get data in other way - namely by using container_of
when host pointer is present.
In this way the sdr_timing data is properly accessed.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 drivers/mmc/exynos_dw_mmc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 49c4f7634830..cd0fa4c6341b 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -46,8 +46,12 @@ struct dwmci_exynos_priv_data {
  */
 static void exynos_dwmci_clksel(struct dwmci_host *host)
 {
+#ifdef CONFIG_DM_MMC
+	struct dwmci_exynos_priv_data *priv =
+		container_of(host, struct dwmci_exynos_priv_data, host);
+#else
 	struct dwmci_exynos_priv_data *priv = host->priv;
-
+#endif
 	dwmci_writel(host, DWMCI_CLKSEL, priv->sdr_timing);
 }
 
-- 
2.11.0

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

* [U-Boot] [PATCH v1 8/9] ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
                   ` (6 preceding siblings ...)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 7/9] ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC (sdr_timing) Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-27  3:13   ` Anand Moon
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card Lukasz Majewski
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

This commit enables support for Exynos Designware MMC driver based on DM.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---

 drivers/mmc/exynos_dw_mmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index cd0fa4c6341b..435ccac59421 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -295,6 +295,7 @@ static int exynos_dwmmc_bind(struct udevice *dev)
 
 static const struct udevice_id exynos_dwmmc_ids[] = {
 	{ .compatible = "samsung,exynos4412-dw-mshc" },
+	{ .compatible = "samsung,exynos-dwmmc" },
 	{ }
 };
 
-- 
2.11.0

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
                   ` (7 preceding siblings ...)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 8/9] ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC Lukasz Majewski
@ 2018-07-25 22:25 ` Lukasz Majewski
  2018-07-26 15:28   ` Anand Moon
  8 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-25 22:25 UTC (permalink / raw)
  To: u-boot

This commit allows by default booting Odroid XU3 from the SD card (when
e.g. eMMC module is not present).

Signed-off-by: Lukasz Majewski <lukma@denx.de>

---

 include/configs/odroid_xu3.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index f495f6219ba9..818a06515cb2 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -94,6 +94,9 @@
 #undef CONFIG_SYS_BOARD
 #define CONFIG_SYS_BOARD	"odroid"
 
+#undef CONFIG_SYS_MMC_ENV_DEV
+#define CONFIG_SYS_MMC_ENV_DEV		2
+
 /* Define new extra env settings, including DFU settings */
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS \
@@ -105,8 +108,8 @@
 	"console=" CONFIG_DEFAULT_CONSOLE "\0"\
 	"fdtfile=exynos5422-odroidxu3.dtb\0" \
 	"boardname=odroidxu3\0" \
-	"mmcbootdev=0\0" \
-	"mmcrootdev=0\0" \
+	"mmcbootdev=2\0" \
+	"mmcrootdev=1\0" \
 	"mmcbootpart=1\0" \
 	"mmcrootpart=2\0" \
 	"dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
-- 
2.11.0

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card Lukasz Majewski
@ 2018-07-26 15:28   ` Anand Moon
  2018-07-26 15:53     ` Lukasz Majewski
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Moon @ 2018-07-26 15:28 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> This commit allows by default booting Odroid XU3 from the SD card (when
> e.g. eMMC module is not present).
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
>
> ---
>
>  include/configs/odroid_xu3.h | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
> index f495f6219ba9..818a06515cb2 100644
> --- a/include/configs/odroid_xu3.h
> +++ b/include/configs/odroid_xu3.h
> @@ -94,6 +94,9 @@
>  #undef CONFIG_SYS_BOARD
>  #define CONFIG_SYS_BOARD       "odroid"
>
> +#undef CONFIG_SYS_MMC_ENV_DEV
> +#define CONFIG_SYS_MMC_ENV_DEV         2
> +
>  /* Define new extra env settings, including DFU settings */
>  #undef CONFIG_EXTRA_ENV_SETTINGS
>  #define CONFIG_EXTRA_ENV_SETTINGS \
> @@ -105,8 +108,8 @@
>         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
>         "fdtfile=exynos5422-odroidxu3.dtb\0" \
>         "boardname=odroidxu3\0" \
> -       "mmcbootdev=0\0" \
> -       "mmcrootdev=0\0" \
> +       "mmcbootdev=2\0" \
> +       "mmcrootdev=1\0" \
>         "mmcbootpart=1\0" \
>         "mmcrootpart=2\0" \
>         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
> --
> 2.11.0
>

This changes probably breaks the booting from eMMC on  Odroid-XU4

U-Boot 2018.07-00377-g80df37b417 (Jul 26 2018 - 10:50:16 +0000) for
ODROID-XU3/XU4/HC1

CPU:   Exynos5422 @ 800 MHz
Model: Odroid XU3 based on EXYNOS5422
Board: Odroid XU3 based on EXYNOS5422
Type:  xu4
DRAM:  2 GiB
MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 2
Loading Environment from MMC... Card did not respond to voltage select!
*** Warning - No block device, using default environment

Failed (-5)
In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0
MMC Device 1 not found
no mmc device at slot 1
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
3069 bytes read in 6 ms (499 KiB/s)
## Executing script at 50000000
Card did not respond to voltage select!
** Bad device mmc 2 **
Card did not respond to voltage select!
** Bad device mmc 2 **
Card did not respond to voltage select!
** Bad device mmc 2 **
SCRIPT FAILED: continuing...
63776 bytes read in 7 ms (8.7 MiB/s)
Card did not respond to voltage select!
starting USB...
USB0:   USB EHCI 1.00
USB1:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
USB2:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 3 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices... 1 Ethernet Device(s) found
Waiting for Ethernet connection... done.
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 10.0.0.144 (1021 ms)
*** Warning: no boot file name; using '0A000090.img'
Using r8152#0 device
TFTP from server 0.0.0.0; our IP address is 10.0.0.144; sending
through gateway 10.0.0.1
Filename '0A000090.img'.
Load address: 0x43e00000
Loading: T

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-26 15:28   ` Anand Moon
@ 2018-07-26 15:53     ` Lukasz Majewski
  2018-07-27  3:04       ` Anand Moon
  0 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-26 15:53 UTC (permalink / raw)
  To: u-boot

Hi Anand,

> Hi Lukasz,
> 
> On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> > This commit allows by default booting Odroid XU3 from the SD card
> > (when e.g. eMMC module is not present).
> >
> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >
> > ---
> >
> >  include/configs/odroid_xu3.h | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/configs/odroid_xu3.h
> > b/include/configs/odroid_xu3.h index f495f6219ba9..818a06515cb2
> > 100644 --- a/include/configs/odroid_xu3.h
> > +++ b/include/configs/odroid_xu3.h
> > @@ -94,6 +94,9 @@
> >  #undef CONFIG_SYS_BOARD
> >  #define CONFIG_SYS_BOARD       "odroid"
> >
> > +#undef CONFIG_SYS_MMC_ENV_DEV
> > +#define CONFIG_SYS_MMC_ENV_DEV         2
> > +
> >  /* Define new extra env settings, including DFU settings */
> >  #undef CONFIG_EXTRA_ENV_SETTINGS
> >  #define CONFIG_EXTRA_ENV_SETTINGS \
> > @@ -105,8 +108,8 @@
> >         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
> >         "fdtfile=exynos5422-odroidxu3.dtb\0" \
> >         "boardname=odroidxu3\0" \
> > -       "mmcbootdev=0\0" \
> > -       "mmcrootdev=0\0" \
> > +       "mmcbootdev=2\0" \
> > +       "mmcrootdev=1\0" \
> >         "mmcbootpart=1\0" \
> >         "mmcrootpart=2\0" \
> >         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
> > --
> > 2.11.0
> >  
> 
> This changes probably breaks the booting from eMMC on  Odroid-XU4

I suppose, that XU4 is also equipped with SD card slot as XU3.

Nonetheless, as I don't have eMMC card for mine XU3, the only way to
boot my device is SD card.

If you believe that this may be a problem, then I can drop this patch.

Have you checked patches from 1-8?
Does it work for you? If yes, please send tested-by tag.

> 
> U-Boot 2018.07-00377-g80df37b417 (Jul 26 2018 - 10:50:16 +0000) for
> ODROID-XU3/XU4/HC1
> 
> CPU:   Exynos5422 @ 800 MHz
> Model: Odroid XU3 based on EXYNOS5422
> Board: Odroid XU3 based on EXYNOS5422
> Type:  xu4
> DRAM:  2 GiB
> MMC:   EXYNOS DWMMC: 0, EXYNOS DWMMC: 2
> Loading Environment from MMC... Card did not respond to voltage
> select! *** Warning - No block device, using default environment
> 
> Failed (-5)
> In:    serial
> Out:   serial
> Err:   serial
> Net:   No ethernet found.
> Hit any key to stop autoboot:  0
> MMC Device 1 not found
> no mmc device at slot 1
> switch to partitions #0, OK
> mmc0(part 0) is current device
> Scanning mmc 0:1...
> Found U-Boot script /boot.scr
> 3069 bytes read in 6 ms (499 KiB/s)
> ## Executing script at 50000000
> Card did not respond to voltage select!
> ** Bad device mmc 2 **
> Card did not respond to voltage select!
> ** Bad device mmc 2 **
> Card did not respond to voltage select!
> ** Bad device mmc 2 **
> SCRIPT FAILED: continuing...
> 63776 bytes read in 7 ms (8.7 MiB/s)
> Card did not respond to voltage select!
> starting USB...
> USB0:   USB EHCI 1.00
> USB1:   Register 2000140 NbrPorts 2
> Starting the controller
> USB XHCI 1.00
> USB2:   Register 2000140 NbrPorts 2
> Starting the controller
> USB XHCI 1.00
> scanning bus 0 for devices... 1 USB Device(s) found
> scanning bus 1 for devices... 3 USB Device(s) found
> scanning bus 2 for devices... 2 USB Device(s) found
>        scanning usb for storage devices... 0 Storage Device(s) found
>        scanning usb for ethernet devices... 1 Ethernet Device(s) found
> Waiting for Ethernet connection... done.
> BOOTP broadcast 1
> BOOTP broadcast 2
> DHCP client bound to address 10.0.0.144 (1021 ms)
> *** Warning: no boot file name; using '0A000090.img'
> Using r8152#0 device
> TFTP from server 0.0.0.0; our IP address is 10.0.0.144; sending
> through gateway 10.0.0.1
> Filename '0A000090.img'.
> Load address: 0x43e00000
> Loading: T
> 
> Best Regards
> -Anand




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180726/c1424138/attachment.sig>

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-26 15:53     ` Lukasz Majewski
@ 2018-07-27  3:04       ` Anand Moon
  2018-07-27  8:24         ` Lukasz Majewski
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:04 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 26 July 2018 at 21:23, Lukasz Majewski <lukma@denx.de> wrote:
> Hi Anand,
>
>> Hi Lukasz,
>>
>> On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
>> > This commit allows by default booting Odroid XU3 from the SD card
>> > (when e.g. eMMC module is not present).
>> >
>> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
>> >
>> > ---
>> >
>> >  include/configs/odroid_xu3.h | 7 +++++--
>> >  1 file changed, 5 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/include/configs/odroid_xu3.h
>> > b/include/configs/odroid_xu3.h index f495f6219ba9..818a06515cb2
>> > 100644 --- a/include/configs/odroid_xu3.h
>> > +++ b/include/configs/odroid_xu3.h
>> > @@ -94,6 +94,9 @@
>> >  #undef CONFIG_SYS_BOARD
>> >  #define CONFIG_SYS_BOARD       "odroid"
>> >
>> > +#undef CONFIG_SYS_MMC_ENV_DEV
>> > +#define CONFIG_SYS_MMC_ENV_DEV         2
>> > +
>> >  /* Define new extra env settings, including DFU settings */
>> >  #undef CONFIG_EXTRA_ENV_SETTINGS
>> >  #define CONFIG_EXTRA_ENV_SETTINGS \
>> > @@ -105,8 +108,8 @@
>> >         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
>> >         "fdtfile=exynos5422-odroidxu3.dtb\0" \
>> >         "boardname=odroidxu3\0" \
>> > -       "mmcbootdev=0\0" \
>> > -       "mmcrootdev=0\0" \
>> > +       "mmcbootdev=2\0" \
>> > +       "mmcrootdev=1\0" \
>> >         "mmcbootpart=1\0" \
>> >         "mmcrootpart=2\0" \
>> >         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
>> > --
>> > 2.11.0
>> >
>>
>> This changes probably breaks the booting from eMMC on  Odroid-XU4
>
> I suppose, that XU4 is also equipped with SD card slot as XU3.
>
> Nonetheless, as I don't have eMMC card for mine XU3, the only way to
> boot my device is SD card.
>
> If you believe that this may be a problem, then I can drop this patch.
>
> Have you checked patches from 1-8?
> Does it work for you? If yes, please send tested-by tag.
>

Yes you probably need to drop this patch,
I had some tough time recovering my eMMC back to flash new u-boot.

I have tested my eMMC with default boot.scr its boot good.
Need to modify the boot.scr to boot into SD card.

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 1/9] ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from exynos_dwmci_get_config()
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 1/9] ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from exynos_dwmci_get_config() Lukasz Majewski
@ 2018-07-27  3:06   ` Anand Moon
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:06 UTC (permalink / raw)
  To: u-boot

Hi Lukasz

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> This commit prevents memory leak when this function is used with DM_MMC
> as the struct dwmci_exynos_priv_data is already allocated by DM.
>
> It is necessary for NON DM aware devices to allocate this struct first.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>
>  drivers/mmc/exynos_dw_mmc.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
> index 865fdf4dbba0..49c4f7634830 100644
> --- a/drivers/mmc/exynos_dw_mmc.c
> +++ b/drivers/mmc/exynos_dw_mmc.c
> @@ -146,17 +146,11 @@ static int do_dwmci_init(struct dwmci_host *host)
>  }
>
>  static int exynos_dwmci_get_config(const void *blob, int node,
> -                                       struct dwmci_host *host)
> +                                  struct dwmci_host *host,
> +                                  struct dwmci_exynos_priv_data *priv)
>  {
>         int err = 0;
>         u32 base, timing[3];
> -       struct dwmci_exynos_priv_data *priv;
> -
> -       priv = malloc(sizeof(struct dwmci_exynos_priv_data));
> -       if (!priv) {
> -               pr_err("dwmci_exynos_priv_data malloc fail!\n");
> -               return -ENOMEM;
> -       }
>
>         /* Extract device id for each mmc channel */
>         host->dev_id = pinmux_decode_periph_id(blob, node);
> @@ -167,7 +161,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
>
>         if (host->dev_index > 4) {
>                 printf("DWMMC%d: Can't get the dev index\n", host->dev_index);
> -               free(priv);
>                 return -EINVAL;
>         }
>
> @@ -178,7 +171,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
>         base = fdtdec_get_addr(blob, node, "reg");
>         if (!base) {
>                 printf("DWMMC%d: Can't get base address\n", host->dev_index);
> -               free(priv);
>                 return -EINVAL;
>         }
>         host->ioaddr = (void *)base;
> @@ -188,7 +180,6 @@ static int exynos_dwmci_get_config(const void *blob, int node,
>         if (err) {
>                 printf("DWMMC%d: Can't get sdr-timings for devider\n",
>                                 host->dev_index);
> -               free(priv);
>                 return -EINVAL;
>         }
>
> @@ -208,14 +199,13 @@ static int exynos_dwmci_get_config(const void *blob, int node,
>         host->bus_hz = fdtdec_get_int(blob, node, "bus_hz", 0);
>         host->div = fdtdec_get_int(blob, node, "div", 0);
>
> -       host->priv = priv;
> -
>         return 0;
>  }
>
>  static int exynos_dwmci_process_node(const void *blob,
>                                         int node_list[], int count)
>  {
> +       struct dwmci_exynos_priv_data *priv;
>         struct dwmci_host *host;
>         int i, node, err;
>
> @@ -224,11 +214,20 @@ static int exynos_dwmci_process_node(const void *blob,
>                 if (node <= 0)
>                         continue;
>                 host = &dwmci_host[i];
> -               err = exynos_dwmci_get_config(blob, node, host);
> +
> +               priv = malloc(sizeof(struct dwmci_exynos_priv_data));
> +               if (!priv) {
> +                       pr_err("dwmci_exynos_priv_data malloc fail!\n");
> +                       return -ENOMEM;
> +               }
> +
> +               err = exynos_dwmci_get_config(blob, node, host, priv);
>                 if (err) {
>                         printf("%s: failed to decode dev %d\n", __func__, i);
> +                       free(priv);
>                         return err;
>                 }
> +               host->priv = priv;
>
>                 do_dwmci_init(host);
>         }
> @@ -266,7 +265,8 @@ static int exynos_dwmmc_probe(struct udevice *dev)
>         struct dwmci_host *host = &priv->host;
>         int err;
>
> -       err = exynos_dwmci_get_config(gd->fdt_blob, dev_of_offset(dev), host);
> +       err = exynos_dwmci_get_config(gd->fdt_blob, dev_of_offset(dev), host,
> +                                     priv);
>         if (err)
>                 return err;
>         err = do_dwmci_init(host);
> --
> 2.11.0
>

Please add my.
Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 2/9] ARM: Odroid XU3: config: Disable SDHCI support in the Odroid XU3
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 2/9] ARM: Odroid XU3: config: Disable SDHCI support in the Odroid XU3 Lukasz Majewski
@ 2018-07-27  3:07   ` Anand Moon
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:07 UTC (permalink / raw)
  To: u-boot

Hi Lukasz

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> The Exynos5422 is solely using DW MMC IP block to support eMMC/SD devices,
> hence the SDHCI code doesn't need to be compiled it.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>
>  configs/odroid-xu3_defconfig | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
> index 5943c19cf9b3..6398c2cd0d6a 100644
> --- a/configs/odroid-xu3_defconfig
> +++ b/configs/odroid-xu3_defconfig
> @@ -30,8 +30,6 @@ CONFIG_ADC=y
>  CONFIG_ADC_EXYNOS=y
>  CONFIG_DFU_MMC=y
>  CONFIG_MMC_DW=y
> -CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_S5P=y
>  CONFIG_NETDEVICES=y
>  CONFIG_SMC911X=y
>  CONFIG_SMC911X_BASE=0x5000000
> --
> 2.11.0
>

Please add my.
Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 3/9] ARM: Odroid XU3: Enable driver model support for MMC (DM_MMC)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 3/9] ARM: Odroid XU3: Enable driver model support for MMC (DM_MMC) Lukasz Majewski
@ 2018-07-27  3:07   ` Anand Moon
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:07 UTC (permalink / raw)
  To: u-boot

Hi Lukasz

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> This commit enables support for DW_MMC running with driver model.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>
>  configs/odroid-xu3_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
> index 6398c2cd0d6a..632542d98420 100644
> --- a/configs/odroid-xu3_defconfig
> +++ b/configs/odroid-xu3_defconfig
> @@ -29,6 +29,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
>  CONFIG_ADC=y
>  CONFIG_ADC_EXYNOS=y
>  CONFIG_DFU_MMC=y
> +CONFIG_DM_MMC=y
>  CONFIG_MMC_DW=y
>  CONFIG_NETDEVICES=y
>  CONFIG_SMC911X=y
> --
> 2.11.0
>

Please add my.
Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 4/9] ARM: Odroid XU3: Fix autoboot.cmd to use ${mmcbootdev} instead of hardcoded 0
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 4/9] ARM: Odroid XU3: Fix autoboot.cmd to use ${mmcbootdev} instead of hardcoded 0 Lukasz Majewski
@ 2018-07-27  3:09   ` Anand Moon
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:09 UTC (permalink / raw)
  To: u-boot

Hi Lukasz

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> This commit adjusts the autoboot.cmd file to use ${mmcbootdev} instead of
> hardcoded value 0.
>
> This is necessary to allow booting this board from the SD card.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>
>  board/samsung/common/bootscripts/autoboot.cmd | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/board/samsung/common/bootscripts/autoboot.cmd b/board/samsung/common/bootscripts/autoboot.cmd
> index 1faed8ba0c1a..11c724c4e095 100644
> --- a/board/samsung/common/bootscripts/autoboot.cmd
> +++ b/board/samsung/common/bootscripts/autoboot.cmd
> @@ -74,15 +74,15 @@ setenv boot_img "
>
>  #### Routine: autoboot - choose proper boot path
>  setenv autoboot "
> -if test -e mmc 0:${mmcbootpart} Image.itb; then
> +if test -e mmc ${mmcbootdev}:${mmcbootpart} Image.itb; then
>         echo Found kernel image: Image.itb;
>         run setboot_fit;
>         run boot_img;
> -elif test -e mmc 0:${mmcbootpart} zImage; then
> +elif test -e mmc ${mmcbootdev}:${mmcbootpart} zImage; then
>         echo Found kernel image: zImage;
>         run setboot_zimg;
>         run boot_img;
> -elif test -e mmc 0:${mmcbootpart} uImage; then
> +elif test -e mmc ${mmcbootdev}:${mmcbootpart} uImage; then
>         echo Found kernel image: uImage;
>         run setboot_uimg;
>         run boot_img;
> --
> 2.11.0
>

Please add my.
Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 5/9] ARM: Odroid XU3: Adjust BOOT_TARGET_DEVICES to allow booting from SD card (mmc2)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 5/9] ARM: Odroid XU3: Adjust BOOT_TARGET_DEVICES to allow booting from SD card (mmc2) Lukasz Majewski
@ 2018-07-27  3:10   ` Anand Moon
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:10 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> This change is necessary to allow booting the Odroid XU3 from SD card
> after enabling the DM_MMC support.
>
> After this change the SD card mmc IP block is correctly enumerated as mmc2
> (and not as mmc1 as in the legacy code).
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>
>  include/configs/exynos5-common.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
> index a7621fc701b2..cd2a9046afec 100644
> --- a/include/configs/exynos5-common.h
> +++ b/include/configs/exynos5-common.h
> @@ -138,6 +138,7 @@
>  #define BOOT_TARGET_DEVICES(func) \
>         func(MMC, mmc, 1) \
>         func(MMC, mmc, 0) \
> +       func(MMC, mmc, 2) \
>         func(PXE, pxe, na) \
>         func(DHCP, dhcp, na)
>
> --
> 2.11.0
>

Please add my.
Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 7/9] ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC (sdr_timing)
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 7/9] ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC (sdr_timing) Lukasz Majewski
@ 2018-07-27  3:12   ` Anand Moon
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:12 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> By convention for DM_MMC the host->priv is used to store struct udevice
> *dev pointer.
>
> Unfortunately, the legacy Exynos DW MMC code uses this field to
> store pointer to dwmci_exynos_priv_data struct
> Hence, we do need to get data in other way - namely by using container_of
> when host pointer is present.
> In this way the sdr_timing data is properly accessed.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>
>  drivers/mmc/exynos_dw_mmc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
> index 49c4f7634830..cd0fa4c6341b 100644
> --- a/drivers/mmc/exynos_dw_mmc.c
> +++ b/drivers/mmc/exynos_dw_mmc.c
> @@ -46,8 +46,12 @@ struct dwmci_exynos_priv_data {
>   */
>  static void exynos_dwmci_clksel(struct dwmci_host *host)
>  {
> +#ifdef CONFIG_DM_MMC
> +       struct dwmci_exynos_priv_data *priv =
> +               container_of(host, struct dwmci_exynos_priv_data, host);
> +#else
>         struct dwmci_exynos_priv_data *priv = host->priv;
> -
> +#endif
>         dwmci_writel(host, DWMCI_CLKSEL, priv->sdr_timing);
>  }
>
> --
> 2.11.0
>

Please add my.
Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 8/9] ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC
  2018-07-25 22:25 ` [U-Boot] [PATCH v1 8/9] ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC Lukasz Majewski
@ 2018-07-27  3:13   ` Anand Moon
  0 siblings, 0 replies; 25+ messages in thread
From: Anand Moon @ 2018-07-27  3:13 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
> This commit enables support for Exynos Designware MMC driver based on DM.
>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> ---
>
>  drivers/mmc/exynos_dw_mmc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
> index cd0fa4c6341b..435ccac59421 100644
> --- a/drivers/mmc/exynos_dw_mmc.c
> +++ b/drivers/mmc/exynos_dw_mmc.c
> @@ -295,6 +295,7 @@ static int exynos_dwmmc_bind(struct udevice *dev)
>
>  static const struct udevice_id exynos_dwmmc_ids[] = {
>         { .compatible = "samsung,exynos4412-dw-mshc" },
> +       { .compatible = "samsung,exynos-dwmmc" },
>         { }
>  };
>
> --
> 2.11.0
>

Please add my.
Tested-by: Anand Moon <linux.amoon@gmail.com>

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-27  3:04       ` Anand Moon
@ 2018-07-27  8:24         ` Lukasz Majewski
  2018-07-27  9:12           ` Anand Moon
  0 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-27  8:24 UTC (permalink / raw)
  To: u-boot

On Fri, 27 Jul 2018 08:34:15 +0530
Anand Moon <linux.amoon@gmail.com> wrote:

> Hi Lukasz,
> 
> On 26 July 2018 at 21:23, Lukasz Majewski <lukma@denx.de> wrote:
> > Hi Anand,
> >  
> >> Hi Lukasz,
> >>
> >> On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:  
> >> > This commit allows by default booting Odroid XU3 from the SD card
> >> > (when e.g. eMMC module is not present).
> >> >
> >> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >> >
> >> > ---
> >> >
> >> >  include/configs/odroid_xu3.h | 7 +++++--
> >> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/include/configs/odroid_xu3.h
> >> > b/include/configs/odroid_xu3.h index f495f6219ba9..818a06515cb2
> >> > 100644 --- a/include/configs/odroid_xu3.h
> >> > +++ b/include/configs/odroid_xu3.h
> >> > @@ -94,6 +94,9 @@
> >> >  #undef CONFIG_SYS_BOARD
> >> >  #define CONFIG_SYS_BOARD       "odroid"
> >> >
> >> > +#undef CONFIG_SYS_MMC_ENV_DEV
> >> > +#define CONFIG_SYS_MMC_ENV_DEV         2
> >> > +
> >> >  /* Define new extra env settings, including DFU settings */
> >> >  #undef CONFIG_EXTRA_ENV_SETTINGS
> >> >  #define CONFIG_EXTRA_ENV_SETTINGS \
> >> > @@ -105,8 +108,8 @@
> >> >         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
> >> >         "fdtfile=exynos5422-odroidxu3.dtb\0" \
> >> >         "boardname=odroidxu3\0" \
> >> > -       "mmcbootdev=0\0" \
> >> > -       "mmcrootdev=0\0" \
> >> > +       "mmcbootdev=2\0" \
> >> > +       "mmcrootdev=1\0" \
> >> >         "mmcbootpart=1\0" \
> >> >         "mmcrootpart=2\0" \
> >> >         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
> >> > --
> >> > 2.11.0
> >> >  
> >>
> >> This changes probably breaks the booting from eMMC on  Odroid-XU4  
> >
> > I suppose, that XU4 is also equipped with SD card slot as XU3.
> >
> > Nonetheless, as I don't have eMMC card for mine XU3, the only way to
> > boot my device is SD card.
> >
> > If you believe that this may be a problem, then I can drop this
> > patch.
> >
> > Have you checked patches from 1-8?
> > Does it work for you? If yes, please send tested-by tag.
> >  
> 
> Yes you probably need to drop this patch,
> I had some tough time recovering my eMMC back to flash new u-boot.
> 
> I have tested my eMMC with default boot.scr its boot good.
> Need to modify the boot.scr to boot into SD card.

SD card has different layout than eMMC.

Despite above - you just shall need to apply patch 9/9 to get the board
running from SD card.

> 
> Best Regards
> -Anand




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180727/473f6810/attachment.sig>

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-27  8:24         ` Lukasz Majewski
@ 2018-07-27  9:12           ` Anand Moon
  2018-07-27  9:56             ` Lukasz Majewski
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Moon @ 2018-07-27  9:12 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 27 July 2018 at 13:54, Lukasz Majewski <lukma@denx.de> wrote:
> On Fri, 27 Jul 2018 08:34:15 +0530
> Anand Moon <linux.amoon@gmail.com> wrote:
>
>> Hi Lukasz,
>>
>> On 26 July 2018 at 21:23, Lukasz Majewski <lukma@denx.de> wrote:
>> > Hi Anand,
>> >
>> >> Hi Lukasz,
>> >>
>> >> On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de> wrote:
>> >> > This commit allows by default booting Odroid XU3 from the SD card
>> >> > (when e.g. eMMC module is not present).
>> >> >
>> >> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
>> >> >
>> >> > ---
>> >> >
>> >> >  include/configs/odroid_xu3.h | 7 +++++--
>> >> >  1 file changed, 5 insertions(+), 2 deletions(-)
>> >> >
>> >> > diff --git a/include/configs/odroid_xu3.h
>> >> > b/include/configs/odroid_xu3.h index f495f6219ba9..818a06515cb2
>> >> > 100644 --- a/include/configs/odroid_xu3.h
>> >> > +++ b/include/configs/odroid_xu3.h
>> >> > @@ -94,6 +94,9 @@
>> >> >  #undef CONFIG_SYS_BOARD
>> >> >  #define CONFIG_SYS_BOARD       "odroid"
>> >> >
>> >> > +#undef CONFIG_SYS_MMC_ENV_DEV
>> >> > +#define CONFIG_SYS_MMC_ENV_DEV         2
>> >> > +
>> >> >  /* Define new extra env settings, including DFU settings */
>> >> >  #undef CONFIG_EXTRA_ENV_SETTINGS
>> >> >  #define CONFIG_EXTRA_ENV_SETTINGS \
>> >> > @@ -105,8 +108,8 @@
>> >> >         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
>> >> >         "fdtfile=exynos5422-odroidxu3.dtb\0" \
>> >> >         "boardname=odroidxu3\0" \
>> >> > -       "mmcbootdev=0\0" \
>> >> > -       "mmcrootdev=0\0" \
>> >> > +       "mmcbootdev=2\0" \
>> >> > +       "mmcrootdev=1\0" \
>> >> >         "mmcbootpart=1\0" \
>> >> >         "mmcrootpart=2\0" \
>> >> >         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
>> >> > --
>> >> > 2.11.0
>> >> >
>> >>
>> >> This changes probably breaks the booting from eMMC on  Odroid-XU4
>> >
>> > I suppose, that XU4 is also equipped with SD card slot as XU3.
>> >
>> > Nonetheless, as I don't have eMMC card for mine XU3, the only way to
>> > boot my device is SD card.
>> >
>> > If you believe that this may be a problem, then I can drop this
>> > patch.
>> >
>> > Have you checked patches from 1-8?
>> > Does it work for you? If yes, please send tested-by tag.
>> >
>>
>> Yes you probably need to drop this patch,
>> I had some tough time recovering my eMMC back to flash new u-boot.
>>
>> I have tested my eMMC with default boot.scr its boot good.
>> Need to modify the boot.scr to boot into SD card.
>
> SD card has different layout than eMMC.
>
> Despite above - you just shall need to apply patch 9/9 to get the board
> running from SD card.
>

Actually SD card are easy to modify and tune with just adding
setenv mmcrootdev  "1" to autoboot.cmd from sdcard.

but with eMMC module it's bit difficult to make this work,
even if we modify the autoboot.cmd and with new boot.scr
changes do not work out.

I have hard time to recover my eMMC module to boot again.
well I have to boot from SD card with eMMC attach and then
flash the new bootloader to eMMC to make this work.

best regards
-Anand

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-27  9:12           ` Anand Moon
@ 2018-07-27  9:56             ` Lukasz Majewski
  2018-07-31 18:10               ` Anand Moon
  0 siblings, 1 reply; 25+ messages in thread
From: Lukasz Majewski @ 2018-07-27  9:56 UTC (permalink / raw)
  To: u-boot

On Fri, 27 Jul 2018 14:42:32 +0530
Anand Moon <linux.amoon@gmail.com> wrote:

> Hi Lukasz,
> 
> On 27 July 2018 at 13:54, Lukasz Majewski <lukma@denx.de> wrote:
> > On Fri, 27 Jul 2018 08:34:15 +0530
> > Anand Moon <linux.amoon@gmail.com> wrote:
> >  
> >> Hi Lukasz,
> >>
> >> On 26 July 2018 at 21:23, Lukasz Majewski <lukma@denx.de> wrote:  
> >> > Hi Anand,
> >> >  
> >> >> Hi Lukasz,
> >> >>
> >> >> On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de>
> >> >> wrote:  
> >> >> > This commit allows by default booting Odroid XU3 from the SD
> >> >> > card (when e.g. eMMC module is not present).
> >> >> >
> >> >> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >> >> >
> >> >> > ---
> >> >> >
> >> >> >  include/configs/odroid_xu3.h | 7 +++++--
> >> >> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >> >> >
> >> >> > diff --git a/include/configs/odroid_xu3.h
> >> >> > b/include/configs/odroid_xu3.h index
> >> >> > f495f6219ba9..818a06515cb2 100644 ---
> >> >> > a/include/configs/odroid_xu3.h +++
> >> >> > b/include/configs/odroid_xu3.h @@ -94,6 +94,9 @@
> >> >> >  #undef CONFIG_SYS_BOARD
> >> >> >  #define CONFIG_SYS_BOARD       "odroid"
> >> >> >
> >> >> > +#undef CONFIG_SYS_MMC_ENV_DEV
> >> >> > +#define CONFIG_SYS_MMC_ENV_DEV         2
> >> >> > +
> >> >> >  /* Define new extra env settings, including DFU settings */
> >> >> >  #undef CONFIG_EXTRA_ENV_SETTINGS
> >> >> >  #define CONFIG_EXTRA_ENV_SETTINGS \
> >> >> > @@ -105,8 +108,8 @@
> >> >> >         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
> >> >> >         "fdtfile=exynos5422-odroidxu3.dtb\0" \
> >> >> >         "boardname=odroidxu3\0" \
> >> >> > -       "mmcbootdev=0\0" \
> >> >> > -       "mmcrootdev=0\0" \
> >> >> > +       "mmcbootdev=2\0" \
> >> >> > +       "mmcrootdev=1\0" \
> >> >> >         "mmcbootpart=1\0" \
> >> >> >         "mmcrootpart=2\0" \
> >> >> >         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
> >> >> > --
> >> >> > 2.11.0
> >> >> >  
> >> >>
> >> >> This changes probably breaks the booting from eMMC on
> >> >> Odroid-XU4  
> >> >
> >> > I suppose, that XU4 is also equipped with SD card slot as XU3.
> >> >
> >> > Nonetheless, as I don't have eMMC card for mine XU3, the only
> >> > way to boot my device is SD card.
> >> >
> >> > If you believe that this may be a problem, then I can drop this
> >> > patch.
> >> >
> >> > Have you checked patches from 1-8?
> >> > Does it work for you? If yes, please send tested-by tag.
> >> >  
> >>
> >> Yes you probably need to drop this patch,
> >> I had some tough time recovering my eMMC back to flash new u-boot.
> >>
> >> I have tested my eMMC with default boot.scr its boot good.
> >> Need to modify the boot.scr to boot into SD card.  
> >
> > SD card has different layout than eMMC.
> >
> > Despite above - you just shall need to apply patch 9/9 to get the
> > board running from SD card.
> >  
> 
> Actually SD card are easy to modify and tune with just adding
> setenv mmcrootdev  "1" to autoboot.cmd from sdcard.
> 
> but with eMMC module it's bit difficult to make this work,

Ach.... Ok, I see

The problem is when you have both attached - the eMMC and SD card.

In that case I always thought that one shall boot from eMMC and the SD
card shall be used as an extra storage space.

Also, please keep in mind that IIRC the ROM first tries to boot from
eMMC, so you need BL1, u-boot placed there if it is present.

> even if we modify the autoboot.cmd and with new boot.scr
> changes do not work out.
> 
> I have hard time to recover my eMMC module to boot again.
> well I have to boot from SD card with eMMC attach and then
> flash the new bootloader to eMMC to make this work.
> 
> best regards
> -Anand




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180727/e2f346b7/attachment.sig>

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-27  9:56             ` Lukasz Majewski
@ 2018-07-31 18:10               ` Anand Moon
  2018-08-01  7:51                 ` Lukasz Majewski
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Moon @ 2018-07-31 18:10 UTC (permalink / raw)
  To: u-boot

Hi Lukasz,

On 27 July 2018 at 15:26, Lukasz Majewski <lukma@denx.de> wrote:
> On Fri, 27 Jul 2018 14:42:32 +0530
> Anand Moon <linux.amoon@gmail.com> wrote:
>
>> Hi Lukasz,
>>
>> On 27 July 2018 at 13:54, Lukasz Majewski <lukma@denx.de> wrote:
>> > On Fri, 27 Jul 2018 08:34:15 +0530
>> > Anand Moon <linux.amoon@gmail.com> wrote:
>> >
>> >> Hi Lukasz,
>> >>
>> >> On 26 July 2018 at 21:23, Lukasz Majewski <lukma@denx.de> wrote:
>> >> > Hi Anand,
>> >> >
>> >> >> Hi Lukasz,
>> >> >>
>> >> >> On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de>
>> >> >> wrote:
>> >> >> > This commit allows by default booting Odroid XU3 from the SD
>> >> >> > card (when e.g. eMMC module is not present).
>> >> >> >
>> >> >> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
>> >> >> >
>> >> >> > ---
>> >> >> >
>> >> >> >  include/configs/odroid_xu3.h | 7 +++++--
>> >> >> >  1 file changed, 5 insertions(+), 2 deletions(-)
>> >> >> >
>> >> >> > diff --git a/include/configs/odroid_xu3.h
>> >> >> > b/include/configs/odroid_xu3.h index
>> >> >> > f495f6219ba9..818a06515cb2 100644 ---
>> >> >> > a/include/configs/odroid_xu3.h +++
>> >> >> > b/include/configs/odroid_xu3.h @@ -94,6 +94,9 @@
>> >> >> >  #undef CONFIG_SYS_BOARD
>> >> >> >  #define CONFIG_SYS_BOARD       "odroid"
>> >> >> >
>> >> >> > +#undef CONFIG_SYS_MMC_ENV_DEV
>> >> >> > +#define CONFIG_SYS_MMC_ENV_DEV         2
>> >> >> > +
>> >> >> >  /* Define new extra env settings, including DFU settings */
>> >> >> >  #undef CONFIG_EXTRA_ENV_SETTINGS
>> >> >> >  #define CONFIG_EXTRA_ENV_SETTINGS \
>> >> >> > @@ -105,8 +108,8 @@
>> >> >> >         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
>> >> >> >         "fdtfile=exynos5422-odroidxu3.dtb\0" \
>> >> >> >         "boardname=odroidxu3\0" \
>> >> >> > -       "mmcbootdev=0\0" \
>> >> >> > -       "mmcrootdev=0\0" \
>> >> >> > +       "mmcbootdev=2\0" \
>> >> >> > +       "mmcrootdev=1\0" \
>> >> >> >         "mmcbootpart=1\0" \
>> >> >> >         "mmcrootpart=2\0" \
>> >> >> >         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
>> >> >> > --
>> >> >> > 2.11.0
>> >> >> >
>> >> >>
>> >> >> This changes probably breaks the booting from eMMC on
>> >> >> Odroid-XU4
>> >> >
>> >> > I suppose, that XU4 is also equipped with SD card slot as XU3.
>> >> >
>> >> > Nonetheless, as I don't have eMMC card for mine XU3, the only
>> >> > way to boot my device is SD card.
>> >> >
>> >> > If you believe that this may be a problem, then I can drop this
>> >> > patch.
>> >> >
>> >> > Have you checked patches from 1-8?
>> >> > Does it work for you? If yes, please send tested-by tag.
>> >> >
>> >>
>> >> Yes you probably need to drop this patch,
>> >> I had some tough time recovering my eMMC back to flash new u-boot.
>> >>
>> >> I have tested my eMMC with default boot.scr its boot good.
>> >> Need to modify the boot.scr to boot into SD card.
>> >
>> > SD card has different layout than eMMC.
>> >
>> > Despite above - you just shall need to apply patch 9/9 to get the
>> > board running from SD card.
>> >
>>
>> Actually SD card are easy to modify and tune with just adding
>> setenv mmcrootdev  "1" to autoboot.cmd from sdcard.
>>
>> but with eMMC module it's bit difficult to make this work,
>
> Ach.... Ok, I see
>
> The problem is when you have both attached - the eMMC and SD card.
>
> In that case I always thought that one shall boot from eMMC and the SD
> card shall be used as an extra storage space.
>
> Also, please keep in mind that IIRC the ROM first tries to boot from
> eMMC, so you need BL1, u-boot placed there if it is present.
>

Can we create a different board initialization file to fine tune the
odroid xu3 platform.
for example Odroid U3 has # board/samsung/odroid/odroid.c

where we can initialize for Odroid XU3 platform boards with following features.
board_clock_init
board_gpio_init
exynos_power_init
board_usb_init
board_leds

Best Regards
-Anand

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

* [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card
  2018-07-31 18:10               ` Anand Moon
@ 2018-08-01  7:51                 ` Lukasz Majewski
  0 siblings, 0 replies; 25+ messages in thread
From: Lukasz Majewski @ 2018-08-01  7:51 UTC (permalink / raw)
  To: u-boot

On Tue, 31 Jul 2018 23:40:10 +0530
Anand Moon <linux.amoon@gmail.com> wrote:

> Hi Lukasz,
> 
> On 27 July 2018 at 15:26, Lukasz Majewski <lukma@denx.de> wrote:
> > On Fri, 27 Jul 2018 14:42:32 +0530
> > Anand Moon <linux.amoon@gmail.com> wrote:
> >  
> >> Hi Lukasz,
> >>
> >> On 27 July 2018 at 13:54, Lukasz Majewski <lukma@denx.de> wrote:  
> >> > On Fri, 27 Jul 2018 08:34:15 +0530
> >> > Anand Moon <linux.amoon@gmail.com> wrote:
> >> >  
> >> >> Hi Lukasz,
> >> >>
> >> >> On 26 July 2018 at 21:23, Lukasz Majewski <lukma@denx.de>
> >> >> wrote:  
> >> >> > Hi Anand,
> >> >> >  
> >> >> >> Hi Lukasz,
> >> >> >>
> >> >> >> On 26 July 2018 at 03:55, Lukasz Majewski <lukma@denx.de>
> >> >> >> wrote:  
> >> >> >> > This commit allows by default booting Odroid XU3 from the
> >> >> >> > SD card (when e.g. eMMC module is not present).
> >> >> >> >
> >> >> >> > Signed-off-by: Lukasz Majewski <lukma@denx.de>
> >> >> >> >
> >> >> >> > ---
> >> >> >> >
> >> >> >> >  include/configs/odroid_xu3.h | 7 +++++--
> >> >> >> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >> >> >> >
> >> >> >> > diff --git a/include/configs/odroid_xu3.h
> >> >> >> > b/include/configs/odroid_xu3.h index
> >> >> >> > f495f6219ba9..818a06515cb2 100644 ---
> >> >> >> > a/include/configs/odroid_xu3.h +++
> >> >> >> > b/include/configs/odroid_xu3.h @@ -94,6 +94,9 @@
> >> >> >> >  #undef CONFIG_SYS_BOARD
> >> >> >> >  #define CONFIG_SYS_BOARD       "odroid"
> >> >> >> >
> >> >> >> > +#undef CONFIG_SYS_MMC_ENV_DEV
> >> >> >> > +#define CONFIG_SYS_MMC_ENV_DEV         2
> >> >> >> > +
> >> >> >> >  /* Define new extra env settings, including DFU settings
> >> >> >> > */ #undef CONFIG_EXTRA_ENV_SETTINGS
> >> >> >> >  #define CONFIG_EXTRA_ENV_SETTINGS \
> >> >> >> > @@ -105,8 +108,8 @@
> >> >> >> >         "console=" CONFIG_DEFAULT_CONSOLE "\0"\
> >> >> >> >         "fdtfile=exynos5422-odroidxu3.dtb\0" \
> >> >> >> >         "boardname=odroidxu3\0" \
> >> >> >> > -       "mmcbootdev=0\0" \
> >> >> >> > -       "mmcrootdev=0\0" \
> >> >> >> > +       "mmcbootdev=2\0" \
> >> >> >> > +       "mmcrootdev=1\0" \
> >> >> >> >         "mmcbootpart=1\0" \
> >> >> >> >         "mmcrootpart=2\0" \
> >> >> >> >         "dfu_alt_system="CONFIG_DFU_ALT_SYSTEM \
> >> >> >> > --
> >> >> >> > 2.11.0
> >> >> >> >  
> >> >> >>
> >> >> >> This changes probably breaks the booting from eMMC on
> >> >> >> Odroid-XU4  
> >> >> >
> >> >> > I suppose, that XU4 is also equipped with SD card slot as XU3.
> >> >> >
> >> >> > Nonetheless, as I don't have eMMC card for mine XU3, the only
> >> >> > way to boot my device is SD card.
> >> >> >
> >> >> > If you believe that this may be a problem, then I can drop
> >> >> > this patch.
> >> >> >
> >> >> > Have you checked patches from 1-8?
> >> >> > Does it work for you? If yes, please send tested-by tag.
> >> >> >  
> >> >>
> >> >> Yes you probably need to drop this patch,
> >> >> I had some tough time recovering my eMMC back to flash new
> >> >> u-boot.
> >> >>
> >> >> I have tested my eMMC with default boot.scr its boot good.
> >> >> Need to modify the boot.scr to boot into SD card.  
> >> >
> >> > SD card has different layout than eMMC.
> >> >
> >> > Despite above - you just shall need to apply patch 9/9 to get the
> >> > board running from SD card.
> >> >  
> >>
> >> Actually SD card are easy to modify and tune with just adding
> >> setenv mmcrootdev  "1" to autoboot.cmd from sdcard.
> >>
> >> but with eMMC module it's bit difficult to make this work,  
> >
> > Ach.... Ok, I see
> >
> > The problem is when you have both attached - the eMMC and SD card.
> >
> > In that case I always thought that one shall boot from eMMC and the
> > SD card shall be used as an extra storage space.
> >
> > Also, please keep in mind that IIRC the ROM first tries to boot from
> > eMMC, so you need BL1, u-boot placed there if it is present.
> >  
> 
> Can we create a different board initialization file to fine tune the
> odroid xu3 platform.
> for example Odroid U3 has # board/samsung/odroid/odroid.c
> 

The idea was to use common board file (./board/samsung/common/board.c)
for all Exynos5 based boards.

The potential differences were supposed to be added via device tree.

> where we can initialize for Odroid XU3 platform boards with following
> features. board_clock_init
> board_gpio_init
> exynos_power_init
> board_usb_init

Above two can be achieved with driver model. Providing such functions
would be a step back from full XU3/XU4 conversion to DM.

> board_leds
> 
> Best Regards
> -Anand




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180801/1a3d650c/attachment.sig>

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

end of thread, other threads:[~2018-08-01  7:51 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25 22:25 [U-Boot] [PATCH v1 0/9] ARM: Odroid XU3: Enable DM_MMC support which is necessary for CONFIG_BLK Lukasz Majewski
2018-07-25 22:25 ` [U-Boot] [PATCH v1 1/9] ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from exynos_dwmci_get_config() Lukasz Majewski
2018-07-27  3:06   ` Anand Moon
2018-07-25 22:25 ` [U-Boot] [PATCH v1 2/9] ARM: Odroid XU3: config: Disable SDHCI support in the Odroid XU3 Lukasz Majewski
2018-07-27  3:07   ` Anand Moon
2018-07-25 22:25 ` [U-Boot] [PATCH v1 3/9] ARM: Odroid XU3: Enable driver model support for MMC (DM_MMC) Lukasz Majewski
2018-07-27  3:07   ` Anand Moon
2018-07-25 22:25 ` [U-Boot] [PATCH v1 4/9] ARM: Odroid XU3: Fix autoboot.cmd to use ${mmcbootdev} instead of hardcoded 0 Lukasz Majewski
2018-07-27  3:09   ` Anand Moon
2018-07-25 22:25 ` [U-Boot] [PATCH v1 5/9] ARM: Odroid XU3: Adjust BOOT_TARGET_DEVICES to allow booting from SD card (mmc2) Lukasz Majewski
2018-07-27  3:10   ` Anand Moon
2018-07-25 22:25 ` [U-Boot] [PATCH v1 6/9] ARM: Odroid XU3: MAINTAINERS: Add a co-maintainer for OdroidXU3 Lukasz Majewski
2018-07-25 22:25 ` [U-Boot] [PATCH v1 7/9] ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC (sdr_timing) Lukasz Majewski
2018-07-27  3:12   ` Anand Moon
2018-07-25 22:25 ` [U-Boot] [PATCH v1 8/9] ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMC Lukasz Majewski
2018-07-27  3:13   ` Anand Moon
2018-07-25 22:25 ` [U-Boot] [PATCH v1 9/9] ARM: Odroid XU3: Modify Odroid XU3 config to boot by default from SD card Lukasz Majewski
2018-07-26 15:28   ` Anand Moon
2018-07-26 15:53     ` Lukasz Majewski
2018-07-27  3:04       ` Anand Moon
2018-07-27  8:24         ` Lukasz Majewski
2018-07-27  9:12           ` Anand Moon
2018-07-27  9:56             ` Lukasz Majewski
2018-07-31 18:10               ` Anand Moon
2018-08-01  7:51                 ` Lukasz Majewski

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.