[U-Boot] [PATCH v2 02/22] omap4: add OMAP4430 revision check

Wolfgang Denk
2011-05-17T08:10:03Z

Dear Aneesh V,

In message <4DD21843.4060000@ti.com> you wrote:
>
> > 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.

Then go for something like

#define OMAP4430_ES1_0 0x44300100
#define OMAP4430_ES2_0 0x44300200
#define OMAP4430_ES2_1 0x44300201
#define OMAP4430_ES2_2 0x44300202

sprintf(omap4_rev, "OMAP%x ES%x.%x",
(rev >> 16) & 0xFFFF,
(rev >> 8) & 0xFF,
rev & 0xFF);

or so.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The optimum committee has no members.
- Norman Augustine