mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
soc: rockchip: cpuinfo: Export rockchip_soc_id_init() function
Allow rockchip_soc_id_init() called before pure_initcall. Change-Id: Ie0d3a18e96df02c2d6ab4aa3e17ea102685cd0c4 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
@@ -195,8 +195,11 @@ static void rk3568_init(void)
|
||||
rk356x_set_cpu_version();
|
||||
}
|
||||
|
||||
static int __init rockchip_soc_id_init(void)
|
||||
int __init rockchip_soc_id_init(void)
|
||||
{
|
||||
if (rockchip_soc_id)
|
||||
return 0;
|
||||
|
||||
if (cpu_is_rk3288()) {
|
||||
rk3288_init();
|
||||
} else if (cpu_is_rk312x()) {
|
||||
|
||||
@@ -54,6 +54,9 @@ static inline void rockchip_set_cpu(unsigned long code)
|
||||
rockchip_soc_id &= ~ROCKCHIP_CPU_MASK;
|
||||
rockchip_soc_id |= (code << ROCKCHIP_CPU_SHIFT) & ROCKCHIP_CPU_MASK;
|
||||
}
|
||||
|
||||
int rockchip_soc_id_init(void);
|
||||
|
||||
#else
|
||||
|
||||
#define rockchip_soc_id 0
|
||||
@@ -70,6 +73,12 @@ static inline void rockchip_set_cpu_version(unsigned long ver)
|
||||
static inline void rockchip_set_cpu(unsigned long code)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int rockchip_soc_id_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CPU_RV1126) || defined(CONFIG_CPU_RV1109)
|
||||
|
||||
Reference in New Issue
Block a user