* [PATCH 1/1] Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
@ 2022-01-23 8:18 Konstantin Smola
2022-01-24 7:40 ` Bezdeka, Florian
0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Smola @ 2022-01-23 8:18 UTC (permalink / raw)
To: xenomai; +Cc: Konstantin Smola
kernel/drivers/serial: Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
Signed-off-by: Konstantin Smola <ksmola51@gmail.com>
---
kernel/drivers/serial/16550A.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/drivers/serial/16550A.c b/kernel/drivers/serial/16550A.c
index c9274fb19..325737f65 100644
--- a/kernel/drivers/serial/16550A.c
+++ b/kernel/drivers/serial/16550A.c
@@ -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;
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
2022-01-23 8:18 [PATCH 1/1] Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases Konstantin Smola
@ 2022-01-24 7:40 ` Bezdeka, Florian
2022-01-24 17:32 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Bezdeka, Florian @ 2022-01-24 7:40 UTC (permalink / raw)
To: ksmola51, xenomai
On Sun, 2022-01-23 at 00:18 -0800, Konstantin Smola via Xenomai wrote:
> kernel/drivers/serial: Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
> Signed-off-by: Konstantin Smola <ksmola51@gmail.com>
> ---
> kernel/drivers/serial/16550A.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/kernel/drivers/serial/16550A.c b/kernel/drivers/serial/16550A.c
> index c9274fb19..325737f65 100644
> --- a/kernel/drivers/serial/16550A.c
> +++ b/kernel/drivers/serial/16550A.c
> @@ -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?
>
> #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?
> err = rt_16550_init_io(i, name);
> if (err)
> goto kfree_out;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
2022-01-24 7:40 ` Bezdeka, Florian
@ 2022-01-24 17:32 ` Jan Kiszka
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2022-01-24 17:32 UTC (permalink / raw)
To: Bezdeka, Florian, ksmola51, xenomai
On 24.01.22 08:40, Bezdeka, Florian via Xenomai wrote:
> On Sun, 2022-01-23 at 00:18 -0800, Konstantin Smola via Xenomai wrote:
>> kernel/drivers/serial: Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases.
>> Signed-off-by: Konstantin Smola <ksmola51@gmail.com>
>> ---
>> kernel/drivers/serial/16550A.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/kernel/drivers/serial/16550A.c b/kernel/drivers/serial/16550A.c
>> index c9274fb19..325737f65 100644
>> --- a/kernel/drivers/serial/16550A.c
>> +++ b/kernel/drivers/serial/16550A.c
>> @@ -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?
>
>>
>> #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.
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.
> 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
--
Siemens AG, Technology
Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-24 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-23 8:18 [PATCH 1/1] Added verbosity to 16550A serial driver. dmesg shows the ports, irqs, baudbases Konstantin Smola
2022-01-24 7:40 ` Bezdeka, Florian
2022-01-24 17:32 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.