lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 1/1] earlycon: Let users set the clock frequency
From
Hi,

On 24. 11. 22, 0:29, Ricardo Ribalda wrote:
> Some platforms, namely AMD Picasso, use non standard uart clocks (48M),
> witch makes it impossible to use with earlycon.
>
> Let the user select its own frequency.
...
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -120,7 +120,11 @@ static int __init parse_options(struct earlycon_device *device, char *options)
> }
>
> if (options) {
> + char *uartclk;
> device->baud = simple_strtoul(options, NULL, 0);
> + uartclk = strchr(options, ',');
> + if (uartclk)
> + port->uartclk = simple_strtoull(uartclk + 1, NULL, 0);

uartclk is uint. So why does it make sense to do ull parsing?

thanks,
--
js
suse labs

\
 
 \ /
  Last update: 2022-11-24 06:59    [W:0.039 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site