[PATCH] ARM: mxs: Change duart device to use amba-pl011
From: Shawn Guo <hidden>
Date: 2011-01-04 05:41:54
Hi Russell, On Mon, Jan 03, 2011 at 10:39:13AM +0000, Russell King - ARM Linux wrote:
On Mon, Dec 27, 2010 at 07:49:40PM +0800, Shawn Guo wrote:quoted
I did not see this problem. It's true that the clock is turned off in amba_device_register. But later, the clock will be turned on again by amba_probe -> amba_get_enable_pclk very soon. But we should add something like below in mx28_clocks_init to reflect the clock status and get usecount updated. clk_enable(&uart_clk) I ran into similar problem with fec driver, and would cover that in fec patch set.This sounds like entirely the wrong approach. Please take some time to understand that there are different clocks which do different things. The PCLK is the name ARM Ltd give to the APB bus clock. This we name apb_pclk, and we expect platforms to provide it where possible. This name will be looked up for every primecell device on the system. If you don't provide an apb_pclk, it will find the device specific function clock. This in itself is no bad thing, unless you use the device outside of the AMBA driver (iow, before probe or after remove) and helps identify when you've forgotten to provide an apb_pclk.
I intended to let the amba bus driver get duart clock. But you are
right, I should provide an apb_pclk since it actually exists on mxs
processors. In case of duart, it is xbus (apbx) clock.
_REGISTER_CLOCK("duart", "apb_pclk", xbus_clk)
Thanks for the comment.
--
Regards,
Shawn