]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
tegra: Allow board-specific init
authorSimon Glass <sjg@chromium.org>
Fri, 5 Jun 2015 20:39:42 +0000 (14:39 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 22:42:34 +0000 (00:42 +0200)
Add a hook to allows boards to add their own init to board_init().

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/include/asm/arch-tegra/sys_proto.h
arch/arm/mach-tegra/board2.c

index 83f9f472c9daf53383438ce36e69771376b11754..b64f9d813b0eb1ba284a390b4a5bd03a92669ff7 100644 (file)
@@ -25,4 +25,11 @@ int tegra_board_id(void);
  */
 int tegra_lcd_pmic_init(int board_id);
 
+/**
+ * nvidia_board_init() - perform any board-specific init
+ *
+ * @return 0 if OK, -ve on error
+ */
+int nvidia_board_init(void);
+
 #endif
index 131802ae62bcaafa90bd24cdfb6c1a3180aeeb06..ebcee4ed9a516529f1c04e79ea471316bf93f871 100644 (file)
@@ -107,6 +107,11 @@ __weak int tegra_lcd_pmic_init(int board_it)
        return 0;
 }
 
+__weak int nvidia_board_init(void)
+{
+       return 0;
+}
+
 /*
  * Routine: board_init
  * Description: Early hardware init.
@@ -180,8 +185,7 @@ int board_init(void)
        /* prepare the WB code to LP0 location */
        warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE);
 #endif
-
-       return 0;
+       return nvidia_board_init();
 }
 
 #ifdef CONFIG_BOARD_EARLY_INIT_F