Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
PATCH 1/1 Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
kernel/drivers/serial: Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
--- kernel/drivers/serial/16550A.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/drivers/serial/16550A.c +3 -0
@@ -31,6 +31,7 @@ MODULE_VERSION("1.5.2");MODULE_LICENSE ("GPL" );#define RT_16550_DRIVER_NAME "xeno_16550A" +static char mod_name[64 ]=RT_16550_DRIVER_NAME ;#define MAX_DEVICES 8
@@ -1128,6 +1129,8 @@ int __init rt_16550_init(void) name = (char *)(dev +1 );ksformat (name,RTDM_MAX_DEVNAME_LEN , dev->label, i); +rtdm_printk ("%s: %s io=0x%x irq=%d baud_base=%d\n" , mod_name, name, (unsigned )rt_16550_base_addr (i),irq[i],baud_base[i]); + err =rt_16550_init_io (i, name);if (err) goto kfree_out;
Signature · 1 line
2.27.0
Quoted 11 lines · Konstantin Smola via Xenomai
kernel/drivers/serial: Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.Signed-off-by Konstantin Smola <[email protected]>--- kernel/drivers/serial/16550A.c | 3 +++ 1 file changed, 3 insertions(+)kernel/drivers/serial/16550A.c +0
-0
kernel/drivers/serial/16550A.c MODULE_VERSION("1.5.2"); · line 34
Quoted 4 lines
kernel/drivers/serial/16550A.c +1
-0@@ -31,6 +31,7 @@ MODULE_VERSION("1.5.2");MODULE_LICENSE ("GPL" );#define RT_16550_DRIVER_NAME "xeno_16550A" +static char mod_name[64 ]=RT_16550_DRIVER_NAME ;
How about using RT_16550_DRIVER_NAME directly?
kernel/drivers/serial/16550A.c int __init rt_16550_init(void) · line 1133
Quoted 9 lines
kernel/drivers/serial/16550A.c +2
-0#define MAX_DEVICES 8@@ -1128,6 +1129,8 @@ int __init rt_16550_init(void) name = (char *)(dev +1 );ksformat (name,RTDM_MAX_DEVNAME_LEN , dev->label, i); +rtdm_printk ("%s: %s io=0x%x irq=%d baud_base=%d\n" , mod_name, name, (unsigned )rt_16550_base_addr (i),irq[i],baud_base[i]); +
I guess Jan will comment on that as well, not sure if we really need such verbose outputs. Technically I wonder if that is the right location. The initialization might still fail below. So maybe move it to the place where the device is up and running?
Quoted 3 lines
kernel/drivers/serial/16550A.c +0
-0err =rt_16550_init_io (i, name);if (err) goto kfree_out;
Quoted 26 lines · Florian via Xenomai
Quoted 11 lines · Konstantin Smola via Xenomai
kernel/drivers/serial: Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.Signed-off-by Konstantin Smola <[email protected]>--- kernel/drivers/serial/16550A.c | 3 +++ 1 file changed, 3 insertions(+)kernel/drivers/serial/16550A.c +0
-0kernel/drivers/serial/16550A.c MODULE_VERSION("1.5.2"); · line 34
Quoted 4 lines
kernel/drivers/serial/16550A.c +1
-0@@ -31,6 +31,7 @@ MODULE_VERSION("1.5.2");MODULE_LICENSE ("GPL" );#define RT_16550_DRIVER_NAME "xeno_16550A" +static char mod_name[64 ]=RT_16550_DRIVER_NAME ;How about using
RT_16550_DRIVER_NAMEdirectly?Quoted 7 lines
kernel/drivers/serial/16550A.c +0
-0#define MAX_DEVICES 8@@ -1128,6 +1129,8 @@ int __init rt_16550_init(void) name = (char *)(dev +1 );ksformat (name,RTDM_MAX_DEVNAME_LEN , dev->label, i);
Quoted 5 lines
kernel/drivers/serial/16550A.c int __init rt_16550_init(void) · line 1133
Quoted 2 lines
kernel/drivers/serial/16550A.c +2
-0+rtdm_printk ("%s: %s io=0x%x irq=%d baud_base=%d\n" , mod_name, name, (unsigned )rt_16550_base_addr (i),irq[i],baud_base[i]); +I guess Jan will comment on that as well, not sure if we really need such verbose outputs.
Yeah, but more for style reasons (overlong line). The output itself is OK, comparable to what Linux reports about its TTYs on boot-up too.
Quoted 3 lines
Technically I wonder if that is the right
location. The initialization might still fail below. So maybe move it to the place where the device is up and running?
That is a valid point, specifically as there is no error output otherwise.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux