提交 80757f23 编写于 作者: L Linus Walleij

ARM: ux500: remap BB offset dynamically

Instead of relying on static maps, remap the BB chip ID
offset dynamically.
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 2d6dd171
......@@ -104,14 +104,18 @@ static struct arm_pmu_platdata db8500_pmu_platdata = {
static const char *db8500_read_soc_id(void)
{
void __iomem *uid = __io_address(U8500_BB_UID_BASE);
void __iomem *uid;
uid = ioremap(U8500_BB_UID_BASE, 0x20);
if (!uid)
return NULL;
/* Throw these device-specific numbers into the entropy pool */
add_device_randomness(uid, 0x14);
return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x",
readl((u32 *)uid+0),
readl((u32 *)uid+1), readl((u32 *)uid+2),
readl((u32 *)uid+3), readl((u32 *)uid+4));
iounmap(uid);
}
static struct device * __init db8500_soc_device_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册