Skip to content

Commit 5b162cc

Browse files
geertugregkh
authored andcommitted
Revert "serial: sh-sci: Allow for compressed SCIF address"
This reverts commit 2d4dd0d. This broke earlycon on all Renesas ARM platforms using a SCIF port for the serial console (R-Car, RZ/A1, RZ/G1, RZ/G2 SoCs), due to an incorrect value of port->regshift. 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 1065302 commit 5b162cc

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,15 @@ static const struct sci_port_params sci_port_params[SCIx_NR_REGTYPES] = {
346346
[SCIx_SH4_SCIF_REGTYPE] = {
347347
.regs = {
348348
[SCSMR] = { 0x00, 16 },
349-
[SCBRR] = { 0x02, 8 },
350-
[SCSCR] = { 0x04, 16 },
351-
[SCxTDR] = { 0x06, 8 },
352-
[SCxSR] = { 0x08, 16 },
353-
[SCxRDR] = { 0x0a, 8 },
354-
[SCFCR] = { 0x0c, 16 },
355-
[SCFDR] = { 0x0e, 16 },
356-
[SCSPTR] = { 0x10, 16 },
357-
[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 },
358358
},
359359
.fifosize = 16,
360360
.overrun_reg = SCLSR,
@@ -2837,7 +2837,7 @@ static int sci_init_single(struct platform_device *dev,
28372837
{
28382838
struct uart_port *port = &sci_port->port;
28392839
const struct resource *res;
2840-
unsigned int i, regtype;
2840+
unsigned int i;
28412841
int ret;
28422842

28432843
sci_port->cfg = p;
@@ -2874,7 +2874,6 @@ static int sci_init_single(struct platform_device *dev,
28742874
if (unlikely(sci_port->params == NULL))
28752875
return -EINVAL;
28762876

2877-
regtype = sci_port->params - sci_port_params;
28782877
switch (p->type) {
28792878
case PORT_SCIFB:
28802879
sci_port->rx_trigger = 48;
@@ -2929,10 +2928,6 @@ static int sci_init_single(struct platform_device *dev,
29292928
port->regshift = 1;
29302929
}
29312930

2932-
if (regtype == SCIx_SH4_SCIF_REGTYPE)
2933-
if (sci_port->reg_size >= 0x20)
2934-
port->regshift = 1;
2935-
29362931
/*
29372932
* The UART port needs an IRQ value, so we peg this to the RX IRQ
29382933
* for the multi-IRQ ports, which is where we are primarily

0 commit comments

Comments
 (0)