]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/am33xx/emif4.c
Add TI816X support
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / am33xx / emif4.c
index ad7b70f93aefab865ec94d62eb57cf53377a9780..59ad25c5b093a30a3b799b69ba878a464678ea90 100644 (file)
@@ -35,16 +35,21 @@ void dram_init_banksize(void)
 }
 
 
-#ifdef CONFIG_SPL_BUILD
+#if defined(CONFIG_SPL_BUILD) || defined(CONFIG_NOR_BOOT)
+#ifdef CONFIG_TI81XX
 static struct dmm_lisa_map_regs *hw_lisa_map_regs =
                                (struct dmm_lisa_map_regs *)DMM_BASE;
+#endif
+#ifndef CONFIG_TI816X
 static struct vtp_reg *vtpreg[2] = {
                                (struct vtp_reg *)VTP0_CTRL_ADDR,
                                (struct vtp_reg *)VTP1_CTRL_ADDR};
+#endif
 #ifdef CONFIG_AM33XX
 static struct ddr_ctrl *ddrctrl = (struct ddr_ctrl *)DDR_CTRL_ADDR;
 #endif
 
+#ifdef CONFIG_TI81XX
 void config_dmm(const struct dmm_lisa_map_regs *regs)
 {
        enable_dmm_clocks();
@@ -59,7 +64,9 @@ void config_dmm(const struct dmm_lisa_map_regs *regs)
        writel(regs->dmm_lisa_map_1, &hw_lisa_map_regs->dmm_lisa_map_1);
        writel(regs->dmm_lisa_map_0, &hw_lisa_map_regs->dmm_lisa_map_0);
 }
+#endif
 
+#ifndef CONFIG_TI816X
 static void config_vtp(int nr)
 {
        writel(readl(&vtpreg[nr]->vtp0ctrlreg) | VTP_CTRL_ENABLE,
@@ -74,14 +81,20 @@ static void config_vtp(int nr)
                        VTP_CTRL_READY)
                ;
 }
+#endif
+
+void __weak ddr_pll_config(unsigned int ddrpll_m)
+{
+}
 
 void config_ddr(unsigned int pll, unsigned int ioctrl,
                const struct ddr_data *data, const struct cmd_control *ctrl,
                const struct emif_regs *regs, int nr)
 {
-       enable_emif_clocks();
        ddr_pll_config(pll);
+#ifndef CONFIG_TI816X
        config_vtp(nr);
+#endif
        config_cmd_ctrl(ctrl, nr);
 
        config_ddr_data(data, nr);