Skip to content

Commit 1065302

Browse files
geertugregkh
authored andcommitted
Revert "serial: sh-sci: Remove SCIx_RZ_SCIFA_REGTYPE"
This reverts commit 7acece7. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Chris Brandt <chris.brandt@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent beeeac4 commit 1065302

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 31 additions & 0 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
*/
@@ -3110,6 +3137,10 @@ static const struct of_device_id of_sci_match[] = {
31103137
.compatible = "renesas,scif-r7s72100",
31113138
.data = SCI_OF_DATA(PORT_SCIF, SCIx_SH2_SCIF_FIFODATA_REGTYPE),
31123139
},
3140+
{
3141+
.compatible = "renesas,scif-r7s9210",
3142+
.data = SCI_OF_DATA(PORT_SCIF, SCIx_RZ_SCIFA_REGTYPE),
3143+
},
31133144
/* Family-specific types */
31143145
{
31153146
.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)