Another question: how can I decide between BB-C and BB-XM in kernel code?

I need to build a common kernel (so that SD cards are exchangeable)
and I found that some GPIOs connected to expansion headers have been
moved between BB-C4 and BB-XM (especially the DSS lines where I use 6
of them as additional GPIOs since the display has only 18 bit). So my
kernel setup code and drivers needs to access different GPIOs
depending on which board they run.

Having two different SD card images or configuring different bootargs
is not a solution.

So what is the easiest way to determine the BB version in the kernel?
Should I port the GPIO171-173 detection logic from U-Boot? Or should I
try to detect the CPU version (OMAP3530 vs. DM3730)? My kernel is
based on


If your tweaks are in board-omap3beagle.c this may help...


I think the easiest way is to detect the CPU because there is a ready function in the kernel: something like get_sku_id(). It works 100% and no need to use this unreliable method with GPIO

2010/9/20 Robert Nelson <>

Yes for pre-xM to xM the cpu (cpu_is_omap3630()) would be easiest..

Until a future "xM A+" comes out with different i/o.. :wink:

However if you need to detect a Bx vs Cx, the gpio method is really
the only way.. (as later Bx (6/7) used the same core ES3.1 as Cx's...)


Thanks for these patches! That's what I had been looking for.