summaryrefslogtreecommitdiffstats
path: root/arch/mips/sibyte/cfe/console.c
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2009-06-02 14:22:06 +0200
committerRalf Baechle <ralf@linux-mips.org>2009-06-17 11:06:27 +0100
commit05f94eebd55ef69a354d3ea70179e40ea4c34de6 (patch)
treee97c73c3b3eeabcc888f8b5f21d97a2976eabc5c /arch/mips/sibyte/cfe/console.c
parent435f81f4a24206f82ce10d430fa6f312cee80669 (diff)
downloadtalos-obmc-linux-05f94eebd55ef69a354d3ea70179e40ea4c34de6.tar.gz
talos-obmc-linux-05f94eebd55ef69a354d3ea70179e40ea4c34de6.zip
MIPS: Sibyte: Remove standalone kernel support
CFE is the only supported and used bootloader on the SiByte boards, the standalone kernel support has been never used outside Broadcom. Remove it and make the kernel use CFE by default. Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sibyte/cfe/console.c')
-rw-r--r--arch/mips/sibyte/cfe/console.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/arch/mips/sibyte/cfe/console.c b/arch/mips/sibyte/cfe/console.c
deleted file mode 100644
index 81e3d54376e9..000000000000
--- a/arch/mips/sibyte/cfe/console.c
+++ /dev/null
@@ -1,79 +0,0 @@
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/console.h>
-
-#include <asm/sibyte/board.h>
-
-#include <asm/fw/cfe/cfe_api.h>
-#include <asm/fw/cfe/cfe_error.h>
-
-extern int cfe_cons_handle;
-
-static void cfe_console_write(struct console *cons, const char *str,
- unsigned int count)
-{
- int i, last, written;
-
- for (i=0, last=0; i<count; i++) {
- if (!str[i])
- /* XXXKW can/should this ever happen? */
- return;
- if (str[i] == '\n') {
- do {
- written = cfe_write(cfe_cons_handle, &str[last], i-last);
- if (written < 0)
- ;
- last += written;
- } while (last < i);
- while (cfe_write(cfe_cons_handle, "\r", 1) <= 0)
- ;
- }
- }
- if (last != count) {
- do {
- written = cfe_write(cfe_cons_handle, &str[last], count-last);
- if (written < 0)
- ;
- last += written;
- } while (last < count);
- }
-
-}
-
-static int cfe_console_setup(struct console *cons, char *str)
-{
- char consdev[32];
- /* XXXKW think about interaction with 'console=' cmdline arg */
- /* If none of the console options are configured, the build will break. */
- if (cfe_getenv("BOOT_CONSOLE", consdev, 32) >= 0) {
-#ifdef CONFIG_SERIAL_SB1250_DUART
- if (!strcmp(consdev, "uart0")) {
- setleds("u0cn");
- } else if (!strcmp(consdev, "uart1")) {
- setleds("u1cn");
-#endif
-#ifdef CONFIG_VGA_CONSOLE
- } else if (!strcmp(consdev, "pcconsole0")) {
- setleds("pccn");
-#endif
- } else
- return -ENODEV;
- }
- return 0;
-}
-
-static struct console sb1250_cfe_cons = {
- .name = "cfe",
- .write = cfe_console_write,
- .setup = cfe_console_setup,
- .flags = CON_PRINTBUFFER,
- .index = -1,
-};
-
-static int __init sb1250_cfe_console_init(void)
-{
- register_console(&sb1250_cfe_cons);
- return 0;
-}
-
-console_initcall(sb1250_cfe_console_init);
OpenPOWER on IntegriCloud