Skip to contentSkip to conversation

tty/serial: earlycon: Fix print for implied MMIO case

PATCH In review Kumar Gala 2 participants 2 messages Oct 17, 2014 – Oct 22, 2014

Subsystems (2)
lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 tty/serial: earlycon: Fix print for implied MMIO case

For the case in which we just provide an address as an argument to the earlycon console type like:

earlycon=msm_serial_dm,0xf991e000

We would report this as an IO port based mapping and not as MMIO. Simple fix to use the port->iotype to decide which message to print.

---
 drivers/tty/serial/earlycon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/earlycon.c +1 -1
index a514ee6..64fe25a 100644
@@ -98,7 +98,7 @@ static int __init parse_options(struct earlycon_device *device,
 		strlcpy(device->options, options, length);
 	}
 
-	if (mmio || mmio32)
+	if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
 		pr_info("Early serial console at MMIO%s 0x%llx (options '%s')\n",
 			mmio32 ? "32" : "",
 			(unsigned long long)port->mapbase,
Signature · 3 lines
Qualcomm Innovation Center, Inc.
 The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
 a Linux Foundation Collaborative Project
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Kumar Gala

For the case in which we just provide an address as an argument to the earlycon console type like:

earlycon=msm_serial_dm,0xf991e000

Personally it would be nice to see this when using pl011 as an earlyon. Currently I get:

Early serial console at I/O port 0x0 (options '')

With this patch I get:

Early serial console at MMIO 0x7ff80000 (options '')

Quoted 4 lines

We would report this as an IO port based mapping and not as MMIO. Simple fix to use the port->iotype to decide which message to print.

Thanks,
Mark.

Quoted 28 lines
---
 drivers/tty/serial/earlycon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/earlycon.c +1 -1
index a514ee6..64fe25a 100644
@@ -98,7 +98,7 @@ static int __init parse_options(struct earlycon_device *device,
 		strlcpy(device->options, options, length);
 	}
 
-	if (mmio || mmio32)
+	if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
 		pr_info("Early serial console at MMIO%s 0x%llx (options '%s')\n",
 			mmio32 ? "32" : "",
 			(unsigned long long)port->mapbase,
Signature · 9 lines
Qualcomm Innovation Center, Inc.
 The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
 a Linux Foundation Collaborative Project


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel