On Thu, Oct 16, 2014 at 05:58:51PM +0800, addy ke wrote:
Please fix your mailer to word wrap within paragraphs.
> On 2014/10/16 17:34, Mark Brown wrote:
> >> If we set the rate unconditionally here, clk_set_rate() will be executed
> >> in each spi transfer.
> > Is that really such a high cost?
On Thu, Oct 16, 2014 at 05:16:02PM +0800, addy ke wrote:
> On 2014/10/15 21:04, Mark Brown wrote:
> > On Wed, Oct 15, 2014 at 07:25:49PM +0800, Addy Ke wrote:
> >> + if (WARN_ON(rs->speed > MAX_SCLK_OUT))
> >> + rs->speed = MAX_SCLK_OUT;
> >> + /* the minimum divsor is 2 */
> >> + if
On 2014/10/16 17:34, Mark Brown wrote:
> On Thu, Oct 16, 2014 at 05:16:02PM +0800, addy ke wrote:
>> On 2014/10/15 21:04, Mark Brown wrote:
>>> On Wed, Oct 15, 2014 at 07:25:49PM +0800, Addy Ke wrote:
>
+ if (WARN_ON(rs->speed > MAX_SCLK_OUT))
+ rs->speed = MAX_SCLK_OUT;
>
>
hi, Mark
On 2014/10/15 21:04, Mark Brown wrote:
> On Wed, Oct 15, 2014 at 07:25:49PM +0800, Addy Ke wrote:
>
>> +if (WARN_ON(rs->speed > MAX_SCLK_OUT))
>> +rs->speed = MAX_SCLK_OUT;
>> +
>> +/* the minimum divsor is 2 */
>> +if (rs->max_freq < 2 * rs->speed) {
>> +
On Wed, Oct 15, 2014 at 07:25:49PM +0800, Addy Ke wrote:
> + if (WARN_ON(rs->speed > MAX_SCLK_OUT))
> + rs->speed = MAX_SCLK_OUT;
> +
> + /* the minimum divsor is 2 */
> + if (rs->max_freq < 2 * rs->speed) {
> + clk_set_rate(rs->spiclk, 2 * rs->speed);
> +
Because the minimum divisor in rk3x's spi controller is 2,
if spi_clk is less than 2 * sclk_out, we can't get the right divisor.
So we must set spi_clk again to match slave request.
Signed-off-by: Addy Ke
---
drivers/spi/spi-rockchip.c | 12
1 file changed, 12 insertions(+)
diff --
6 matches
Mail list logo