Re: [U-Boot] [PATCH v0] rockchip: adding the missing "/" in entries of boot_devices

2019-10-18 Thread Kever Yang


On 2019/10/17 下午3:22, d...@t-chip.com.cn wrote:

From: Levin Du 

Without the prefix, "same-as-spl" in `u-boot,spl-boot-order` will not work
as expected. When board_boot_order() `spl-boot-order.c` meets
"same-as-spl", it gets the conf by looking the boot_devices table by boot
source, and parse the node by the conf with:

node = fdt_path_offset(blob, conf);

which will failed without the "/" indicating the path.

Currently only entries of boot_devices in rk3399 have the "/" prefix.
Therefore add the missing ones in other boards.

Signed-off-by: Levin Du 


Reviewed-by: Kever Yang


Thanks,
- Kever


---

  arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
  arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
  arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
  arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
  arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
  5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c 
b/arch/arm/mach-rockchip/rk3188/rk3188.c
index 95f0e3ccbead..1b012f7f67ae 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -14,8 +14,8 @@
  #define GRF_BASE  0x20008000
  
  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {

-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@1021c000",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@10214000",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@1021c000",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@10214000",
  };
  
  #ifdef CONFIG_DEBUG_UART_BOARD_INIT

diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c 
b/arch/arm/mach-rockchip/rk322x/rk322x.c
index cd0bf8a70cc0..562117e6c13a 100644
--- a/arch/arm/mach-rockchip/rk322x/rk322x.c
+++ b/arch/arm/mach-rockchip/rk322x/rk322x.c
@@ -8,8 +8,8 @@
  #include 
  
  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {

-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@3002",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@3000",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@3002",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@3000",
  };
  
  #ifdef CONFIG_DEBUG_UART_BOARD_INIT

diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c 
b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 057ce920809e..987b4e0d58c2 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -22,8 +22,8 @@ DECLARE_GLOBAL_DATA_PTR;
  #define GRF_BASE  0xff77
  
  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {

-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@ff0f",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@ff0c",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
  };
  
  #ifdef CONFIG_SPL_BUILD

diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c 
b/arch/arm/mach-rockchip/rk3328/rk3328.c
index c2448d727302..8c81242e5d4b 100644
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
@@ -19,8 +19,8 @@ DECLARE_GLOBAL_DATA_PTR;
  #define FW_DDR_CON_REG0xFF7C0040
  
  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {

-   [BROM_BOOTSOURCE_EMMC] = "rksdmmc@ff52",
-   [BROM_BOOTSOURCE_SD] = "rksdmmc@ff50",
+   [BROM_BOOTSOURCE_EMMC] = "/rksdmmc@ff52",
+   [BROM_BOOTSOURCE_SD] = "/rksdmmc@ff50",
  };
  
  static struct mm_region rk3328_mem_map[] = {

diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c 
b/arch/arm/mach-rockchip/rk3368/rk3368.c
index 7ccd417a18ce..20ae79779473 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -54,8 +54,8 @@ static struct mm_region rk3368_mem_map[] = {
  struct mm_region *mem_map = rk3368_mem_map;
  
  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {

-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@ff0f",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@ff0c",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
  };
  
  #ifdef CONFIG_ARCH_EARLY_INIT_R



___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v0] rockchip: adding the missing "/" in entries of boot_devices

2019-10-17 Thread Philipp Tomsich


> On 17.10.2019, at 09:22, d...@t-chip.com.cn wrote:
> 
> From: Levin Du 
> 
> Without the prefix, "same-as-spl" in `u-boot,spl-boot-order` will not work
> as expected. When board_boot_order() `spl-boot-order.c` meets
> "same-as-spl", it gets the conf by looking the boot_devices table by boot
> source, and parse the node by the conf with:
> 
>   node = fdt_path_offset(blob, conf);
> 
> which will failed without the "/" indicating the path.
> 
> Currently only entries of boot_devices in rk3399 have the "/" prefix.
> Therefore add the missing ones in other boards.

Good catch. One can thus tell what platform I originally tested this on ;-)

> Signed-off-by: Levin Du 

Reviewed-by: Philipp Tomsich 

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v0] rockchip: adding the missing "/" in entries of boot_devices

2019-10-17 Thread Mark Kettenis
> From: d...@t-chip.com.cn
> Date: Thu, 17 Oct 2019 15:22:38 +0800
> 
> From: Levin Du 
> 
> Without the prefix, "same-as-spl" in `u-boot,spl-boot-order` will not work
> as expected. When board_boot_order() `spl-boot-order.c` meets
> "same-as-spl", it gets the conf by looking the boot_devices table by boot
> source, and parse the node by the conf with:
> 
>node = fdt_path_offset(blob, conf);
> 
> which will failed without the "/" indicating the path.
> 
> Currently only entries of boot_devices in rk3399 have the "/" prefix.
> Therefore add the missing ones in other boards.
> 
> Signed-off-by: Levin Du 

I have a very similar diff in my tree that I didn't manage to send out yet.

Reviewed by: Mark Kettenis 

> ---
> 
>  arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
>  arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
>  arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
>  arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
>  arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
>  5 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c 
> b/arch/arm/mach-rockchip/rk3188/rk3188.c
> index 95f0e3ccbead..1b012f7f67ae 100644
> --- a/arch/arm/mach-rockchip/rk3188/rk3188.c
> +++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
> @@ -14,8 +14,8 @@
>  #define GRF_BASE 0x20008000
>  
>  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
> - [BROM_BOOTSOURCE_EMMC] = "dwmmc@1021c000",
> - [BROM_BOOTSOURCE_SD] = "dwmmc@10214000",
> + [BROM_BOOTSOURCE_EMMC] = "/dwmmc@1021c000",
> + [BROM_BOOTSOURCE_SD] = "/dwmmc@10214000",
>  };
>  
>  #ifdef CONFIG_DEBUG_UART_BOARD_INIT
> diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c 
> b/arch/arm/mach-rockchip/rk322x/rk322x.c
> index cd0bf8a70cc0..562117e6c13a 100644
> --- a/arch/arm/mach-rockchip/rk322x/rk322x.c
> +++ b/arch/arm/mach-rockchip/rk322x/rk322x.c
> @@ -8,8 +8,8 @@
>  #include 
>  
>  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
> - [BROM_BOOTSOURCE_EMMC] = "dwmmc@3002",
> - [BROM_BOOTSOURCE_SD] = "dwmmc@3000",
> + [BROM_BOOTSOURCE_EMMC] = "/dwmmc@3002",
> + [BROM_BOOTSOURCE_SD] = "/dwmmc@3000",
>  };
>  
>  #ifdef CONFIG_DEBUG_UART_BOARD_INIT
> diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c 
> b/arch/arm/mach-rockchip/rk3288/rk3288.c
> index 057ce920809e..987b4e0d58c2 100644
> --- a/arch/arm/mach-rockchip/rk3288/rk3288.c
> +++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
> @@ -22,8 +22,8 @@ DECLARE_GLOBAL_DATA_PTR;
>  #define GRF_BASE 0xff77
>  
>  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
> - [BROM_BOOTSOURCE_EMMC] = "dwmmc@ff0f",
> - [BROM_BOOTSOURCE_SD] = "dwmmc@ff0c",
> + [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
> + [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
>  };
>  
>  #ifdef CONFIG_SPL_BUILD
> diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c 
> b/arch/arm/mach-rockchip/rk3328/rk3328.c
> index c2448d727302..8c81242e5d4b 100644
> --- a/arch/arm/mach-rockchip/rk3328/rk3328.c
> +++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
> @@ -19,8 +19,8 @@ DECLARE_GLOBAL_DATA_PTR;
>  #define FW_DDR_CON_REG   0xFF7C0040
>  
>  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
> - [BROM_BOOTSOURCE_EMMC] = "rksdmmc@ff52",
> - [BROM_BOOTSOURCE_SD] = "rksdmmc@ff50",
> + [BROM_BOOTSOURCE_EMMC] = "/rksdmmc@ff52",
> + [BROM_BOOTSOURCE_SD] = "/rksdmmc@ff50",
>  };
>  
>  static struct mm_region rk3328_mem_map[] = {
> diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c 
> b/arch/arm/mach-rockchip/rk3368/rk3368.c
> index 7ccd417a18ce..20ae79779473 100644
> --- a/arch/arm/mach-rockchip/rk3368/rk3368.c
> +++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
> @@ -54,8 +54,8 @@ static struct mm_region rk3368_mem_map[] = {
>  struct mm_region *mem_map = rk3368_mem_map;
>  
>  const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
> - [BROM_BOOTSOURCE_EMMC] = "dwmmc@ff0f",
> - [BROM_BOOTSOURCE_SD] = "dwmmc@ff0c",
> + [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
> + [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
>  };
>  
>  #ifdef CONFIG_ARCH_EARLY_INIT_R
> -- 
> 2.23.0.37.g745f6812895b
> 
> 
> 
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v0] rockchip: adding the missing "/" in entries of boot_devices

2019-10-17 Thread djw
From: Levin Du 

Without the prefix, "same-as-spl" in `u-boot,spl-boot-order` will not work
as expected. When board_boot_order() `spl-boot-order.c` meets
"same-as-spl", it gets the conf by looking the boot_devices table by boot
source, and parse the node by the conf with:

   node = fdt_path_offset(blob, conf);

which will failed without the "/" indicating the path.

Currently only entries of boot_devices in rk3399 have the "/" prefix.
Therefore add the missing ones in other boards.

Signed-off-by: Levin Du 

---

 arch/arm/mach-rockchip/rk3188/rk3188.c | 4 ++--
 arch/arm/mach-rockchip/rk322x/rk322x.c | 4 ++--
 arch/arm/mach-rockchip/rk3288/rk3288.c | 4 ++--
 arch/arm/mach-rockchip/rk3328/rk3328.c | 4 ++--
 arch/arm/mach-rockchip/rk3368/rk3368.c | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3188/rk3188.c 
b/arch/arm/mach-rockchip/rk3188/rk3188.c
index 95f0e3ccbead..1b012f7f67ae 100644
--- a/arch/arm/mach-rockchip/rk3188/rk3188.c
+++ b/arch/arm/mach-rockchip/rk3188/rk3188.c
@@ -14,8 +14,8 @@
 #define GRF_BASE   0x20008000
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@1021c000",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@10214000",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@1021c000",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@10214000",
 };
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
diff --git a/arch/arm/mach-rockchip/rk322x/rk322x.c 
b/arch/arm/mach-rockchip/rk322x/rk322x.c
index cd0bf8a70cc0..562117e6c13a 100644
--- a/arch/arm/mach-rockchip/rk322x/rk322x.c
+++ b/arch/arm/mach-rockchip/rk322x/rk322x.c
@@ -8,8 +8,8 @@
 #include 
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@3002",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@3000",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@3002",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@3000",
 };
 
 #ifdef CONFIG_DEBUG_UART_BOARD_INIT
diff --git a/arch/arm/mach-rockchip/rk3288/rk3288.c 
b/arch/arm/mach-rockchip/rk3288/rk3288.c
index 057ce920809e..987b4e0d58c2 100644
--- a/arch/arm/mach-rockchip/rk3288/rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/rk3288.c
@@ -22,8 +22,8 @@ DECLARE_GLOBAL_DATA_PTR;
 #define GRF_BASE   0xff77
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@ff0f",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@ff0c",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
 };
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/mach-rockchip/rk3328/rk3328.c 
b/arch/arm/mach-rockchip/rk3328/rk3328.c
index c2448d727302..8c81242e5d4b 100644
--- a/arch/arm/mach-rockchip/rk3328/rk3328.c
+++ b/arch/arm/mach-rockchip/rk3328/rk3328.c
@@ -19,8 +19,8 @@ DECLARE_GLOBAL_DATA_PTR;
 #define FW_DDR_CON_REG 0xFF7C0040
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "rksdmmc@ff52",
-   [BROM_BOOTSOURCE_SD] = "rksdmmc@ff50",
+   [BROM_BOOTSOURCE_EMMC] = "/rksdmmc@ff52",
+   [BROM_BOOTSOURCE_SD] = "/rksdmmc@ff50",
 };
 
 static struct mm_region rk3328_mem_map[] = {
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c 
b/arch/arm/mach-rockchip/rk3368/rk3368.c
index 7ccd417a18ce..20ae79779473 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -54,8 +54,8 @@ static struct mm_region rk3368_mem_map[] = {
 struct mm_region *mem_map = rk3368_mem_map;
 
 const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
-   [BROM_BOOTSOURCE_EMMC] = "dwmmc@ff0f",
-   [BROM_BOOTSOURCE_SD] = "dwmmc@ff0c",
+   [BROM_BOOTSOURCE_EMMC] = "/dwmmc@ff0f",
+   [BROM_BOOTSOURCE_SD] = "/dwmmc@ff0c",
 };
 
 #ifdef CONFIG_ARCH_EARLY_INIT_R
-- 
2.23.0.37.g745f6812895b



___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot