Skip to content

Commit 4ebaf07

Browse files
committed
Merge tag 'tty-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
I wrote: "Serial driver fixes for 4.19-rc7 Here are 3 small serial driver fixes for 4.19-rc7 - 2 sh-sci bugfixes for reported issues - a revert of the PM handling for the 8250_dw code All of these have been in linux-next with no reported issues." * tag 'tty-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "serial: sh-sci: Allow for compressed SCIF address" Revert "serial: sh-sci: Remove SCIx_RZ_SCIFA_REGTYPE" Revert "serial: 8250_dw: Fix runtime PM handling"
2 parents cc02f85 + 5b162cc commit 4ebaf07

File tree

3 files changed

+42
-19
lines changed

3 files changed

+42
-19
lines changed

drivers/tty/serial/8250/8250_dw.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,6 @@ static int dw8250_probe(struct platform_device *pdev)
630630
if (!data->skip_autocfg)
631631
dw8250_setup_port(p);
632632

633-
#ifdef CONFIG_PM
634-
uart.capabilities |= UART_CAP_RPM;
635-
#endif
636-
637633
/* If we have a valid fifosize, try hooking up DMA */
638634
if (p->fifosize) {
639635
data->dma.rxconf.src_maxburst = p->fifosize / 4;

drivers/tty/serial/sh-sci.c

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,33 @@ static const struct sci_port_params sci_port_params[SCIx_NR_REGTYPES] = {
291291
.error_clear = SCIF_ERROR_CLEAR,
292292
},
293293

294+
/*
295+
* The "SCIFA" that is in RZ/T and RZ/A2.
296+
* It looks like a normal SCIF with FIFO data, but with a
297+
* compressed address space. Also, the break out of interrupts
298+
* are different: ERI/BRI, RXI, TXI, TEI, DRI.
299+
*/
300+
[SCIx_RZ_SCIFA_REGTYPE] = {
301+
.regs = {
302+
[SCSMR] = { 0x00, 16 },
303+
[SCBRR] = { 0x02, 8 },
304+
[SCSCR] = { 0x04, 16 },
305+
[SCxTDR] = { 0x06, 8 },
306+
[SCxSR] = { 0x08, 16 },
307+
[SCxRDR] = { 0x0A, 8 },
308+
[SCFCR] = { 0x0C, 16 },
309+
[SCFDR] = { 0x0E, 16 },
310+
[SCSPTR] = { 0x10, 16 },
311+
[SCLSR] = { 0x12, 16 },
312+
},
313+
.fifosize = 16,
314+
.overrun_reg = SCLSR,
315+
.overrun_mask = SCLSR_ORER,
316+
.sampling_rate_mask = SCI_SR(32),
317+
.error_mask = SCIF_DEFAULT_ERROR_MASK,
318+
.error_clear = SCIF_ERROR_CLEAR,
319+
},
320+
294321
/*
295322
* Common SH-3 SCIF definitions.
296323
*/
@@ -319,15 +346,15 @@ static const struct sci_port_params sci_port_params[SCIx_NR_REGTYPES] = {
319346
[SCIx_SH4_SCIF_REGTYPE] = {
320347
.regs = {
321348
[SCSMR] = { 0x00, 16 },
322-
[SCBRR] = { 0x02, 8 },
323-
[SCSCR] = { 0x04, 16 },
324-
[SCxTDR] = { 0x06, 8 },
325-
[SCxSR] = { 0x08, 16 },
326-
[SCxRDR] = { 0x0a, 8 },
327-
[SCFCR] = { 0x0c, 16 },
328-
[SCFDR] = { 0x0e, 16 },
329-
[SCSPTR] = { 0x10, 16 },
330-
[SCLSR] = { 0x12, 16 },
349+
[SCBRR] = { 0x04, 8 },
350+
[SCSCR] = { 0x08, 16 },
351+
[SCxTDR] = { 0x0c, 8 },
352+
[SCxSR] = { 0x10, 16 },
353+
[SCxRDR] = { 0x14, 8 },
354+
[SCFCR] = { 0x18, 16 },
355+
[SCFDR] = { 0x1c, 16 },
356+
[SCSPTR] = { 0x20, 16 },
357+
[SCLSR] = { 0x24, 16 },
331358
},
332359
.fifosize = 16,
333360
.overrun_reg = SCLSR,
@@ -2810,7 +2837,7 @@ static int sci_init_single(struct platform_device *dev,
28102837
{
28112838
struct uart_port *port = &sci_port->port;
28122839
const struct resource *res;
2813-
unsigned int i, regtype;
2840+
unsigned int i;
28142841
int ret;
28152842

28162843
sci_port->cfg = p;
@@ -2847,7 +2874,6 @@ static int sci_init_single(struct platform_device *dev,
28472874
if (unlikely(sci_port->params == NULL))
28482875
return -EINVAL;
28492876

2850-
regtype = sci_port->params - sci_port_params;
28512877
switch (p->type) {
28522878
case PORT_SCIFB:
28532879
sci_port->rx_trigger = 48;
@@ -2902,10 +2928,6 @@ static int sci_init_single(struct platform_device *dev,
29022928
port->regshift = 1;
29032929
}
29042930

2905-
if (regtype == SCIx_SH4_SCIF_REGTYPE)
2906-
if (sci_port->reg_size >= 0x20)
2907-
port->regshift = 1;
2908-
29092931
/*
29102932
* The UART port needs an IRQ value, so we peg this to the RX IRQ
29112933
* for the multi-IRQ ports, which is where we are primarily
@@ -3110,6 +3132,10 @@ static const struct of_device_id of_sci_match[] = {
31103132
.compatible = "renesas,scif-r7s72100",
31113133
.data = SCI_OF_DATA(PORT_SCIF, SCIx_SH2_SCIF_FIFODATA_REGTYPE),
31123134
},
3135+
{
3136+
.compatible = "renesas,scif-r7s9210",
3137+
.data = SCI_OF_DATA(PORT_SCIF, SCIx_RZ_SCIFA_REGTYPE),
3138+
},
31133139
/* Family-specific types */
31143140
{
31153141
.compatible = "renesas,rcar-gen1-scif",

include/linux/serial_sci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ enum {
3636
SCIx_SH4_SCIF_FIFODATA_REGTYPE,
3737
SCIx_SH7705_SCIF_REGTYPE,
3838
SCIx_HSCIF_REGTYPE,
39+
SCIx_RZ_SCIFA_REGTYPE,
3940

4041
SCIx_NR_REGTYPES,
4142
};

0 commit comments

Comments
 (0)