[U-Boot] [PATCH v2 02/22] omap4: add OMAP4430 revision check
Aneesh V
aneesh at ti.com
Tue May 17 08:40:03 CEST 2011
Hi Wolfgang,
On Monday 16 May 2011 09:05 PM, Wolfgang Denk wrote:
> Dear Aneesh V,
>
...
>>
>> 1. Please note that the above function is just for getting the string
>> not for the revision itself. To get the revision we have
>> omap4_revision().
>
> Well, when you already have such a funxction, then why cannot it be
> made to return useful values that are well-suited for formatting?
>
> Instead of
>
> #define OMAP4430_ES1_0 1
> #define OMAP4430_ES2_0 2
> #define OMAP4430_ES2_1 3
> #define OMAP4430_ES2_2 4
>
> you could use
>
> #define OMAP4430_ES1_0 10
> #define OMAP4430_ES2_0 20
> #define OMAP4430_ES2_1 21
> #define OMAP4430_ES2_2 22
>
> And then use a plain
>
> sprintf(omap4_rev, "OMAP4430 ES%d.%d", rev/10, rev%10);
>
> or similar.
This is a good idea. The only minor hitch is that OMAP4460 will come
into picture in near future, again having at least ES1_0. But I think
that can be worked out.
best regards,
Aneesh
More information about the U-Boot
mailing list