Commit f15601d6 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Linus Walleij

ARM: ux500: call ux500_setup_id later

ux500_setup_id is currently called from u8500_map_io(), which is
really early, but nothing relies on the ID any more, other than
a printk message that is not really all that important to
have early during boot.

If we move the call to ux500_setup_id() into ux500_soc_device_init(),
that file becomes usuable almost entirely standalone, and we can kill
off the u8500_map_io() callback as it just does the default
debug_ll_io_init() now.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent cd1dc431
...@@ -27,13 +27,6 @@ ...@@ -27,13 +27,6 @@
#include "board-mop500.h" #include "board-mop500.h"
#include "db8500-regs.h" #include "db8500-regs.h"
#include "id.h"
static void __init u8500_map_io(void)
{
debug_ll_io_init();
ux500_setup_id();
}
/* /*
* The PMU IRQ lines of two cores are wired together into a single interrupt. * The PMU IRQ lines of two cores are wired together into a single interrupt.
...@@ -117,7 +110,6 @@ static const char * stericsson_dt_platform_compat[] = { ...@@ -117,7 +110,6 @@ static const char * stericsson_dt_platform_compat[] = {
DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)") DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)")
.l2c_aux_val = 0, .l2c_aux_val = 0,
.l2c_aux_mask = ~0, .l2c_aux_mask = ~0,
.map_io = u8500_map_io,
.init_irq = ux500_init_irq, .init_irq = ux500_init_irq,
.init_machine = u8500_init_machine, .init_machine = u8500_init_machine,
.dt_compat = stericsson_dt_platform_compat, .dt_compat = stericsson_dt_platform_compat,
......
...@@ -37,21 +37,16 @@ static struct dbx500_asic_id dbx500_id; ...@@ -37,21 +37,16 @@ static struct dbx500_asic_id dbx500_id;
static unsigned int __init ux500_read_asicid(phys_addr_t addr) static unsigned int __init ux500_read_asicid(phys_addr_t addr)
{ {
phys_addr_t base = addr & ~0xfff; void __iomem *virt = ioremap(addr, 4);
struct map_desc desc = { unsigned int asicid;
.virtual = (unsigned long)UX500_VIRT_ROM,
.pfn = __phys_to_pfn(base),
.length = SZ_16K,
.type = MT_DEVICE,
};
iotable_init(&desc, 1); if (!virt)
return 0;
/* As in devicemaps_init() */ asicid = readl(virt);
local_flush_tlb_all(); iounmap(virt);
flush_cache_all();
return readl(UX500_VIRT_ROM + (addr & 0xfff)); return asicid;
} }
static void ux500_print_soc_info(unsigned int asicid) static void ux500_print_soc_info(unsigned int asicid)
...@@ -86,7 +81,7 @@ static unsigned int partnumber(unsigned int asicid) ...@@ -86,7 +81,7 @@ static unsigned int partnumber(unsigned int asicid)
* DB9540 0x413fc090 0xFFFFDBF4 0x009540xx * DB9540 0x413fc090 0xFFFFDBF4 0x009540xx
*/ */
void __init ux500_setup_id(void) static void __init ux500_setup_id(void)
{ {
unsigned int cpuid = read_cpuid_id(); unsigned int cpuid = read_cpuid_id();
unsigned int asicid = 0; unsigned int asicid = 0;
...@@ -197,6 +192,8 @@ struct device * __init ux500_soc_device_init(void) ...@@ -197,6 +192,8 @@ struct device * __init ux500_soc_device_init(void)
struct soc_device *soc_dev; struct soc_device *soc_dev;
struct soc_device_attribute *soc_dev_attr; struct soc_device_attribute *soc_dev_attr;
ux500_setup_id();
soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
if (!soc_dev_attr) if (!soc_dev_attr)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
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