From patchwork Mon Sep 12 17:51:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 668910 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3sXwNR0Q8Kz9rvt for ; Tue, 13 Sep 2016 03:51:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7FF2FA7534; Mon, 12 Sep 2016 19:51:32 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RJJp5jEdytsL; Mon, 12 Sep 2016 19:51:32 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B7894BB1A; Mon, 12 Sep 2016 19:51:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 797C34BB1A for ; Mon, 12 Sep 2016 19:51:29 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g2LoAIS4AMGV for ; Mon, 12 Sep 2016 19:51:29 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id 1D7394BA35 for ; Mon, 12 Sep 2016 19:51:27 +0200 (CEST) Received: from swarren-lx1.nvidia.com (thunderhill.nvidia.com [216.228.112.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPSA id A1C1A1C03C9; Mon, 12 Sep 2016 11:51:31 -0600 (MDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99 at avon.wwwdotorg.org From: Stephen Warren To: u-boot@lists.denx.de, Simon Glass , Tom Warren , Stephen Warren Date: Mon, 12 Sep 2016 11:51:12 -0600 Message-Id: <20160912175115.13198-1-swarren@wwwdotorg.org> X-Mailer: git-send-email 2.9.3 X-NVConfidentiality: public Subject: [U-Boot] [PATCH 1/4] ARM: tegra: add SoC-level hook for board_late_init() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Stephen Warren 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 Reviewed-by: Simon Glass Acked-by: Joe Hershberger --- 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(-) 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) { }