diff mbox

[U-Boot,1/4] ARM: tegra: add SoC-level hook for board_late_init()

Message ID 20160912175115.13198-1-swarren@wwwdotorg.org
State Accepted
Commit 86919a2
Delegated to: Joe Hershberger
Headers show

Commit Message

Stephen Warren Sept. 12, 2016, 5:51 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

Extend the Tegra186 implementation of board_late_init() to call a per-SoC
"hook" function. This will allow SoC-specific (rather than Tegra-wide)
functionality to be implemented without the core Tegra code needing to be
aware of the details. While board186.c is currently only used for
Tegra186, it should be applicable to any other future SoC, and perhaps its
simple design could be back-ported to older SoCs in the future too.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
This series logically relies on the DWC EQOS driver series that I just
sent in order for the device to actually work. However, the code should
compile and even run (albeit without yet enabling Ethernet) even without
both series applied. So, the two series don't need to be applied in any
particular order, nor in the same branch.

 arch/arm/mach-tegra/board186.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Simon Glass Sept. 19, 2016, 12:58 a.m. UTC | #1
On 12 September 2016 at 11:51, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> Extend the Tegra186 implementation of board_late_init() to call a per-SoC
> "hook" function. This will allow SoC-specific (rather than Tegra-wide)
> functionality to be implemented without the core Tegra code needing to be
> aware of the details. While board186.c is currently only used for
> Tegra186, it should be applicable to any other future SoC, and perhaps its
> simple design could be back-ported to older SoCs in the future too.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> This series logically relies on the DWC EQOS driver series that I just
> sent in order for the device to actually work. However, the code should
> compile and even run (albeit without yet enabling Ethernet) even without
> both series applied. So, the two series don't need to be applied in any
> particular order, nor in the same branch.
>
>  arch/arm/mach-tegra/board186.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Joe Hershberger Nov. 2, 2016, 8:29 p.m. UTC | #2
On Mon, Sep 12, 2016 at 12:51 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> Extend the Tegra186 implementation of board_late_init() to call a per-SoC
> "hook" function. This will allow SoC-specific (rather than Tegra-wide)
> functionality to be implemented without the core Tegra code needing to be
> aware of the details. While board186.c is currently only used for
> Tegra186, it should be applicable to any other future SoC, and perhaps its
> simple design could be back-ported to older SoCs in the future too.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger Nov. 7, 2016, 5:31 p.m. UTC | #3
Hi Stephen,

https://patchwork.ozlabs.org/patch/668910/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/arch/arm/mach-tegra/board186.c b/arch/arm/mach-tegra/board186.c
index 1b9799fd80c2..38261e421cc1 100644
--- a/arch/arm/mach-tegra/board186.c
+++ b/arch/arm/mach-tegra/board186.c
@@ -26,11 +26,16 @@  int board_init(void)
 	return tegra_board_init();
 }
 
-int board_late_init(void)
+__weak int tegra_soc_board_init_late(void)
 {
 	return 0;
 }
 
+int board_late_init(void)
+{
+	return tegra_soc_board_init_late();
+}
+
 void pad_init_mmc(struct mmc_host *host)
 {
 }