diff options
| -rw-r--r-- | Documentation/devicetree/bindings/serial/efm32-uart.txt | 4 | ||||
| -rw-r--r-- | drivers/tty/serial/efm32-uart.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/serial/efm32-uart.txt b/Documentation/devicetree/bindings/serial/efm32-uart.txt index 8e080b893b49..1984bdfbd545 100644 --- a/Documentation/devicetree/bindings/serial/efm32-uart.txt +++ b/Documentation/devicetree/bindings/serial/efm32-uart.txt | |||
| @@ -6,7 +6,7 @@ Required properties: | |||
| 6 | - interrupts : Should contain uart interrupt | 6 | - interrupts : Should contain uart interrupt |
| 7 | 7 | ||
| 8 | Optional properties: | 8 | Optional properties: |
| 9 | - location : Decides the location of the USART I/O pins. | 9 | - efm32,location : Decides the location of the USART I/O pins. |
| 10 | Allowed range : [0 .. 5] | 10 | Allowed range : [0 .. 5] |
| 11 | Default: 0 | 11 | Default: 0 |
| 12 | 12 | ||
| @@ -16,5 +16,5 @@ uart@0x4000c400 { | |||
| 16 | compatible = "efm32,uart"; | 16 | compatible = "efm32,uart"; |
| 17 | reg = <0x4000c400 0x400>; | 17 | reg = <0x4000c400 0x400>; |
| 18 | interrupts = <15>; | 18 | interrupts = <15>; |
| 19 | location = <0>; | 19 | efm32,location = <0>; |
| 20 | }; | 20 | }; |
diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c index 0eb5b5673ede..028582e924a5 100644 --- a/drivers/tty/serial/efm32-uart.c +++ b/drivers/tty/serial/efm32-uart.c | |||
| @@ -671,7 +671,10 @@ static int efm32_uart_probe_dt(struct platform_device *pdev, | |||
| 671 | if (!np) | 671 | if (!np) |
| 672 | return 1; | 672 | return 1; |
| 673 | 673 | ||
| 674 | ret = of_property_read_u32(np, "location", &location); | 674 | ret = of_property_read_u32(np, "efm32,location", &location); |
| 675 | if (ret) | ||
| 676 | /* fall back to old and (wrongly) generic property "location" */ | ||
| 677 | ret = of_property_read_u32(np, "location", &location); | ||
| 675 | if (!ret) { | 678 | if (!ret) { |
| 676 | if (location > 5) { | 679 | if (location > 5) { |
| 677 | dev_err(&pdev->dev, "invalid location\n"); | 680 | dev_err(&pdev->dev, "invalid location\n"); |
