static int cpu_silicon_rev = -1;
#define MX6_USB_ANALOG_DIGPROG 0x260
+#define MX6SL_USB_ANALOG_DIGPROG 0x280
static int mx6_get_srev(void)
{
void __iomem *anatop = MX6_IO_ADDRESS(ANATOP_BASE_ADDR);
u32 rev;
+ if (cpu_is_mx6sl())
+ rev = __raw_readl(anatop + MX6SL_USB_ANALOG_DIGPROG);
+ else
+ rev = __raw_readl(anatop + MX6_USB_ANALOG_DIGPROG);
- rev = __raw_readl(anatop + MX6_USB_ANALOG_DIGPROG);
rev &= 0xff;
if (rev == 0)
}
EXPORT_SYMBOL(mx6dl_revision);
+/*
+ * Returns:
+ * the silicon revision of the cpu
+ */
+int mx6sl_revision(void)
+{
+ if (!cpu_is_mx6sl())
+ return -EINVAL;
+
+ if (cpu_silicon_rev == -1)
+ cpu_silicon_rev = mx6_get_srev();
+
+ return cpu_silicon_rev;
+}
+EXPORT_SYMBOL(mx6sl_revision);
+
static int __init post_cpu_init(void)
{
unsigned int reg;
#include <mach/common.h>
#include <mach/iomux-v3.h>
#include <asm/hardware/cache-l2x0.h>
+#include "crm_regs.h"
/*!
* This structure defines the MX6 memory map.
static void mx6_set_cpu_type(void)
{
- u32 cpu_type = readl(IO_ADDRESS(ANATOP_BASE_ADDR + 0x260));
+ u32 cpu_type = readl(IO_ADDRESS(ANATOP_BASE_ADDR + 0x280));
+ cpu_type >>= 16;
+ if (cpu_type == 0x60) {
+ mxc_set_cpu_type(MXC_CPU_MX6SL);
+ imx_print_silicon_rev("i.MX6SoloLite", mx6sl_revision());
+ return;
+ }
+
+ cpu_type = readl(IO_ADDRESS(ANATOP_BASE_ADDR + 0x260));
cpu_type >>= 16;
if (cpu_type == 0x63) {
mxc_set_cpu_type(MXC_CPU_MX6Q);
#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
extern int mx6q_revision(void);
extern int mx6dl_revision(void);
+extern int mx6sl_revision(void);
#endif
#endif /* __ASM_ARCH_MXC_MX6_H__ */
#define MXC_CPU_MX53 53
#define MXC_CPU_MX6Q 63
#define MXC_CPU_MX6DL 61
+#define MXC_CPU_MX6SL 60
#define IMX_CHIP_REVISION_1_0 0x10
#define IMX_CHIP_REVISION_1_1 0x11
# define mxc_cpu_type __mxc_cpu_type
# define cpu_is_mx6q() (mxc_cpu_type == MXC_CPU_MX6Q)
# define cpu_is_mx6dl() (mxc_cpu_type == MXC_CPU_MX6DL)
+# define cpu_is_mx6sl() (mxc_cpu_type == MXC_CPU_MX6SL)
#else
# define cpu_is_mx6q() (0)
# define cpu_is_mx6dl() (0)
+# define cpu_is_mx6sl() (0)
#endif
#ifndef __ASSEMBLY__
#define cpu_is_mx5() (cpu_is_mx51() || cpu_is_mx53() || cpu_is_mx50())
#define cpu_is_mx3() (cpu_is_mx31() || cpu_is_mx35())
#define cpu_is_mx2() (cpu_is_mx21() || cpu_is_mx27())
-#define cpu_is_mx6() (cpu_is_mx6q() || cpu_is_mx6dl())
+#define cpu_is_mx6() (cpu_is_mx6q() || cpu_is_mx6dl() || cpu_is_mx6sl())
#define MXC_PGCR_PCR 1
#define MXC_SRPGCR_PCR 1