summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-03-15 22:12:46 +0800
committerYe Li <ye.li@nxp.com>2017-04-05 14:04:35 +0800
commit8aef13ebd92f709f4e6b80cf46c7cfe0f69bb211 (patch)
treeb06bbce7e2983c54d1699bb129d6e3a98281fc16 /arch/arm/include/asm
parente1c98a672e50fd0405686b74dad50680a75a8a9f (diff)
downloadu-boot-imx-8aef13ebd92f709f4e6b80cf46c7cfe0f69bb211.zip
u-boot-imx-8aef13ebd92f709f4e6b80cf46c7cfe0f69bb211.tar.gz
u-boot-imx-8aef13ebd92f709f4e6b80cf46c7cfe0f69bb211.tar.bz2
MLK-12483-3 mx6: Add a module fuse checking
Implement a functionality to read the soc fuses and check if any module is fused. For fused module, we have to disable it in u-boot dynamically, and change the its node in FDT to "disabled" status before starting the kernel. In this patch, we implement the ft_system_setup for FDT fixup. This function will be called during boot process or by "fdt systemsetup" command. To enable the module fuse checking, two configurations must be defined: CONFIG_MODULE_FUSE CONFIG_OF_SYSTEM_SETUP Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 7236051526b73a5a25cc8330a79f5c08b7d70726)
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/arch-mx6/module_fuse.h120
-rw-r--r--arch/arm/include/asm/arch-mx6/sys_proto.h3
2 files changed, 123 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-mx6/module_fuse.h b/arch/arm/include/asm/arch-mx6/module_fuse.h
new file mode 100644
index 0000000..7208243
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx6/module_fuse.h
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2016 Freescale Semiconductor, Inc.
+ */
+
+/*
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef __MODULE_FUSE_H__
+#define __MODULE_FUSE_H__
+
+enum fuse_module_type{
+ MX6_MODULE_TSC,
+ MX6_MODULE_ADC1,
+ MX6_MODULE_ADC2,
+ MX6_MODULE_SIM1,
+ MX6_MODULE_SIM2,
+ MX6_MODULE_FLEXCAN1,
+ MX6_MODULE_FLEXCAN2,
+ MX6_MODULE_SPDIF,
+ MX6_MODULE_EIM,
+ MX6_MODULE_SD1,
+ MX6_MODULE_SD2,
+ MX6_MODULE_SD3,
+ MX6_MODULE_SD4,
+ MX6_MODULE_QSPI1,
+ MX6_MODULE_QSPI2,
+ MX6_MODULE_GPMI,
+ MX6_MODULE_APBHDMA,
+ MX6_MODULE_LCDIF,
+ MX6_MODULE_PXP,
+ MX6_MODULE_CSI,
+ MX6_MODULE_ENET1,
+ MX6_MODULE_ENET2,
+ MX6_MODULE_CAAM,
+ MX6_MODULE_USB_OTG1,
+ MX6_MODULE_USB_OTG2,
+ MX6_MODULE_SAI2,
+ MX6_MODULE_SAI3,
+ MX6_MODULE_BEE,
+ MX6_MODULE_UART1,
+ MX6_MODULE_UART2,
+ MX6_MODULE_UART3,
+ MX6_MODULE_UART4,
+ MX6_MODULE_UART5,
+ MX6_MODULE_UART6,
+ MX6_MODULE_UART7,
+ MX6_MODULE_UART8,
+ MX6_MODULE_PWM5,
+ MX6_MODULE_PWM6,
+ MX6_MODULE_PWM7,
+ MX6_MODULE_PWM8,
+ MX6_MODULE_ECSPI1,
+ MX6_MODULE_ECSPI2,
+ MX6_MODULE_ECSPI3,
+ MX6_MODULE_ECSPI4,
+ MX6_MODULE_ECSPI5,
+ MX6_MODULE_I2C1,
+ MX6_MODULE_I2C2,
+ MX6_MODULE_I2C3,
+ MX6_MODULE_I2C4,
+ MX6_MODULE_GPT1,
+ MX6_MODULE_GPT2,
+ MX6_MODULE_EPIT1,
+ MX6_MODULE_EPIT2,
+};
+
+#if !defined(CONFIG_MODULE_FUSE)
+static inline u32 check_module_fused(enum fuse_module_type module)
+{
+ return 0;
+};
+
+static inline u32 mx6_esdhc_fused(u32 base_addr)
+{
+ return 0;
+};
+
+static inline u32 mx6_ecspi_fused(u32 base_addr)
+{
+ return 0;
+};
+static inline u32 mx6_uart_fused(u32 base_addr)
+{
+ return 0;
+};
+static inline u32 mx6_usb_fused(u32 base_addr)
+{
+ return 0;
+};
+static inline u32 mx6_qspi_fused(u32 base_addr)
+{
+ return 0;
+};
+static inline u32 mx6_i2c_fused(u32 base_addr)
+{
+ return 0;
+};
+static inline u32 mx6_enet_fused(u32 base_addr)
+{
+ return 0;
+};
+
+#else
+u32 check_module_fused(enum fuse_module_type module);
+u32 mx6_esdhc_fused(u32 base_addr);
+u32 mx6_ecspi_fused(u32 base_addr);
+u32 mx6_uart_fused(u32 base_addr);
+u32 mx6_usb_fused(u32 base_addr);
+u32 mx6_qspi_fused(u32 base_addr);
+u32 mx6_i2c_fused(u32 base_addr);
+u32 mx6_enet_fused(u32 base_addr);
+#endif
+
+#ifdef DEBUG
+void print_fuse_status();
+void simulate_fuse();
+#endif
+
+#endif /* __MODULE_FUSE_H__ */
diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
index 16c9b76..8c3c956 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -2,7 +2,10 @@
* (C) Copyright 2009
* Stefano Babic, DENX Software Engineering, sbabic@denx.de.
*
+ * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
+ *
* SPDX-License-Identifier: GPL-2.0+
*/
#include <asm/imx-common/sys_proto.h>
+#include <asm/arch/module_fuse.h>