mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 18:59:44 +00:00
e3ee4be321
Detection of board revision is done early - before power setup. In case of Odroid XU3/XU4/HC1 family, the detection is done using ADC which is supplied by LDO4/VDD_ADC regulator. This regulator could be turned off (e.g. by kernel before reboot). If ADC is used early, the regulators are not yet available and the detection won't work. Split the revision detection out of set_board_type() into separate function called later - either when displaying board info (in late mode) or during misc_init_r. The idea is that set_board_type() will be called early so its method of detection are limited to flattened device tree (exynos5-dt-types.c for Exynos5) or GPIO (odroid.c for Exynos4412). The newly added set_board_revision() can be called only later, when resources like regulator are available. This is necessary to fix the detection of Odroid HC1 after reboot, if kernel turned off the LDO4 regulator. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
39 lines
771 B
C
39 lines
771 B
C
#ifndef __SAMSUNG_MISC_COMMON_H__
|
|
#define __SAMSUNG_MISC_COMMON_H__
|
|
|
|
#ifdef CONFIG_REVISION_TAG
|
|
u32 get_board_rev(void);
|
|
#endif
|
|
|
|
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
|
void set_board_info(void);
|
|
#endif
|
|
|
|
#ifdef CONFIG_LCD_MENU
|
|
enum {
|
|
BOOT_MODE_INFO,
|
|
BOOT_MODE_THOR,
|
|
BOOT_MODE_UMS,
|
|
BOOT_MODE_DFU,
|
|
BOOT_MODE_GPT,
|
|
BOOT_MODE_ENV,
|
|
BOOT_MODE_EXIT,
|
|
};
|
|
|
|
void keys_init(void);
|
|
void check_boot_mode(void);
|
|
#endif /* CONFIG_LCD_MENU */
|
|
|
|
#ifdef CONFIG_CMD_BMP
|
|
void draw_logo(void);
|
|
#endif
|
|
|
|
#ifdef CONFIG_SET_DFU_ALT_INFO
|
|
char *get_dfu_alt_system(char *interface, char *devstr);
|
|
char *get_dfu_alt_boot(char *interface, char *devstr);
|
|
#endif
|
|
void set_board_type(void);
|
|
void set_board_revision(void);
|
|
const char *get_board_type(void);
|
|
|
|
#endif /* __SAMSUNG_MISC_COMMON_H__ */
|