Commit 563a0fcd authored by Terry Lv's avatar Terry Lv

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: default avatarTerry Lv <r65388@freescale.com>
parent d85c0551
/*
* 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));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment