diff options
author | Mark Brown <broonie@linaro.org> | 2014-07-24 22:54:49 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-24 22:54:49 +0100 |
commit | bcddae4453f74e9d1dbc8db78c5c9bc552c600cb (patch) | |
tree | 44f433cdce0aea74d1098967ff28454e512f777f /arch/xtensa | |
parent | bf3738e51576cd0cd8c59ef611734cc423323563 (diff) | |
parent | fc40eed01c76797b6f71c982a782cef2d6ab48a6 (diff) | |
download | juno-bcddae4453f74e9d1dbc8db78c5c9bc552c600cb.tar.gz |
Merge remote-tracking branch 'lsk/v3.10/topic/libfdt' into linux-linaro-lsk
Conflicts:
drivers/of/fdt.c
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/kernel/setup.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index a5214542f31..ea9afb6904d 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -222,6 +222,43 @@ static int __init parse_bootparam(const bp_tag_t* tag) } #ifdef CONFIG_OF +bool __initdata dt_memory_scan = false; + +#if XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY +unsigned long xtensa_kio_paddr = XCHAL_KIO_DEFAULT_PADDR; +EXPORT_SYMBOL(xtensa_kio_paddr); + +static int __init xtensa_dt_io_area(unsigned long node, const char *uname, + int depth, void *data) +{ + const __be32 *ranges; + int len; + + if (depth > 1) + return 0; + + if (!of_flat_dt_is_compatible(node, "simple-bus")) + return 0; + + ranges = of_get_flat_dt_prop(node, "ranges", &len); + if (!ranges) + return 1; + if (len == 0) + return 1; + + xtensa_kio_paddr = of_read_ulong(ranges+1, 1); + /* round down to nearest 256MB boundary */ + xtensa_kio_paddr &= 0xf0000000; + + return 1; +} +#else +static int __init xtensa_dt_io_area(unsigned long node, const char *uname, + int depth, void *data) +{ + return 1; +} +#endif void __init early_init_dt_add_memory_arch(u64 base, u64 size) { |