[U-Boot] [PATCH v2 1/3] rockchip: rk3399: derive ethaddr from cpuid
Kever Yang
kever.yang at rock-chips.com
Sun Jul 21 04:24:30 UTC 2019
HI Rohan,
On 2019/7/19 下午10:56, Rohan Garg wrote:
> Hey Kever
>
>> This should be depends on CONFIG_MISC_INIT_R.
>>
> Ack.
>
>> It's great to make these code as common code so that other SoCs
>>
>> can share it, is it possible to also make this function common?
>>
>> Not every SoC have efuse driver, so for those SoCs, we need a random
>>
>> serial No.
>>
> Do you think we can merge this as is for now and then move onto making it more
> generic for other devices at a later date?
This is a per-SoC feature, so it's fine to add this into rk3399-board.c
without
much extra work, and other device can enable or disable it by the option
CONFIG_MISC_INIT_R. So I think you can move the code from evb-rk3399.c
to rk3399-board.c directly.
Thanks,
- Kever
>
>>> + const u32 cpuid_offset = 0x7;
>>> + const u32 cpuid_length = 0x10;
>>> + u8 cpuid[cpuid_length];
>>> +
>>> + rockchip_cpuid_from_efuse(cpuid_offset, cpuid_length, cpuid);
>>> + rockchip_cpuid_set(cpuid, cpuid_length);
>>> + rockchip_setup_macaddr();
>> It will be better for these function calls with return value.
>>
>> There should be a blank line before 'return';
> Ack.
>
> Cheers
> Rohan Garg
More information about the U-Boot
mailing list