1 CFE is the only supported and used bootloader on the SiByte boards,
2 the standalone kernel support has been never used outside Broadcom.
3 Remove it and make the kernel use CFE by default.
5 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
7 --- a/arch/mips/Makefile
8 +++ b/arch/mips/Makefile
9 @@ -167,7 +167,6 @@ libs-$(CONFIG_ARC) += arch/mips/fw/arc/
10 libs-$(CONFIG_CFE) += arch/mips/fw/cfe/
11 libs-$(CONFIG_SNIPROM) += arch/mips/fw/sni/
12 libs-y += arch/mips/fw/lib/
13 -libs-$(CONFIG_SIBYTE_CFE) += arch/mips/sibyte/cfe/
16 # Board-dependent options and extra files
17 --- a/arch/mips/sibyte/cfe/console.c
20 -#include <linux/init.h>
21 -#include <linux/errno.h>
22 -#include <linux/console.h>
24 -#include <asm/sibyte/board.h>
26 -#include <asm/fw/cfe/cfe_api.h>
27 -#include <asm/fw/cfe/cfe_error.h>
29 -extern int cfe_cons_handle;
31 -static void cfe_console_write(struct console *cons, const char *str,
34 - int i, last, written;
36 - for (i=0, last=0; i<count; i++) {
38 - /* XXXKW can/should this ever happen? */
40 - if (str[i] == '\n') {
42 - written = cfe_write(cfe_cons_handle, &str[last], i-last);
47 - while (cfe_write(cfe_cons_handle, "\r", 1) <= 0)
51 - if (last != count) {
53 - written = cfe_write(cfe_cons_handle, &str[last], count-last);
57 - } while (last < count);
62 -static int cfe_console_setup(struct console *cons, char *str)
65 - /* XXXKW think about interaction with 'console=' cmdline arg */
66 - /* If none of the console options are configured, the build will break. */
67 - if (cfe_getenv("BOOT_CONSOLE", consdev, 32) >= 0) {
68 -#ifdef CONFIG_SERIAL_SB1250_DUART
69 - if (!strcmp(consdev, "uart0")) {
71 - } else if (!strcmp(consdev, "uart1")) {
74 -#ifdef CONFIG_VGA_CONSOLE
75 - } else if (!strcmp(consdev, "pcconsole0")) {
84 -static struct console sb1250_cfe_cons = {
86 - .write = cfe_console_write,
87 - .setup = cfe_console_setup,
88 - .flags = CON_PRINTBUFFER,
92 -static int __init sb1250_cfe_console_init(void)
94 - register_console(&sb1250_cfe_cons);
98 -console_initcall(sb1250_cfe_console_init);
99 --- a/arch/mips/sibyte/cfe/Makefile
103 -lib-$(CONFIG_SIBYTE_CFE_CONSOLE) += console.o
104 --- a/arch/mips/sibyte/cfe/setup.c
108 - * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation
110 - * This program is free software; you can redistribute it and/or
111 - * modify it under the terms of the GNU General Public License
112 - * as published by the Free Software Foundation; either version 2
113 - * of the License, or (at your option) any later version.
115 - * This program is distributed in the hope that it will be useful,
116 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
117 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
118 - * GNU General Public License for more details.
120 - * You should have received a copy of the GNU General Public License
121 - * along with this program; if not, write to the Free Software
122 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
125 -#include <linux/init.h>
126 -#include <linux/kernel.h>
127 -#include <linux/linkage.h>
128 -#include <linux/mm.h>
129 -#include <linux/blkdev.h>
130 -#include <linux/bootmem.h>
131 -#include <linux/pm.h>
132 -#include <linux/smp.h>
134 -#include <asm/bootinfo.h>
135 -#include <asm/reboot.h>
136 -#include <asm/sibyte/board.h>
137 -#include <asm/smp-ops.h>
139 -#include <asm/fw/cfe/cfe_api.h>
140 -#include <asm/fw/cfe/cfe_error.h>
142 -/* Max ram addressable in 32-bit segments */
144 -#define MAX_RAM_SIZE (~0ULL)
146 -#ifdef CONFIG_HIGHMEM
147 -#ifdef CONFIG_64BIT_PHYS_ADDR
148 -#define MAX_RAM_SIZE (~0ULL)
150 -#define MAX_RAM_SIZE (0xffffffffULL)
153 -#define MAX_RAM_SIZE (0x1fffffffULL)
157 -#define SIBYTE_MAX_MEM_REGIONS 8
158 -phys_t board_mem_region_addrs[SIBYTE_MAX_MEM_REGIONS];
159 -phys_t board_mem_region_sizes[SIBYTE_MAX_MEM_REGIONS];
160 -unsigned int board_mem_region_count;
162 -int cfe_cons_handle;
164 -#ifdef CONFIG_BLK_DEV_INITRD
165 -extern unsigned long initrd_start, initrd_end;
168 -static void __noreturn cfe_linux_exit(void *arg)
170 - int warm = *(int *)arg;
172 - if (smp_processor_id()) {
173 - static int reboot_smp;
175 - /* Don't repeat the process from another CPU */
177 - /* Get CPU 0 to do the cfe_exit */
179 - smp_call_function(cfe_linux_exit, arg, 0);
182 - printk("Passing control back to CFE...\n");
184 - printk("cfe_exit returned??\n");
189 -static void __noreturn cfe_linux_restart(char *command)
191 - static const int zero;
193 - cfe_linux_exit((void *)&zero);
196 -static void __noreturn cfe_linux_halt(void)
198 - static const int one = 1;
200 - cfe_linux_exit((void *)&one);
203 -static __init void prom_meminit(void)
205 - u64 addr, size, type; /* regardless of 64BIT_PHYS_ADDR */
209 -#ifdef CONFIG_BLK_DEV_INITRD
210 - unsigned long initrd_pstart;
211 - unsigned long initrd_pend;
213 - initrd_pstart = CPHYSADDR(initrd_start);
214 - initrd_pend = CPHYSADDR(initrd_end);
215 - if (initrd_start &&
216 - ((initrd_pstart > MAX_RAM_SIZE)
217 - || (initrd_pend > MAX_RAM_SIZE))) {
218 - panic("initrd out of addressable memory");
223 - for (idx = 0; cfe_enummem(idx, mem_flags, &addr, &size, &type) != CFE_ERR_NOMORE;
226 - if (type == CFE_MI_AVAILABLE) {
228 - * See if this block contains (any portion of) the
231 -#ifdef CONFIG_BLK_DEV_INITRD
232 - if (initrd_start) {
233 - if ((initrd_pstart > addr) &&
234 - (initrd_pstart < (addr + size))) {
235 - add_memory_region(addr,
236 - initrd_pstart - addr,
240 - if ((initrd_pend > addr) &&
241 - (initrd_pend < (addr + size))) {
242 - add_memory_region(initrd_pend,
243 - (addr + size) - initrd_pend,
250 - if (addr > MAX_RAM_SIZE)
252 - if (addr+size > MAX_RAM_SIZE)
253 - size = MAX_RAM_SIZE - (addr+size) + 1;
255 - * memcpy/__copy_user prefetch, which
256 - * will cause a bus error for
257 - * KSEG/KUSEG addrs not backed by RAM.
258 - * Hence, reserve some padding for the
259 - * prefetch distance.
263 - add_memory_region(addr, size, BOOT_MEM_RAM);
265 - board_mem_region_addrs[board_mem_region_count] = addr;
266 - board_mem_region_sizes[board_mem_region_count] = size;
267 - board_mem_region_count++;
268 - if (board_mem_region_count ==
269 - SIBYTE_MAX_MEM_REGIONS) {
271 - * Too many regions. Need to configure more
277 -#ifdef CONFIG_BLK_DEV_INITRD
278 - if (initrd_start) {
279 - add_memory_region(initrd_pstart, initrd_pend - initrd_pstart,
280 - BOOT_MEM_RESERVED);
285 -#ifdef CONFIG_BLK_DEV_INITRD
286 -static int __init initrd_setup(char *str)
290 - char *tmp, *endptr;
291 - unsigned long initrd_size;
293 - /* Make a copy of the initrd argument so we can smash it up here */
294 - for (idx = 0; idx < sizeof(rdarg)-1; idx++) {
295 - if (!str[idx] || (str[idx] == ' ')) break;
296 - rdarg[idx] = str[idx];
303 - *Initrd location comes in the form "<hex size of ramdisk in bytes>@<location in memory>"
304 - * e.g. initrd=3abfd@80010000. This is set up by the loader.
306 - for (tmp = str; *tmp != '@'; tmp++) {
316 - initrd_size = simple_strtoul(str, &endptr, 16);
322 - initrd_start = simple_strtoul(tmp, &endptr, 16);
326 - initrd_end = initrd_start + initrd_size;
327 - printk("Found initrd of %lx@%lx\n", initrd_size, initrd_start);
330 - printk("Bad initrd argument. Disabling initrd\n");
338 -extern struct plat_smp_ops sb_smp_ops;
339 -extern struct plat_smp_ops bcm1480_smp_ops;
342 - * prom_init is called just after the cpu type is determined, from setup_arch()
344 -void __init prom_init(void)
346 - uint64_t cfe_ept, cfe_handle;
347 - unsigned int cfe_eptseal;
348 - int argc = fw_arg0;
349 - char **envp = (char **) fw_arg2;
350 - int *prom_vec = (int *) fw_arg3;
352 - _machine_restart = cfe_linux_restart;
353 - _machine_halt = cfe_linux_halt;
354 - pm_power_off = cfe_linux_halt;
357 - * Check if a loader was used; if NOT, the 4 arguments are
358 - * what CFE gives us (handle, 0, EPT and EPTSEAL)
361 - cfe_handle = (uint64_t)(long)argc;
362 - cfe_ept = (long)envp;
363 - cfe_eptseal = (uint32_t)(unsigned long)prom_vec;
365 - if ((int32_t)(long)prom_vec < 0) {
367 - * Old loader; all it gives us is the handle,
368 - * so use the "known" entrypoint and assume
371 - cfe_handle = (uint64_t)(long)prom_vec;
372 - cfe_ept = (uint64_t)((int32_t)0x9fc00500);
373 - cfe_eptseal = CFE_EPTSEAL;
376 - * Newer loaders bundle the handle/ept/eptseal
377 - * Note: prom_vec is in the loader's useg
378 - * which is still alive in the TLB.
380 - cfe_handle = (uint64_t)((int32_t *)prom_vec)[0];
381 - cfe_ept = (uint64_t)((int32_t *)prom_vec)[2];
382 - cfe_eptseal = (unsigned int)((uint32_t *)prom_vec)[3];
385 - if (cfe_eptseal != CFE_EPTSEAL) {
386 - /* too early for panic to do any good */
387 - printk("CFE's entrypoint seal doesn't match. Spinning.");
390 - cfe_init(cfe_handle, cfe_ept);
392 - * Get the handle for (at least) prom_putchar, possibly for
395 - cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE);
396 - if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, CL_SIZE) < 0) {
399 - * It's OK for direct boot to not provide a
402 - strcpy(arcs_cmdline, "root=/dev/ram0 ");
404 - /* The loader should have set the command line */
405 - /* too early for panic to do any good */
406 - printk("LINUX_CMDLINE not defined in cfe.");
411 -#ifdef CONFIG_BLK_DEV_INITRD
414 - /* Need to find out early whether we've got an initrd. So scan
415 - the list looking now */
416 - for (ptr = arcs_cmdline; *ptr; ptr++) {
417 - while (*ptr == ' ') {
420 - if (!strncmp(ptr, "initrd=", 7)) {
421 - initrd_setup(ptr+7);
424 - while (*ptr && (*ptr != ' ')) {
430 -#endif /* CONFIG_BLK_DEV_INITRD */
432 - /* Not sure this is needed, but it's the safe way. */
433 - arcs_cmdline[CL_SIZE-1] = 0;
437 -#if defined(CONFIG_SIBYTE_BCM112X) || defined(CONFIG_SIBYTE_SB1250)
438 - register_smp_ops(&sb_smp_ops);
440 -#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
441 - register_smp_ops(&bcm1480_smp_ops);
445 -void __init prom_free_prom_memory(void)
447 - /* Not sure what I'm supposed to do here. Nothing, I think */
450 -void prom_putchar(char c)
454 - while ((ret = cfe_write(cfe_cons_handle, &c, 1)) == 0)
458 +++ b/arch/mips/sibyte/common/cfe.c
461 + * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation
463 + * This program is free software; you can redistribute it and/or
464 + * modify it under the terms of the GNU General Public License
465 + * as published by the Free Software Foundation; either version 2
466 + * of the License, or (at your option) any later version.
468 + * This program is distributed in the hope that it will be useful,
469 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
470 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
471 + * GNU General Public License for more details.
473 + * You should have received a copy of the GNU General Public License
474 + * along with this program; if not, write to the Free Software
475 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
478 +#include <linux/init.h>
479 +#include <linux/kernel.h>
480 +#include <linux/linkage.h>
481 +#include <linux/mm.h>
482 +#include <linux/blkdev.h>
483 +#include <linux/bootmem.h>
484 +#include <linux/pm.h>
485 +#include <linux/smp.h>
487 +#include <asm/bootinfo.h>
488 +#include <asm/reboot.h>
489 +#include <asm/sibyte/board.h>
490 +#include <asm/smp-ops.h>
492 +#include <asm/fw/cfe/cfe_api.h>
493 +#include <asm/fw/cfe/cfe_error.h>
495 +/* Max ram addressable in 32-bit segments */
497 +#define MAX_RAM_SIZE (~0ULL)
499 +#ifdef CONFIG_HIGHMEM
500 +#ifdef CONFIG_64BIT_PHYS_ADDR
501 +#define MAX_RAM_SIZE (~0ULL)
503 +#define MAX_RAM_SIZE (0xffffffffULL)
506 +#define MAX_RAM_SIZE (0x1fffffffULL)
510 +#define SIBYTE_MAX_MEM_REGIONS 8
511 +phys_t board_mem_region_addrs[SIBYTE_MAX_MEM_REGIONS];
512 +phys_t board_mem_region_sizes[SIBYTE_MAX_MEM_REGIONS];
513 +unsigned int board_mem_region_count;
515 +int cfe_cons_handle;
517 +#ifdef CONFIG_BLK_DEV_INITRD
518 +extern unsigned long initrd_start, initrd_end;
521 +static void __noreturn cfe_linux_exit(void *arg)
523 + int warm = *(int *)arg;
525 + if (smp_processor_id()) {
526 + static int reboot_smp;
528 + /* Don't repeat the process from another CPU */
530 + /* Get CPU 0 to do the cfe_exit */
532 + smp_call_function(cfe_linux_exit, arg, 0);
535 + printk("Passing control back to CFE...\n");
537 + printk("cfe_exit returned??\n");
542 +static void __noreturn cfe_linux_restart(char *command)
544 + static const int zero;
546 + cfe_linux_exit((void *)&zero);
549 +static void __noreturn cfe_linux_halt(void)
551 + static const int one = 1;
553 + cfe_linux_exit((void *)&one);
556 +static __init void prom_meminit(void)
558 + u64 addr, size, type; /* regardless of 64BIT_PHYS_ADDR */
562 +#ifdef CONFIG_BLK_DEV_INITRD
563 + unsigned long initrd_pstart;
564 + unsigned long initrd_pend;
566 + initrd_pstart = CPHYSADDR(initrd_start);
567 + initrd_pend = CPHYSADDR(initrd_end);
568 + if (initrd_start &&
569 + ((initrd_pstart > MAX_RAM_SIZE)
570 + || (initrd_pend > MAX_RAM_SIZE))) {
571 + panic("initrd out of addressable memory");
576 + for (idx = 0; cfe_enummem(idx, mem_flags, &addr, &size, &type) != CFE_ERR_NOMORE;
579 + if (type == CFE_MI_AVAILABLE) {
581 + * See if this block contains (any portion of) the
584 +#ifdef CONFIG_BLK_DEV_INITRD
585 + if (initrd_start) {
586 + if ((initrd_pstart > addr) &&
587 + (initrd_pstart < (addr + size))) {
588 + add_memory_region(addr,
589 + initrd_pstart - addr,
593 + if ((initrd_pend > addr) &&
594 + (initrd_pend < (addr + size))) {
595 + add_memory_region(initrd_pend,
596 + (addr + size) - initrd_pend,
603 + if (addr > MAX_RAM_SIZE)
605 + if (addr+size > MAX_RAM_SIZE)
606 + size = MAX_RAM_SIZE - (addr+size) + 1;
608 + * memcpy/__copy_user prefetch, which
609 + * will cause a bus error for
610 + * KSEG/KUSEG addrs not backed by RAM.
611 + * Hence, reserve some padding for the
612 + * prefetch distance.
616 + add_memory_region(addr, size, BOOT_MEM_RAM);
618 + board_mem_region_addrs[board_mem_region_count] = addr;
619 + board_mem_region_sizes[board_mem_region_count] = size;
620 + board_mem_region_count++;
621 + if (board_mem_region_count ==
622 + SIBYTE_MAX_MEM_REGIONS) {
624 + * Too many regions. Need to configure more
630 +#ifdef CONFIG_BLK_DEV_INITRD
631 + if (initrd_start) {
632 + add_memory_region(initrd_pstart, initrd_pend - initrd_pstart,
633 + BOOT_MEM_RESERVED);
638 +#ifdef CONFIG_BLK_DEV_INITRD
639 +static int __init initrd_setup(char *str)
643 + char *tmp, *endptr;
644 + unsigned long initrd_size;
646 + /* Make a copy of the initrd argument so we can smash it up here */
647 + for (idx = 0; idx < sizeof(rdarg)-1; idx++) {
648 + if (!str[idx] || (str[idx] == ' ')) break;
649 + rdarg[idx] = str[idx];
656 + *Initrd location comes in the form "<hex size of ramdisk in bytes>@<location in memory>"
657 + * e.g. initrd=3abfd@80010000. This is set up by the loader.
659 + for (tmp = str; *tmp != '@'; tmp++) {
669 + initrd_size = simple_strtoul(str, &endptr, 16);
675 + initrd_start = simple_strtoul(tmp, &endptr, 16);
679 + initrd_end = initrd_start + initrd_size;
680 + printk("Found initrd of %lx@%lx\n", initrd_size, initrd_start);
683 + printk("Bad initrd argument. Disabling initrd\n");
691 +extern struct plat_smp_ops sb_smp_ops;
692 +extern struct plat_smp_ops bcm1480_smp_ops;
695 + * prom_init is called just after the cpu type is determined, from setup_arch()
697 +void __init prom_init(void)
699 + uint64_t cfe_ept, cfe_handle;
700 + unsigned int cfe_eptseal;
701 + int argc = fw_arg0;
702 + char **envp = (char **) fw_arg2;
703 + int *prom_vec = (int *) fw_arg3;
705 + _machine_restart = cfe_linux_restart;
706 + _machine_halt = cfe_linux_halt;
707 + pm_power_off = cfe_linux_halt;
710 + * Check if a loader was used; if NOT, the 4 arguments are
711 + * what CFE gives us (handle, 0, EPT and EPTSEAL)
714 + cfe_handle = (uint64_t)(long)argc;
715 + cfe_ept = (long)envp;
716 + cfe_eptseal = (uint32_t)(unsigned long)prom_vec;
718 + if ((int32_t)(long)prom_vec < 0) {
720 + * Old loader; all it gives us is the handle,
721 + * so use the "known" entrypoint and assume
724 + cfe_handle = (uint64_t)(long)prom_vec;
725 + cfe_ept = (uint64_t)((int32_t)0x9fc00500);
726 + cfe_eptseal = CFE_EPTSEAL;
729 + * Newer loaders bundle the handle/ept/eptseal
730 + * Note: prom_vec is in the loader's useg
731 + * which is still alive in the TLB.
733 + cfe_handle = (uint64_t)((int32_t *)prom_vec)[0];
734 + cfe_ept = (uint64_t)((int32_t *)prom_vec)[2];
735 + cfe_eptseal = (unsigned int)((uint32_t *)prom_vec)[3];
738 + if (cfe_eptseal != CFE_EPTSEAL) {
739 + /* too early for panic to do any good */
740 + printk("CFE's entrypoint seal doesn't match. Spinning.");
743 + cfe_init(cfe_handle, cfe_ept);
745 + * Get the handle for (at least) prom_putchar, possibly for
748 + cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE);
749 + if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, CL_SIZE) < 0) {
752 + * It's OK for direct boot to not provide a
755 + strcpy(arcs_cmdline, "root=/dev/ram0 ");
757 + /* The loader should have set the command line */
758 + /* too early for panic to do any good */
759 + printk("LINUX_CMDLINE not defined in cfe.");
764 +#ifdef CONFIG_BLK_DEV_INITRD
767 + /* Need to find out early whether we've got an initrd. So scan
768 + the list looking now */
769 + for (ptr = arcs_cmdline; *ptr; ptr++) {
770 + while (*ptr == ' ') {
773 + if (!strncmp(ptr, "initrd=", 7)) {
774 + initrd_setup(ptr+7);
777 + while (*ptr && (*ptr != ' ')) {
783 +#endif /* CONFIG_BLK_DEV_INITRD */
785 + /* Not sure this is needed, but it's the safe way. */
786 + arcs_cmdline[CL_SIZE-1] = 0;
790 +#if defined(CONFIG_SIBYTE_BCM112X) || defined(CONFIG_SIBYTE_SB1250)
791 + register_smp_ops(&sb_smp_ops);
793 +#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
794 + register_smp_ops(&bcm1480_smp_ops);
798 +void __init prom_free_prom_memory(void)
800 + /* Not sure what I'm supposed to do here. Nothing, I think */
803 +void prom_putchar(char c)
807 + while ((ret = cfe_write(cfe_cons_handle, &c, 1)) == 0)
811 +++ b/arch/mips/sibyte/common/cfe_console.c
813 +#include <linux/init.h>
814 +#include <linux/errno.h>
815 +#include <linux/console.h>
817 +#include <asm/sibyte/board.h>
819 +#include <asm/fw/cfe/cfe_api.h>
820 +#include <asm/fw/cfe/cfe_error.h>
822 +extern int cfe_cons_handle;
824 +static void cfe_console_write(struct console *cons, const char *str,
825 + unsigned int count)
827 + int i, last, written;
829 + for (i=0, last=0; i<count; i++) {
831 + /* XXXKW can/should this ever happen? */
833 + if (str[i] == '\n') {
835 + written = cfe_write(cfe_cons_handle, &str[last], i-last);
839 + } while (last < i);
840 + while (cfe_write(cfe_cons_handle, "\r", 1) <= 0)
844 + if (last != count) {
846 + written = cfe_write(cfe_cons_handle, &str[last], count-last);
850 + } while (last < count);
855 +static int cfe_console_setup(struct console *cons, char *str)
858 + /* XXXKW think about interaction with 'console=' cmdline arg */
859 + /* If none of the console options are configured, the build will break. */
860 + if (cfe_getenv("BOOT_CONSOLE", consdev, 32) >= 0) {
861 +#ifdef CONFIG_SERIAL_SB1250_DUART
862 + if (!strcmp(consdev, "uart0")) {
864 + } else if (!strcmp(consdev, "uart1")) {
867 +#ifdef CONFIG_VGA_CONSOLE
868 + } else if (!strcmp(consdev, "pcconsole0")) {
877 +static struct console sb1250_cfe_cons = {
879 + .write = cfe_console_write,
880 + .setup = cfe_console_setup,
881 + .flags = CON_PRINTBUFFER,
885 +static int __init sb1250_cfe_console_init(void)
887 + register_console(&sb1250_cfe_cons);
891 +console_initcall(sb1250_cfe_console_init);
892 --- a/arch/mips/sibyte/common/Makefile
893 +++ b/arch/mips/sibyte/common/Makefile
898 +obj-$(CONFIG_SIBYTE_CFE_CONSOLE) += cfe_console.o
899 obj-$(CONFIG_SIBYTE_TBPROF) += sb_tbprof.o
901 EXTRA_CFLAGS += -Werror
902 --- a/arch/mips/sibyte/Kconfig
903 +++ b/arch/mips/sibyte/Kconfig
904 @@ -75,6 +75,8 @@ config SIBYTE_SB1xxx_SOC
906 select SYS_SUPPORTS_32BIT_KERNEL
907 select SYS_SUPPORTS_64BIT_KERNEL
909 + select SYS_HAS_EARLY_PRINTK
912 prompt "SiByte SOC Stepping"
913 @@ -136,34 +138,14 @@ config SB1_CERR_STALL
914 bool "Stall (rather than panic) on fatal cache error"
915 depends on SIBYTE_SB1xxx_SOC
918 - bool "Booting from CFE"
919 - depends on SIBYTE_SB1xxx_SOC
921 - select SYS_HAS_EARLY_PRINTK
923 - Make use of the CFE API for enumerating available memory,
924 - controlling secondary CPUs, and possibly console output.
926 config SIBYTE_CFE_CONSOLE
927 bool "Use firmware console"
928 - depends on SIBYTE_CFE
929 + depends on SIBYTE_SB1xxx_SOC
931 Use the CFE API's console write routines during boot. Other console
932 options (VT console, sb1250 duart console, etc.) should not be
935 -config SIBYTE_STANDALONE
937 - depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
938 - select SYS_HAS_EARLY_PRINTK
941 -config SIBYTE_STANDALONE_RAM_SIZE
942 - int "Memory size (in megabytes)"
943 - depends on SIBYTE_STANDALONE
946 config SIBYTE_BUS_WATCHER
947 bool "Support for Bus Watcher statistics"
948 depends on SIBYTE_SB1xxx_SOC
949 --- a/arch/mips/sibyte/sb1250/Makefile
950 +++ b/arch/mips/sibyte/sb1250/Makefile
952 obj-y := setup.o irq.o time.o
954 obj-$(CONFIG_SMP) += smp.o
955 -obj-$(CONFIG_SIBYTE_STANDALONE) += prom.o
956 obj-$(CONFIG_SIBYTE_BUS_WATCHER) += bus_watcher.o
958 EXTRA_CFLAGS += -Werror
959 --- a/arch/mips/sibyte/sb1250/prom.c
963 - * Copyright (C) 2000, 2001 Broadcom Corporation
965 - * This program is free software; you can redistribute it and/or
966 - * modify it under the terms of the GNU General Public License
967 - * as published by the Free Software Foundation; either version 2
968 - * of the License, or (at your option) any later version.
970 - * This program is distributed in the hope that it will be useful,
971 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
972 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
973 - * GNU General Public License for more details.
975 - * You should have received a copy of the GNU General Public License
976 - * along with this program; if not, write to the Free Software
977 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
980 -#include <linux/init.h>
981 -#include <linux/kernel.h>
982 -#include <linux/mm.h>
983 -#include <linux/blkdev.h>
984 -#include <linux/bootmem.h>
985 -#include <linux/smp.h>
986 -#include <linux/initrd.h>
987 -#include <linux/pm.h>
989 -#include <asm/bootinfo.h>
990 -#include <asm/reboot.h>
992 -#define MAX_RAM_SIZE ((CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024) - 1)
994 -static __init void prom_meminit(void)
996 -#ifdef CONFIG_BLK_DEV_INITRD
997 - unsigned long initrd_pstart;
998 - unsigned long initrd_pend;
1000 - initrd_pstart = __pa(initrd_start);
1001 - initrd_pend = __pa(initrd_end);
1002 - if (initrd_start &&
1003 - ((initrd_pstart > MAX_RAM_SIZE)
1004 - || (initrd_pend > MAX_RAM_SIZE))) {
1005 - panic("initrd out of addressable memory");
1008 - add_memory_region(0, initrd_pstart,
1010 - add_memory_region(initrd_pstart, initrd_pend - initrd_pstart,
1011 - BOOT_MEM_RESERVED);
1012 - add_memory_region(initrd_pend,
1013 - (CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024) - initrd_pend,
1016 - add_memory_region(0, CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024,
1021 -void prom_cpu0_exit(void *unused)
1026 -static void prom_linux_exit(void)
1029 - if (smp_processor_id()) {
1030 - smp_call_function(prom_cpu0_exit, NULL, 1);
1037 - * prom_init is called just after the cpu type is determined, from setup_arch()
1039 -void __init prom_init(void)
1041 - _machine_restart = (void (*)(char *))prom_linux_exit;
1042 - _machine_halt = prom_linux_exit;
1043 - pm_power_off = prom_linux_exit;
1045 - strcpy(arcs_cmdline, "root=/dev/ram0 ");
1050 -void __init prom_free_prom_memory(void)
1052 - /* Not sure what I'm supposed to do here. Nothing, I think */
1055 -void prom_putchar(char c)
1058 --- a/arch/mips/sibyte/swarm/setup.c
1059 +++ b/arch/mips/sibyte/swarm/setup.c
1060 @@ -136,16 +136,6 @@ void __init plat_mem_setup(void)
1062 swarm_rtc_type = RTC_M4LT81;
1064 - printk("This kernel optimized for "
1067 -#ifdef CONFIG_SIBYTE_CFE
1075 screen_info = (struct screen_info) {
1076 0, 0, /* orig-x, orig-y */