xtensa: xtfpga: fix serial port register width and endianness

Serial port is attached to XTFPGA boards as native endian device, mark
it as such in DTS and pass correct endianness in platform data.
Set register width in DTS to 4, this way it matches the platform data
and works correctly on big-endian CPUs.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
Max Filippov 2015-08-24 19:44:46 +03:00 коммит произвёл Chris Zankel
Родитель 4611bf7eb5
Коммит abfbd89595
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -60,6 +60,8 @@
no-loopback-test; no-loopback-test;
reg = <0x0d050020 0x20>; reg = <0x0d050020 0x20>;
reg-shift = <2>; reg-shift = <2>;
reg-io-width = <4>;
native-endian;
interrupts = <0 1>; /* external irq 0 */ interrupts = <0 1>; /* external irq 0 */
clocks = <&osc>; clocks = <&osc>;
}; };

Просмотреть файл

@ -283,7 +283,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
.irq = DUART16552_INTNUM, .irq = DUART16552_INTNUM,
.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
UPF_IOREMAP, UPF_IOREMAP,
.iotype = UPIO_MEM32, .iotype = XCHAL_HAVE_BE ? UPIO_MEM32BE : UPIO_MEM32,
.regshift = 2, .regshift = 2,
.uartclk = 0, /* set in xtavnet_init() */ .uartclk = 0, /* set in xtavnet_init() */
}, },