summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/cpu-db8500.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-06-20 23:01:26 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-07-12 11:24:08 +0200
commitcd1dc431d02afda521bed53b7c87a678a3ac246f (patch)
tree0e08a9208cfb554de41d3781ef4c9669b004fc39 /arch/arm/mach-ux500/cpu-db8500.c
parent4cf124f9a9d0d3505b6335d6061da54f83125b8e (diff)
ARM: ux500: consolidate soc_device code in id.c
Nothing else uses the global dbx500_asic_id structure, so we can merge the two small files that reference it into one. Signed-off-by: Arnd Bergmann <arnd@arndb.de> 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.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 3874e9c236e9..e7eba473d3bd 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -20,7 +20,6 @@
#include <linux/of_platform.h>
#include <linux/perf/arm_pmu.h>
#include <linux/regulator/machine.h>
-#include <linux/random.h>
#include <asm/mach/map.h>
@@ -60,31 +59,6 @@ static struct arm_pmu_platdata db8500_pmu_platdata = {
.handle_irq = db8500_pmu_handler,
};
-static const char *db8500_read_soc_id(void)
-{
- void __iomem *uid;
- const char *retstr;
-
- 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);
- retstr = 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);
- return retstr;
-}
-
-static struct device * __init db8500_soc_device_init(void)
-{
- const char *soc_id = db8500_read_soc_id();
-
- return ux500_soc_device_init(soc_id);
-}
-
static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
/* Requires call-back bindings. */
OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
@@ -121,7 +95,7 @@ static const struct of_device_id u8500_local_bus_nodes[] = {
static void __init u8500_init_machine(void)
{
- struct device *parent = db8500_soc_device_init();
+ struct device *parent = ux500_soc_device_init();
/* automatically probe child nodes of dbx5x0 devices */
if (of_machine_is_compatible("st-ericsson,u8540"))