[PATCH] H8/300 support update (3/3) - others

From: Yoshinori Sato
Date: Tue Apr 06 2004 - 06:11:23 EST


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

--
Yoshinori Sato
<ysato@xxxxxxxxxxxxxxxxxxxx>

diff -Nru -X .exclude-diff linux-2.6.5/arch/h8300/Kconfig linux-2.6.5-h8300/arch/h8300/Kconfig
--- linux-2.6.5/arch/h8300/Kconfig 2004-04-06 17:11:10.000000000 +0900
+++ linux-2.6.5-h8300/arch/h8300/Kconfig 2004-04-06 17:00:23.000000000 +0900
@@ -57,17 +57,17 @@
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 Suooprt
More Information. (Japanese Only)
<http://strawberry-linux.com/h8/index.html>

@@ -81,7 +81,7 @@
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 @@
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 GDB_DEBUG
bool "Use gdb stub"
- depends on (!H8300H_SIM && H8S_SIM)
+ depends on (!H8300H_SIM && !H8S_SIM)
help
gdb stub exception support

diff -Nru -X .exclude-diff linux-2.6.5/arch/h8300/Kconfig.ide linux-2.6.5-h8300/arch/h8300/Kconfig.ide
--- linux-2.6.5/arch/h8300/Kconfig.ide 2004-04-06 17:10:56.000000000 +0900
+++ linux-2.6.5-h8300/arch/h8300/Kconfig.ide 2004-03-23 23:43:40.000000000 +0900
@@ -14,7 +14,7 @@
help
IDE alternate registers address

-config H8300_IDE_IRQNO
+config H8300_IDE_IRQ
int "IDE IRQ no"
depends on IDE
help
diff -Nru -X .exclude-diff linux-2.6.5/arch/h8300/kernel/setup.c linux-2.6.5-h8300/arch/h8300/kernel/setup.c
--- linux-2.6.5/arch/h8300/kernel/setup.c 2004-04-06 17:11:10.000000000 +0900
+++ linux-2.6.5-h8300/arch/h8300/kernel/setup.c 2004-03-26 18:12:36.000000000 +0900
@@ -138,27 +138,23 @@
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@xxxxxxxxxxxxxxxxxxxx>\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@xxxxxxxxxxxxxxxxxxxx>\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 @@

#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 @@
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 @@
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 -Nru -X .exclude-diff linux-2.6.5/arch/h8300/platform/h8s/ints_h8s.c linux-2.6.5-h8300/arch/h8300/platform/h8s/ints_h8s.c
--- linux-2.6.5/arch/h8300/platform/h8s/ints_h8s.c 2004-04-06 17:11:10.000000000 +0900
+++ linux-2.6.5-h8300/arch/h8300/platform/h8s/ints_h8s.c 2004-03-23 23:42:00.000000000 +0900
@@ -63,7 +63,8 @@
{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 @@
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 -Nru -X .exclude-diff linux-2.6.5/include/asm-h8300/regs306x.h linux-2.6.5-h8300/include/asm-h8300/regs306x.h
--- linux-2.6.5/include/asm-h8300/regs306x.h 2004-01-09 15:59:19.000000000 +0900
+++ linux-2.6.5-h8300/include/asm-h8300/regs306x.h 2004-03-26 18:12:46.000000000 +0900
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/