diff options
Diffstat (limited to 'arch/arm/mach-rockchip/board.c')
-rw-r--r-- | arch/arm/mach-rockchip/board.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index b2a88e789d..8ca3463731 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -11,6 +11,7 @@ #include <asm/arch-rockchip/boot_mode.h> #include <asm/arch-rockchip/clock.h> #include <asm/arch-rockchip/periph.h> +#include <asm/arch-rockchip/misc.h> #include <power/regulator.h> DECLARE_GLOBAL_DATA_PTR; @@ -102,3 +103,25 @@ int fastboot_set_reboot_flag(void) return 0; } #endif + +#ifdef CONFIG_MISC_INIT_R +__weak int misc_init_r(void) +{ + const u32 cpuid_offset = 0x7; + const u32 cpuid_length = 0x10; + u8 cpuid[cpuid_length]; + int ret; + + ret = rockchip_cpuid_from_efuse(cpuid_offset, cpuid_length, cpuid); + if (ret) + return ret; + + ret = rockchip_cpuid_set(cpuid, cpuid_length); + if (ret) + return ret; + + ret = rockchip_setup_macaddr(); + + return ret; +} +#endif |