2012-02-23 09:09:07 +00:00
|
|
|
#ifndef __MACH_IMX6_H
|
|
|
|
#define __MACH_IMX6_H
|
|
|
|
|
2013-06-21 13:18:07 +00:00
|
|
|
#include <io.h>
|
|
|
|
#include <mach/generic.h>
|
|
|
|
#include <mach/imx6-regs.h>
|
|
|
|
|
2012-02-23 09:09:07 +00:00
|
|
|
void imx6_init_lowlevel(void);
|
|
|
|
|
2013-06-21 13:18:07 +00:00
|
|
|
#define IMX6_ANATOP_SI_REV 0x260
|
|
|
|
|
|
|
|
#define IMX6_CPUTYPE_IMX6Q 0x63
|
|
|
|
#define IMX6_CPUTYPE_IMX6DL 0x61
|
|
|
|
|
|
|
|
static inline int imx6_cpu_type(void)
|
|
|
|
{
|
|
|
|
uint32_t val;
|
|
|
|
|
|
|
|
if (!cpu_is_mx6())
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
val = readl(MX6_ANATOP_BASE_ADDR + IMX6_ANATOP_SI_REV);
|
|
|
|
|
|
|
|
return (val >> 16) & 0xff;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int cpu_is_mx6q(void)
|
|
|
|
{
|
|
|
|
return imx6_cpu_type() == IMX6_CPUTYPE_IMX6Q;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int cpu_is_mx6dl(void)
|
|
|
|
{
|
|
|
|
return imx6_cpu_type() == IMX6_CPUTYPE_IMX6DL;
|
|
|
|
}
|
|
|
|
|
2012-02-23 09:09:07 +00:00
|
|
|
#endif /* __MACH_IMX6_H */
|