aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/setup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-19 22:07:12 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-19 22:07:12 -0400
commit25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (patch)
treee0977d906193eadeafebc442775491b844be79d5 /arch/mips/kernel/setup.c
parent4c84a39c8adba6bf2f829b217e78bfd61478191a (diff)
parent1723b4a34af85447684c9696af83929d2c1e8e6b (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (51 commits) [MIPS] Make timer interrupt frequency configurable from kconfig. [MIPS] Correct HAL2 Kconfig description [MIPS] Fix R4K cache macro names [MIPS] Add Missing R4K Cache Macros to IP27 & IP32 [MIPS] Support for the RM9000-based Basler eXcite smart camera platform. [MIPS] Support for the R5500-based NEC EMMA2RH Mark-eins board [MIPS] Support SNI RM200C SNI in big endian mode and R5000 processors. [MIPS] SN: include asm/sn/types.h for nasid_t. [MIPS] Random fixes for sb1250 [MIPS] Fix bcm1480 compile [MIPS] Remove support for NEC DDB5476. [MIPS] Remove support for NEC DDB5074. [MIPS] Cleanup memory managment initialization. [MIPS] SN: Declare bridge_pci_ops. [MIPS] Remove unused function alloc_pci_controller. [MIPS] IP27: Extract pci_ops into separate file. [MIPS] IP27: Use symbolic constants instead of magic numbers. [MIPS] vr41xx: remove unnecessay items from vr41xx/Kconfig. [MIPS] IP27: Cleanup N/M mode configuration. [MIPS] IP27: Throw away old unused hacks. ...
Diffstat (limited to 'arch/mips/kernel/setup.c')
-rw-r--r--arch/mips/kernel/setup.c56
1 files changed, 43 insertions, 13 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 397a70e651b5..bfcec8d9bfe4 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -442,6 +442,48 @@ static inline void bootmem_init(void)
442#endif /* CONFIG_BLK_DEV_INITRD */ 442#endif /* CONFIG_BLK_DEV_INITRD */
443} 443}
444 444
445/*
446 * arch_mem_init - initialize memory managment subsystem
447 *
448 * o plat_mem_setup() detects the memory configuration and will record detected
449 * memory areas using add_memory_region.
450 * o parse_cmdline_early() parses the command line for mem= options which,
451 * iff detected, will override the results of the automatic detection.
452 *
453 * At this stage the memory configuration of the system is known to the
454 * kernel but generic memory managment system is still entirely uninitialized.
455 *
456 * o bootmem_init()
457 * o sparse_init()
458 * o paging_init()
459 *
460 * At this stage the bootmem allocator is ready to use.
461 *
462 * NOTE: historically plat_mem_setup did the entire platform initialization.
463 * This was rather impractical because it meant plat_mem_setup had to
464 * get away without any kind of memory allocator. To keep old code from
465 * breaking plat_setup was just renamed to plat_setup and a second platform
466 * initialization hook for anything else was introduced.
467 */
468
469extern void plat_mem_setup(void);
470
471static void __init arch_mem_init(char **cmdline_p)
472{
473 /* call board setup routine */
474 plat_mem_setup();
475
476 strlcpy(command_line, arcs_cmdline, sizeof(command_line));
477 strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
478
479 *cmdline_p = command_line;
480
481 parse_cmdline_early();
482 bootmem_init();
483 sparse_init();
484 paging_init();
485}
486
445static inline void resource_init(void) 487static inline void resource_init(void)
446{ 488{
447 int i; 489 int i;
@@ -495,8 +537,6 @@ static inline void resource_init(void)
495#undef MAXMEM 537#undef MAXMEM
496#undef MAXMEM_PFN 538#undef MAXMEM_PFN
497 539
498extern void plat_setup(void);
499
500void __init setup_arch(char **cmdline_p) 540void __init setup_arch(char **cmdline_p)
501{ 541{
502 cpu_probe(); 542 cpu_probe();
@@ -511,18 +551,8 @@ void __init setup_arch(char **cmdline_p)
511#endif 551#endif
512#endif 552#endif
513 553
514 /* call board setup routine */ 554 arch_mem_init(cmdline_p);
515 plat_setup();
516 555
517 strlcpy(command_line, arcs_cmdline, sizeof(command_line));
518 strlcpy(saved_command_line, command_line, COMMAND_LINE_SIZE);
519
520 *cmdline_p = command_line;
521
522 parse_cmdline_early();
523 bootmem_init();
524 sparse_init();
525 paging_init();
526 resource_init(); 556 resource_init();
527#ifdef CONFIG_SMP 557#ifdef CONFIG_SMP
528 plat_smp_setup(); 558 plat_smp_setup();