diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-05-14 10:35:46 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-05-18 16:06:34 +0300 |
commit | 80757f2335c93fbb9a8fa5a2e68f8ef46d2d5081 (patch) | |
tree | 3b23e7ee6d836e1f42f920a1fbd9bcfa0c4f3284 /arch/arm/mach-ux500/cpu-db8500.c | |
parent | 2d6dd1711346d1708eacdbb1b5e8a5a573562fd1 (diff) | |
download | linux-80757f2335c93fbb9a8fa5a2e68f8ef46d2d5081.tar.xz |
ARM: ux500: remap BB offset dynamically
Instead of relying on static maps, remap the BB chip ID
offset dynamically.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/cpu-db8500.c')
-rw-r--r-- | arch/arm/mach-ux500/cpu-db8500.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 391d329a7e88..0b3ebbf38702 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -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) |