Commit ebc5e200 authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Rob Herring

serial: of_serial: Support big-endian register accesses

If the device node has a "big-endian" property and 32-bit registers, tell
the serial driver to use UPIO_MEM32BE instead of UPIO_MEM32.
Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent c627f2ce
...@@ -115,7 +115,8 @@ static int of_platform_serial_setup(struct platform_device *ofdev, ...@@ -115,7 +115,8 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
port->iotype = UPIO_MEM; port->iotype = UPIO_MEM;
break; break;
case 4: case 4:
port->iotype = UPIO_MEM32; port->iotype = of_device_is_big_endian(np) ?
UPIO_MEM32BE : UPIO_MEM32;
break; break;
default: default:
dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n", dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n",
......
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