diff options
| author | Olof Johansson <olof@lixom.net> | 2014-01-02 13:35:25 -0500 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2014-01-02 13:35:25 -0500 |
| commit | c655479ab89cfad17a773cb55b57199c19f65e9b (patch) | |
| tree | e2219efc6293053fe89e42ceaf248bcbb9744cab /include/linux | |
| parent | 63df151aa1037e4f4e71ec009a3b233ee2cc1dea (diff) | |
| parent | d85bcfa916ffdf078f188aeab60f738b290f4309 (diff) | |
Merge tag 'renesas-soc3-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc
From Simon Horman:
Third Round of Renesas ARM Based SoC Updates for v3.14
* Global
- Don't set plat_sci_port scbrr_algo_id field
- Declare SCIF register base and IRQ as resources
- Don't define SCIF platform data in an array
- Use macros to declare SCIF devices
* r7s72100 SoC (RZ/A1H)
- Add i2c clocks
* r8a7778 (R-Car M1)
- Add sound SCU clock support
* tag 'renesas-soc3-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (43 commits)
arm: shmobile: r7s72100: add i2c clocks
ARM: shmobile: r8a7791: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7779: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7790: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7740: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a73a4: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7778: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r7s72100: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: sh73a0: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7790: Declare SCIF register base and IRQ as resources
ARM: shmobile: r8a7791: Declare SCIF register base and IRQ as resources
ARM: shmobile: r8a7778: Declare SCIF register base and IRQ as resources
ARM: shmobile: sh7372: Don't set plat_sci_port scbrr_algo_id field
ARM: shmobile: r8a7779: Declare SCIF register base and IRQ as resources
ARM: shmobile: r8a7740: Declare SCIF register base and IRQ as resources
ARM: shmobile: r8a73a4: Declare SCIF register base and IRQ as resources
ARM: shmobile: r7s72100: Declare SCIF register base and IRQ as resources
ARM: shmobile: sh73a0: Declare SCIF register base and IRQ as resources
ARM: shmobile: sh7372: Declare SCIF register base and IRQ as resources
ARM: shmobile: r8a7790: Don't define SCIF platform data in an array
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/serial_sci.h | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 50fe651da965..af414e1895a5 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
| @@ -11,11 +11,11 @@ | |||
| 11 | #define SCIx_NOT_SUPPORTED (-1) | 11 | #define SCIx_NOT_SUPPORTED (-1) |
| 12 | 12 | ||
| 13 | enum { | 13 | enum { |
| 14 | SCBRR_ALGO_1, /* ((clk + 16 * bps) / (16 * bps) - 1) */ | 14 | SCBRR_ALGO_NONE, /* Compute sampling rate in the driver */ |
| 15 | SCBRR_ALGO_2, /* ((clk + 16 * bps) / (32 * bps) - 1) */ | 15 | SCBRR_ALGO_1, /* clk / (16 * bps) */ |
| 16 | SCBRR_ALGO_3, /* (((clk * 2) + 16 * bps) / (16 * bps) - 1) */ | 16 | SCBRR_ALGO_2, /* DIV_ROUND_CLOSEST(clk, 32 * bps) - 1 */ |
| 17 | SCBRR_ALGO_4, /* (((clk * 2) + 16 * bps) / (32 * bps) - 1) */ | 17 | SCBRR_ALGO_3, /* clk / (8 * bps) */ |
| 18 | SCBRR_ALGO_5, /* (((clk * 1000 / 32) / bps) - 1) */ | 18 | SCBRR_ALGO_4, /* DIV_ROUND_CLOSEST(clk, 16 * bps) - 1 */ |
| 19 | SCBRR_ALGO_6, /* HSCIF variable sample rate algorithm */ | 19 | SCBRR_ALGO_6, /* HSCIF variable sample rate algorithm */ |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| @@ -70,17 +70,6 @@ enum { | |||
| 70 | SCIx_MUX_IRQ = SCIx_NR_IRQS, /* special case */ | 70 | SCIx_MUX_IRQ = SCIx_NR_IRQS, /* special case */ |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| 73 | /* Offsets into the sci_port->gpios array */ | ||
| 74 | enum { | ||
| 75 | SCIx_SCK, | ||
| 76 | SCIx_RXD, | ||
| 77 | SCIx_TXD, | ||
| 78 | SCIx_CTS, | ||
| 79 | SCIx_RTS, | ||
| 80 | |||
| 81 | SCIx_NR_FNS, | ||
| 82 | }; | ||
| 83 | |||
| 84 | enum { | 73 | enum { |
| 85 | SCIx_PROBE_REGTYPE, | 74 | SCIx_PROBE_REGTYPE, |
| 86 | 75 | ||
| @@ -108,10 +97,10 @@ enum { | |||
| 108 | } | 97 | } |
| 109 | 98 | ||
| 110 | #define SCIx_IRQ_IS_MUXED(port) \ | 99 | #define SCIx_IRQ_IS_MUXED(port) \ |
| 111 | ((port)->cfg->irqs[SCIx_ERI_IRQ] == \ | 100 | ((port)->irqs[SCIx_ERI_IRQ] == \ |
| 112 | (port)->cfg->irqs[SCIx_RXI_IRQ]) || \ | 101 | (port)->irqs[SCIx_RXI_IRQ]) || \ |
| 113 | ((port)->cfg->irqs[SCIx_ERI_IRQ] && \ | 102 | ((port)->irqs[SCIx_ERI_IRQ] && \ |
| 114 | !(port)->cfg->irqs[SCIx_RXI_IRQ]) | 103 | ((port)->irqs[SCIx_RXI_IRQ] < 0)) |
| 115 | /* | 104 | /* |
| 116 | * SCI register subset common for all port types. | 105 | * SCI register subset common for all port types. |
| 117 | * Not all registers will exist on all parts. | 106 | * Not all registers will exist on all parts. |
| @@ -142,20 +131,17 @@ struct plat_sci_port_ops { | |||
| 142 | struct plat_sci_port { | 131 | struct plat_sci_port { |
| 143 | unsigned long mapbase; /* resource base */ | 132 | unsigned long mapbase; /* resource base */ |
| 144 | unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ | 133 | unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ |
| 145 | unsigned int gpios[SCIx_NR_FNS]; /* SCK, RXD, TXD, CTS, RTS */ | ||
| 146 | unsigned int type; /* SCI / SCIF / IRDA / HSCIF */ | 134 | unsigned int type; /* SCI / SCIF / IRDA / HSCIF */ |
| 147 | upf_t flags; /* UPF_* flags */ | 135 | upf_t flags; /* UPF_* flags */ |
| 148 | unsigned long capabilities; /* Port features/capabilities */ | 136 | unsigned long capabilities; /* Port features/capabilities */ |
| 149 | 137 | ||
| 138 | unsigned int sampling_rate; | ||
| 150 | unsigned int scbrr_algo_id; /* SCBRR calculation algo */ | 139 | unsigned int scbrr_algo_id; /* SCBRR calculation algo */ |
| 151 | unsigned int scscr; /* SCSCR initialization */ | 140 | unsigned int scscr; /* SCSCR initialization */ |
| 152 | 141 | ||
| 153 | /* | 142 | /* |
| 154 | * Platform overrides if necessary, defaults otherwise. | 143 | * Platform overrides if necessary, defaults otherwise. |
| 155 | */ | 144 | */ |
| 156 | int overrun_bit; | ||
| 157 | unsigned int error_mask; | ||
| 158 | |||
| 159 | int port_reg; | 145 | int port_reg; |
| 160 | unsigned char regshift; | 146 | unsigned char regshift; |
| 161 | unsigned char regtype; | 147 | unsigned char regtype; |
