summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/plat-mxc/devices/platform-mxc_mlb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-mxc_mlb.c b/arch/arm/plat-mxc/devices/platform-mxc_mlb.c
index a1ede415ed81..661595fd5f38 100644
--- a/arch/arm/plat-mxc/devices/platform-mxc_mlb.c
+++ b/arch/arm/plat-mxc/devices/platform-mxc_mlb.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,9 +40,12 @@ struct platform_device *__init imx_add_mlb(
#endif /* ifdef CONFIG_SOC_IMX53 */
#ifdef CONFIG_SOC_IMX6Q
+
struct platform_device *__init imx_add_mlb(
const struct mxc_mlb_platform_data *pdata)
{
+#define HW_OCOTP_CFGn(n) (0x00000410 + (n) * 0x10)
+ unsigned int mlb_disable = 0;
struct resource res[] = {
{
.start = MLB_BASE_ADDR,
@@ -65,6 +68,10 @@ struct platform_device *__init imx_add_mlb(
.flags = IORESOURCE_IRQ,
},
};
+
+ mlb_disable = readl(MX6_IO_ADDRESS(OCOTP_BASE_ADDR) + HW_OCOTP_CFGn(2));
+ if (mlb_disable & 0x04000000)
+ return ERR_PTR(-ENODEV);
return imx_add_platform_device("mxc_mlb150", 0,
res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
}