aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/setup.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-01-09 11:01:00 -0500
committerArnd Bergmann <arnd@arndb.de>2012-01-09 11:01:00 -0500
commita07613a54d700a974f3a4a657da78ef5d097315d (patch)
treee4bc91713e02fa6d8f08b07de53ea8f905593dfa /arch/arm/kernel/setup.c
parent65db039bf7402f0a5b19cbf6dcff55ebea433b8b (diff)
parent928a11ba36f999436915ea2b1eadf54301f93059 (diff)
Merge branch 'samsung/dt' into samsung/cleanup
Conflicts: arch/arm/mach-s3c64xx/Makefile arch/arm/mach-s5pc100/Makefile arch/arm/mach-s5pv210/Makefile Pull in previously resolved conflicts: The Makefiles were reorganized in the "rmk/restart" series and modified in the "samsung/cleanup series". This also pulls in the other conflict resolutions from the restart series against the samsung/dt series. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r--arch/arm/kernel/setup.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 8fc2c8fcbdc6..095d6611c84e 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -31,6 +31,7 @@
31#include <linux/memblock.h> 31#include <linux/memblock.h>
32#include <linux/bug.h> 32#include <linux/bug.h>
33#include <linux/compiler.h> 33#include <linux/compiler.h>
34#include <linux/sort.h>
34 35
35#include <asm/unified.h> 36#include <asm/unified.h>
36#include <asm/cpu.h> 37#include <asm/cpu.h>
@@ -890,6 +891,12 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr)
890 return mdesc; 891 return mdesc;
891} 892}
892 893
894static int __init meminfo_cmp(const void *_a, const void *_b)
895{
896 const struct membank *a = _a, *b = _b;
897 long cmp = bank_pfn_start(a) - bank_pfn_start(b);
898 return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
899}
893 900
894void __init setup_arch(char **cmdline_p) 901void __init setup_arch(char **cmdline_p)
895{ 902{
@@ -908,8 +915,8 @@ void __init setup_arch(char **cmdline_p)
908 arm_dma_zone_size = mdesc->dma_zone_size; 915 arm_dma_zone_size = mdesc->dma_zone_size;
909 } 916 }
910#endif 917#endif
911 if (mdesc->soft_reboot) 918 if (mdesc->restart_mode)
912 reboot_setup("s"); 919 reboot_setup(&mdesc->restart_mode);
913 920
914 init_mm.start_code = (unsigned long) _text; 921 init_mm.start_code = (unsigned long) _text;
915 init_mm.end_code = (unsigned long) _etext; 922 init_mm.end_code = (unsigned long) _etext;
@@ -922,12 +929,16 @@ void __init setup_arch(char **cmdline_p)
922 929
923 parse_early_param(); 930 parse_early_param();
924 931
932 sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL);
925 sanity_check_meminfo(); 933 sanity_check_meminfo();
926 arm_memblock_init(&meminfo, mdesc); 934 arm_memblock_init(&meminfo, mdesc);
927 935
928 paging_init(mdesc); 936 paging_init(mdesc);
929 request_standard_resources(mdesc); 937 request_standard_resources(mdesc);
930 938
939 if (mdesc->restart)
940 arm_pm_restart = mdesc->restart;
941
931 unflatten_device_tree(); 942 unflatten_device_tree();
932 943
933#ifdef CONFIG_SMP 944#ifdef CONFIG_SMP