Skip to contentSkip to conversation

AM35x: Add support for EMIF4

PATCH New hvaibhav at ti.com 1 participant 1 message Jun 7, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v4 2/2 AM35x: Add support for EMIF4

From: Vaibhav Hiremath <[email protected]>

This patch adds support for the EMIF4 interface
available in the AM35x processors.

---
Changes from V2:
- Removed all instances of #ifdef CONFIG_EMIF4
Changes from V3:
- Corrected Makfile entry to keep list sorted
- Unnecessary comments moved here

 arch/arm/cpu/arm_cortexa8/omap3/Makefile    |    1 +
 arch/arm/cpu/arm_cortexa8/omap3/emif4.c     |  168 +++++++++++++++++++++++++++
 arch/arm/include/asm/arch-omap3/cpu.h       |   24 ++++
 arch/arm/include/asm/arch-omap3/emif4.h     |   79 +++++++++++++
 arch/arm/include/asm/arch-omap3/sys_proto.h |    1 +
 include/configs/am3517_evm.h                |    2 +-
 6 files changed, 274 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
 create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
arch/arm/cpu/arm_cortexa8/omap3/Makefile +1 -0
index 1e80eb3..7d63c6b 100644
@@ -37,6 +37,7 @@ COBJS	+= syslib.o
 COBJS	+= sys_info.o
 COBJS	+= timer.o
 
+COBJS-$(CONFIG_EMIF4)	+= emif4.o
 COBJS-$(CONFIG_SDRC)	+= sdrc.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
arch/arm/cpu/arm_cortexa8/omap3/emif4.c new file +168 -0

168 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/cpu.h +24 -0
index ce16da7..c072c27 100644
@@ -216,6 +216,30 @@ struct sdrc {
 	struct sdrc_cs cs[2];	/* 0x80 || 0xB0 */
 };
 
+/* EMIF4 */
+typedef struct emif4 {
+	unsigned int sdram_sts;
+	unsigned int sdram_config;
+	unsigned int res1;
+	unsigned int sdram_refresh_ctrl;
+	unsigned int sdram_refresh_ctrl_shdw;
+	unsigned int sdram_time1;
+	unsigned int sdram_time1_shdw;
+	unsigned int sdram_time2;
+	unsigned int sdram_time2_shdw;
+	unsigned int sdram_time3;
+	unsigned int sdram_time3_shdw;
+	unsigned char res2[8];
+	unsigned int sdram_pwr_mgmt;
+	unsigned int sdram_pwr_mgmt_shdw;
+	unsigned char res3[32];
+	unsigned int sdram_iodft_tlgc;
+	unsigned char res4[128];
+	unsigned int ddr_phyctrl1;
+	unsigned int ddr_phyctrl1_shdw;
+	unsigned int ddr_phyctrl2;
+} emif4_t;
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
arch/arm/include/asm/arch-omap3/emif4.h new file +79 -0

79 lines not on this page · raw message

arch/arm/include/asm/arch-omap3/sys_proto.h +1 -0
index 4608f30..db7b42a 100644
@@ -33,6 +33,7 @@ void per_clocks_enable(void);
 void memif_init(void);
 void sdrc_init(void);
 void do_sdrc_init(u32, u32);
+void emif4_init(void);
 void gpmc_init(void);
 void enable_gpmc_cs_config(const u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
 			u32 size);
include/configs/am3517_evm.h +1 -1
index 595b99c..513d005 100644
@@ -33,7 +33,7 @@
 #define CONFIG_OMAP34XX		1	/* which is a 34XX */
 #define CONFIG_OMAP3_AM3517EVM	1	/* working with AM3517EVM */
 
-#define CONFIG_EMIF4		1	/* The chip has EMIF4 controller */
+#define CONFIG_EMIF4	/* The chip has EMIF4 controller */
 
 #include <asm/arch/cpu.h>		/* get chip and board defs */
 #include <asm/arch/omap3.h>

--
1.6.2.4