From 25ffe7d74591b7457c8f01eef573cf3c2651e144 Mon Sep 17 00:00:00 2001 From: Terry Lv Date: Fri, 16 Nov 2012 15:41:01 +0800 Subject: [PATCH] ENGR00233929: add kernel command line to enable snvs In MX6Q/DL, originally GPIO_0 is used as CKO pin function. when SNVS module is enabled, CKO output stops suddenly. Both CKO clock config register CCOSR and GPIO_0 IOMUX register value are not changed. But because ALT7 of GPIO_0 pad is SNVS_VIO_5 function. I doubt that when SNVS module is enabled, GPIO_0 pad is automatically changed to SNVS instance by SoC. Thus we add option for snvs enable/disable. Signed-off-by: Terry Lv --- arch/arm/mach-mx6/board-mx6q_sabrelite.c | 11 ++++++++++- arch/arm/mach-mx6/board-mx6q_sabresd.c | 12 ++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-mx6/board-mx6q_sabrelite.c b/arch/arm/mach-mx6/board-mx6q_sabrelite.c index 3289b1a5a98e..cec9bf0705bd 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabrelite.c +++ b/arch/arm/mach-mx6/board-mx6q_sabrelite.c @@ -103,6 +103,7 @@ static struct clk *sata_clk; extern char *gp_reg_id; extern char *soc_reg_id; extern char *pu_reg_id; +static int caam_enabled; extern struct regulator *(*get_cpu_regulator)(void); extern void (*put_cpu_regulator)(void); @@ -1114,6 +1115,13 @@ static struct mipi_csi2_platform_data mipi_csi2_pdata = { .pixel_clk = "emi_clk", }; +static int __init caam_setup(char *__unused) +{ + caam_enabled = 1; + return 1; +} +early_param("caam", caam_setup); + /*! * Board specific initialization. */ @@ -1158,7 +1166,8 @@ static void __init mx6_sabrelite_board_init(void) imx6q_add_mipi_csi2(&mipi_csi2_pdata); imx6q_add_imx_snvs_rtc(); - imx6q_add_imx_caam(); + if (1 == caam_enabled) + imx6q_add_imx_caam(); imx6q_add_imx_i2c(0, &mx6q_sabrelite_i2c_data); imx6q_add_imx_i2c(1, &mx6q_sabrelite_i2c_data); diff --git a/arch/arm/mach-mx6/board-mx6q_sabresd.c b/arch/arm/mach-mx6/board-mx6q_sabresd.c index 863b2b1b8a88..86f1091cdcf1 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabresd.c +++ b/arch/arm/mach-mx6/board-mx6q_sabresd.c @@ -204,7 +204,7 @@ static int mma8451_position = 1; static int mag3110_position = 2; static int max11801_mode = 1; static int enable_lcd_ldb; - +static int caam_enabled; extern char *gp_reg_id; extern char *soc_reg_id; @@ -1629,6 +1629,13 @@ static struct mipi_csi2_platform_data mipi_csi2_pdata = { .pixel_clk = "emi_clk", }; +static int __init caam_setup(char *__unused) +{ + caam_enabled = 1; + return 1; +} +early_param("caam", caam_setup); + #define SNVS_LPCR 0x38 static void mx6_snvs_poweroff(void) { @@ -1728,7 +1735,8 @@ static void __init mx6_sabresd_board_init(void) imx6q_add_mipi_csi2(&mipi_csi2_pdata); imx6q_add_imx_snvs_rtc(); - imx6q_add_imx_caam(); + if (1 == caam_enabled) + imx6q_add_imx_caam(); if (board_is_mx6_reva()) { strcpy(mxc_i2c0_board_info[0].type, "wm8958"); -- 2.39.5