summaryrefslogtreecommitdiff
path: root/board/omap3/beagle
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-06-14 22:05:42 +0200
committerWolfgang Denk <wd@denx.de>2009-06-14 22:05:42 +0200
commit92afd368bba7d98b2b7bfb51082c3639bb2119b3 (patch)
tree74ffc8a3f4980f7c6bad6bf80bb41d3974eff685 /board/omap3/beagle
parent6b1f78ae6ad037382ad430b07064105c88f7ac02 (diff)
parent388517e4b745b00256c2fa201ce7bccb67b4f245 (diff)
Merge branch 'next' of ../master
Diffstat (limited to 'board/omap3/beagle')
-rw-r--r--board/omap3/beagle/beagle.c32
-rw-r--r--board/omap3/beagle/beagle.h2
-rw-r--r--board/omap3/beagle/u-boot.lds63
3 files changed, 19 insertions, 78 deletions
diff --git a/board/omap3/beagle/beagle.c b/board/omap3/beagle/beagle.c
index 7eb70ee3b..d268e1870 100644
--- a/board/omap3/beagle/beagle.c
+++ b/board/omap3/beagle/beagle.c
@@ -33,6 +33,7 @@
#include <asm/io.h>
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
+#include <asm/arch/gpio.h>
#include <asm/mach-types.h>
#include "beagle.h"
@@ -57,7 +58,7 @@ int board_init(void)
/*
* Routine: beagle_get_revision
- * Description: Return revision of the BeagleBoard this code is running on.
+ * 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.
*/
@@ -74,22 +75,25 @@ int beagle_get_revision(void)
*/
void beagle_identify(void)
{
- gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
-
- /* Configure GPIO 171 as input */
- writel(readl(&gpio6_base->oe) | GPIO11, &gpio6_base->oe);
-
- /* Get value of GPIO 171 */
- beagle_revision_c = readl(&gpio6_base->datain) & BOARD_REVISION_MASK;
+ 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;
+ }
printf("Board revision ");
- if (beagle_revision_c) {
- printf("Ax/Bx\n");
- beagle_revision_c = 0;
- } else {
+ if (beagle_revision_c)
printf("C\n");
- beagle_revision_c = 1;
- }
+ else
+ printf("Ax/Bx\n");
}
/*
diff --git a/board/omap3/beagle/beagle.h b/board/omap3/beagle/beagle.h
index 324ec66fb..3a0f907d7 100644
--- a/board/omap3/beagle/beagle.h
+++ b/board/omap3/beagle/beagle.h
@@ -371,7 +371,7 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(D2D_MBUSFLAG), (IEN | PTD | DIS | M0)) /*d2d_mbusflag*/\
MUX_VAL(CP(D2D_SBUSFLAG), (IEN | PTD | DIS | M0)) /*d2d_sbusflag*/\
MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\
- MUX_VAL(CP(SDRC_CKE1), (IDIS | PTD | DIS | M7)) /*sdrc_cke1*/
+ MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/
#define MUX_BEAGLE_C() \
MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\
diff --git a/board/omap3/beagle/u-boot.lds b/board/omap3/beagle/u-boot.lds
deleted file mode 100644
index 3af04a2ce..000000000
--- a/board/omap3/beagle/u-boot.lds
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * January 2004 - Changed to support H4 device
- * Copyright (c) 2004 Texas Instruments
- *
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
- . = 0x00000000;
-
- . = ALIGN(4);
- .text :
- {
- cpu/arm_cortexa8/start.o (.text)
- *(.text)
- }
-
- . = ALIGN(4);
- .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-
- .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
- __exidx_start = .;
- .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
- __exidx_end = .;
-
- . = ALIGN(4);
- .data : { *(.data) }
-
- . = ALIGN(4);
- .got : { *(.got) }
-
- __u_boot_cmd_start = .;
- .u_boot_cmd : { *(.u_boot_cmd) }
- __u_boot_cmd_end = .;
-
- . = ALIGN(4);
- __bss_start = .;
- .bss : { *(.bss) }
- _end = .;
-}