summaryrefslogtreecommitdiff
path: root/recipes/u-boot/u-boot-git/beagleboard/revision-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/u-boot/u-boot-git/beagleboard/revision-detection.patch')
-rw-r--r--recipes/u-boot/u-boot-git/beagleboard/revision-detection.patch144
1 files changed, 0 insertions, 144 deletions
diff --git a/recipes/u-boot/u-boot-git/beagleboard/revision-detection.patch b/recipes/u-boot/u-boot-git/beagleboard/revision-detection.patch
deleted file mode 100644
index 634efda385..0000000000
--- a/recipes/u-boot/u-boot-git/beagleboard/revision-detection.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From 15fbe5ff9ee2fd2f8da4c16805d6c7ccf7244bae Mon Sep 17 00:00:00 2001
-From: Syed Mohammed Khasim <khasim@ti.com>
-Date: Fri, 8 Jan 2010 20:13:47 +0530
-Subject: [PATCH] OMAP3 Beagle Update revision detection
-
-New BeagleBoard revision C4 uses a new ID. Update revision detection.
-
-Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
-Signed-off-by: Syed Mohammed Khasim <khasim@ti.com>
----
- board/ti/beagle/beagle.c | 65 ++++++++++++++++++++++++++++-----------------
- board/ti/beagle/beagle.h | 8 ++++-
- 2 files changed, 46 insertions(+), 27 deletions(-)
-
-diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
-index 32d501e..0def5a6 100644
---- a/board/ti/beagle/beagle.c
-+++ b/board/ti/beagle/beagle.c
-@@ -38,7 +38,7 @@
- #include <asm/mach-types.h>
- #include "beagle.h"
-
--static int beagle_revision_c;
-+static int beagle_revision;
-
- /*
- * Routine: board_init
-@@ -60,41 +60,57 @@ int board_init(void)
- /*
- * Routine: beagle_get_revision
- * Description: Return the revision of the BeagleBoard this code is running on.
-- * If it is a revision Ax/Bx board, this function returns 0,
-- * on a revision C board you will get a 1.
- */
- int beagle_get_revision(void)
- {
-- return beagle_revision_c;
-+ return beagle_revision;
- }
-
- /*
- * Routine: beagle_identify
-- * Description: Detect if we are running on a Beagle revision Ax/Bx or
-- * Cx. This can be done by GPIO_171. If this is low, we are
-- * running on a revision C board.
-+ * Description: Detect if we are running on a Beagle revision Ax/Bx,
-+ * C1/2/3, C4 or D. This can be done by reading
-+ * the level of GPIO173, GPIO172 and GPIO171. This should
-+ * result in
-+ * GPIO173, GPIO172, GPIO171: 1 1 1 => Ax/Bx
-+ * GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3
-+ * GPIO173, GPIO172, GPIO171: 1 0 1 => C4
-+ * GPIO173, GPIO172, GPIO171: 0 0 0 => XM
- */
- void beagle_identify(void)
- {
-- beagle_revision_c = 0;
-- if (!omap_request_gpio(171)) {
-- unsigned int val;
--
-- omap_set_gpio_direction(171, 1);
-- val = omap_get_gpio_datain(171);
-- omap_free_gpio(171);
--
-- if (val)
-- beagle_revision_c = 0;
-- else
-- beagle_revision_c = 1;
-- }
-+ omap_request_gpio(171);
-+ omap_request_gpio(172);
-+ omap_request_gpio(173);
-+ omap_set_gpio_direction(171, 1);
-+ omap_set_gpio_direction(172, 1);
-+ omap_set_gpio_direction(173, 1);
-+
-+ beagle_revision = omap_get_gpio_datain(173) << 2 |
-+ omap_get_gpio_datain(172) << 1 |
-+ omap_get_gpio_datain(171);
-+ omap_free_gpio(171);
-+ omap_free_gpio(172);
-+ omap_free_gpio(173);
-
- printf("Board revision ");
-- if (beagle_revision_c)
-- printf("C\n");
-- else
-+
-+ switch (beagle_revision) {
-+ case REVISION_AXBX:
- printf("Ax/Bx\n");
-+ break;
-+ case REVISION_CX:
-+ printf("C1/C2/C3\n");
-+ break;
-+ case REVISION_C4:
-+ printf("C4\n");
-+ break;
-+ case REVISION_XM:
-+ printf("XM\n");
-+ break;
-+ default:
-+ printf("unknown 0x%02x\n", beagle_revision);
-+ }
- }
-
- /*
-@@ -137,7 +153,6 @@ void set_muxconf_regs(void)
- {
- MUX_BEAGLE();
-
-- if (beagle_revision_c) {
-+ if (beagle_revision != REVISION_AXBX)
- MUX_BEAGLE_C();
-- }
- }
-diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h
-index 7fe6275..b1720c9 100644
---- a/board/ti/beagle/beagle.h
-+++ b/board/ti/beagle/beagle.h
-@@ -33,7 +33,11 @@ const omap3_sysinfo sysinfo = {
- #endif
- };
-
--#define BOARD_REVISION_MASK (0x1 << 11)
-+/* BeagleBoard revisions */
-+#define REVISION_AXBX 0x7
-+#define REVISION_CX 0x6
-+#define REVISION_C4 0x5
-+#define REVISION_XM 0x0
-
- /*
- * IEN - Input Enable
-@@ -264,7 +268,7 @@ const omap3_sysinfo sysinfo = {
- MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*GPIO_170*/\
- MUX_VAL(CP(MCSPI1_CLK), (IEN | PTU | EN | M4)) /*GPIO_171*/\
- MUX_VAL(CP(MCSPI1_SIMO), (IEN | PTU | EN | M4)) /*GPIO_172*/\
-- MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI*/\
-+ MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTU | EN | M4)) /*GPIO_173*/\
- MUX_VAL(CP(MCSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\
- MUX_VAL(CP(MCSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\
- MUX_VAL(CP(MCSPI1_CS2), (IDIS | PTD | DIS | M4)) /*GPIO_176*/\
---
-1.5.6.3