From: Richard Genoud <richard.genoud@gmail.com>
To: Claudiu Beznea <claudiu.beznea@microchip.com>,
richard.genoud@gmail.com, gregkh@linuxfoundation.org,
jirislaby@kernel.org, nicolas.ferre@microchip.com,
alexandre.belloni@bootlin.com, patrice.chotard@foss.st.com
Cc: linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] tty: serial: atmel: remove enable/disable clock due to atmel_console_setup()
Date: Fri, 17 Jun 2022 15:06:46 +0200 [thread overview]
Message-ID: <fec70c93-960d-711b-b6a1-ffc8ba23dfdb@gmail.com> (raw)
In-Reply-To: <20220616140024.2081238-4-claudiu.beznea@microchip.com>
Le 16/06/2022 à 16:00, Claudiu Beznea a écrit :
> There is no need for clk_prepare_enable() at the beginning of
> atmel_console_setup() and clk_disable_unprepare() at the end of
> atmel_console_setup() as the clock is already enabled when calling
> atmel_console_setup() and its disablement is done at the end
> of probe.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
> ---
> drivers/tty/serial/atmel_serial.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 4cec97fd7241..3a94c2bdda72 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2617,7 +2617,6 @@ static void __init atmel_console_get_options(struct uart_port *port, int *baud,
>
> static int __init atmel_console_setup(struct console *co, char *options)
> {
> - int ret;
> struct uart_port *port = &atmel_ports[co->index].uart;
> struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
> int baud = 115200;
> @@ -2630,10 +2629,6 @@ static int __init atmel_console_setup(struct console *co, char *options)
> return -ENODEV;
> }
>
> - ret = clk_prepare_enable(atmel_ports[co->index].clk);
> - if (ret)
> - return ret;
> -
> atmel_uart_writel(port, ATMEL_US_IDR, -1);
> atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
> atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN);
> @@ -2914,17 +2909,6 @@ static int atmel_serial_probe(struct platform_device *pdev)
> if (ret)
> goto err_add_port;
>
> -#ifdef CONFIG_SERIAL_ATMEL_CONSOLE
> - if (uart_console(&atmel_port->uart)
> - && ATMEL_CONSOLE_DEVICE->flags & CON_ENABLED) {
> - /*
> - * The serial core enabled the clock for us, so undo
> - * the clk_prepare_enable() in atmel_console_setup()
> - */
> - clk_disable_unprepare(atmel_port->clk);
> - }
> -#endif
> -
> device_init_wakeup(&pdev->dev, 1);
> platform_set_drvdata(pdev, atmel_port);
>
Thanks !
next prev parent reply other threads:[~2022-06-17 13:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 14:00 [PATCH v3 0/4] serial: atmel: cleanup code Claudiu Beznea
2022-06-16 14:00 ` [PATCH v3 1/4] tty: serial: atmel: stop using legacy pm ops Claudiu Beznea
2022-06-16 14:00 ` [PATCH v3 2/4] tty: serial: atmel: use devm_clk_get() Claudiu Beznea
2022-06-17 13:06 ` Richard Genoud
2022-06-16 14:00 ` [PATCH v3 3/4] tty: serial: atmel: remove enable/disable clock due to atmel_console_setup() Claudiu Beznea
2022-06-17 13:06 ` Richard Genoud [this message]
2022-06-16 14:00 ` [PATCH v3 4/4] serial: st-asc: remove include of pm_runtime.h Claudiu Beznea
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=fec70c93-960d-711b-b6a1-ffc8ba23dfdb@gmail.com \
--to=richard.genoud@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=patrice.chotard@foss.st.com \
/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
Powered by JetHome