From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Thomas Kopp <thomas.kopp@microchip.com>, linux-can@vger.kernel.org
Cc: dev.kurt@vandijck-laurijssen.be, kernel@pengutronix.de,
manivannan.sadhasivam@linaro.org
Subject: Re: [PATCH] can: mcp25xxfd: Limit spiclk to 0.85*(sysclk/2)
Date: Wed, 16 Sep 2020 12:20:53 +0200 [thread overview]
Message-ID: <2c9efaf8-f5d0-0d8e-11c8-47293ef43d10@pengutronix.de> (raw)
In-Reply-To: <20200916100823.1105-1-thomas.kopp@microchip.com>
[-- Attachment #1.1: Type: text/plain, Size: 2011 bytes --]
On 9/16/20 12:08 PM, Thomas Kopp wrote:
> Signed-off-by: Thomas Kopp <thomas.kopp@microchip.com>
> ---
> drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c
> index 6ffa7af50119..670b7d1e1f46 100644
> --- a/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c
> +++ b/drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c
> @@ -2821,11 +2821,13 @@ static int mcp25xxfd_probe(struct spi_device *spi)
> * 2518 40 MHz allwinner,sun8i-h3 allwinner,sun8i-h3-spi 18750000 Hz 93.75% 600000000 Hz bad assigned-clocks = <&ccu CLK_SPIx>
> * 2517 20 MHz fsl,imx8mm fsl,imx51-ecspi 9090909 Hz 90.09% 18181819 Hz good assigned-clocks = <&clk IMX8MM_CLK_ECSPIx_ROOT>
> * 2517 20 MHz fsl,imx8mm fsl,imx51-ecspi 9523809 Hz 95.34% 28571429 Hz bad assigned-clocks = <&clk IMX8MM_CLK_ECSPIx_ROOT>
> + * 2517 40 MHz atmel,sama5d27 atmel,at91rm9200-spi 16400000 Hz 82% 82000000 Hz good default
> + * 2518 40 MHz atmel,sama5d27 atmel,at91rm9200-spi 16400000 Hz 82% 82000000 Hz good default
> *
> - * Limit SPI clock to 92.5% of SYSCLOCK / 2 for now.
> + * Limit SPI clock to 85% of SYSCLOCK / 2 for now.
> */
> priv->spi_max_speed_hz_orig = spi->max_speed_hz;
> - spi->max_speed_hz = min(spi->max_speed_hz, freq / 2 / 1000 * 925);
> + spi->max_speed_hz = min(spi->max_speed_hz, freq / 2 / 1000 * 850);
> spi->bits_per_word = 8;
> spi->rt = true;
> err = spi_setup(spi);
>
Squashed into the "can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN"
patch.
thanks,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-09-16 10:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 10:08 [PATCH] can: mcp25xxfd: Limit spiclk to 0.85*(sysclk/2) Thomas Kopp
2020-09-16 10:20 ` Marc Kleine-Budde [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=2c9efaf8-f5d0-0d8e-11c8-47293ef43d10@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=dev.kurt@vandijck-laurijssen.be \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=thomas.kopp@microchip.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;
as well as URLs for NNTP newsgroup(s).