MIPS: rb532: Fix MMIO UART resource registration
Subsystems (2)
PATCH 1/1 MIPS: rb532: Fix MMIO UART resource registration
Since commit 6e690d54cfa8 ("serial: 8250: fix return error code in serial8250_request_std_resource()"), registering an 8250 MMIO port without mapbase no longer works, as the resource range is derived from mapbase/mapsize.
Populate mapbase and mapsize accordingly. Also drop ugly membase KSEG1 pointer and set UPF_IOREMAP instead, letting the 8250 core perform the ioremap.
---
Since it's a partial fix to the issue report, I'll not use Closes tag. checkpatch is unhappy :-(
--- arch/mips/rb532/devices.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/mips/rb532/devices.c +3 -2
@@ -213,11 +213,12 @@ static struct platform_device rb532_wdt = {static struct plat_serial8250_port rb532_uart_res[] = { { .type =PORT_16550A , - .membase = (char *)KSEG1ADDR (REGBASE +UART0BASE ), + .mapbase =REGBASE +UART0BASE , + .mapsize =0x1000 , .irq =UART0_IRQ , .regshift =2 , .iotype =UPIO_MEM , - .flags =UPF_BOOT_AUTOCONF , + .flags =UPF_BOOT_AUTOCONF |UPF_IOREMAP , }, { .flags =0 ,
---
base-commit: 0f8a890c4524d6e4013ff225e70de2aed7e6d726
change-id: 20260205-rb532-uart-5f2d2ff28eb8
Best regards,
Signature · 1 line
Jiaxun Yang <[email protected]>
Quoted 42 lines · Jiaxun Yang
Since commit
6e690d54cfa8("serial: 8250: fix return error code inserial8250_request_std_resource()"), registering an 8250 MMIO port without mapbase no longer works, as the resource range is derived from mapbase/mapsize.Populate mapbase and mapsize accordingly. Also drop ugly membase KSEG1 pointer and set
UPF_IOREMAPinstead, letting the 8250 core perform the ioremap.Fixes 6e690d54cfa8 ("serial: 8250: fix return error code in serial8250_request_std_resource()")Reported-by Waldemar Brodkorb <[email protected]>Signed-off-by Jiaxun Yang <[email protected]>---
Since it's a partial fix to the issue report, I'll not use Closes tag. checkpatch is unhappy :-(--- arch/mips/rb532/devices.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)arch/mips/rb532/devices.c +3
-3@@ -213,11 +213,12 @@ static struct platform_device rb532_wdt = {static struct plat_serial8250_port rb532_uart_res[] = { { .type =PORT_16550A , - .membase = (char *)KSEG1ADDR (REGBASE +UART0BASE ), + .mapbase =REGBASE +UART0BASE , + .mapsize =0x1000 , .irq =UART0_IRQ , .regshift =2 , .iotype =UPIO_MEM , - .flags =UPF_BOOT_AUTOCONF , + .flags =UPF_BOOT_AUTOCONF |UPF_IOREMAP , }, { .flags =0 , ---
Quoted 2 lines
base-commit:
0f8a890c4524d6e4013ff225e70de2aed7e6d726
change-id: 20260205-rb532-uart-5f2d2ff28eb8
applied to mips-next
Thomas.
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]