Commit a752ba18 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Greg Kroah-Hartman

serial: sh-sci: Fix register offsets for the IRDA serial port

Even though most of its registers are 8-bit wide, the IRDA has two
16-bit registers that make it a 16-bit peripheral and not a 8-bit
peripheral with addresses shifted by one. Fix the registers offset in
the driver and the platform data regshift value.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f48debc4
...@@ -157,7 +157,6 @@ static struct platform_device scif1_device = { ...@@ -157,7 +157,6 @@ static struct platform_device scif1_device = {
static struct plat_sci_port scif2_platform_data = { static struct plat_sci_port scif2_platform_data = {
.type = PORT_IRDA, .type = PORT_IRDA,
.ops = &sh770x_sci_port_ops, .ops = &sh770x_sci_port_ops,
.regshift = 1,
}; };
static struct resource scif2_resources[] = { static struct resource scif2_resources[] = {
......
...@@ -193,18 +193,17 @@ static const struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = { ...@@ -193,18 +193,17 @@ static const struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = {
}, },
/* /*
* Common definitions for legacy IrDA ports, dependent on * Common definitions for legacy IrDA ports.
* regshift value.
*/ */
[SCIx_IRDA_REGTYPE] = { [SCIx_IRDA_REGTYPE] = {
[SCSMR] = { 0x00, 8 }, [SCSMR] = { 0x00, 8 },
[SCBRR] = { 0x01, 8 }, [SCBRR] = { 0x02, 8 },
[SCSCR] = { 0x02, 8 }, [SCSCR] = { 0x04, 8 },
[SCxTDR] = { 0x03, 8 }, [SCxTDR] = { 0x06, 8 },
[SCxSR] = { 0x04, 8 }, [SCxSR] = { 0x08, 16 },
[SCxRDR] = { 0x05, 8 }, [SCxRDR] = { 0x0a, 8 },
[SCFCR] = { 0x06, 8 }, [SCFCR] = { 0x0c, 8 },
[SCFDR] = { 0x07, 16 }, [SCFDR] = { 0x0e, 16 },
[SCTFDR] = sci_reg_invalid, [SCTFDR] = sci_reg_invalid,
[SCRFDR] = sci_reg_invalid, [SCRFDR] = sci_reg_invalid,
[SCSPTR] = sci_reg_invalid, [SCSPTR] = sci_reg_invalid,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment