Merge tag 'devicetree-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
[firefly-linux-kernel-4.4.55.git] / drivers / tty / serial / of_serial.c
index aa00154c4a6db5af75080e671e7615c70521dc44..5b73afb9f9f34343371477be0c48d535f600dc86 100644 (file)
@@ -116,7 +116,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",