9
0
Fork 0

i.MX: Add primitive functions for VF610 family

Add very basic functions to support VF610 family.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Andrey Smirnov 2016-11-09 08:13:49 -08:00 committed by Sascha Hauer
parent 047ee22b89
commit d08d788930
5 changed files with 33 additions and 0 deletions

View File

@ -149,6 +149,16 @@ config ARCH_IMX6SX
select OFTREE
select COMMON_CLK_OF_PROVIDER
config ARCH_VF610
bool
select ARCH_HAS_L2X0
select ARCH_HAS_FEC_IMX
select CPU_V7
select PINCTRL
select OFTREE
select COMMON_CLK
select COMMON_CLK_OF_PROVIDER
config IMX_MULTI_BOARDS
bool "Allow multiple boards to be selected"
select HAVE_PBL_MULTI_IMAGES

View File

@ -33,3 +33,8 @@ void imx6_cpu_lowlevel_init(void)
enable_arm_errata_794072_war();
enable_arm_errata_845369_war();
}
void vf610_cpu_lowlevel_init(void)
{
arm_cpu_lowlevel_init();
}

View File

@ -63,6 +63,8 @@ static int imx_soc_from_dt(void)
return IMX_CPU_IMX6;
if (of_machine_is_compatible("fsl,imx6qp"))
return IMX_CPU_IMX6;
if (of_machine_is_compatible("fsl,vf610"))
return IMX_CPU_VF610;
return 0;
}
@ -99,6 +101,8 @@ static int imx_init(void)
ret = imx53_init();
else if (cpu_is_mx6())
ret = imx6_init();
else if (cpu_is_vf610())
ret = 0;
else
return -EINVAL;

View File

@ -45,6 +45,7 @@ int imx6_devices_init(void);
void imx5_cpu_lowlevel_init(void);
void imx6_cpu_lowlevel_init(void);
void vf610_cpu_lowlevel_init(void);
/* There's a off-by-one betweem the gpio bank number and the gpiochip */
/* range e.g. GPIO_1_5 is gpio 5 under linux */
@ -173,6 +174,18 @@ extern unsigned int __imx_cpu_type;
# define cpu_is_mx6() (0)
#endif
#ifdef CONFIG_ARCH_VF610
# ifdef imx_cpu_type
# undef imx_cpu_type
# define imx_cpu_type __imx_cpu_type
# else
# define imx_cpu_type IMX_CPU_VF610
# endif
# define cpu_is_vf610() (imx_cpu_type == IMX_CPU_VF610)
#else
# define cpu_is_vf610() (0)
#endif
#define cpu_is_mx23() (0)
#define cpu_is_mx28() (0)

View File

@ -11,5 +11,6 @@
#define IMX_CPU_IMX51 51
#define IMX_CPU_IMX53 53
#define IMX_CPU_IMX6 6
#define IMX_CPU_VF610 610
#endif /* __MACH_IMX_CPU_TYPES_H */