Re: [PATCH v1] spi: pxa2xx: set clock divider according to rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-01-24 at 14:18 +0200, Jarkko Nikula wrote:
> On 01/24/2018 01:59 PM, Andy Shevchenko wrote:

> > +static unsigned int spt_get_clk_div(struct driver_data *drv_data,
> > int rate)
> > +{
> > +	const struct ssp_device *ssp = drv_data->ssp;
> > +	struct chip_data *chip = drv_data->cur_chip;
> > +	long round;
> > +
> > +	round = clk_round_rate(ssp->clk, rate);
> > +	clk_set_rate(ssp->clk, round);
> > +
> 
> Are you sure about this? If I remember correctly clk_set_rate() may 
> sleep and here call chain originates from tasklet pump_transfers() -> 
> pxa2xx_ssp_get_clk_div() -> spt_get_clk_div().

Indeed. Apparently needs more test with additional debugging options
enabled.

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux