On Wed, 2008-11-05 at 17:16 -0800, Tony Lindgren wrote: > * David Brownell <david-b@xxxxxxxxxxx> [081105 15:53]: > > On Wednesday 05 November 2008, Stanley.Miao wrote: > > > @@ -333,7 +333,8 @@ struct omap_mcbsp_platform_data { > > > u8 dma_rx_sync, dma_tx_sync; > > > u16 rx_irq, tx_irq; > > > struct omap_mcbsp_ops *ops; > > > - char const *clk_name; > > > + char const *ick_name; > > > + char const *fck_name; > > > }; > > > > > > struct omap_mcbsp { > > > > I thought the idea was to fix this using the clock aliasing > > facility ... so that the mcbsp driver would just > > > > ick = clk_get(dev, "ick"); > > fck = clk_get(dev, "fck"); > > > > (with IS_ERR checks of course) and the platform data would > > no longer need to hold those names. > > > > That approach can work on OMAP1 too ... I think this patch > > breaks OMAP1 boards. > > Russell also has some ideas, so despite the nasty bug, let's put > the clock aliasing and virtual clocks stuff on hold for a little > while. Meanwhile, maybe we can just add some function for the > virtual clock that does not cause the recursion? At the start, I tried to add a function __clk_enable(). +int __clk_enable(struct clk *clk) +{ + if(arch_clock->clk_enable) + return arch_clock->clk_enable(clk); + return 0; +} +EXPORT_SYMBOL(__clk_enable); + int clk_enable(struct clk *clk) { unsigned long flags; @@ -84,33 +92,36 @@ int clk_enable(struct clk *clk) return -EINVAL; spin_lock_irqsave(&clockfw_lock, flags); - if (arch_clock->clk_enable) - ret = arch_clock->clk_enable(clk); + ret = __clk_enable(clk); spin_unlock_irqrestore(&clockfw_lock, flags); return ret; } EXPORT_SYMBOL(clk_enable); But in this way I have to add __clk_enable() to include/linux/clk.h, so I give up this method. Stanley. > > Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html