From: Krzysztof Kozlowski <krzk@kernel.org>
To: "Łukasz Stelmach" <l.stelmach@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
Mark Brown <broonie@kernel.org>, Kukjin Kim <kgene@kernel.org>,
Andi Shyti <andi@etezian.org>, Tomasz Figa <tfiga@chromium.org>,
linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com
Subject: Re: [PATCH v2 7/9] spi: spi-s3c64xx: Ensure cur_speed holds actual clock value
Date: Sat, 22 Aug 2020 14:43:25 +0200 [thread overview]
Message-ID: <20200822124325.GF20423@kozik-lap> (raw)
In-Reply-To: <20200821161401.11307-8-l.stelmach@samsung.com>
On Fri, Aug 21, 2020 at 06:13:59PM +0200, Łukasz Stelmach wrote:
> cur_speed is used to calculate transfer timeout and needs to be
> set to the actual value of (half) the clock speed for precise
> calculations.
If you need this only for timeout calculation just divide it in
s3c64xx_wait_for_dma(). Otherwise why only if (cmu) case is updated?
You are also affecting here not only timeout but
s3c64xx_enable_datapath() which is not mentioned in commit log. In other
words, this looks wrong.
Best regards,
Krzysztof
>
> Cc: Tomasz Figa <tfiga@chromium.org>
> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
> ---
> drivers/spi/spi-s3c64xx.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> index 02de734b8ab1..89c162efe355 100644
> --- a/drivers/spi/spi-s3c64xx.c
> +++ b/drivers/spi/spi-s3c64xx.c
> @@ -626,6 +626,7 @@ static int s3c64xx_spi_config(struct s3c64xx_spi_driver_data *sdd)
> ret = clk_set_rate(sdd->src_clk, sdd->cur_speed * 2);
> if (ret)
> return ret;
> + sdd->cur_speed = clk_get_rate(sdd->src_clk) / 2;
> } else {
> /* Configure Clock */
> val = readl(regs + S3C64XX_SPI_CLK_CFG);
> --
> 2.26.2
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-08-22 12:44 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200821161404eucas1p20577160d1bff2e8f5cae7403e93716ab@eucas1p2.samsung.com>
2020-08-21 16:13 ` [PATCH v2 0/9] Some fixes for spi-s3c64xx Łukasz Stelmach
2020-08-21 16:13 ` [PATCH v2 1/9] spi: spi-s3c64xx: swap s3c64xx_spi_set_cs() and s3c64xx_enable_datapath() Łukasz Stelmach
2020-08-22 12:01 ` Krzysztof Kozlowski
2020-08-21 16:13 ` [PATCH v2 2/9] spi: spi-s3s64xx: Add S3C64XX_SPI_QUIRK_CS_AUTO for Exynos3250 Łukasz Stelmach
2020-08-22 12:02 ` Krzysztof Kozlowski
2020-08-21 16:13 ` [PATCH v2 3/9] spi: spi-s3c64xx: Report more information when errors occur Łukasz Stelmach
2020-08-22 12:03 ` Krzysztof Kozlowski
2020-08-21 16:13 ` [PATCH v2 4/9] spi: spi-s3c64xx: Rename S3C64XX_SPI_SLAVE_* to S3C64XX_SPI_CS_* Łukasz Stelmach
2020-08-21 16:13 ` [PATCH v2 5/9] spi: spi-s3c64xx: Fix doc comment for struct s3c64xx_spi_driver_data Łukasz Stelmach
2020-08-22 12:26 ` Krzysztof Kozlowski
2020-08-21 16:13 ` [PATCH v2 6/9] spi: spi-s3c64xx: Check return values Łukasz Stelmach
2020-08-22 12:37 ` Krzysztof Kozlowski
2020-08-25 19:06 ` Sylwester Nawrocki
2020-09-01 15:21 ` Lukasz Stelmach
2020-09-02 8:14 ` Sylwester Nawrocki
2020-09-03 8:45 ` Lukasz Stelmach
2020-09-03 11:18 ` Sylwester Nawrocki
2020-08-21 16:13 ` [PATCH v2 7/9] spi: spi-s3c64xx: Ensure cur_speed holds actual clock value Łukasz Stelmach
2020-08-22 12:43 ` Krzysztof Kozlowski [this message]
2020-08-22 14:52 ` Tomasz Figa
2020-08-22 15:18 ` Krzysztof Kozlowski
2020-08-22 15:20 ` Tomasz Figa
2020-08-24 13:17 ` Lukasz Stelmach
2020-08-24 13:21 ` Tomasz Figa
2020-08-25 9:01 ` Lukasz Stelmach
2020-08-25 15:11 ` Tomasz Figa
2020-08-25 15:45 ` Lukasz Stelmach
2020-08-22 14:54 ` Tomasz Figa
2020-08-21 16:14 ` [PATCH v2 8/9] spi: spi-s3c64xx: Increase transfer timeout Łukasz Stelmach
2020-08-22 12:43 ` Krzysztof Kozlowski
2020-08-21 16:14 ` [PATCH v2 9/9] spi: spi-s3c64xx: Turn on interrupts upon resume Łukasz Stelmach
2020-08-22 12:44 ` Krzysztof Kozlowski
2020-10-01 15:21 ` [PATCH v2 RESEND 0/9] Some fixes for spi-s3c64xx Łukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 1/9] spi: spi-s3c64xx: swap s3c64xx_spi_set_cs() and s3c64xx_enable_datapath() Łukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 2/9] spi: spi-s3s64xx: Add S3C64XX_SPI_QUIRK_CS_AUTO for Exynos3250 Łukasz Stelmach
2020-10-01 19:04 ` Krzysztof Kozlowski
2020-10-02 10:13 ` Lukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 3/9] spi: spi-s3c64xx: Check return values Łukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 4/9] spi: spi-s3c64xx: Report more information when errors occur Łukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 5/9] spi: spi-s3c64xx: Rename S3C64XX_SPI_SLAVE_* to S3C64XX_SPI_CS_* Łukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 6/9] spi: spi-s3c64xx: Fix doc comment for struct s3c64xx_spi_driver_data Łukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 7/9] spi: spi-s3c64xx: Ensure cur_speed holds actual clock value Łukasz Stelmach
2020-10-01 19:12 ` Krzysztof Kozlowski
2020-10-01 15:21 ` [PATCH v2 RESEND 8/9] spi: spi-s3c64xx: Increase transfer timeout Łukasz Stelmach
2020-10-01 15:21 ` [PATCH v2 RESEND 9/9] spi: spi-s3c64xx: Turn on interrupts upon resume Łukasz Stelmach
2020-10-01 16:13 ` [PATCH v2 RESEND 0/9] Some fixes for spi-s3c64xx Mark Brown
2020-10-01 18:23 ` Lukasz Stelmach
2020-10-01 19:02 ` Krzysztof Kozlowski
2020-10-01 19:43 ` Mark Brown
2020-10-02 6:18 ` Krzysztof Kozlowski
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=20200822124325.GF20423@kozik-lap \
--to=krzk@kernel.org \
--cc=andi@etezian.org \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=kgene@kernel.org \
--cc=l.stelmach@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=tfiga@chromium.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).