diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-01-18 15:12:20 +0530 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-02-15 23:15:56 +0530 |
commit | 450dd430bf45ab212a91acfb9bed2528d17f30cd (patch) | |
tree | deaf7d7aef0616834e804de041eea9de3e0a52c8 /arch/arc/mm | |
parent | 999159a5381bff3bd6f688c5d20fbec9d8789e53 (diff) | |
download | op-kernel-dev-450dd430bf45ab212a91acfb9bed2528d17f30cd.zip op-kernel-dev-450dd430bf45ab212a91acfb9bed2528d17f30cd.tar.gz |
ARC: [DeviceTree] Convert some Kconfig items to runtime values
* mem size now runtime configured (prev CONFIG_ARC_PLAT_SDRAM_SIZE)
* core cpu clk runtime configured (prev CONFIG_ARC_PLAT_CLK)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/arc/mm')
-rw-r--r-- | arch/arc/mm/init.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index 682cf57..caf797d 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -25,7 +25,7 @@ char empty_zero_page[PAGE_SIZE] __aligned(PAGE_SIZE); EXPORT_SYMBOL(empty_zero_page); /* Default tot mem from .config */ -static unsigned long arc_mem_sz = CONFIG_ARC_PLAT_SDRAM_SIZE; +static unsigned long arc_mem_sz = 0x20000000; /* some default */ /* User can over-ride above with "mem=nnn[KkMm]" in cmdline */ static int __init setup_mem_sz(char *str) @@ -41,7 +41,8 @@ early_param("mem", setup_mem_sz); void __init early_init_dt_add_memory_arch(u64 base, u64 size) { - pr_err("%s(%llx, %llx)\n", __func__, base, size); + arc_mem_sz = size & PAGE_MASK; + pr_info("Memory size set via devicetree %ldM\n", TO_MB(arc_mem_sz)); } /* @@ -62,7 +63,9 @@ void __init setup_arch_memory(void) /* * We do it here, so that memory is correctly instantiated - * even if "mem=xxx" cmline over-ride is not given + * even if "mem=xxx" cmline over-ride is given and/or + * DT has memory node. Each causes an update to @arc_mem_sz + * and we finally add memory one here */ memblock_add(CONFIG_LINUX_LINK_BASE, arc_mem_sz); |