#define RKTF_VLDVER_MINOR (3)
-static void rockchip_tf_ver_check(void)
+static int __init rockchip_tf_ver_check(void)
{
u64 val;
u32 ver_val;
if ((RKTF_VER_MAJOR(ver_val) >= RKTF_VLDVER_MAJOR) &&
(RKTF_VER_MINOR(ver_val) >= RKTF_VLDVER_MINOR))
- return;
+ return 0;
ver_error:
pr_err("trusted firmware need to update to(%d.%d) or is invaild!\n",
RKTF_VLDVER_MAJOR, RKTF_VLDVER_MINOR);
} while(1);
-}
+ return 0;
+}
+device_initcall_sync(rockchip_tf_ver_check);
#endif
static int rk3288_efuse_readregs(u32 addr, u32 length, u8 *buf)
return efuse_buf[23+ch];
}
-#ifdef CONFIG_ARM
static void __init rk3288_set_system_serial(void)
{
int i;
system_serial_low = crc32(0, buf, 8);
system_serial_high = crc32(system_serial_low, buf + 8, 8);
}
-#else
-static inline void __init rk3288_set_system_serial(void) {}
-#endif
int rk312x_efuse_readregs(u32 addr, u32 length, u8 *buf)
{
{
int ret;
- if (cpu_is_rk3288()) {
+ if (cpu_is_rk3288() || cpu_is_rk3228()) {
rk3288_efuse_init();
} else if (cpu_is_rk312x()) {
ret = rk312x_efuse_readregs(0, 32, efuse_buf);
}
efuse_phys = regs->start;
- rockchip_tf_ver_check();
-
rk3288_efuse_init();
return 0;
}