Skip to contentSkip to conversation

fix reregistering of serial console

PATCH Superseded Waldemar Brodkorb 2 participants 2 messages Jul 2, 2014 MIPS

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix reregistering of serial console

Runtime tested on Mikrotik RB532 board.
Thanks goes to Geert Uytterhoeven for the explanation of the problem.

"I'm afraid this is not gonna help. When the port is unregistered, its type will be reset to PORT_UNKNOWN.
So before registering it again, its type must be set again the actual serial driver, cfr. the change to of_serial.c."

---
 arch/mips/rb532/devices.c |    1 +
 1 file changed, 1 insertion(+)
arch/mips/rb532/devices.c +1 -0
index 3af00b2..ba61268 100644
@@ -223,6 +223,7 @@ static struct platform_device rb532_wdt = {
 
 static struct plat_serial8250_port rb532_uart_res[] = {
 	{
+		.type           = PORT_16550A,
 		.membase	= (char *)KSEG1ADDR(REGBASE + UART0BASE),
 		.irq		= UART0_IRQ,
 		.regshift	= 2,
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw

2014-07-02 9:09 GMT-07:00 Waldemar Brodkorb <[email protected]>:

Quoted 2 lines

Runtime tested on Mikrotik RB532 board.
Thanks goes to Geert Uytterhoeven for the explanation of the problem.

The subject should be something like "MIPS: rb532: fix reregistering of serial console" to be consistent with the other changes.

Quoted 7 lines

"I'm afraid this is not gonna help. When the port is unregistered, its type will be reset to PORT_UNKNOWN.
So before registering it again, its type must be set again the actual serial driver, cfr. the change to of_serial.c."

Thanks!

Quoted 20 lines
---
 arch/mips/rb532/devices.c |    1 +
 1 file changed, 1 insertion(+)
arch/mips/rb532/devices.c +1 -1
index 3af00b2..ba61268 100644
@@ -223,6 +223,7 @@ static struct platform_device rb532_wdt = {
 
 static struct plat_serial8250_port rb532_uart_res[] = {
        {
+               .type           = PORT_16550A,
                .membase        = (char *)KSEG1ADDR(REGBASE + UART0BASE),
                .irq            = UART0_IRQ,
                .regshift       = 2,
--

1.7.10.4

Signature · 1 line
Florian