9
0
Fork 0

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>
This commit is contained in:
Nishanth Menon 2008-09-11 10:26:16 -05:00 committed by Sascha Hauer
parent 2f620bb88c
commit 261f587e3d
2 changed files with 25 additions and 0 deletions

View File

@ -59,6 +59,7 @@
#include <asm/arch/syslib.h> #include <asm/arch/syslib.h>
#include <asm/arch/control.h> #include <asm/arch/control.h>
#include <asm/arch/omap3-mux.h> #include <asm/arch/omap3-mux.h>
#include <asm/arch/gpmc.h>
#include "board.h" #include "board.h"
/******************** Board Boot Time *******************/ /******************** Board Boot Time *******************/
@ -270,6 +271,10 @@ static int beagle_devices_init(void)
if (ret) if (ret)
goto failed; goto failed;
#endif #endif
#ifdef CONFIG_GPMC
/* WP is made high and WAIT1 active Low */
gpmc_generic_init(0x10);
#endif
failed: failed:
return ret; return ret;
} }

View File

@ -54,6 +54,7 @@
#include <asm/arch/syslib.h> #include <asm/arch/syslib.h>
#include <asm/arch/control.h> #include <asm/arch/control.h>
#include <asm/arch/omap3-mux.h> #include <asm/arch/omap3-mux.h>
#include <asm/arch/gpmc.h>
#include "board.h" #include "board.h"
/******************** Board Boot Time *******************/ /******************** Board Boot Time *******************/
@ -610,6 +611,8 @@ static void mux_config(void)
/******************** Board Run Time *******************/ /******************** Board Run Time *******************/
/*-----------------------CONSOLE Devices -----------------------------------*/
#ifdef CONFIG_DRIVER_SERIAL_NS16550 #ifdef CONFIG_DRIVER_SERIAL_NS16550
static struct NS16550_plat serial_plat = { static struct NS16550_plat serial_plat = {
@ -642,6 +645,15 @@ static int sdp3430_console_init(void)
console_initcall(sdp3430_console_init); console_initcall(sdp3430_console_init);
#endif /* CONFIG_DRIVER_SERIAL_NS16550 */ #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 = { struct device_d sdram_dev = {
.name = "ram", .name = "ram",
.id = "ram0", .id = "ram0",
@ -652,7 +664,9 @@ struct device_d sdram_dev = {
.type = DEVICE_TYPE_DRAM, .type = DEVICE_TYPE_DRAM,
}; };
/*------------------------- RAM Devices -------------------------------------*/
#ifndef CONFIG_CMD_MEMORY #ifndef CONFIG_CMD_MEMORY
static struct driver_d ram_drv = { static struct driver_d ram_drv = {
.name = "ram", .name = "ram",
.probe = dummy_probe, .probe = dummy_probe,
@ -665,6 +679,8 @@ static struct driver_d ram_drv = {
}; };
#endif #endif
/*-----------------------Generic Devices Initialization ---------------------*/
static int sdp3430_devices_init(void) static int sdp3430_devices_init(void)
{ {
int ret; int ret;
@ -676,6 +692,10 @@ static int sdp3430_devices_init(void)
if (ret) if (ret)
goto failed; goto failed;
#endif #endif
ret = sdp3430_flash_init();
if (ret)
goto failed;
failed: failed:
return ret; return ret;
} }