diff options
author | Shane McDonald <mcdonald.shane@gmail.com> | 2009-04-28 19:00:27 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-05-14 08:50:29 -0400 |
commit | 5c5dd1d29120affb127955277bfba9f60e27a3fe (patch) | |
tree | bcbb4af82d949b7eef66cc23bbc211b80a5ef4aa /arch/mips/pmc-sierra | |
parent | 1a4ba061b3c93804027b4cc4c588cfad748d9fc2 (diff) |
MIPS: MSP71xx: Remove the RAMROOT functions
The RAMROOT function was a successful but non-portable attempt to append
the root filesystem to the end of the kernel image. The preferred and
portable solution is to use an initramfs instead.
Signed-off-by: Shane McDonald <mcdonald.shane@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/pmc-sierra')
-rw-r--r-- | arch/mips/pmc-sierra/Kconfig | 12 | ||||
-rw-r--r-- | arch/mips/pmc-sierra/msp71xx/msp_prom.c | 60 |
2 files changed, 1 insertions, 71 deletions
diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig index 90261b83db04..c139988bb85d 100644 --- a/arch/mips/pmc-sierra/Kconfig +++ b/arch/mips/pmc-sierra/Kconfig | |||
@@ -36,18 +36,6 @@ config PMC_MSP7120_FPGA | |||
36 | 36 | ||
37 | endchoice | 37 | endchoice |
38 | 38 | ||
39 | menu "Options for PMC-Sierra MSP chipsets" | ||
40 | depends on PMC_MSP | ||
41 | |||
42 | config PMC_MSP_EMBEDDED_ROOTFS | ||
43 | bool "Root filesystem embedded in kernel image" | ||
44 | select MTD | ||
45 | select MTD_BLOCK | ||
46 | select MTD_PMC_MSP_RAMROOT | ||
47 | select MTD_RAM | ||
48 | |||
49 | endmenu | ||
50 | |||
51 | config HYPERTRANSPORT | 39 | config HYPERTRANSPORT |
52 | bool "Hypertransport Support for PMC-Sierra Yosemite" | 40 | bool "Hypertransport Support for PMC-Sierra Yosemite" |
53 | depends on PMC_YOSEMITE | 41 | depends on PMC_YOSEMITE |
diff --git a/arch/mips/pmc-sierra/msp71xx/msp_prom.c b/arch/mips/pmc-sierra/msp71xx/msp_prom.c index e5bd5481d8db..c317a3623ce9 100644 --- a/arch/mips/pmc-sierra/msp71xx/msp_prom.c +++ b/arch/mips/pmc-sierra/msp71xx/msp_prom.c | |||
@@ -40,12 +40,6 @@ | |||
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <linux/interrupt.h> | 41 | #include <linux/interrupt.h> |
42 | #include <linux/mm.h> | 42 | #include <linux/mm.h> |
43 | #ifdef CONFIG_CRAMFS | ||
44 | #include <linux/cramfs_fs.h> | ||
45 | #endif | ||
46 | #ifdef CONFIG_SQUASHFS | ||
47 | #include <linux/squashfs_fs.h> | ||
48 | #endif | ||
49 | 43 | ||
50 | #include <asm/addrspace.h> | 44 | #include <asm/addrspace.h> |
51 | #include <asm/bootinfo.h> | 45 | #include <asm/bootinfo.h> |
@@ -435,10 +429,6 @@ struct prom_pmemblock *__init prom_getmdesc(void) | |||
435 | char *str; | 429 | char *str; |
436 | unsigned int memsize; | 430 | unsigned int memsize; |
437 | unsigned int heaptop; | 431 | unsigned int heaptop; |
438 | #ifdef CONFIG_MTD_PMC_MSP_RAMROOT | ||
439 | void *ramroot_start; | ||
440 | unsigned long ramroot_size; | ||
441 | #endif | ||
442 | int i; | 432 | int i; |
443 | 433 | ||
444 | str = prom_getenv(memsz_env); | 434 | str = prom_getenv(memsz_env); |
@@ -506,19 +496,7 @@ struct prom_pmemblock *__init prom_getmdesc(void) | |||
506 | i++; /* 3 */ | 496 | i++; /* 3 */ |
507 | mdesc[i].type = BOOT_MEM_RESERVED; | 497 | mdesc[i].type = BOOT_MEM_RESERVED; |
508 | mdesc[i].base = CPHYSADDR((u32)_text); | 498 | mdesc[i].base = CPHYSADDR((u32)_text); |
509 | #ifdef CONFIG_MTD_PMC_MSP_RAMROOT | 499 | mdesc[i].size = CPHYSADDR(PAGE_ALIGN((u32)_end)) - mdesc[i].base; |
510 | if (get_ramroot(&ramroot_start, &ramroot_size)) { | ||
511 | /* | ||
512 | * Rootfs in RAM -- follows kernel | ||
513 | * Combine rootfs image with kernel block so a | ||
514 | * page (4k) isn't wasted between memory blocks | ||
515 | */ | ||
516 | mdesc[i].size = CPHYSADDR(PAGE_ALIGN( | ||
517 | (u32)ramroot_start + ramroot_size)) - mdesc[i].base; | ||
518 | } else | ||
519 | #endif | ||
520 | mdesc[i].size = CPHYSADDR(PAGE_ALIGN( | ||
521 | (u32)_end)) - mdesc[i].base; | ||
522 | 500 | ||
523 | /* Remainder of RAM -- under memsize */ | 501 | /* Remainder of RAM -- under memsize */ |
524 | i++; /* 5 */ | 502 | i++; /* 5 */ |
@@ -528,39 +506,3 @@ struct prom_pmemblock *__init prom_getmdesc(void) | |||
528 | 506 | ||
529 | return &mdesc[0]; | 507 | return &mdesc[0]; |
530 | } | 508 | } |
531 | |||
532 | /* rootfs functions */ | ||
533 | #ifdef CONFIG_MTD_PMC_MSP_RAMROOT | ||
534 | bool get_ramroot(void **start, unsigned long *size) | ||
535 | { | ||
536 | extern char _end[]; | ||
537 | |||
538 | /* Check for start following the end of the kernel */ | ||
539 | void *check_start = (void *)_end; | ||
540 | |||
541 | /* Check for supported rootfs types */ | ||
542 | #ifdef CONFIG_CRAMFS | ||
543 | if (*(__u32 *)check_start == CRAMFS_MAGIC) { | ||
544 | /* Get CRAMFS size */ | ||
545 | *start = check_start; | ||
546 | *size = PAGE_ALIGN(((struct cramfs_super *) | ||
547 | check_start)->size); | ||
548 | |||
549 | return true; | ||
550 | } | ||
551 | #endif | ||
552 | #ifdef CONFIG_SQUASHFS | ||
553 | if (*((unsigned int *)check_start) == SQUASHFS_MAGIC) { | ||
554 | /* Get SQUASHFS size */ | ||
555 | *start = check_start; | ||
556 | *size = PAGE_ALIGN(((struct squashfs_super_block *) | ||
557 | check_start)->bytes_used); | ||
558 | |||
559 | return true; | ||
560 | } | ||
561 | #endif | ||
562 | |||
563 | return false; | ||
564 | } | ||
565 | EXPORT_SYMBOL(get_ramroot); | ||
566 | #endif | ||