Blame view

include/linux/serial_sci.h 1.52 KB
96de1a8f0   Paul Mundt   serial: Move asm-...
1
2
  #ifndef __LINUX_SERIAL_SCI_H
  #define __LINUX_SERIAL_SCI_H
ecd956168   Paul Mundt   serial: Add SERIA...
3
4
  
  #include <linux/serial_core.h>
14baf9d7f   Paul Mundt   serial: sh-sci: f...
5
  #include <linux/sh_dma.h>
ecd956168   Paul Mundt   serial: Add SERIA...
6
7
  
  /*
96de1a8f0   Paul Mundt   serial: Move asm-...
8
   * Generic header for SuperH SCI(F) (used by sh/sh64/h8300 and related parts)
ecd956168   Paul Mundt   serial: Add SERIA...
9
   */
26c92f372   Paul Mundt   serial: sh-sci: M...
10
11
12
13
14
15
16
  enum {
  	SCBRR_ALGO_1,		/* ((clk + 16 * bps) / (16 * bps) - 1) */
  	SCBRR_ALGO_2,		/* ((clk + 16 * bps) / (32 * bps) - 1) */
  	SCBRR_ALGO_3,		/* (((clk * 2) + 16 * bps) / (16 * bps) - 1) */
  	SCBRR_ALGO_4,		/* (((clk * 2) + 16 * bps) / (32 * bps) - 1) */
  	SCBRR_ALGO_5,		/* (((clk * 1000 / 32) / bps) - 1) */
  };
00b9de9c2   Paul Mundt   serial: sh-sci: M...
17
18
19
20
  #define SCSCR_TIE	(1 << 7)
  #define SCSCR_RIE	(1 << 6)
  #define SCSCR_TE	(1 << 5)
  #define SCSCR_RE	(1 << 4)
f43dc23d5   Paul Mundt   Merge branch 'mas...
21
  #define SCSCR_REIE	(1 << 3)	/* not supported by all parts */
00b9de9c2   Paul Mundt   serial: sh-sci: M...
22
23
24
  #define SCSCR_TOIE	(1 << 2)	/* not supported by all parts */
  #define SCSCR_CKE1	(1 << 1)
  #define SCSCR_CKE0	(1 << 0)
ecd956168   Paul Mundt   serial: Add SERIA...
25
26
27
28
29
30
31
32
  /* Offsets into the sci_port->irqs array */
  enum {
  	SCIx_ERI_IRQ,
  	SCIx_RXI_IRQ,
  	SCIx_TXI_IRQ,
  	SCIx_BRI_IRQ,
  	SCIx_NR_IRQS,
  };
73a19e4c0   Guennadi Liakhovetski   serial: sh-sci: A...
33
  struct device;
ecd956168   Paul Mundt   serial: Add SERIA...
34
35
36
37
38
39
40
41
42
  /*
   * Platform device specific platform_data struct
   */
  struct plat_sci_port {
  	void __iomem	*membase;		/* io cookie */
  	unsigned long	mapbase;		/* resource base */
  	unsigned int	irqs[SCIx_NR_IRQS];	/* ERI, RXI, TXI, BRI */
  	unsigned int	type;			/* SCI / SCIF / IRDA */
  	upf_t		flags;			/* UPF_* flags */
501b825d0   Magnus Damm   sh-sci: improve c...
43
  	char		*clk;			/* clock string */
00b9de9c2   Paul Mundt   serial: sh-sci: M...
44

26c92f372   Paul Mundt   serial: sh-sci: M...
45
  	unsigned int	scbrr_algo_id;		/* SCBRR calculation algo */
00b9de9c2   Paul Mundt   serial: sh-sci: M...
46
  	unsigned int	scscr;			/* SCSCR initialization */
f43dc23d5   Paul Mundt   Merge branch 'mas...
47

73a19e4c0   Guennadi Liakhovetski   serial: sh-sci: A...
48
  	struct device	*dma_dev;
f43dc23d5   Paul Mundt   Merge branch 'mas...
49

04e82ffb0   Peter Huewe   serial: sh-sci: F...
50
  #ifdef CONFIG_SERIAL_SH_SCI_DMA
4bab9d426   Magnus Damm   dmaengine: shdma:...
51
52
  	unsigned int dma_slave_tx;
  	unsigned int dma_slave_rx;
04e82ffb0   Peter Huewe   serial: sh-sci: F...
53
  #endif
ecd956168   Paul Mundt   serial: Add SERIA...
54
  };
96de1a8f0   Paul Mundt   serial: Move asm-...
55
  #endif /* __LINUX_SERIAL_SCI_H */