]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/omap5/hwinit.c
ARM: DRA72: disable workaround for 801819
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / omap5 / hwinit.c
index 03c2b978560aeb6c177b1f6fbcc9213868803e08..22e0829a6a0c2482328f6136ec1e6cf2160586bc 100644 (file)
@@ -40,6 +40,15 @@ static struct gpio_bank gpio_bank_54xx[8] = {
 
 const struct gpio_bank *const omap_gpio_bank = gpio_bank_54xx;
 
+void do_set_mux32(u32 base, struct pad_conf_entry const *array, int size)
+{
+       int i;
+       struct pad_conf_entry *pad = (struct pad_conf_entry *)array;
+
+       for (i = 0; i < size; i++, pad++)
+               writel(pad->val, base + pad->offset);
+}
+
 #ifdef CONFIG_SPL_BUILD
 /* LPDDR2 specific IO settings */
 static void io_settings_lpddr2(void)
@@ -113,6 +122,7 @@ static void io_settings_ddr3(void)
 void do_io_settings(void)
 {
        u32 io_settings = 0, mask = 0;
+       struct emif_reg_struct *emif = (struct emif_reg_struct *)EMIF1_BASE;
 
        /* Impedance settings EMMC, C2C 1,2, hsi2 */
        mask = (ds_mask << 2) | (ds_mask << 8) |
@@ -168,7 +178,7 @@ void do_io_settings(void)
                       (sc_fast << 17) | (sc_fast << 14);
        writel(io_settings, (*ctrl)->control_smart3io_padconf_1);
 
-       if (emif_sdram_type() == EMIF_SDRAM_TYPE_LPDDR2)
+       if (emif_sdram_type(emif->emif_sdram_config) == EMIF_SDRAM_TYPE_LPDDR2)
                io_settings_lpddr2();
        else
                io_settings_ddr3();
@@ -408,3 +418,20 @@ void v7_arch_cp15_set_l2aux_ctrl(u32 l2auxctrl, u32 cpu_midr,
 {
        omap_smc1(OMAP5_SERVICE_L2ACTLR_SET, l2auxctrl);
 }
+
+void v7_arch_cp15_set_acr(u32 acr, u32 cpu_midr, u32 cpu_rev_comb,
+                         u32 cpu_variant, u32 cpu_rev)
+{
+
+#ifdef CONFIG_ARM_ERRATA_801819
+       /*
+        * DRA72x processors are uniprocessors and DONOT have
+        * ACP (Accelerator Coherency Port) hooked to ACE (AXI Coherency
+        * Extensions) Hence the erratum workaround is not applicable for
+        * DRA72x processors.
+        */
+       if (is_dra72x())
+               acr &= ~((0x3 << 23) | (0x3 << 25));
+#endif
+       omap_smc1(OMAP5_SERVICE_ACR_SET, acr);
+}