Index: arch/h8300/Kconfig =================================================================== RCS file: /cvsroot/uclinux-h8/linux-2.6/arch/h8300/Kconfig,v retrieving revision 1.1.1.1.2.2 diff -u -r1.1.1.1.2.2 Kconfig --- arch/h8300/Kconfig 23 Mar 2004 14:38:43 -0000 1.1.1.1.2.2 +++ arch/h8300/Kconfig 5 Apr 2004 14:00:09 -0000 @@ -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 Index: drivers/serial/Kconfig =================================================================== RCS file: /cvsroot/uclinux-h8/linux-2.6/drivers/serial/Kconfig,v retrieving revision 1.1.1.1.2.3 diff -u -r1.1.1.1.2.3 Kconfig --- drivers/serial/Kconfig 5 Apr 2004 01:46:52 -0000 1.1.1.1.2.3 +++ drivers/serial/Kconfig 5 Apr 2004 14:03:25 -0000 @@ -479,7 +479,7 @@ config SERIAL_SH_SCI tristate "SH SCI(F) serial port support" - depends on SUPERH + depends on SUPERH || H8300 select SERIAL_CORE config SERIAL_SH_SCI_CONSOLE Index: drivers/serial/sh-sci.c =================================================================== RCS file: /cvsroot/uclinux-h8/linux-2.6/drivers/serial/sh-sci.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.4.1 diff -u -r1.1.1.1 -r1.1.4.1 --- drivers/serial/sh-sci.c 4 Apr 2004 17:40:02 -0000 1.1.1.1 +++ drivers/serial/sh-sci.c 5 Apr 2004 14:11:40 -0000 1.1.4.1 @@ -313,9 +313,9 @@ #if defined(SCI_ONLY) || defined(SCI_AND_SCIF) #if defined(__H8300H__) || defined(__H8300S__) -static void sci_init_pins_sci(struct sci_port* port, unsigned int cflag) +static void sci_init_pins_sci(struct uart_port* port, unsigned int cflag) { - int ch = (port->base - SMR0) >> 3; + int ch = (port->mapbase - SMR0) >> 3; /* set DDR regs */ H8300_GPIO_DDR(h8300_sci_pins[ch].port,h8300_sci_pins[ch].rx,H8300_GPIO_INPUT); @@ -418,11 +418,15 @@ return; } +#if !defined(SCI_ONLY) if (port->type == PORT_SCIF) { txroom = 16 - (sci_in(port, SCFDR)>>8); } else { txroom = (sci_in(port, SCxSR) & SCI_TDRE)?1:0; } +#else + txroom = (sci_in(port, SCxSR) & SCI_TDRE)?1:0; +#endif count = txroom; @@ -454,10 +458,12 @@ local_irq_save(flags); ctrl = sci_in(port, SCSCR); +#if !defined(SCI_ONLY) if (port->type == PORT_SCIF) { sci_in(port, SCxSR); /* Dummy read */ sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port)); } +#endif ctrl |= SCI_CTRL_FLAGS_TIE; sci_out(port, SCSCR, ctrl); @@ -480,11 +486,15 @@ return; while (1) { +#if !defined(SCI_ONLY) if (port->type == PORT_SCIF) { count = sci_in(port, SCFDR)&0x001f; } else { count = (sci_in(port, SCxSR)&SCxSR_RDxF(port))?1:0; } +#else + count = (sci_in(port, SCxSR)&SCxSR_RDxF(port))?1:0; +#endif /* Don't copy more bytes than there is room for in the buffer */ if (tty->flip.count + count > TTY_FLIPBUF_SIZE) @@ -936,9 +946,11 @@ sci_out(port, SCSCR, 0x00); /* TE=0, RE=0, CKE1=0 */ +#if !defined(SCI_ONLY) if (port->type == PORT_SCIF) { sci_out(port, SCFCR, SCFCR_RFRST | SCFCR_TFRST); } +#endif smr_val = sci_in(port, SCSMR) & 3; if ((termios->c_cflag & CSIZE) == CS7) @@ -1328,8 +1340,11 @@ * We need to set the initial uartclk here, since otherwise it will * only ever be setup at sci_init() time. */ +#if !defined(__H8300H__) && !defined(__H8300S__) port->uartclk = current_cpu_data.module_clock * 16; - +#else + port->uartclk = CONFIG_CPU_CLOCK; +#endif if (options) uart_parse_options(options, &baud, &parity, &bits, &flow); @@ -1468,7 +1483,11 @@ for (chan = 0; chan < SCI_NPORTS; chan++) { struct sci_port *sciport = &sci_ports[chan]; +#if !defined(__H8300H__) && !defined(__H8300S__) sciport->port.uartclk = (current_cpu_data.module_clock * 16); +#else + sciport->port.uartclk = CONFIG_CPU_CLOCK; +#endif uart_add_one_port(&sci_uart_driver, &sciport->port); sciport->break_timer.data = (unsigned long)sciport; sciport->break_timer.function = sci_break_timer; Index: drivers/serial/sh-sci.h =================================================================== RCS file: /cvsroot/uclinux-h8/linux-2.6/drivers/serial/sh-sci.h,v retrieving revision 1.1.1.1 retrieving revision 1.1.4.1 diff -u -r1.1.1.1 -r1.1.4.1 --- drivers/serial/sh-sci.h 4 Apr 2004 17:40:07 -0000 1.1.1.1 +++ drivers/serial/sh-sci.h 5 Apr 2004 14:11:40 -0000 1.1.4.1 @@ -240,11 +240,11 @@ } #define CPU_SCI_FNS(name, sci_offset, sci_size) \ - static inline unsigned int sci_##name##_in(struct sci_port* port) \ + static inline unsigned int sci_##name##_in(struct uart_port* port) \ { \ SCI_IN(sci_size, sci_offset); \ } \ - static inline void sci_##name##_out(struct sci_port* port, unsigned int value) \ + static inline void sci_##name##_out(struct uart_port* port, unsigned int value) \ { \ SCI_OUT(sci_size, sci_offset, value); \ } @@ -379,9 +379,9 @@ } #elif defined(__H8300H__) || defined(__H8300S__) -static inline int sci_rxd_in(struct sci_port *port) +static inline int sci_rxd_in(struct uart_port *port) { - int ch = (port->base - SMR0) >> 3; + int ch = (port->mapbase - SMR0) >> 3; return (H8300_SCI_DR(ch) & h8300_sci_pins[ch].rx) ? 1 : 0; } #endif