From 2d3b5df8530cd5ef883750378838dea7c40259af Mon Sep 17 00:00:00 2001 From: Ye Li Date: Wed, 16 Mar 2016 13:50:54 +0800 Subject: MLK-12483-4 mx6: Modify drivers to disable fused modules Add the fuse checking in drivers, when the module is disabled in fuse, the driver will not work. Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C, USB-EHCI, GIS, LCDIF. Signed-off-by: Ye Li (cherry picked from commit 1704e116f9b39aeb99201919a18bc2b1e19a980e) --- drivers/video/mxc_gis.c | 16 +++++++++++++++- drivers/video/mxsfb.c | 10 ++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/mxc_gis.c b/drivers/video/mxc_gis.c index 7b07198..64c1b9a 100644 --- a/drivers/video/mxc_gis.c +++ b/drivers/video/mxc_gis.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2014 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright (C) 2014-2016 Freescale Semiconductor, Inc. All Rights Reserved. * * SPDX-License-Identifier: GPL-2.0+ */ @@ -301,6 +301,20 @@ void mxc_enable_gis(void) u32 csimemsize, pxpmemsize; char const *gis_input = getenv("gis"); +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_CSI)) { + printf("CSI@0x%x is fused, disable it\n", CSI1_BASE_ADDR); + return; + } +#endif + +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_PXP)) { + printf("PXP@0x%x is fused, disable it\n", PXP_BASE_ADDR); + return; + } +#endif + gis_regs = (struct mxs_gis_regs *)GIS_BASE_ADDR; pxp_regs = (struct mxs_pxp_regs *)PXP_BASE_ADDR; csi_regs = (struct mxs_csi_regs *)CSI1_BASE_ADDR; diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index fe53d2e..fae9d75 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -171,6 +171,10 @@ void lcdif_power_down(void) struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)(panel.isaBase); int timeout = 1000000; +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_LCDIF)) + return; +#endif if (!panel.frameAdrs) return; @@ -221,6 +225,12 @@ void *video_hw_init(void) bpp = depth; } +#ifdef CONFIG_MX6 + if (check_module_fused(MX6_MODULE_LCDIF)) { + printf("LCDIF@0x%x is fused, disable it\n", MXS_LCDIF_BASE); + return NULL; + } +#endif /* fill in Graphic device struct */ sprintf(panel.modeIdent, "%dx%dx%d", mode.xres, mode.yres, bpp); -- cgit v1.1