diff options
author | Terry Lv <r65388@freescale.com> | 2012-11-13 15:50:48 +0800 |
---|---|---|
committer | Terry Lv <r65388@freescale.com> | 2012-11-16 17:15:46 +0800 |
commit | 563a0fcdd26943b3be0dfcf817f88d7b56b6f1b8 (patch) | |
tree | ebeb98254da7e1225c6b73aad3fd136f0463d2e4 | |
parent | d85c0551dc3a80b27577063f122a262b95ec56c0 (diff) |
ENGR00233387: MLB: read fuse to check if to enable mlb
Read "Disabled MLB" bit in OTP CFG2 to check if to enable mlb.
Signed-off-by: Terry Lv <r65388@freescale.com>
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-mxc_mlb.c | 9 |
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)); } |