aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-01-30 19:25:51 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-30 19:25:51 -0500
commitbd45ac0c5daae35e7c71138172e63df5cf644cf6 (patch)
tree5eb5a599bf6a9d7a8a34e802db932aa9e9555de4 /drivers/serial
parent4eece4ccf997c0e6d8fdad3d842e37b16b8d705f (diff)
parent5bdeae46be6dfe9efa44a548bd622af325f4bdb4 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/21285.c2
-rw-r--r--drivers/serial/bfin_5xx.c6
-rw-r--r--drivers/serial/icom.c24
-rw-r--r--drivers/serial/icom.h2
-rw-r--r--drivers/serial/sh-sci.c6
-rw-r--r--drivers/serial/sh-sci.h48
6 files changed, 59 insertions, 29 deletions
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index facb67855619..6a48dfa1efe8 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -277,6 +277,8 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
277 if (termios->c_iflag & INPCK) 277 if (termios->c_iflag & INPCK)
278 port->read_status_mask |= RXSTAT_FRAME | RXSTAT_PARITY; 278 port->read_status_mask |= RXSTAT_FRAME | RXSTAT_PARITY;
279 279
280 tty_encode_baud_rate(tty, baud, baud);
281
280 /* 282 /*
281 * Which character status flags should we ignore? 283 * Which character status flags should we ignore?
282 */ 284 */
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 6f475b609864..ac2a3ef28d55 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -442,7 +442,8 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
442 set_bfin_dma_config(DIR_READ, DMA_FLOW_STOP, 442 set_bfin_dma_config(DIR_READ, DMA_FLOW_STOP,
443 INTR_ON_BUF, 443 INTR_ON_BUF,
444 DIMENSION_LINEAR, 444 DIMENSION_LINEAR,
445 DATA_SIZE_8)); 445 DATA_SIZE_8,
446 DMA_SYNC_RESTART));
446 set_dma_start_addr(uart->tx_dma_channel, (unsigned long)(xmit->buf+xmit->tail)); 447 set_dma_start_addr(uart->tx_dma_channel, (unsigned long)(xmit->buf+xmit->tail));
447 set_dma_x_count(uart->tx_dma_channel, uart->tx_count); 448 set_dma_x_count(uart->tx_dma_channel, uart->tx_count);
448 set_dma_x_modify(uart->tx_dma_channel, 1); 449 set_dma_x_modify(uart->tx_dma_channel, 1);
@@ -689,7 +690,8 @@ static int bfin_serial_startup(struct uart_port *port)
689 set_dma_config(uart->rx_dma_channel, 690 set_dma_config(uart->rx_dma_channel,
690 set_bfin_dma_config(DIR_WRITE, DMA_FLOW_AUTO, 691 set_bfin_dma_config(DIR_WRITE, DMA_FLOW_AUTO,
691 INTR_ON_ROW, DIMENSION_2D, 692 INTR_ON_ROW, DIMENSION_2D,
692 DATA_SIZE_8)); 693 DATA_SIZE_8,
694 DMA_SYNC_RESTART));
693 set_dma_x_count(uart->rx_dma_channel, DMA_RX_XCOUNT); 695 set_dma_x_count(uart->rx_dma_channel, DMA_RX_XCOUNT);
694 set_dma_x_modify(uart->rx_dma_channel, 1); 696 set_dma_x_modify(uart->rx_dma_channel, 1);
695 set_dma_y_count(uart->rx_dma_channel, DMA_RX_YCOUNT); 697 set_dma_y_count(uart->rx_dma_channel, DMA_RX_YCOUNT);
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 9d3105b64a7a..9c2df5c857cf 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -48,7 +48,7 @@
48#include <linux/vmalloc.h> 48#include <linux/vmalloc.h>
49#include <linux/smp.h> 49#include <linux/smp.h>
50#include <linux/spinlock.h> 50#include <linux/spinlock.h>
51#include <linux/kobject.h> 51#include <linux/kref.h>
52#include <linux/firmware.h> 52#include <linux/firmware.h>
53#include <linux/bitops.h> 53#include <linux/bitops.h>
54 54
@@ -65,7 +65,7 @@
65#define ICOM_VERSION_STR "1.3.1" 65#define ICOM_VERSION_STR "1.3.1"
66#define NR_PORTS 128 66#define NR_PORTS 128
67#define ICOM_PORT ((struct icom_port *)port) 67#define ICOM_PORT ((struct icom_port *)port)
68#define to_icom_adapter(d) container_of(d, struct icom_adapter, kobj) 68#define to_icom_adapter(d) container_of(d, struct icom_adapter, kref)
69 69
70static const struct pci_device_id icom_pci_table[] = { 70static const struct pci_device_id icom_pci_table[] = {
71 { 71 {
@@ -141,6 +141,7 @@ static inline void trace(struct icom_port *, char *, unsigned long) {};
141#else 141#else
142static inline void trace(struct icom_port *icom_port, char *trace_pt, unsigned long trace_data) {}; 142static inline void trace(struct icom_port *icom_port, char *trace_pt, unsigned long trace_data) {};
143#endif 143#endif
144static void icom_kref_release(struct kref *kref);
144 145
145static void free_port_memory(struct icom_port *icom_port) 146static void free_port_memory(struct icom_port *icom_port)
146{ 147{
@@ -1063,11 +1064,11 @@ static int icom_open(struct uart_port *port)
1063{ 1064{
1064 int retval; 1065 int retval;
1065 1066
1066 kobject_get(&ICOM_PORT->adapter->kobj); 1067 kref_get(&ICOM_PORT->adapter->kref);
1067 retval = startup(ICOM_PORT); 1068 retval = startup(ICOM_PORT);
1068 1069
1069 if (retval) { 1070 if (retval) {
1070 kobject_put(&ICOM_PORT->adapter->kobj); 1071 kref_put(&ICOM_PORT->adapter->kref, icom_kref_release);
1071 trace(ICOM_PORT, "STARTUP_ERROR", 0); 1072 trace(ICOM_PORT, "STARTUP_ERROR", 0);
1072 return retval; 1073 return retval;
1073 } 1074 }
@@ -1088,7 +1089,7 @@ static void icom_close(struct uart_port *port)
1088 1089
1089 shutdown(ICOM_PORT); 1090 shutdown(ICOM_PORT);
1090 1091
1091 kobject_put(&ICOM_PORT->adapter->kobj); 1092 kref_put(&ICOM_PORT->adapter->kref, icom_kref_release);
1092} 1093}
1093 1094
1094static void icom_set_termios(struct uart_port *port, 1095static void icom_set_termios(struct uart_port *port,
@@ -1485,18 +1486,14 @@ static void icom_remove_adapter(struct icom_adapter *icom_adapter)
1485 pci_release_regions(icom_adapter->pci_dev); 1486 pci_release_regions(icom_adapter->pci_dev);
1486} 1487}
1487 1488
1488static void icom_kobj_release(struct kobject *kobj) 1489static void icom_kref_release(struct kref *kref)
1489{ 1490{
1490 struct icom_adapter *icom_adapter; 1491 struct icom_adapter *icom_adapter;
1491 1492
1492 icom_adapter = to_icom_adapter(kobj); 1493 icom_adapter = to_icom_adapter(kref);
1493 icom_remove_adapter(icom_adapter); 1494 icom_remove_adapter(icom_adapter);
1494} 1495}
1495 1496
1496static struct kobj_type icom_kobj_type = {
1497 .release = icom_kobj_release,
1498};
1499
1500static int __devinit icom_probe(struct pci_dev *dev, 1497static int __devinit icom_probe(struct pci_dev *dev,
1501 const struct pci_device_id *ent) 1498 const struct pci_device_id *ent)
1502{ 1499{
@@ -1592,8 +1589,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
1592 } 1589 }
1593 } 1590 }
1594 1591
1595 kobject_init(&icom_adapter->kobj); 1592 kref_init(&icom_adapter->kref);
1596 icom_adapter->kobj.ktype = &icom_kobj_type;
1597 return 0; 1593 return 0;
1598 1594
1599probe_exit2: 1595probe_exit2:
@@ -1619,7 +1615,7 @@ static void __devexit icom_remove(struct pci_dev *dev)
1619 icom_adapter = list_entry(tmp, struct icom_adapter, 1615 icom_adapter = list_entry(tmp, struct icom_adapter,
1620 icom_adapter_entry); 1616 icom_adapter_entry);
1621 if (icom_adapter->pci_dev == dev) { 1617 if (icom_adapter->pci_dev == dev) {
1622 kobject_put(&icom_adapter->kobj); 1618 kref_put(&icom_adapter->kref, icom_kref_release);
1623 return; 1619 return;
1624 } 1620 }
1625 } 1621 }
diff --git a/drivers/serial/icom.h b/drivers/serial/icom.h
index e8578d8cd35e..027455496745 100644
--- a/drivers/serial/icom.h
+++ b/drivers/serial/icom.h
@@ -270,7 +270,7 @@ struct icom_adapter {
270#define V2_ONE_PORT_RVX_ONE_PORT_IMBED_MDM 0x0251 270#define V2_ONE_PORT_RVX_ONE_PORT_IMBED_MDM 0x0251
271 int numb_ports; 271 int numb_ports;
272 struct list_head icom_adapter_entry; 272 struct list_head icom_adapter_entry;
273 struct kobject kobj; 273 struct kref kref;
274}; 274};
275 275
276/* prototype */ 276/* prototype */
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 73440e26834b..ddf639144538 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -302,7 +302,7 @@ static void sci_init_pins_scif(struct uart_port* port, unsigned int cflag)
302 } 302 }
303 sci_out(port, SCFCR, fcr_val); 303 sci_out(port, SCFCR, fcr_val);
304} 304}
305#elif defined(CONFIG_CPU_SUBTYPE_SH7720) 305#elif defined(CONFIG_CPU_SUBTYPE_SH7720) || defined(CONFIG_CPU_SUBTYPE_SH7721)
306static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag) 306static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
307{ 307{
308 unsigned int fcr_val = 0; 308 unsigned int fcr_val = 0;
@@ -395,7 +395,8 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
395 } else { 395 } else {
396#ifdef CONFIG_CPU_SUBTYPE_SH7343 396#ifdef CONFIG_CPU_SUBTYPE_SH7343
397 /* Nothing */ 397 /* Nothing */
398#elif defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 398#elif defined(CONFIG_CPU_SUBTYPE_SH7763) || \
399 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
399 defined(CONFIG_CPU_SUBTYPE_SH7785) || \ 400 defined(CONFIG_CPU_SUBTYPE_SH7785) || \
400 defined(CONFIG_CPU_SUBTYPE_SHX3) 401 defined(CONFIG_CPU_SUBTYPE_SHX3)
401 ctrl_outw(0x0080, SCSPTR0); /* Set RTS = 1 */ 402 ctrl_outw(0x0080, SCSPTR0); /* Set RTS = 1 */
@@ -408,6 +409,7 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
408#endif 409#endif
409 410
410#if defined(CONFIG_CPU_SUBTYPE_SH7760) || \ 411#if defined(CONFIG_CPU_SUBTYPE_SH7760) || \
412 defined(CONFIG_CPU_SUBTYPE_SH7763) || \
411 defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 413 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
412 defined(CONFIG_CPU_SUBTYPE_SH7785) 414 defined(CONFIG_CPU_SUBTYPE_SH7785)
413static inline int scif_txroom(struct uart_port *port) 415static inline int scif_txroom(struct uart_port *port)
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index d24621ce799a..f5764ebcfe07 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -46,7 +46,8 @@
46 */ 46 */
47# define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0 47# define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0
48# define SCIF_ONLY 48# define SCIF_ONLY
49#elif defined(CONFIG_CPU_SUBTYPE_SH7720) 49#elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \
50 defined(CONFIG_CPU_SUBTYPE_SH7721)
50# define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */ 51# define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */
51# define SCIF_ONLY 52# define SCIF_ONLY
52#define SCIF_ORER 0x0200 /* overrun error bit */ 53#define SCIF_ORER 0x0200 /* overrun error bit */
@@ -119,6 +120,12 @@
119# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ 120# define SCSCR_INIT(port) 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */
120# define SCI_ONLY 121# define SCI_ONLY
121# define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port) 122# define H8300_SCI_DR(ch) *(volatile char *)(P1DR + h8300_sci_pins[ch].port)
123#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
124# define SCSPTR0 0xffe00024 /* 16 bit SCIF */
125# define SCSPTR1 0xffe08024 /* 16 bit SCIF */
126# define SCIF_ORER 0x0001 /* overrun error bit */
127# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
128# define SCIF_ONLY
122#elif defined(CONFIG_CPU_SUBTYPE_SH7770) 129#elif defined(CONFIG_CPU_SUBTYPE_SH7770)
123# define SCSPTR0 0xff923020 /* 16 bit SCIF */ 130# define SCSPTR0 0xff923020 /* 16 bit SCIF */
124# define SCSPTR1 0xff924020 /* 16 bit SCIF */ 131# define SCSPTR1 0xff924020 /* 16 bit SCIF */
@@ -142,7 +149,9 @@
142# define SCIF_OPER 0x0001 /* Overrun error bit */ 149# define SCIF_OPER 0x0001 /* Overrun error bit */
143# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ 150# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
144# define SCIF_ONLY 151# define SCIF_ONLY
145#elif defined(CONFIG_CPU_SUBTYPE_SH7206) 152#elif defined(CONFIG_CPU_SUBTYPE_SH7203) || \
153 defined(CONFIG_CPU_SUBTYPE_SH7206) || \
154 defined(CONFIG_CPU_SUBTYPE_SH7263)
146# define SCSPTR0 0xfffe8020 /* 16 bit SCIF */ 155# define SCSPTR0 0xfffe8020 /* 16 bit SCIF */
147# define SCSPTR1 0xfffe8820 /* 16 bit SCIF */ 156# define SCSPTR1 0xfffe8820 /* 16 bit SCIF */
148# define SCSPTR2 0xfffe9020 /* 16 bit SCIF */ 157# define SCSPTR2 0xfffe9020 /* 16 bit SCIF */
@@ -214,7 +223,8 @@
214#define SCIF_DR 0x0001 /* 7705 SCIF, 7707 SCIF, 7709 SCIF, 7750 SCIF */ 223#define SCIF_DR 0x0001 /* 7705 SCIF, 7707 SCIF, 7709 SCIF, 7750 SCIF */
215 224
216#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ 225#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
217 defined(CONFIG_CPU_SUBTYPE_SH7720) 226 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
227 defined(CONFIG_CPU_SUBTYPE_SH7721)
218#define SCIF_ORER 0x0200 228#define SCIF_ORER 0x0200
219#define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER) 229#define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER)
220#define SCIF_RFDC_MASK 0x007f 230#define SCIF_RFDC_MASK 0x007f
@@ -252,7 +262,8 @@
252# define SCxSR_PER(port) SCIF_PER 262# define SCxSR_PER(port) SCIF_PER
253# define SCxSR_BRK(port) SCIF_BRK 263# define SCxSR_BRK(port) SCIF_BRK
254#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ 264#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
255 defined(CONFIG_CPU_SUBTYPE_SH7720) 265 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
266 defined(CONFIG_CPU_SUBTYPE_SH7721)
256# define SCxSR_RDxF_CLEAR(port) (sci_in(port,SCxSR)&0xfffc) 267# define SCxSR_RDxF_CLEAR(port) (sci_in(port,SCxSR)&0xfffc)
257# define SCxSR_ERROR_CLEAR(port) (sci_in(port,SCxSR)&0xfd73) 268# define SCxSR_ERROR_CLEAR(port) (sci_in(port,SCxSR)&0xfd73)
258# define SCxSR_TDxE_CLEAR(port) (sci_in(port,SCxSR)&0xffdf) 269# define SCxSR_TDxE_CLEAR(port) (sci_in(port,SCxSR)&0xffdf)
@@ -361,7 +372,8 @@
361#define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) \ 372#define SCIF_FNS(name, sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size) \
362 CPU_SCIF_FNS(name, sh4_scif_offset, sh4_scif_size) 373 CPU_SCIF_FNS(name, sh4_scif_offset, sh4_scif_size)
363#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ 374#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
364 defined(CONFIG_CPU_SUBTYPE_SH7720) 375 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
376 defined(CONFIG_CPU_SUBTYPE_SH7721)
365#define SCIF_FNS(name, scif_offset, scif_size) \ 377#define SCIF_FNS(name, scif_offset, scif_size) \
366 CPU_SCIF_FNS(name, scif_offset, scif_size) 378 CPU_SCIF_FNS(name, scif_offset, scif_size)
367#else 379#else
@@ -388,7 +400,8 @@
388#endif 400#endif
389 401
390#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ 402#if defined(CONFIG_CPU_SUBTYPE_SH7705) || \
391 defined(CONFIG_CPU_SUBTYPE_SH7720) 403 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
404 defined(CONFIG_CPU_SUBTYPE_SH7721)
392 405
393SCIF_FNS(SCSMR, 0x00, 16) 406SCIF_FNS(SCSMR, 0x00, 16)
394SCIF_FNS(SCBRR, 0x04, 8) 407SCIF_FNS(SCBRR, 0x04, 8)
@@ -412,6 +425,7 @@ SCIx_FNS(SCxSR, 0x08, 8, 0x10, 8, 0x08, 16, 0x10, 16, 0x04, 8)
412SCIx_FNS(SCxRDR, 0x0a, 8, 0x14, 8, 0x0A, 8, 0x14, 8, 0x05, 8) 425SCIx_FNS(SCxRDR, 0x0a, 8, 0x14, 8, 0x0A, 8, 0x14, 8, 0x05, 8)
413SCIF_FNS(SCFCR, 0x0c, 8, 0x18, 16) 426SCIF_FNS(SCFCR, 0x0c, 8, 0x18, 16)
414#if defined(CONFIG_CPU_SUBTYPE_SH7760) || \ 427#if defined(CONFIG_CPU_SUBTYPE_SH7760) || \
428 defined(CONFIG_CPU_SUBTYPE_SH7763) || \
415 defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 429 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
416 defined(CONFIG_CPU_SUBTYPE_SH7785) 430 defined(CONFIG_CPU_SUBTYPE_SH7785)
417SCIF_FNS(SCFDR, 0x0e, 16, 0x1C, 16) 431SCIF_FNS(SCFDR, 0x0e, 16, 0x1C, 16)
@@ -510,7 +524,8 @@ static inline void set_sh771x_scif_pfc(struct uart_port *port)
510 return; 524 return;
511 } 525 }
512} 526}
513#elif defined(CONFIG_CPU_SUBTYPE_SH7720) 527#elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \
528 defined(CONFIG_CPU_SUBTYPE_SH7721)
514static inline int sci_rxd_in(struct uart_port *port) 529static inline int sci_rxd_in(struct uart_port *port)
515{ 530{
516 if (port->mapbase == 0xa4430000) 531 if (port->mapbase == 0xa4430000)
@@ -580,6 +595,15 @@ static inline int sci_rxd_in(struct uart_port *port)
580 int ch = (port->mapbase - SMR0) >> 3; 595 int ch = (port->mapbase - SMR0) >> 3;
581 return (H8300_SCI_DR(ch) & h8300_sci_pins[ch].rx) ? 1 : 0; 596 return (H8300_SCI_DR(ch) & h8300_sci_pins[ch].rx) ? 1 : 0;
582} 597}
598#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
599static inline int sci_rxd_in(struct uart_port *port)
600{
601 if (port->mapbase == 0xffe00000)
602 return ctrl_inw(SCSPTR0) & 0x0001 ? 1 : 0; /* SCIF */
603 if (port->mapbase == 0xffe08000)
604 return ctrl_inw(SCSPTR1) & 0x0001 ? 1 : 0; /* SCIF */
605 return 1;
606}
583#elif defined(CONFIG_CPU_SUBTYPE_SH7770) 607#elif defined(CONFIG_CPU_SUBTYPE_SH7770)
584static inline int sci_rxd_in(struct uart_port *port) 608static inline int sci_rxd_in(struct uart_port *port)
585{ 609{
@@ -617,7 +641,9 @@ static inline int sci_rxd_in(struct uart_port *port)
617 return ctrl_inw(SCSPTR5) & 0x0001 ? 1 : 0; /* SCIF */ 641 return ctrl_inw(SCSPTR5) & 0x0001 ? 1 : 0; /* SCIF */
618 return 1; 642 return 1;
619} 643}
620#elif defined(CONFIG_CPU_SUBTYPE_SH7206) 644#elif defined(CONFIG_CPU_SUBTYPE_SH7203) || \
645 defined(CONFIG_CPU_SUBTYPE_SH7206) || \
646 defined(CONFIG_CPU_SUBTYPE_SH7263)
621static inline int sci_rxd_in(struct uart_port *port) 647static inline int sci_rxd_in(struct uart_port *port)
622{ 648{
623 if (port->mapbase == 0xfffe8000) 649 if (port->mapbase == 0xfffe8000)
@@ -688,11 +714,13 @@ static inline int sci_rxd_in(struct uart_port *port)
688 * -- Mitch Davis - 15 Jul 2000 714 * -- Mitch Davis - 15 Jul 2000
689 */ 715 */
690 716
691#if defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 717#if defined(CONFIG_CPU_SUBTYPE_SH7763) || \
718 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
692 defined(CONFIG_CPU_SUBTYPE_SH7785) 719 defined(CONFIG_CPU_SUBTYPE_SH7785)
693#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(16*bps)-1) 720#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(16*bps)-1)
694#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ 721#elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \
695 defined(CONFIG_CPU_SUBTYPE_SH7720) 722 defined(CONFIG_CPU_SUBTYPE_SH7720) || \
723 defined(CONFIG_CPU_SUBTYPE_SH7721)
696#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1) 724#define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1)
697#elif defined(__H8300H__) || defined(__H8300S__) 725#elif defined(__H8300H__) || defined(__H8300S__)
698#define SCBRR_VALUE(bps) (((CONFIG_CPU_CLOCK*1000/32)/bps)-1) 726#define SCBRR_VALUE(bps) (((CONFIG_CPU_CLOCK*1000/32)/bps)-1)