aboutsummaryrefslogtreecommitdiff
path: root/arch/sh64/kernel/early_printk.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:52:50 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:52:50 +1100
commite189f3495c4e30fc84fc9241096edf3932e23439 (patch)
tree5916c89ace81537a02ae01869386ba6caafdab9c /arch/sh64/kernel/early_printk.c
parentf4798748dee00c807a63f5518f08b3df161e0f6d (diff)
parent6582d7b7376aa587d74b08c74457dc28abc1a9fa (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (197 commits) sh: add spi header and r2d platform data V3 sh: update r7780rp interrupt code sh: remove consistent alloc stuff from the machine vector sh: use declared coherent memory for dreamcast pci ethernet adapter sh: declared coherent memory support V2 sh: Add support for SDK7780 board. sh: constify function pointer tables sh: Kill off -traditional for linker script. cdrom: Add support for Sega Dreamcast GD-ROM. sh: Kill off hs7751rvoip reference from arch/sh/Kconfig. sh: Drop r7780rp_defconfig, use r7780mp_defconfig as kbuild default. sh: Kill off dead HS771RVoIP board support. sh: r7785rp: Fix up DECLARE_INTC_DESC() arg mismatch. sh: r7785rp: Hook up the rest of the HL7785 FPGA IRQ vectors. sh: r2d - enable sm501 usb host function sh: remove voyagergx sh: r2d - add lcd planel timings to sm501 platform data sh: Add OHCI and UDC platform devices for SH7720. sh: intc - remove default interrupt priority tables sh: Correct pte size mismatch for X2 TLB. ...
Diffstat (limited to 'arch/sh64/kernel/early_printk.c')
-rw-r--r--arch/sh64/kernel/early_printk.c99
1 files changed, 0 insertions, 99 deletions
diff --git a/arch/sh64/kernel/early_printk.c b/arch/sh64/kernel/early_printk.c
deleted file mode 100644
index 4f913112367..00000000000
--- a/arch/sh64/kernel/early_printk.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * arch/sh64/kernel/early_printk.c
- *
- * SH-5 Early SCIF console (cloned and hacked from sh implementation)
- *
- * Copyright (C) 2003, 2004 Paul Mundt <lethal@linux-sh.org>
- * Copyright (C) 2002 M. R. Brown <mrbrown@0xd6.org>
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-#include <linux/console.h>
-#include <linux/tty.h>
-#include <linux/init.h>
-#include <asm/io.h>
-#include <asm/hardware.h>
-
-#define SCIF_BASE_ADDR 0x01030000
-#define SCIF_ADDR_SH5 PHYS_PERIPHERAL_BLOCK+SCIF_BASE_ADDR
-
-/*
- * Fixed virtual address where SCIF is mapped (should already be done
- * in arch/sh64/kernel/head.S!).
- */
-#define SCIF_REG 0xfa030000
-
-enum {
- SCIF_SCSMR2 = SCIF_REG + 0x00,
- SCIF_SCBRR2 = SCIF_REG + 0x04,
- SCIF_SCSCR2 = SCIF_REG + 0x08,
- SCIF_SCFTDR2 = SCIF_REG + 0x0c,
- SCIF_SCFSR2 = SCIF_REG + 0x10,
- SCIF_SCFRDR2 = SCIF_REG + 0x14,
- SCIF_SCFCR2 = SCIF_REG + 0x18,
- SCIF_SCFDR2 = SCIF_REG + 0x1c,
- SCIF_SCSPTR2 = SCIF_REG + 0x20,
- SCIF_SCLSR2 = SCIF_REG + 0x24,
-};
-
-static void sh_console_putc(int c)
-{
- while (!(ctrl_inw(SCIF_SCFSR2) & 0x20))
- cpu_relax();
-
- ctrl_outb(c, SCIF_SCFTDR2);
- ctrl_outw((ctrl_inw(SCIF_SCFSR2) & 0x9f), SCIF_SCFSR2);
-
- if (c == '\n')
- sh_console_putc('\r');
-}
-
-static void sh_console_flush(void)
-{
- ctrl_outw((ctrl_inw(SCIF_SCFSR2) & 0xbf), SCIF_SCFSR2);
-
- while (!(ctrl_inw(SCIF_SCFSR2) & 0x40))
- cpu_relax();
-
- ctrl_outw((ctrl_inw(SCIF_SCFSR2) & 0xbf), SCIF_SCFSR2);
-}
-
-static void sh_console_write(struct console *con, const char *s, unsigned count)
-{
- while (count-- > 0)
- sh_console_putc(*s++);
-
- sh_console_flush();
-}
-
-static int __init sh_console_setup(struct console *con, char *options)
-{
- con->cflag = CREAD | HUPCL | CLOCAL | B19200 | CS8;
-
- return 0;
-}
-
-static struct console sh_console = {
- .name = "scifcon",
- .write = sh_console_write,
- .setup = sh_console_setup,
- .flags = CON_PRINTBUFFER | CON_BOOT,
- .index = -1,
-};
-
-void __init enable_early_printk(void)
-{
- ctrl_outb(0x2a, SCIF_SCBRR2); /* 19200bps */
-
- ctrl_outw(0x04, SCIF_SCFCR2); /* Reset TFRST */
- ctrl_outw(0x10, SCIF_SCFCR2); /* TTRG0=1 */
-
- ctrl_outw(0, SCIF_SCSPTR2);
- ctrl_outw(0x60, SCIF_SCFSR2);
- ctrl_outw(0, SCIF_SCLSR2);
- ctrl_outw(0x30, SCIF_SCSCR2);
-
- register_console(&sh_console);
-}