x-load: fall back to xM when detecting beagleboard revisions
authorKoen Kooi <koen@dominion.thruhere.net>
Tue, 8 Mar 2011 07:52:31 +0000 (08:52 +0100)
committerKoen Kooi <koen@dominion.thruhere.net>
Tue, 8 Mar 2011 07:52:31 +0000 (08:52 +0100)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
recipes-bsp/x-load/x-load/xmc.patch [new file with mode: 0644]
recipes-bsp/x-load/x-load_git.bb

diff --git a/recipes-bsp/x-load/x-load/xmc.patch b/recipes-bsp/x-load/x-load/xmc.patch
new file mode 100644 (file)
index 0000000..bddcb8f
--- /dev/null
@@ -0,0 +1,52 @@
+From b35937bf29c828e311f1d9bb1385bd32d34ec060 Mon Sep 17 00:00:00 2001
+From: Jason Kridner <jkridner@beagleboard.org>
+Date: Mon, 7 Mar 2011 19:31:15 -0600
+Subject: [PATCH] Forced newer revisions to default to xM.
+
+---
+ 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 1b3d8c7..d55d32e 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);
+@@ -662,7 +675,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.6.1
+
index 5be261b7c8c45b79a02ebe359de245c3385df372..eb8f3eaf92c4e54bbc78864f55dfb2a268ccbe0a 100644 (file)
@@ -3,7 +3,7 @@ require x-load.inc
 #FILESPATHPKG_prepend = "x-load-git:x-load-git/${MACHINE}"
 
 PV = "1.44+${PR}+gitr${SRCREV}"
-PR ="r20"
+PR ="r21"
 PE = "1"
 
 SRCREV_pn-${PN} = "24b8b7f41a83540433024854736518876257672c"
@@ -13,6 +13,7 @@ SRC_URI = "git://gitorious.org/x-loader/x-loader.git;branch=master;protocol=git
            file://0003-MUX-Configure-SYS_NIRQ2-pin-in-safe-mode.patch \
            file://0004-OMAP4-clocks-Disable-slimbus-and-pad_clks.patch \
            file://0005-omap4-Make-1GHz-as-default-MPU-clock.patch \
+           file://xmc.patch \
           "
 
 S = "${WORKDIR}/git"