From 5bacf4a128c044b085e7705433cfbe984f6cfae8 Mon Sep 17 00:00:00 2001 From: Sriram Date: Tue, 22 Sep 2009 18:51:48 +0530 Subject: Fix compilation break for omap3_evm with the changes introduced for 3517 support, compilation for omap3evm breaks. this patch addresses the dependencies --- cpu/arm_cortexa8/omap3/mem.c | 7 ++++++- include/asm-arm/arch-omap3/cpu.h | 2 ++ include/asm-arm/arch-omap3/omap3.h | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c index 49047b42d6..41417326f6 100644 --- a/cpu/arm_cortexa8/omap3/mem.c +++ b/cpu/arm_cortexa8/omap3/mem.c @@ -31,6 +31,8 @@ #include #include +#ifdef CONFIG_OMAP35XX + /* Definitions for EMIF4 configuration values */ #define EMIF4_TIM1_T_RP 0x3 #define EMIF4_TIM1_T_RCD 0x3 @@ -84,6 +86,7 @@ #define EMIF4_DDR1_DLL_MODE 0x0 #define EMIF4_DDR1_VTP_DYN 0x1 #define EMIF4_DDR1_LB_CK_SEL 0x0 +#endif /* * Only One NAND allowed on board at a time. @@ -141,7 +144,6 @@ gpmc_csx_t *onenand_cs_base; #endif static sdrc_t *sdrc_base = (sdrc_t *)OMAP34XX_SDRC_BASE; -static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE; /************************************************************************** * make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow @@ -254,6 +256,8 @@ void do_sdrc_init(u32 cs, u32 early) writel(0, &sdrc_base->cs[cs].mcfg); } +#ifdef CONFIG_OMAP35XX +static emif4_t *emif4_base = (emif4_t *)OMAP34XX_SDRC_BASE; unsigned long calc_size_from_emif4(int cs) { unsigned int size; @@ -339,6 +343,7 @@ void emif4_init(void) (EMIF4_CFG_IBANK_POS << 27) | (EMIF4_CFG_SDRAM_TYP << 29)); writel(regval, &emif4_base->sdram_config); } +#endif void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base, u32 base, u32 size) diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h index 989b1c38f9..fbc9303a9a 100644 --- a/include/asm-arm/arch-omap3/cpu.h +++ b/include/asm-arm/arch-omap3/cpu.h @@ -25,6 +25,8 @@ #ifndef _CPU_H #define _CPU_H +#define OFFS(x) ((x) >> 2) + /* Register offsets of common modules */ /* Control */ #ifndef __ASSEMBLY__ diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h index 8c9656f9e1..f60da39e3f 100644 --- a/include/asm-arm/arch-omap3/omap3.h +++ b/include/asm-arm/arch-omap3/omap3.h @@ -105,6 +105,10 @@ typedef struct gpio { } gpio_t; #endif /* __ASSEMBLY__ */ +#define GPIO_OE 0x34 +#define GPIO_CLEARDATAOUT 0x90 +#define GPIO_SETDATAOUT 0x94 + #define GPIO0 (0x1 << 0) #define GPIO1 (0x1 << 1) #define GPIO2 (0x1 << 2) -- cgit v1.2.3