]> git.baikalelectronics.ru Git - uboot.git/commit
rockchip: misc: read the correct number of bytes from the efuse
authorHeiko Stuebner <heiko@sntech.de>
Wed, 25 Sep 2019 18:40:56 +0000 (20:40 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 28 Sep 2019 14:26:32 +0000 (22:26 +0800)
commit4f4f1b26263f41bb33b4eb2c326c67727c7d97b4
treeb8a877876bae5332bf9233806a784a34365d6373
parentce71b0e43d64540a17358163452f32b76b59bbdf
rockchip: misc: read the correct number of bytes from the efuse

Originally the cpuid var the value gets read into was defined as
    u8 cpuid[RK3399_CPUID_LEN];
hence the sizeof(cpuid) would return the correct the correct number
of array elements.

With the move to a separate function cpuid becomes a pointer and
sizeof(cpuid) hence returns the pointer size - 8 in the arm64 case.

We do have the actual id length available as function param so use
it for actual amount of bytes to read.

Fixes: bf21c263294a ("rockchip: rk3399: derive ethaddr from cpuid")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
arch/arm/mach-rockchip/misc.c