summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNishanth Menon <menon.nishanth@gmail.com>2008-09-11 10:26:16 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2008-09-15 10:11:05 +0200
commit261f587e3d9280de8ef2e67b799eefab153a012b (patch)
treea614ad6b2dd66d010616a648063d0984d0b5d70b
parent2f620bb88c1cb8272d231bc33cda62611a8ed696 (diff)
downloadbarebox-261f587e3d9280de8ef2e67b799eefab153a012b.tar.gz
barebox-261f587e3d9280de8ef2e67b799eefab153a012b.tar.xz
Boards:OMAP: Add GPMC init
This patch adds support for GPMC initialization to existing board files - beagle and sdp3430 Signed-off-by: Nishanth Menon <x0nishan@ti.com>
-rw-r--r--board/omap/board-beagle.c5
-rw-r--r--board/omap/board-sdp343x.c20
2 files changed, 25 insertions, 0 deletions
diff --git a/board/omap/board-beagle.c b/board/omap/board-beagle.c
index a1b7b714cc..0156cb70d7 100644
--- a/board/omap/board-beagle.c
+++ b/board/omap/board-beagle.c
@@ -59,6 +59,7 @@
#include <asm/arch/syslib.h>
#include <asm/arch/control.h>
#include <asm/arch/omap3-mux.h>
+#include <asm/arch/gpmc.h>
#include "board.h"
/******************** Board Boot Time *******************/
@@ -270,6 +271,10 @@ static int beagle_devices_init(void)
if (ret)
goto failed;
#endif
+#ifdef CONFIG_GPMC
+ /* WP is made high and WAIT1 active Low */
+ gpmc_generic_init(0x10);
+#endif
failed:
return ret;
}
diff --git a/board/omap/board-sdp343x.c b/board/omap/board-sdp343x.c
index b8162ab361..f53a8cfb60 100644
--- a/board/omap/board-sdp343x.c
+++ b/board/omap/board-sdp343x.c
@@ -54,6 +54,7 @@
#include <asm/arch/syslib.h>
#include <asm/arch/control.h>
#include <asm/arch/omap3-mux.h>
+#include <asm/arch/gpmc.h>
#include "board.h"
/******************** Board Boot Time *******************/
@@ -610,6 +611,8 @@ static void mux_config(void)
/******************** Board Run Time *******************/
+/*-----------------------CONSOLE Devices -----------------------------------*/
+
#ifdef CONFIG_DRIVER_SERIAL_NS16550
static struct NS16550_plat serial_plat = {
@@ -642,6 +645,15 @@ static int sdp3430_console_init(void)
console_initcall(sdp3430_console_init);
#endif /* CONFIG_DRIVER_SERIAL_NS16550 */
+/*------------------------- FLASH Devices -----------------------------------*/
+static int sdp3430_flash_init(void)
+{
+#ifdef CONFIG_GPMC
+ /* WP is made high and WAIT1 active Low */
+ gpmc_generic_init(0x10);
+#endif
+ return 0;
+}
struct device_d sdram_dev = {
.name = "ram",
.id = "ram0",
@@ -652,7 +664,9 @@ struct device_d sdram_dev = {
.type = DEVICE_TYPE_DRAM,
};
+/*------------------------- RAM Devices -------------------------------------*/
#ifndef CONFIG_CMD_MEMORY
+
static struct driver_d ram_drv = {
.name = "ram",
.probe = dummy_probe,
@@ -665,6 +679,8 @@ static struct driver_d ram_drv = {
};
#endif
+/*-----------------------Generic Devices Initialization ---------------------*/
+
static int sdp3430_devices_init(void)
{
int ret;
@@ -676,6 +692,10 @@ static int sdp3430_devices_init(void)
if (ret)
goto failed;
#endif
+ ret = sdp3430_flash_init();
+ if (ret)
+ goto failed;
+
failed:
return ret;
}