* [PATCH] rockchip: rk3399: spl: Don't init dram if TPL enabled
@ 2019-05-08 6:39 ` Jagan Teki
0 siblings, 0 replies; 4+ messages in thread
From: Jagan Teki @ 2019-05-08 6:39 UTC (permalink / raw)
To: Simon Glass, Philipp Tomsich, Kever Yang, Akash Gajjar
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
Jagan Teki, u-boot-0aAXYlwwYIKGBzrmiIFOJg
DRAM init would require in
- TPL stage if target support TPL and
- SPL stage if target support SPL alone
So, don't initialize the dram in SPL if TPL defined and at
the same time enable it if TPL undefined which is SPL alone.
Tested in TPL and SPL supported boards.
Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
---
arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
index 3eea73ef33..a439e09b61 100644
--- a/arch/arm/mach-rockchip/rk3399-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
@@ -198,11 +198,13 @@ void board_init_f(ulong dummy)
return;
}
+#if !defined(SUPPORT_TPL)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret) {
pr_err("DRAM init failed: %d\n", ret);
return;
}
+#endif
}
#if defined(SPL_GPIO_SUPPORT)
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] rockchip: rk3399: spl: Don't init dram if TPL enabled
@ 2019-05-08 6:39 ` Jagan Teki
0 siblings, 0 replies; 4+ messages in thread
From: Jagan Teki @ 2019-05-08 6:39 UTC (permalink / raw)
To: u-boot
DRAM init would require in
- TPL stage if target support TPL and
- SPL stage if target support SPL alone
So, don't initialize the dram in SPL if TPL defined and at
the same time enable it if TPL undefined which is SPL alone.
Tested in TPL and SPL supported boards.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
index 3eea73ef33..a439e09b61 100644
--- a/arch/arm/mach-rockchip/rk3399-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
@@ -198,11 +198,13 @@ void board_init_f(ulong dummy)
return;
}
+#if !defined(SUPPORT_TPL)
ret = uclass_get_device(UCLASS_RAM, 0, &dev);
if (ret) {
pr_err("DRAM init failed: %d\n", ret);
return;
}
+#endif
}
#if defined(SPL_GPIO_SUPPORT)
--
2.18.0.321.gffc6fa0e3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] rockchip: rk3399: spl: Don't init dram if TPL enabled
2019-05-08 6:39 ` [U-Boot] " Jagan Teki
@ 2019-05-08 7:52 ` Kever Yang
-1 siblings, 0 replies; 4+ messages in thread
From: Kever Yang @ 2019-05-08 7:52 UTC (permalink / raw)
To: Jagan Teki, Simon Glass, Philipp Tomsich, Akash Gajjar
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/,
u-boot-0aAXYlwwYIKGBzrmiIFOJg
Hi Jagan,
On 05/08/2019 02:39 PM, Jagan Teki wrote:
> DRAM init would require in
> - TPL stage if target support TPL and
> - SPL stage if target support SPL alone
>
> So, don't initialize the dram in SPL if TPL defined and at
> the same time enable it if TPL undefined which is SPL alone.
>
> Tested in TPL and SPL supported boards.
>
> Signed-off-by: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
> ---
> arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
> index 3eea73ef33..a439e09b61 100644
> --- a/arch/arm/mach-rockchip/rk3399-board-spl.c
> +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
> @@ -198,11 +198,13 @@ void board_init_f(ulong dummy)
> return;
> }
>
> +#if !defined(SUPPORT_TPL)
> ret = uclass_get_device(UCLASS_RAM, 0, &dev);
> if (ret) {
> pr_err("DRAM init failed: %d\n", ret);
> return;
> }
> +#endif
We still need to init DRAM driver in SPL so that we can get correct ram
info,
but we don't need to run the dram init program, which should have been
handled in DRAM driver.
Thanks,
- Kever
> }
>
> #if defined(SPL_GPIO_SUPPORT)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] rockchip: rk3399: spl: Don't init dram if TPL enabled
@ 2019-05-08 7:52 ` Kever Yang
0 siblings, 0 replies; 4+ messages in thread
From: Kever Yang @ 2019-05-08 7:52 UTC (permalink / raw)
To: u-boot
Hi Jagan,
On 05/08/2019 02:39 PM, Jagan Teki wrote:
> DRAM init would require in
> - TPL stage if target support TPL and
> - SPL stage if target support SPL alone
>
> So, don't initialize the dram in SPL if TPL defined and at
> the same time enable it if TPL undefined which is SPL alone.
>
> Tested in TPL and SPL supported boards.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> arch/arm/mach-rockchip/rk3399-board-spl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
> index 3eea73ef33..a439e09b61 100644
> --- a/arch/arm/mach-rockchip/rk3399-board-spl.c
> +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
> @@ -198,11 +198,13 @@ void board_init_f(ulong dummy)
> return;
> }
>
> +#if !defined(SUPPORT_TPL)
> ret = uclass_get_device(UCLASS_RAM, 0, &dev);
> if (ret) {
> pr_err("DRAM init failed: %d\n", ret);
> return;
> }
> +#endif
We still need to init DRAM driver in SPL so that we can get correct ram
info,
but we don't need to run the dram init program, which should have been
handled in DRAM driver.
Thanks,
- Kever
> }
>
> #if defined(SPL_GPIO_SUPPORT)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-08 7:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 6:39 [PATCH] rockchip: rk3399: spl: Don't init dram if TPL enabled Jagan Teki
2019-05-08 6:39 ` [U-Boot] " Jagan Teki
[not found] ` <20190508063956.26549-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2019-05-08 7:52 ` Kever Yang
2019-05-08 7:52 ` [U-Boot] " Kever Yang
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.