aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_sci.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/serial_sci.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/serial_sci.h')
-rw-r--r--include/linux/serial_sci.h38
1 files changed, 32 insertions, 6 deletions
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h
index baed2122c5a6..a2afc9fbe186 100644
--- a/include/linux/serial_sci.h
+++ b/include/linux/serial_sci.h
@@ -8,6 +8,23 @@
8 * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts) 8 * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
9 */ 9 */
10 10
11enum {
12 SCBRR_ALGO_1, /* ((clk + 16 * bps) / (16 * bps) - 1) */
13 SCBRR_ALGO_2, /* ((clk + 16 * bps) / (32 * bps) - 1) */
14 SCBRR_ALGO_3, /* (((clk * 2) + 16 * bps) / (16 * bps) - 1) */
15 SCBRR_ALGO_4, /* (((clk * 2) + 16 * bps) / (32 * bps) - 1) */
16 SCBRR_ALGO_5, /* (((clk * 1000 / 32) / bps) - 1) */
17};
18
19#define SCSCR_TIE (1 << 7)
20#define SCSCR_RIE (1 << 6)
21#define SCSCR_TE (1 << 5)
22#define SCSCR_RE (1 << 4)
23#define SCSCR_REIE (1 << 3) /* not supported by all parts */
24#define SCSCR_TOIE (1 << 2) /* not supported by all parts */
25#define SCSCR_CKE1 (1 << 1)
26#define SCSCR_CKE0 (1 << 0)
27
11/* Offsets into the sci_port->irqs array */ 28/* Offsets into the sci_port->irqs array */
12enum { 29enum {
13 SCIx_ERI_IRQ, 30 SCIx_ERI_IRQ,
@@ -17,23 +34,32 @@ enum {
17 SCIx_NR_IRQS, 34 SCIx_NR_IRQS,
18}; 35};
19 36
37#define SCIx_IRQ_MUXED(irq) \
38{ \
39 [SCIx_ERI_IRQ] = (irq), \
40 [SCIx_RXI_IRQ] = (irq), \
41 [SCIx_TXI_IRQ] = (irq), \
42 [SCIx_BRI_IRQ] = (irq), \
43}
44
20struct device; 45struct device;
21 46
22/* 47/*
23 * Platform device specific platform_data struct 48 * Platform device specific platform_data struct
24 */ 49 */
25struct plat_sci_port { 50struct plat_sci_port {
26 void __iomem *membase; /* io cookie */
27 unsigned long mapbase; /* resource base */ 51 unsigned long mapbase; /* resource base */
28 unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ 52 unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */
29 unsigned int type; /* SCI / SCIF / IRDA */ 53 unsigned int type; /* SCI / SCIF / IRDA */
30 upf_t flags; /* UPF_* flags */ 54 upf_t flags; /* UPF_* flags */
31 char *clk; /* clock string */ 55
56 unsigned int scbrr_algo_id; /* SCBRR calculation algo */
57 unsigned int scscr; /* SCSCR initialization */
58
32 struct device *dma_dev; 59 struct device *dma_dev;
33#ifdef CONFIG_SERIAL_SH_SCI_DMA 60
34 unsigned int dma_slave_tx; 61 unsigned int dma_slave_tx;
35 unsigned int dma_slave_rx; 62 unsigned int dma_slave_rx;
36#endif
37}; 63};
38 64
39#endif /* __LINUX_SERIAL_SCI_H */ 65#endif /* __LINUX_SERIAL_SCI_H */