]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/mx6/soc.c
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / mx6 / soc.c
index 193ba1240fb3e04b37e21aacf927c7ffd1900fad..fc436fbee7c971978a896cdf24ce75648260dd86 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/imx-common/boot_mode.h>
+#include <asm/imx-common/dma.h>
 #include <stdbool.h>
 
 struct scu_regs {
@@ -61,6 +62,18 @@ u32 get_cpu_rev(void)
        return (type << 12) | (reg + 0x10);
 }
 
+#ifdef CONFIG_REVISION_TAG
+u32 __weak get_board_rev(void)
+{
+       u32 cpurev = get_cpu_rev();
+       u32 type = ((cpurev >> 12) & 0xff);
+       if (type == MXC_CPU_MX6SOLO)
+               cpurev = (MXC_CPU_MX6DL) << 12 | (cpurev & 0xFFF);
+
+       return cpurev;
+}
+#endif
+
 void init_aips(void)
 {
        struct aipstz_regs *aips1, *aips2;
@@ -139,6 +152,12 @@ int arch_cpu_init(void)
        set_vddsoc(1200);       /* Set VDDSOC to 1.2V */
 
        imx_set_wdog_powerdown(false); /* Disable PDE bit of WMCR register */
+
+#ifdef CONFIG_APBH_DMA
+       /* Start APBH DMA */
+       mxs_dma_init();
+#endif
+
        return 0;
 }
 
@@ -153,8 +172,8 @@ void enable_caches(void)
 #if defined(CONFIG_FEC_MXC)
 void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 {
-       struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
-       struct fuse_bank *bank = &iim->bank[4];
+       struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
+       struct fuse_bank *bank = &ocotp->bank[4];
        struct fuse_bank4_regs *fuse =
                        (struct fuse_bank4_regs *)bank->fuse_regs;