[U-Boot] [PATCH] rockchip: derive ethaddr from cpuid

Heiko Stübner heiko at sntech.de
Wed Jul 10 12:53:18 UTC 2019


Hi Rohan,

Am Mittwoch, 10. Juli 2019, 14:08:31 CEST schrieb Rohan Garg:
> Hey Heiko
> > Also, that code looks pretty much like the same in rk3399-puma.
> > 
> > So maybe it might be good to have this in a common location so
> > more boards can access common code instead of duplicating that
> > whole function numerous times?
> 
> Sounds good to me, do you have any recommendations where something like this 
> would live?

>From a cursory glance, it looks like most Rockchip socs have that cpu-id
value in the efuse (I checked rk3288, rk3399, rk3328 ... rk3368 efuse looks
similar but I'm not sure yet if it also has that id value).

So in any case I'd suggest somewhere in mach-rockchip, so that all
Rockchip socs can profit from that if they want.

It might be good to separate the cpu-id reading from the serial-generation
though, to parameterize the offset+length.

cpu_id = rockchip_cpuid_from_efuse(offset, length);
	//containing the efuse related code
rockchip_cpuid_set(cpu_id);
	//containing the calculations and env-setting


Heiko




More information about the U-Boot mailing list