- use new serial driver (drivers/serial/sh-sci.[ch])
- typo fix
- add message level

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>



---

 25-akpm/arch/h8300/Kconfig                 |   74 +----------------------------
 25-akpm/arch/h8300/Kconfig.ide             |    2 
 25-akpm/arch/h8300/kernel/setup.c          |   48 +++++-------------
 25-akpm/arch/h8300/platform/h8s/ints_h8s.c |    5 +
 25-akpm/include/asm-h8300/regs306x.h       |    4 -
 5 files changed, 24 insertions(+), 109 deletions(-)

diff -puN arch/h8300/Kconfig~h8300-others arch/h8300/Kconfig
--- 25/arch/h8300/Kconfig~h8300-others	2004-04-06 21:06:55.044931488 -0700
+++ 25-akpm/arch/h8300/Kconfig	2004-04-06 21:06:55.053930120 -0700
@@ -57,17 +57,17 @@ config H8300H_GENERIC
 config H8300H_AKI3068NET
 	bool "AE-3068/69"
 	help
-	  AKI-H8/3068F / AKI-H8/3069F Flashmicom LAN Board Suppot
+	  AKI-H8/3068F / AKI-H8/3069F Flashmicom LAN Board Support
 	  More Information. (Japanese Only)
 	  <http://akizukidensi.com/catalog/h8.html>
-	  AE-3068/69 Evalution Board Support
+	  AE-3068/69 Evaluation Board Support
 	  More Information.
 	  <http://www.microtronique.com/ae3069lan.htm>
 
 config H8300H_H8MAX
 	bool "H8MAX"
 	help
-	  H8MAX Evalution Board Suooprt
+	  H8MAX Evaluation Board Support
 	  More Information. (Japanese Only)
 	  <http://strawberry-linux.com/h8/index.html>
 
@@ -81,7 +81,7 @@ config H8300H_SIM
 config H8S_EDOSK2674
 	bool "EDOSK-2674"
 	help
-	  Renesas EDOSK-2674R Evalution Board Support
+	  Renesas EDOSK-2674 Evaluation Board Support
 	  More Information.
 	  <http://www.azpower.com/H8-uClinux/index.html>
  	  <http://www.eu.renesas.com/tools/edk/support/edosk2674.html>
@@ -240,70 +240,6 @@ config HW_CONSOLE
 	depends on VT && !S390 && !UM
 	default y
 
-config SERIAL
-	tristate "Serial (8250, 16450, 16550 or compatible) support"
-	---help---
-	  This selects whether you want to include the driver for the standard
-	  serial ports.  The standard answer is Y.  People who might say N
-	  here are those that are setting up dedicated Ethernet WWW/FTP
-	  servers, or users that have one of the various bus mice instead of a
-	  serial mouse and don't intend to use their machine's standard serial
-	  port for anything.  (Note that the Cyclades and Stallion multi
-	  serial port drivers do not need this driver built in for them to
-	  work.)
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called serial.
-	  [WARNING: Do not compile this driver as a module if you are using
-	  non-standard serial ports, since the configuration information will
-	  be lost when the driver is unloaded.  This limitation may be lifted
-	  in the future.]
-
-	  BTW1: If you have a mouseman serial mouse which is not recognized by
-	  the X window system, try running gpm first.
-
-	  BTW2: If you intend to use a software modem (also called Winmodem)
-	  under Linux, forget it.  These modems are crippled and require
-	  proprietary drivers which are only available under Windows.
-
-	  Most people will say Y or M here, so that they can use serial mice,
-	  modems and similar devices connecting to the standard serial ports.
-
-config SH_SCI
-	tristate "Serial (SCI, SCIF) support"
-	help
-	  Selecting this option will allow the Linux kernel to transfer data
-	  over SCI (Serial Communication Interface) and/or SCIF (Serial
-	  Communication Interface with FIFO) which are built into the Hitachi
-	  SuperH processor.  The option provides 1 to 3 (depending
-	  on the CPU model) standard Linux tty devices, /dev/ttySC[012]; one
-	  of these is normally used as the system console.
-
-	  If in doubt, press "y".
-
-config SERIAL_CONSOLE
-	bool "Support for console on serial port"
-	depends on SERIAL=y || SH_SCI=y
-	---help---
-	  If you say Y here, it will be possible to use a serial port as the
-	  system console (the system console is the device which receives all
-	  kernel messages and warnings and which allows logins in single user
-	  mode). This could be useful if some terminal or printer is connected
-	  to that serial port.
-
-	  Even if you say Y here, the currently visible virtual console
-	  (/dev/tty0) will still be used as the system console by default, but
-	  you can alter that using a kernel command line option such as
-	  "console=ttyS1". (Try "man bootparam" or see the documentation of
-	  your boot loader (lilo or loadlin) about how to pass options to the
-	  kernel at boot time.)
-
-	  If you don't have a VGA card installed and you say Y here, the
-	  kernel will automatically use the first serial line, /dev/ttyS0, as
-	  system console.
-
-	  If unsure, say N.
-
 comment "Unix98 PTY support"
 
 config UNIX98_PTYS
@@ -396,7 +332,7 @@ config SYSCALL_PRINT
 
 config GDB_DEBUG
    	bool "Use gdb stub"
-	depends on (!H8300H_SIM && H8S_SIM)
+	depends on (!H8300H_SIM && !H8S_SIM)
 	help
 	  gdb stub exception support
 
diff -puN arch/h8300/Kconfig.ide~h8300-others arch/h8300/Kconfig.ide
--- 25/arch/h8300/Kconfig.ide~h8300-others	2004-04-06 21:06:55.046931184 -0700
+++ 25-akpm/arch/h8300/Kconfig.ide	2004-04-06 21:06:55.054929968 -0700
@@ -14,7 +14,7 @@ config H8300_IDE_ALT
 	help
 	  IDE alternate registers address
 
-config H8300_IDE_IRQNO
+config H8300_IDE_IRQ
 	int "IDE IRQ no"
 	depends on IDE
 	help
diff -puN arch/h8300/kernel/setup.c~h8300-others arch/h8300/kernel/setup.c
--- 25/arch/h8300/kernel/setup.c~h8300-others	2004-04-06 21:06:55.047931032 -0700
+++ 25-akpm/arch/h8300/kernel/setup.c	2004-04-06 21:06:55.055929816 -0700
@@ -138,27 +138,23 @@ void __init setup_arch(char **cmdline_p)
 	register_console((struct console *)&gdb_console);
 #endif
 
-	printk("\r\n\nuClinux " CPU "\n");
-	printk("Target Hardware: %s\n",_target_name);
-	printk("Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
-	printk("H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n");
+	printk(KERN_INFO "\r\n\nuClinux " CPU "\n");
+	printk(KERN_INFO "Target Hardware: %s\n",_target_name);
+	printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
+	printk(KERN_INFO "H8/300 series support by Yoshinori Sato <ysato@users.sourceforge.jp>\n");
 
 #ifdef DEBUG
-	printk("KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
+	printk(KERN_DEBUG "KERNEL -> TEXT=0x%06x-0x%06x DATA=0x%06x-0x%06x "
 		"BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
 		(int) &_sdata, (int) &_edata,
 		(int) &_sbss, (int) &_ebss);
-	printk("KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
+	printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x "
 		"STACK=0x%06x-0x%06x\n",
 	       (int) &_ebss, (int) memory_start,
 		(int) memory_start, (int) memory_end,
 		(int) memory_end, (int) &_ramend);
 #endif
 
-#ifdef CONFIG_BLK_DEV_BLKMEM
-	ROOT_DEV = MKDEV(BLKMEM_MAJOR,0);
-#endif
-
 #ifdef CONFIG_DEFAULT_CMDLINE
 	/* set from default command line */
 	if (*command_line == '\0')
@@ -171,7 +167,7 @@ void __init setup_arch(char **cmdline_p)
 
 #ifdef DEBUG
 	if (strlen(*cmdline_p)) 
-		printk("Command line: '%s'\n", *cmdline_p);
+		printk(KERN_DEBUG "Command line: '%s'\n", *cmdline_p);
 #endif
 
 	/*
@@ -195,30 +191,10 @@ void __init setup_arch(char **cmdline_p)
 	paging_init();
 	h8300_gpio_init();
 #ifdef DEBUG
-	printk("Done setup_arch\n");
+	printk(KERN_DEBUG "Done setup_arch\n");
 #endif
 }
 
-int get_cpuinfo(char * buffer)
-{
-    char *cpu;
-    u_long clockfreq;
-
-    cpu = CPU;
-
-    clockfreq = CONFIG_CPU_CLOCK;
-
-    return(sprintf(buffer, "CPU:\t\t%s\n"
-		   "Clock:\t%lu.%1luMHz\n"
-		   "BogoMips:\t%lu.%02lu\n"
-		   "Calibration:\t%lu loops\n",
-		   cpu,
-		   clockfreq/100,clockfreq%100,
-		   (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100,
-		   (loops_per_jiffy*HZ)));
-
-}
-
 /*
  *	Get CPU information for use by the procfs.
  */
@@ -226,17 +202,19 @@ int get_cpuinfo(char * buffer)
 static int show_cpuinfo(struct seq_file *m, void *v)
 {
     char *cpu;
+    int mode;
     u_long clockfreq;
 
     cpu = CPU;
+    mode = *(volatile unsigned char *)MDCR & 0x07;
 
     clockfreq = CONFIG_CPU_CLOCK;
 
-    seq_printf(m,  "CPU:\t\t%s\n"
-		   "Clock:\t%lu.%1luMHz\n"
+    seq_printf(m,  "CPU:\t\t%s (mode:%d)\n"
+		   "Clock:\t\t%lu.%1luMHz\n"
 		   "BogoMips:\t%lu.%02lu\n"
 		   "Calibration:\t%lu loops\n",
-		   cpu,
+	           cpu,mode,
 		   clockfreq/100,clockfreq%100,
 		   (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100,
 		   (loops_per_jiffy*HZ));
diff -puN arch/h8300/platform/h8s/ints_h8s.c~h8300-others arch/h8300/platform/h8s/ints_h8s.c
--- 25/arch/h8300/platform/h8s/ints_h8s.c~h8300-others	2004-04-06 21:06:55.049930728 -0700
+++ 25-akpm/arch/h8300/platform/h8s/ints_h8s.c	2004-04-06 21:06:55.055929816 -0700
@@ -63,7 +63,8 @@ const static struct irq_pins irq_assign_
 	{H8300_GPIO_P2,H8300_GPIO_B6},{H8300_GPIO_P2,H8300_GPIO_B7},
 };
 
-#define IRQ_GPIO_MAP(irqbit,port,bit)				  \
+/* IRQ to GPIO pinno transrate */
+#define IRQ_GPIO_MAP(irqbit,irq,port,bit)			  \
 do {								  \
 	if (*(volatile unsigned short *)ITSR & irqbit) {	  \
 		port = irq_assign_table1[irq - EXT_IRQ0].port_no; \
@@ -79,7 +80,7 @@ int h8300_enable_irq_pin(unsigned int ir
 	if (irq >= EXT_IRQ0 && irq <= EXT_IRQ15) {
 		unsigned short ptn = 1 << (irq - EXT_IRQ0);
 		unsigned int port_no,bit_no;
-		IRQ_GPIO_MAP(ptn,port_no,bit_no);
+		IRQ_GPIO_MAP(ptn,irq,port_no,bit_no);
 		if (H8300_GPIO_RESERVE(port_no, bit_no) == 0)
 			return -EBUSY;                   /* pin already use */
 		H8300_GPIO_DDR(port_no, bit_no, H8300_GPIO_INPUT);
diff -puN include/asm-h8300/regs306x.h~h8300-others include/asm-h8300/regs306x.h
--- 25/include/asm-h8300/regs306x.h~h8300-others	2004-04-06 21:06:55.050930576 -0700
+++ 25-akpm/include/asm-h8300/regs306x.h	2004-04-06 21:06:55.055929816 -0700
@@ -125,8 +125,8 @@
 #define RDR2  0xFFFFC5
 #define SCMR2 0xFFFFC6
 
-#define MDCR   0xFEE000
-#define SYSCR  0xFEE001
+#define MDCR   0xFEE011
+#define SYSCR  0xFEE012
 #define DIVCR  0xFEE01B
 #define MSTCRH 0xFEE01C
 #define MSTCRL 0xFEE01D

_