mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
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: 0482538499
("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>
This commit is contained in:
parent
dfd590075c
commit
03f98b75e4
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ int rockchip_cpuid_from_efuse(const u32 cpuid_offset,
|
|||
}
|
||||
|
||||
/* read the cpu_id range from the efuses */
|
||||
ret = misc_read(dev, cpuid_offset, cpuid, sizeof(cpuid));
|
||||
ret = misc_read(dev, cpuid_offset, cpuid, cpuid_length);
|
||||
if (ret) {
|
||||
debug("%s: reading cpuid from the efuses failed\n",
|
||||
__func__);
|
||||
|
|
Loading…
Reference in a new issue