tegra: Provide a function to allow LCD PMIC setup
Some LCDs require a PMIC to be set up - add a function for this. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:
parent
d55b7d4c53
commit
8277636420
|
|
@ -17,4 +17,12 @@ void invalidate_dcache(void);
|
||||||
*/
|
*/
|
||||||
int tegra_board_id(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
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,11 @@ int checkboard(void)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_DISPLAY_BOARDINFO */
|
#endif /* CONFIG_DISPLAY_BOARDINFO */
|
||||||
|
|
||||||
|
__weak int tegra_lcd_pmic_init(int board_it)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routine: board_init
|
* Routine: board_init
|
||||||
* Description: Early hardware init.
|
* Description: Early hardware init.
|
||||||
|
|
@ -107,6 +112,7 @@ int checkboard(void)
|
||||||
int board_init(void)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
__maybe_unused int err;
|
__maybe_unused int err;
|
||||||
|
__maybe_unused int board_id;
|
||||||
|
|
||||||
/* Do clocks and UART first so that printf() works */
|
/* Do clocks and UART first so that printf() works */
|
||||||
clock_init();
|
clock_init();
|
||||||
|
|
@ -147,6 +153,10 @@ int board_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_LCD
|
#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);
|
tegra_lcd_check_next_stage(gd->fdt_blob, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue