From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Fri, 28 Oct 2016 18:49:19 +0200 Subject: [U-Boot] [U-Boot, v3, 2/7] clk: at91: Improve the clock implementation In-Reply-To: <1474945234-30540-3-git-send-email-wenyou.yang@atmel.com> (from Wenyou Yang on Tue, 27 Sep 2016 11:00:29 +0800) References: <1474945234-30540-3-git-send-email-wenyou.yang@atmel.com> Message-ID: <20161028164919.28722-1-andreas@biessmann.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wenyou Yang, Wenyou Yang writes: >For the peripheral clock, provide the clock ops for the clock >provider, such as spi0_clk. The .of_xlate is to get the clk->id, >the .enable is to enable the spi0 peripheral clock, the .get_rate >is to get the clock frequency. > >The driver for periph32ck node is responsible for recursively >binding its children as clk devices, not provide the clock ops. > >So do the generated clock and system clock. > >Signed-off-by: Wenyou Yang >Acked-by: Stephen Warren >--- > >Changes in v3: > - Remove the unneeded wrapper functions. > - Fix typo, Invaild -> Invalid. > - Add Acked-by tag. > >Changes in v2: > - For the periph32ck, periph64ck, gck, systemck nodes, they aren't > the clock providers, are to house various actual clock providers, > use UCLASS_MISC, instead of UCLASS_CLK. > - For *_of_xlate(), add argument check. > - Fix the implementation of the *_get_rate(). > - Use documentation-wise variables for *_clk_probe(). > - Remove the duplicated code, use the common functions. > > drivers/clk/at91/Kconfig | 1 + > drivers/clk/at91/clk-generated.c | 87 +++++++++++++++++++++++---------------- > drivers/clk/at91/clk-peripheral.c | 72 ++++++++++++++++++++++---------- > drivers/clk/at91/clk-system.c | 57 ++++++++++++++----------- > drivers/clk/at91/pmc.c | 62 ++++++++++++++++++++++++---- > drivers/clk/at91/pmc.h | 5 ++- > 6 files changed, 195 insertions(+), 89 deletions(-) applied to u-boot-atmel/master, thanks! Best regards, Andreas Bie?mann