mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
spi/pxa2xx: convert to the common clk framework
Convert clk_enable() to clk_prepare_enable() and clk_disable() to clk_disable_unprepare() respectively in order to support the common clk framework. Otherwise we get warnings on the console as the clock is not prepared before it is enabled. In addition we must cache the maximum clock rate to drv_data->max_clk_rate at probe time because clk_get_rate() cannot be called in tasklet context. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
7f86bde90e
commit
3343b7a6d2
2 changed files with 20 additions and 31 deletions
|
@ -133,23 +133,5 @@ static inline void pxa_free_dma(int dma_ch)
|
|||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* The CE4100 does not have the clk framework implemented and SPI clock can
|
||||
* not be switched on/off or the divider changed.
|
||||
*/
|
||||
static inline void clk_disable(struct clk *clk)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int clk_enable(struct clk *clk)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline unsigned long clk_get_rate(struct clk *clk)
|
||||
{
|
||||
return 3686400;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue