s3c2410 mmc errata?

Harald Welte laforge at openmoko.org
Thu Jun 7 10:01:16 CEST 2007

On Wed, Jun 06, 2007 at 08:07:33PM +0200, Pierre Ossman wrote:
> Harald Welte wrote:
> > I'll double check this with my specs for later processors.  Runtime
> > check is definitely preferred, since one kernel has to support multiple
> > different processors...
> >   
> You're more experienced with embedded stuff than I am; how do you
> conveniently determine the current CPU?

unfortunately there currently is no API for that.  But the way s3cmci
solves this problem is by exporting three platform devices, one
s3c2412-sdi, one s3c2410-sdi and one s3c2440-sdi.

struct s3cmci_host has a 'is2440' member that you can use to check.

There are other examples in the code where 2440 specifics have been put
into 'if (host->is2440)' blocks.

unfortunately 'if (!host->is2440)' will not cut it, since it would 
basically mean 2410 + 2412.

I would therefore argue that the 'is2440' is replaced with something
like 'cpu_type' which can then be defined to constants like

Ben: I still believe that it would be helpful, if not even better, if
the s3c platform code exported something like a cheap inline function to
determine the specific S3C variant.  This could solve this 'once and for
all' in all the drivers in a unique way, rather than every driver having
to reinvent the wheel.

- Harald Welte <laforge at openmoko.org>          	        http://openmoko.org/
Software for the world's first truly open Free Software mobile phone

More information about the openmoko-kernel mailing list