public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <t.figa@samsung.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: mturquette@linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	patches@opensource.wolfsonmicro.com,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH] clk: s3c64xx: Correct spi bus clock hookups
Date: Wed, 16 Oct 2013 11:10:59 +0200	[thread overview]
Message-ID: <1625192.kcLGqB93c8@amdc1227> (raw)
In-Reply-To: <20131016081035.GD20219@opensource.wolfsonmicro.com>

On Wednesday 16 of October 2013 09:10:35 Charles Keepax wrote:
> + samsung soc mailing list
> 
> On Wed, Oct 16, 2013 at 12:52:42AM +0200, Tomasz Figa wrote:
> > Hi Charles,
> > 
> > On Tuesday 15 of October 2013 13:26:22 Charles Keepax wrote:
> > >  	ALIAS(SCLK_MMC1, "s3c-sdhci.1", "mmc_busclk.2"),
> > >  	ALIAS(SCLK_MMC0, "s3c-sdhci.0", "mmc_busclk.2"),
> > > -	ALIAS(SCLK_SPI1, "s3c6410-spi.1", "spi-bus"),
> > > -	ALIAS(SCLK_SPI0, "s3c6410-spi.0", "spi-bus"),
> > > +	ALIAS(PCLK_SPI1, "s3c6410-spi.1", "spi_busclk0"),
> > > +	ALIAS(SCLK_SPI1, "s3c6410-spi.1", "spi_busclk1"),
> > > +	ALIAS(SCLK_SPI1_48, "s3c6410-spi.1", "spi_busclk2"),
> > 
> > ...according to the documentation, the order is different. The SPI_CLKSEL 
> > field of CLK_CFG register of the SPI block can have following values:
> > 0 - PCLK (aka PCLK_SPIx)
> > 1 - USBCLK (aka SCLK_SPIx_48)
> > 2 - Epll clock (aka SCLK_SPIx)
> > 
> > The index after spi_busclk corresponds to the value written to SPI_CLKSEL 
> > field, so your patch should be adjusted accordingly.
> 
> Hmm... will probably need to test this to see what happens the
> old clock setup was this:
> 
> 	CLKDEV_INIT(NULL, "spi_busclk0", &clk_p),
> 	CLKDEV_INIT("s3c6410-spi.0", "spi_busclk1", &clk_sclk_spi0.clk),
> 	CLKDEV_INIT("s3c6410-spi.0", "spi_busclk2", &clk_48m_spi0),
> 	CLKDEV_INIT("s3c6410-spi.1", "spi_busclk1", &clk_sclk_spi1.clk),
> 	CLKDEV_INIT("s3c6410-spi.1", "spi_busclk2", &clk_48m_spi1),
> 
> Which appears to differ from the documentation, that said though
> I would wager that only the first of those has really had much
> testing.

I believe in 90% cases the driver simply used first available clock,
which would be the PCLK, so I wouldn't be really surprised if operation
on other clock sources weren't even tested.

If you have hardware to test this, especially with possibility of checking
the SPI frequency I would really appreciate this, as I unfortunately don't
have such.

Best regards,
Tomasz

  reply	other threads:[~2013-10-16  9:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 12:26 [PATCH] clk: s3c64xx: Correct spi bus clock hookups Charles Keepax
2013-10-15 22:52 ` Tomasz Figa
2013-10-16  8:10   ` Charles Keepax
2013-10-16  9:10     ` Tomasz Figa [this message]
2013-10-16 10:26       ` Charles Keepax

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=1625192.kcLGqB93c8@amdc1227 \
    --to=t.figa@samsung.com \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=patches@opensource.wolfsonmicro.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