Commit 0b43f270 authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds

[PATCH] m32r: SIO driver

Here is a patch to support the M32R SIO (serial IO) driver.

This driver supports the M32R serial ports.
- Supports two types M32R serial interfaces; M32R_SIO and M32R_PLDSIO.
- With SMP safeness.

Currently the M32R_PLDSIO serial interface, which is implemented on a PLD
on the M3T-M32700UT evaluation board, has slightly different specification
from the integrated peripheral SIO (M32R_SIO).  Now we can select them by
CONFIG_ option.

It is a serial-core based driver, based on drivers/serial/8250.c.  Any
comments or suggestions will be appreciated.
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7bec22c8
...@@ -727,4 +727,33 @@ config SERIAL_ICOM ...@@ -727,4 +727,33 @@ config SERIAL_ICOM
This driver can also be built as a module. If so, the module This driver can also be built as a module. If so, the module
will be called icom. will be called icom.
config SERIAL_M32R_SIO
bool "M32R SIO I/F"
depends on M32R
default y
select SERIAL_CORE
help
Say Y here if you want to use the M32R serial controller.
config SERIAL_M32R_SIO_CONSOLE
bool "use SIO console"
depends on SERIAL_M32R_SIO=y
select SERIAL_CORE_CONSOLE
help
Say Y here if you want to support a serial console.
If you use an M3T-M32700UT or an OPSPUT platform,
please say also y for SERIAL_M32R_PLDSIO.
config SERIAL_M32R_PLDSIO
bool "M32R SIO I/F on a PLD"
depends on SERIAL_M32R_SIO=y
default n
help
Say Y here if you want to use the M32R serial controller
on a PLD (Programmable Logic Device).
If you use an M3T-M32700UT or an OPSPUT platform,
please say Y.
endmenu endmenu
...@@ -41,3 +41,4 @@ obj-$(CONFIG_SERIAL_BAST_SIO) += bast_sio.o ...@@ -41,3 +41,4 @@ obj-$(CONFIG_SERIAL_BAST_SIO) += bast_sio.o
obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o obj-$(CONFIG_SERIAL_SGI_L1_CONSOLE) += sn_console.o
obj-$(CONFIG_SERIAL_CPM) += cpm_uart/ obj-$(CONFIG_SERIAL_CPM) += cpm_uart/
obj-$(CONFIG_SERIAL_MPC52xx) += mpc52xx_uart.o obj-$(CONFIG_SERIAL_MPC52xx) += mpc52xx_uart.o
obj-$(CONFIG_SERIAL_M32R_SIO) += m32r_sio.o
This diff is collapsed.
/*
* m32r_sio.h
*
* Driver for M32R serial ports
*
* Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
* Based on drivers/serial/8250.h.
*
* Copyright (C) 2001 Russell King.
* Copyright (C) 2004 Hirokazu Takata <takata at linux-m32r.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/config.h>
struct m32r_sio_probe {
struct module *owner;
int (*pci_init_one)(struct pci_dev *dev);
void (*pci_remove_one)(struct pci_dev *dev);
void (*pnp_init)(void);
};
int m32r_sio_register_probe(struct m32r_sio_probe *probe);
void m32r_sio_unregister_probe(struct m32r_sio_probe *probe);
void m32r_sio_get_irq_map(unsigned int *map);
void m32r_sio_suspend_port(int line);
void m32r_sio_resume_port(int line);
struct old_serial_port {
unsigned int uart;
unsigned int baud_base;
unsigned int port;
unsigned int irq;
unsigned int flags;
unsigned char hub6;
unsigned char io_type;
unsigned char *iomem_base;
unsigned short iomem_reg_shift;
};
#define _INLINE_ inline
#define PROBE_RSA (1 << 0)
#define PROBE_ANY (~0)
#define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
#ifdef CONFIG_SERIAL_SIO_SHARE_IRQ
#define M32R_SIO_SHARE_IRQS 1
#else
#define M32R_SIO_SHARE_IRQS 0
#endif
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment