Skip to contentSkip to conversation

serial: stm: set linux_console_name

PATCH In review Michael Grzeschik 3 participants 3 messages May 29, 2020 – Jun 3, 2020 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: stm: set linux_console_name

We set the linux_console_name so for this uart the linux.bootargs.console will be properly set.

---
 drivers/serial/stm-serial.c | 1 +
 1 file changed, 1 insertion(+)
drivers/serial/stm-serial.c +1 -0
index ea482415ce..a2c3dcf56e 100644
@@ -159,6 +159,7 @@ static int stm_serial_probe(struct device_d *dev)
 	cdev->flush = stm_serial_flush;
 	cdev->setbrg = stm_serial_setbaudrate;
 	cdev->dev = dev;
+	cdev->linux_console_name = "ttyAMA";
 
 	dev->priv = priv;
 	iores = dev_request_mem_resource(dev, 0);
Signature · 7 lines
2.26.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Hello Michael,

Quoted 13 lines · Michael Grzeschik

We set the linux_console_name so for this uart the linux.bootargs.console will be properly set.

---
 drivers/serial/stm-serial.c | 1 +
 1 file changed, 1 insertion(+)
drivers/serial/stm-serial.c +0 -0
index ea482415ce..a2c3dcf56e 100644

drivers/serial/stm-serial.c static int stm_serial_probe(struct device_d *dev) · line 162

Quoted 4 lines
drivers/serial/stm-serial.c +1 -0
@@ -159,6 +159,7 @@ static int stm_serial_probe(struct device_d *dev)
 	cdev->flush = stm_serial_flush;
 	cdev->setbrg = stm_serial_setbaudrate;
 	cdev->dev = dev;
+	cdev->linux_console_name = "ttyAMA";

Couldn't we just combine the two drivers? On a cursory look, only difference is how they're probed?

Quoted 4 lines
drivers/serial/stm-serial.c +0 -0
 	dev->priv = priv;
 	iores = dev_request_mem_resource(dev, 0);
 
Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
Quoted 11 lines · Ahmad Fatoum

Hello Michael,

Quoted 8 lines · Michael Grzeschik

We set the linux_console_name so for this uart the linux.bootargs.console will be properly set.

---
 drivers/serial/stm-serial.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

drivers/serial/stm-serial.c static int stm_serial_probe(struct device_d *dev) · line 162

Quoted 9 lines
drivers/serial/stm-serial.c +1 -0
index ea482415ce..a2c3dcf56e 100644
@@ -159,6 +159,7 @@ static int stm_serial_probe(struct device_d *dev)
 	cdev->flush = stm_serial_flush;
 	cdev->setbrg = stm_serial_setbaudrate;
 	cdev->dev = dev;
+	cdev->linux_console_name = "ttyAMA";

Couldn't we just combine the two drivers? On a cursory look, only difference is how they're probed?

Yes, that sounds good. Until this is done I applied this patch.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox