[PATCH] BeagleBoard: Forced newer revisions to default to xM.

8 views
Skip to first unread message

Jason Kridner

unread,
Mar 10, 2011, 4:04:43 PM3/10/11
to x-lo...@googlegroups.com, jkri...@beagleboard.org, beagl...@googlegroups.com
Even if we don't know what revision of the board it is, the default should be to use the
latest known revision, not to simply fail or default to an older revision that could be
detected anyway.

Signed-off-by: Jason Kridner <jkri...@beagleboard.org>
---
board/omap3530beagle/omap3530beagle.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c
index 073e35a..15943f5 100644
--- a/board/omap3530beagle/omap3530beagle.c
+++ b/board/omap3530beagle/omap3530beagle.c
@@ -212,6 +212,7 @@ u32 cpu_is_3410(void)
* GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3
* GPIO173, GPIO172, GPIO171: 1 0 1 => C4
* GPIO173, GPIO172, GPIO171: 0 0 0 => XM
+ * default => XM
******************************************/
int beagle_revision(void)
{
@@ -227,6 +228,18 @@ int beagle_revision(void)
rev = omap_get_gpio_datain(173) << 2 |
omap_get_gpio_datain(172) << 1 |
omap_get_gpio_datain(171);
+
+ /* Default newer board revisions to XM */
+ switch(rev) {
+ case REVISION_AXBX:
+ case REVISION_CX:
+ case REVISION_C4:
+ break;
+ case REVISION_XM:
+ default:
+ rev = REVISION_XM;
+ }
+
omap_free_gpio(171);
omap_free_gpio(172);
omap_free_gpio(173);
@@ -690,7 +703,7 @@ int misc_init_r(void)
printf("Beagle Rev C4\n");
break;
case REVISION_XM:
- printf("Beagle xM Rev A\n");
+ printf("Beagle xM\n");
break;
default:
printf("Beagle unknown 0x%02x\n", rev);
--
1.5.6.4

Nishanth Menon

unread,
Mar 10, 2011, 8:18:26 PM3/10/11
to x-lo...@googlegroups.com, Jason Kridner, beagl...@googlegroups.com
Acked-by: Nishanth Menon <n...@ti.com>

--
Regards,
Nishanth Menon

Anand Gadiyar

unread,
Mar 14, 2011, 4:32:11 AM3/14/11
to x-lo...@googlegroups.com, Jason Kridner, beagl...@googlegroups.com
Nishanth Menon wrote:
> Jason Kridner wrote, on 03/11/2011 02:34 AM:
> > Even if we don't know what revision of the board it is, the
> > default should be to use the latest known revision, not to
> > simply fail or default to an older revision that could be
> > detected anyway.
> >
> > Signed-off-by: Jason Kridner<jkri...@beagleboard.org>

...

> Acked-by: Nishanth Menon <n...@ti.com>

Applied, thanks!

Reply all
Reply to author
Forward
0 new messages