From: Greg KH <gregkh@linuxfoundation.org>
To: Filip Jensen <dev-Felipe.Jensen@duagon.com>
Cc: jirislaby@kernel.org, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org,
Jose Javier Rodriguez Barbarin
<dev-josejavier.rodriguez@duagon.com>
Subject: Re: [PATCH 2/2] serial: 8250_men_mcb: Parameter for base clockrate
Date: Wed, 17 Dec 2025 15:00:28 +0100 [thread overview]
Message-ID: <2025121711-landing-vending-e4e0@gregkh> (raw)
In-Reply-To: <20251210164804.94801-3-dev-Felipe.Jensen@duagon.com>
On Wed, Dec 10, 2025 at 05:48:04PM +0100, Filip Jensen wrote:
> A parameter is needed for allowing to change the base clockrate for
> each uart port, as this fpga units have no fixed base clock. If the
> parameter is not set or is set to 0, it will use the default value.
> Allows setting the clockrate up to 64 UARTs.
>
> Reviewed-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
> Signed-off-by: Filip Jensen <dev-Felipe.Jensen@duagon.com>
> ---
> drivers/tty/serial/8250/8250_men_mcb.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_men_mcb.c b/drivers/tty/serial/8250/8250_men_mcb.c
> index 6ba7464bb2dd..01dcb9c17b0c 100644
> --- a/drivers/tty/serial/8250/8250_men_mcb.c
> +++ b/drivers/tty/serial/8250/8250_men_mcb.c
> @@ -28,6 +28,7 @@
> #define MEN_UART3_MASK 0x04
> #define MEN_UART4_MASK 0x08
>
> +#define MEN_8250_MAX_SETUP 64
> #define MEN_Z025_MAX_UARTS 4
> #define MEN_UART_MEM_SIZE 0x10
> #define MEM_UART_REGISTER_SIZE 0x01
> @@ -45,12 +46,18 @@ struct serial_8250_men_mcb_data {
> int line[MEN_Z025_MAX_UARTS];
> unsigned int offset[MEN_Z025_MAX_UARTS];
> };
> +static int portindex;
> +static ulong uartclk[MEN_8250_MAX_SETUP];
> +module_param_array(uartclk, ulong, NULL, 0664);
> +MODULE_PARM_DESC(
> + uartclk,
> + "Base for baudrate generation for each port. E.g.: uartclk=1843200,1843200,1041666,1041666. If set to 0 it will use board's default");
This is not the 1990's, please do nto add new module parameters. That
way lies madness and an inability to handle dynamic devices in any way.
Why can't this be found out some other way? Device discovery? Device
tree? quirk for something else? This should not be so broken that you
need to manually come up with kernel boot lines like this. What about
fixing the hardware itself to not need this at all?
thanks,
greg k-h
prev parent reply other threads:[~2025-12-17 14:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 16:48 [PATCH 0/2] serial: 8250_men_mcb: Parameter for base clock rate Filip Jensen
2025-12-10 16:48 ` [PATCH 1/2] serial: 8250_men_mcb: Clean defines Filip Jensen
2025-12-10 16:48 ` [PATCH 2/2] serial: 8250_men_mcb: Parameter for base clockrate Filip Jensen
2025-12-17 14:00 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025121711-landing-vending-e4e0@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dev-Felipe.Jensen@duagon.com \
--cc=dev-josejavier.rodriguez@duagon.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).