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) {
398 - /* The loader should have set the command line */
399 - /* too early for panic to do any good */
400 - printk("LINUX_CMDLINE not defined in cfe.");
405 -#ifdef CONFIG_BLK_DEV_INITRD
408 - /* Need to find out early whether we've got an initrd. So scan
409 - the list looking now */
410 - for (ptr = arcs_cmdline; *ptr; ptr++) {
411 - while (*ptr == ' ') {
414 - if (!strncmp(ptr, "initrd=", 7)) {
415 - initrd_setup(ptr+7);
418 - while (*ptr && (*ptr != ' ')) {
424 -#endif /* CONFIG_BLK_DEV_INITRD */
426 - /* Not sure this is needed, but it's the safe way. */
427 - arcs_cmdline[CL_SIZE-1] = 0;
431 -#if defined(CONFIG_SIBYTE_BCM112X) || defined(CONFIG_SIBYTE_SB1250)
432 - register_smp_ops(&sb_smp_ops);
434 -#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
435 - register_smp_ops(&bcm1480_smp_ops);
439 -void __init prom_free_prom_memory(void)
441 - /* Not sure what I'm supposed to do here. Nothing, I think */
444 -void prom_putchar(char c)
448 - while ((ret = cfe_write(cfe_cons_handle, &c, 1)) == 0)
452 +++ b/arch/mips/sibyte/common/cfe.c
455 + * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation
457 + * This program is free software; you can redistribute it and/or
458 + * modify it under the terms of the GNU General Public License
459 + * as published by the Free Software Foundation; either version 2
460 + * of the License, or (at your option) any later version.
462 + * This program is distributed in the hope that it will be useful,
463 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
464 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
465 + * GNU General Public License for more details.
467 + * You should have received a copy of the GNU General Public License
468 + * along with this program; if not, write to the Free Software
469 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
472 +#include <linux/init.h>
473 +#include <linux/kernel.h>
474 +#include <linux/linkage.h>
475 +#include <linux/mm.h>
476 +#include <linux/blkdev.h>
477 +#include <linux/bootmem.h>
478 +#include <linux/pm.h>
479 +#include <linux/smp.h>
481 +#include <asm/bootinfo.h>
482 +#include <asm/reboot.h>
483 +#include <asm/sibyte/board.h>
484 +#include <asm/smp-ops.h>
486 +#include <asm/fw/cfe/cfe_api.h>
487 +#include <asm/fw/cfe/cfe_error.h>
489 +/* Max ram addressable in 32-bit segments */
491 +#define MAX_RAM_SIZE (~0ULL)
493 +#ifdef CONFIG_HIGHMEM
494 +#ifdef CONFIG_64BIT_PHYS_ADDR
495 +#define MAX_RAM_SIZE (~0ULL)
497 +#define MAX_RAM_SIZE (0xffffffffULL)
500 +#define MAX_RAM_SIZE (0x1fffffffULL)
504 +#define SIBYTE_MAX_MEM_REGIONS 8
505 +phys_t board_mem_region_addrs[SIBYTE_MAX_MEM_REGIONS];
506 +phys_t board_mem_region_sizes[SIBYTE_MAX_MEM_REGIONS];
507 +unsigned int board_mem_region_count;
509 +int cfe_cons_handle;
511 +#ifdef CONFIG_BLK_DEV_INITRD
512 +extern unsigned long initrd_start, initrd_end;
515 +static void __noreturn cfe_linux_exit(void *arg)
517 + int warm = *(int *)arg;
519 + if (smp_processor_id()) {
520 + static int reboot_smp;
522 + /* Don't repeat the process from another CPU */
524 + /* Get CPU 0 to do the cfe_exit */
526 + smp_call_function(cfe_linux_exit, arg, 0);
529 + printk("Passing control back to CFE...\n");
531 + printk("cfe_exit returned??\n");
536 +static void __noreturn cfe_linux_restart(char *command)
538 + static const int zero;
540 + cfe_linux_exit((void *)&zero);
543 +static void __noreturn cfe_linux_halt(void)
545 + static const int one = 1;
547 + cfe_linux_exit((void *)&one);
550 +static __init void prom_meminit(void)
552 + u64 addr, size, type; /* regardless of 64BIT_PHYS_ADDR */
556 +#ifdef CONFIG_BLK_DEV_INITRD
557 + unsigned long initrd_pstart;
558 + unsigned long initrd_pend;
560 + initrd_pstart = CPHYSADDR(initrd_start);
561 + initrd_pend = CPHYSADDR(initrd_end);
562 + if (initrd_start &&
563 + ((initrd_pstart > MAX_RAM_SIZE)
564 + || (initrd_pend > MAX_RAM_SIZE))) {
565 + panic("initrd out of addressable memory");
570 + for (idx = 0; cfe_enummem(idx, mem_flags, &addr, &size, &type) != CFE_ERR_NOMORE;
573 + if (type == CFE_MI_AVAILABLE) {
575 + * See if this block contains (any portion of) the
578 +#ifdef CONFIG_BLK_DEV_INITRD
579 + if (initrd_start) {
580 + if ((initrd_pstart > addr) &&
581 + (initrd_pstart < (addr + size))) {
582 + add_memory_region(addr,
583 + initrd_pstart - addr,
587 + if ((initrd_pend > addr) &&
588 + (initrd_pend < (addr + size))) {
589 + add_memory_region(initrd_pend,
590 + (addr + size) - initrd_pend,
597 + if (addr > MAX_RAM_SIZE)
599 + if (addr+size > MAX_RAM_SIZE)
600 + size = MAX_RAM_SIZE - (addr+size) + 1;
602 + * memcpy/__copy_user prefetch, which
603 + * will cause a bus error for
604 + * KSEG/KUSEG addrs not backed by RAM.
605 + * Hence, reserve some padding for the
606 + * prefetch distance.
610 + add_memory_region(addr, size, BOOT_MEM_RAM);
612 + board_mem_region_addrs[board_mem_region_count] = addr;
613 + board_mem_region_sizes[board_mem_region_count] = size;
614 + board_mem_region_count++;
615 + if (board_mem_region_count ==
616 + SIBYTE_MAX_MEM_REGIONS) {
618 + * Too many regions. Need to configure more
624 +#ifdef CONFIG_BLK_DEV_INITRD
625 + if (initrd_start) {
626 + add_memory_region(initrd_pstart, initrd_pend - initrd_pstart,
627 + BOOT_MEM_RESERVED);
632 +#ifdef CONFIG_BLK_DEV_INITRD
633 +static int __init initrd_setup(char *str)
637 + char *tmp, *endptr;
638 + unsigned long initrd_size;
640 + /* Make a copy of the initrd argument so we can smash it up here */
641 + for (idx = 0; idx < sizeof(rdarg)-1; idx++) {
642 + if (!str[idx] || (str[idx] == ' ')) break;
643 + rdarg[idx] = str[idx];
650 + *Initrd location comes in the form "<hex size of ramdisk in bytes>@<location in memory>"
651 + * e.g. initrd=3abfd@80010000. This is set up by the loader.
653 + for (tmp = str; *tmp != '@'; tmp++) {
663 + initrd_size = simple_strtoul(str, &endptr, 16);
669 + initrd_start = simple_strtoul(tmp, &endptr, 16);
673 + initrd_end = initrd_start + initrd_size;
674 + printk("Found initrd of %lx@%lx\n", initrd_size, initrd_start);
677 + printk("Bad initrd argument. Disabling initrd\n");
685 +extern struct plat_smp_ops sb_smp_ops;
686 +extern struct plat_smp_ops bcm1480_smp_ops;
689 + * prom_init is called just after the cpu type is determined, from setup_arch()
691 +void __init prom_init(void)
693 + uint64_t cfe_ept, cfe_handle;
694 + unsigned int cfe_eptseal;
695 + int argc = fw_arg0;
696 + char **envp = (char **) fw_arg2;
697 + int *prom_vec = (int *) fw_arg3;
699 + _machine_restart = cfe_linux_restart;
700 + _machine_halt = cfe_linux_halt;
701 + pm_power_off = cfe_linux_halt;
704 + * Check if a loader was used; if NOT, the 4 arguments are
705 + * what CFE gives us (handle, 0, EPT and EPTSEAL)
708 + cfe_handle = (uint64_t)(long)argc;
709 + cfe_ept = (long)envp;
710 + cfe_eptseal = (uint32_t)(unsigned long)prom_vec;
712 + if ((int32_t)(long)prom_vec < 0) {
714 + * Old loader; all it gives us is the handle,
715 + * so use the "known" entrypoint and assume
718 + cfe_handle = (uint64_t)(long)prom_vec;
719 + cfe_ept = (uint64_t)((int32_t)0x9fc00500);
720 + cfe_eptseal = CFE_EPTSEAL;
723 + * Newer loaders bundle the handle/ept/eptseal
724 + * Note: prom_vec is in the loader's useg
725 + * which is still alive in the TLB.
727 + cfe_handle = (uint64_t)((int32_t *)prom_vec)[0];
728 + cfe_ept = (uint64_t)((int32_t *)prom_vec)[2];
729 + cfe_eptseal = (unsigned int)((uint32_t *)prom_vec)[3];
732 + if (cfe_eptseal != CFE_EPTSEAL) {
733 + /* too early for panic to do any good */
734 + printk("CFE's entrypoint seal doesn't match. Spinning.");
737 + cfe_init(cfe_handle, cfe_ept);
739 + * Get the handle for (at least) prom_putchar, possibly for
742 + cfe_cons_handle = cfe_getstdhandle(CFE_STDHANDLE_CONSOLE);
743 + if (cfe_getenv("LINUX_CMDLINE", arcs_cmdline, CL_SIZE) < 0) {
746 + * It's OK for direct boot to not provide a
749 + strcpy(arcs_cmdline, "root=/dev/ram0 ");
751 + /* The loader should have set the command line */
752 + /* too early for panic to do any good */
753 + printk("LINUX_CMDLINE not defined in cfe.");
758 +#ifdef CONFIG_BLK_DEV_INITRD
761 + /* Need to find out early whether we've got an initrd. So scan
762 + the list looking now */
763 + for (ptr = arcs_cmdline; *ptr; ptr++) {
764 + while (*ptr == ' ') {
767 + if (!strncmp(ptr, "initrd=", 7)) {
768 + initrd_setup(ptr+7);
771 + while (*ptr && (*ptr != ' ')) {
777 +#endif /* CONFIG_BLK_DEV_INITRD */
779 + /* Not sure this is needed, but it's the safe way. */
780 + arcs_cmdline[CL_SIZE-1] = 0;
784 +#if defined(CONFIG_SIBYTE_BCM112X) || defined(CONFIG_SIBYTE_SB1250)
785 + register_smp_ops(&sb_smp_ops);
787 +#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
788 + register_smp_ops(&bcm1480_smp_ops);
792 +void __init prom_free_prom_memory(void)
794 + /* Not sure what I'm supposed to do here. Nothing, I think */
797 +void prom_putchar(char c)
801 + while ((ret = cfe_write(cfe_cons_handle, &c, 1)) == 0)
805 +++ b/arch/mips/sibyte/common/cfe_console.c
807 +#include <linux/init.h>
808 +#include <linux/errno.h>
809 +#include <linux/console.h>
811 +#include <asm/sibyte/board.h>
813 +#include <asm/fw/cfe/cfe_api.h>
814 +#include <asm/fw/cfe/cfe_error.h>
816 +extern int cfe_cons_handle;
818 +static void cfe_console_write(struct console *cons, const char *str,
819 + unsigned int count)
821 + int i, last, written;
823 + for (i=0, last=0; i<count; i++) {
825 + /* XXXKW can/should this ever happen? */
827 + if (str[i] == '\n') {
829 + written = cfe_write(cfe_cons_handle, &str[last], i-last);
833 + } while (last < i);
834 + while (cfe_write(cfe_cons_handle, "\r", 1) <= 0)
838 + if (last != count) {
840 + written = cfe_write(cfe_cons_handle, &str[last], count-last);
844 + } while (last < count);
849 +static int cfe_console_setup(struct console *cons, char *str)
852 + /* XXXKW think about interaction with 'console=' cmdline arg */
853 + /* If none of the console options are configured, the build will break. */
854 + if (cfe_getenv("BOOT_CONSOLE", consdev, 32) >= 0) {
855 +#ifdef CONFIG_SERIAL_SB1250_DUART
856 + if (!strcmp(consdev, "uart0")) {
858 + } else if (!strcmp(consdev, "uart1")) {
861 +#ifdef CONFIG_VGA_CONSOLE
862 + } else if (!strcmp(consdev, "pcconsole0")) {
871 +static struct console sb1250_cfe_cons = {
873 + .write = cfe_console_write,
874 + .setup = cfe_console_setup,
875 + .flags = CON_PRINTBUFFER,
879 +static int __init sb1250_cfe_console_init(void)
881 + register_console(&sb1250_cfe_cons);
885 +console_initcall(sb1250_cfe_console_init);
886 --- a/arch/mips/sibyte/common/Makefile
887 +++ b/arch/mips/sibyte/common/Makefile
892 +obj-$(CONFIG_SIBYTE_CFE_CONSOLE) += cfe_console.o
893 obj-$(CONFIG_SIBYTE_TBPROF) += sb_tbprof.o
895 EXTRA_CFLAGS += -Werror
896 --- a/arch/mips/sibyte/Kconfig
897 +++ b/arch/mips/sibyte/Kconfig
898 @@ -75,6 +75,8 @@ config SIBYTE_SB1xxx_SOC
900 select SYS_SUPPORTS_32BIT_KERNEL
901 select SYS_SUPPORTS_64BIT_KERNEL
903 + select SYS_HAS_EARLY_PRINTK
906 prompt "SiByte SOC Stepping"
907 @@ -136,34 +138,14 @@ config SB1_CERR_STALL
908 bool "Stall (rather than panic) on fatal cache error"
909 depends on SIBYTE_SB1xxx_SOC
912 - bool "Booting from CFE"
913 - depends on SIBYTE_SB1xxx_SOC
915 - select SYS_HAS_EARLY_PRINTK
917 - Make use of the CFE API for enumerating available memory,
918 - controlling secondary CPUs, and possibly console output.
920 config SIBYTE_CFE_CONSOLE
921 bool "Use firmware console"
922 - depends on SIBYTE_CFE
923 + depends on SIBYTE_SB1xxx_SOC
925 Use the CFE API's console write routines during boot. Other console
926 options (VT console, sb1250 duart console, etc.) should not be
929 -config SIBYTE_STANDALONE
931 - depends on SIBYTE_SB1xxx_SOC && !SIBYTE_CFE
932 - select SYS_HAS_EARLY_PRINTK
935 -config SIBYTE_STANDALONE_RAM_SIZE
936 - int "Memory size (in megabytes)"
937 - depends on SIBYTE_STANDALONE
940 config SIBYTE_BUS_WATCHER
941 bool "Support for Bus Watcher statistics"
942 depends on SIBYTE_SB1xxx_SOC
943 --- a/arch/mips/sibyte/sb1250/Makefile
944 +++ b/arch/mips/sibyte/sb1250/Makefile
946 obj-y := setup.o irq.o time.o
948 obj-$(CONFIG_SMP) += smp.o
949 -obj-$(CONFIG_SIBYTE_STANDALONE) += prom.o
950 obj-$(CONFIG_SIBYTE_BUS_WATCHER) += bus_watcher.o
952 EXTRA_CFLAGS += -Werror
953 --- a/arch/mips/sibyte/sb1250/prom.c
957 - * Copyright (C) 2000, 2001 Broadcom Corporation
959 - * This program is free software; you can redistribute it and/or
960 - * modify it under the terms of the GNU General Public License
961 - * as published by the Free Software Foundation; either version 2
962 - * of the License, or (at your option) any later version.
964 - * This program is distributed in the hope that it will be useful,
965 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
966 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
967 - * GNU General Public License for more details.
969 - * You should have received a copy of the GNU General Public License
970 - * along with this program; if not, write to the Free Software
971 - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
974 -#include <linux/init.h>
975 -#include <linux/kernel.h>
976 -#include <linux/mm.h>
977 -#include <linux/blkdev.h>
978 -#include <linux/bootmem.h>
979 -#include <linux/smp.h>
980 -#include <linux/initrd.h>
981 -#include <linux/pm.h>
983 -#include <asm/bootinfo.h>
984 -#include <asm/reboot.h>
986 -#define MAX_RAM_SIZE ((CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024) - 1)
988 -static __init void prom_meminit(void)
990 -#ifdef CONFIG_BLK_DEV_INITRD
991 - unsigned long initrd_pstart;
992 - unsigned long initrd_pend;
994 - initrd_pstart = __pa(initrd_start);
995 - initrd_pend = __pa(initrd_end);
996 - if (initrd_start &&
997 - ((initrd_pstart > MAX_RAM_SIZE)
998 - || (initrd_pend > MAX_RAM_SIZE))) {
999 - panic("initrd out of addressable memory");
1002 - add_memory_region(0, initrd_pstart,
1004 - add_memory_region(initrd_pstart, initrd_pend - initrd_pstart,
1005 - BOOT_MEM_RESERVED);
1006 - add_memory_region(initrd_pend,
1007 - (CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024) - initrd_pend,
1010 - add_memory_region(0, CONFIG_SIBYTE_STANDALONE_RAM_SIZE * 1024 * 1024,
1015 -void prom_cpu0_exit(void *unused)
1020 -static void prom_linux_exit(void)
1023 - if (smp_processor_id()) {
1024 - smp_call_function(prom_cpu0_exit, NULL, 1);
1031 - * prom_init is called just after the cpu type is determined, from setup_arch()
1033 -void __init prom_init(void)
1035 - _machine_restart = (void (*)(char *))prom_linux_exit;
1036 - _machine_halt = prom_linux_exit;
1037 - pm_power_off = prom_linux_exit;
1039 - strcpy(arcs_cmdline, "root=/dev/ram0 ");
1044 -void __init prom_free_prom_memory(void)
1046 - /* Not sure what I'm supposed to do here. Nothing, I think */
1049 -void prom_putchar(char c)
1052 --- a/arch/mips/sibyte/swarm/setup.c
1053 +++ b/arch/mips/sibyte/swarm/setup.c
1054 @@ -136,16 +136,6 @@ void __init plat_mem_setup(void)
1056 swarm_rtc_type = RTC_M4LT81;
1058 - printk("This kernel optimized for "
1061 -#ifdef CONFIG_SIBYTE_CFE
1069 screen_info = (struct screen_info) {
1070 0, 0, /* orig-x, orig-y */