mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
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: Kevin Cernekee <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Rob Herring <[email protected]>
This commit is contained in:
1 parent
c627f2ceb6
commit
ebc5e20082
1 file changed
+2
-1
@@ -115,7 +115,8 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
|
||||
port->iotype = UPIO_MEM;
|
||||
break;
|
||||
case 4:
|
||||
port->iotype = UPIO_MEM32;
|
||||
port->iotype = of_device_is_big_endian(np) ?
|
||||
UPIO_MEM32BE : UPIO_MEM32;
|
||||
break;
|
||||
default:
|
||||
dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n",
|
||||
|
||||
Reference in new issue
Block a user