diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2014-04-24 02:54:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-24 19:13:01 -0400 |
commit | fcbee4d49f30eb0eaa83a62e6a3cab5a892ed93f (patch) | |
tree | 3198d615b2f5b1620116d97c73cd4c171c8e4f24 | |
parent | c439c33d85e252d3b2b454ab7ba38b62d6e0a830 (diff) |
serial: sh-sci: Add device tree support for r8a7779
According to the platform data for the legacy-C initialisation of sh-sci
for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
scscr needs to be set.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 | ||||
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index 53e6c175db6c..bba86de1a094 100644 --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | |||
@@ -12,6 +12,7 @@ Required properties: | |||
12 | - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART. | 12 | - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART. |
13 | - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. | 13 | - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART. |
14 | - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. | 14 | - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART. |
15 | - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. | ||
15 | - "renesas,scif" for generic SCIF compatible UART. | 16 | - "renesas,scif" for generic SCIF compatible UART. |
16 | - "renesas,scifa" for generic SCIFA compatible UART. | 17 | - "renesas,scifa" for generic SCIFA compatible UART. |
17 | - "renesas,scifb" for generic SCIFB compatible UART. | 18 | - "renesas,scifb" for generic SCIFB compatible UART. |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 88236da0ddf7..3b5d2f679946 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev) | |||
2419 | struct sci_port_info { | 2419 | struct sci_port_info { |
2420 | unsigned int type; | 2420 | unsigned int type; |
2421 | unsigned int regtype; | 2421 | unsigned int regtype; |
2422 | unsigned int scscr_extra; | ||
2422 | }; | 2423 | }; |
2423 | 2424 | ||
2424 | static const struct of_device_id of_sci_match[] = { | 2425 | static const struct of_device_id of_sci_match[] = { |
@@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = { | |||
2429 | .regtype = SCIx_SH4_SCIF_REGTYPE, | 2430 | .regtype = SCIx_SH4_SCIF_REGTYPE, |
2430 | }, | 2431 | }, |
2431 | }, { | 2432 | }, { |
2433 | .compatible = "renesas,scif-r8a7779", | ||
2434 | .data = (void *)&(const struct sci_port_info) { | ||
2435 | .type = PORT_SCIF, | ||
2436 | .regtype = SCIx_SH4_SCIF_REGTYPE, | ||
2437 | .scscr_extra = SCSCR_CKE1, | ||
2438 | }, | ||
2439 | }, { | ||
2432 | .compatible = "renesas,scifa", | 2440 | .compatible = "renesas,scifa", |
2433 | .data = &(const struct sci_port_info) { | 2441 | .data = &(const struct sci_port_info) { |
2434 | .type = PORT_SCIFA, | 2442 | .type = PORT_SCIFA, |
@@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id) | |||
2488 | p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; | 2496 | p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; |
2489 | p->type = info->type; | 2497 | p->type = info->type; |
2490 | p->regtype = info->regtype; | 2498 | p->regtype = info->regtype; |
2491 | p->scscr = SCSCR_RE | SCSCR_TE; | 2499 | p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra; |
2492 | 2500 | ||
2493 | return p; | 2501 | return p; |
2494 | } | 2502 | } |