All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] rockchip: rv1108: use correct API for board callback
@ 2020-04-13  1:38 Kever Yang
  2020-04-13  1:38 ` [PATCH 2/3] rockchip: rv1108: Enable grf as pre-reloc node Kever Yang
  2020-04-13  1:38 ` [PATCH 3/3] rockchip: evb-rv1108: enable board early init Kever Yang
  0 siblings, 2 replies; 4+ messages in thread
From: Kever Yang @ 2020-04-13  1:38 UTC (permalink / raw)
  To: u-boot

Use board_early_init_f() instead of mach_cpu_init() for board, the
board_early_init_f() is used for board init and after dm_initf, while
the mach_cpu_init() is used for CPU/SOC and before dm_initf()(not able
to use syscon API).

Fixes: 9cec336708 ("rockchip: evb-rv1108: Use syscon API to get grf base")
Fixes: 4aa33690fc {"rockchip: elgin-rv1108: Use syscon API to get grf base")

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 board/elgin/elgin_rv1108/elgin_rv1108.c | 2 +-
 board/rockchip/evb_rv1108/evb_rv1108.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/elgin/elgin_rv1108/elgin_rv1108.c b/board/elgin/elgin_rv1108/elgin_rv1108.c
index c5a1cc95e4..f9100e178c 100644
--- a/board/elgin/elgin_rv1108/elgin_rv1108.c
+++ b/board/elgin/elgin_rv1108/elgin_rv1108.c
@@ -14,7 +14,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int mach_cpu_init(void)
+int board_early_init_f(void)
 {
 	struct rv1108_grf *grf;
 	enum {
diff --git a/board/rockchip/evb_rv1108/evb_rv1108.c b/board/rockchip/evb_rv1108/evb_rv1108.c
index 5d622c3737..f34fe4401b 100644
--- a/board/rockchip/evb_rv1108/evb_rv1108.c
+++ b/board/rockchip/evb_rv1108/evb_rv1108.c
@@ -13,7 +13,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int mach_cpu_init(void)
+int board_early_init_f(void)
 {
 	struct rv1108_grf *grf;
 	enum {
-- 
2.17.1

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

* [PATCH 2/3] rockchip: rv1108: Enable grf as pre-reloc node
  2020-04-13  1:38 [PATCH 1/3] rockchip: rv1108: use correct API for board callback Kever Yang
@ 2020-04-13  1:38 ` Kever Yang
  2020-04-13  1:38 ` [PATCH 3/3] rockchip: evb-rv1108: enable board early init Kever Yang
  1 sibling, 0 replies; 4+ messages in thread
From: Kever Yang @ 2020-04-13  1:38 UTC (permalink / raw)
  To: u-boot

The grf node will be used before relocate, enable it in dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 arch/arm/dts/rv1108-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/rv1108-u-boot.dtsi b/arch/arm/dts/rv1108-u-boot.dtsi
index 41ac054b81..6a2098b8d4 100644
--- a/arch/arm/dts/rv1108-u-boot.dtsi
+++ b/arch/arm/dts/rv1108-u-boot.dtsi
@@ -4,3 +4,7 @@
  */
 
 #include "rockchip-u-boot.dtsi"
+
+&grf {
+	u-boot,dm-pre-reloc;
+};
-- 
2.17.1

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

* [PATCH 3/3] rockchip: evb-rv1108: enable board early init
  2020-04-13  1:38 [PATCH 1/3] rockchip: rv1108: use correct API for board callback Kever Yang
  2020-04-13  1:38 ` [PATCH 2/3] rockchip: rv1108: Enable grf as pre-reloc node Kever Yang
@ 2020-04-13  1:38 ` Kever Yang
  2020-04-13 12:17   ` Otavio Salvador
  1 sibling, 1 reply; 4+ messages in thread
From: Kever Yang @ 2020-04-13  1:38 UTC (permalink / raw)
  To: u-boot

Enable board early init callback to init board specific hardware.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 configs/evb-rv1108_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/evb-rv1108_defconfig b/configs/evb-rv1108_defconfig
index ae2c9704ab..3998ba4f2a 100644
--- a/configs/evb-rv1108_defconfig
+++ b/configs/evb-rv1108_defconfig
@@ -10,6 +10,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_DEFAULT_FDT_FILE="rv1108-evb.dtb"
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_RANDOM_UUID=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
-- 
2.17.1

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

* [PATCH 3/3] rockchip: evb-rv1108: enable board early init
  2020-04-13  1:38 ` [PATCH 3/3] rockchip: evb-rv1108: enable board early init Kever Yang
@ 2020-04-13 12:17   ` Otavio Salvador
  0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2020-04-13 12:17 UTC (permalink / raw)
  To: u-boot

On Sun, Apr 12, 2020 at 10:39 PM Kever Yang <kever.yang@rock-chips.com> wrote:
>
> Enable board early init callback to init board specific hardware.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>

Please send the same patch to elgin-rv1108 config.


-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

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

end of thread, other threads:[~2020-04-13 12:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13  1:38 [PATCH 1/3] rockchip: rv1108: use correct API for board callback Kever Yang
2020-04-13  1:38 ` [PATCH 2/3] rockchip: rv1108: Enable grf as pre-reloc node Kever Yang
2020-04-13  1:38 ` [PATCH 3/3] rockchip: evb-rv1108: enable board early init Kever Yang
2020-04-13 12:17   ` Otavio Salvador

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.