[U-Boot] [PATCH v2 09/26] tegra: Provide a function to allow LCD PMIC setup
Simon Glass
sjg at chromium.org
Sun Feb 1 17:54:04 CET 2015
Some LCDs require a PMIC to be set up - add a function for this.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2: None
arch/arm/include/asm/arch-tegra/sys_proto.h | 8 ++++++++
board/nvidia/common/board.c | 10 ++++++++++
2 files changed, 18 insertions(+)
diff --git a/arch/arm/include/asm/arch-tegra/sys_proto.h b/arch/arm/include/asm/arch-tegra/sys_proto.h
index 914d8b9..83f9f47 100644
--- a/arch/arm/include/asm/arch-tegra/sys_proto.h
+++ b/arch/arm/include/asm/arch-tegra/sys_proto.h
@@ -17,4 +17,12 @@ void invalidate_dcache(void);
*/
int tegra_board_id(void);
+/**
+ * tegra_lcd_pmic_init() - Set up the PMIC for a board
+ *
+ * @board_id: Board ID which may be used to select LCD type
+ * @return 0 if OK, -ve on error
+ */
+int tegra_lcd_pmic_init(int board_id);
+
#endif
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 2ee9b6d..0a33bc5 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -99,6 +99,11 @@ int checkboard(void)
}
#endif /* CONFIG_DISPLAY_BOARDINFO */
+__weak int tegra_lcd_pmic_init(int board_it)
+{
+ return 0;
+}
+
/*
* Routine: board_init
* Description: Early hardware init.
@@ -106,6 +111,7 @@ int checkboard(void)
int board_init(void)
{
__maybe_unused int err;
+ __maybe_unused int board_id;
/* Do clocks and UART first so that printf() works */
clock_init();
@@ -146,6 +152,10 @@ int board_init(void)
#endif
#ifdef CONFIG_LCD
+ board_id = tegra_board_id();
+ err = tegra_lcd_pmic_init(board_id);
+ if (err)
+ return err;
tegra_lcd_check_next_stage(gd->fdt_blob, 0);
#endif
--
2.2.0.rc0.207.ga3a616c
More information about the U-Boot
mailing list