From 4f16f7ff3bc02f6e1845677235fea157bdc0e59c Mon Sep 17 00:00:00 2001 From: Kaihua Zhong Date: Fri, 17 Nov 2017 17:27:31 +0800 Subject: clk: hisilicon: Add support for Hi3660 stub clocks Hi3660 has four stub clocks, which are big and LITTLE cluster clocks, GPU clock and DDR clock. These clocks ask MCU for frequency scaling by sending message through mailbox. This commit adds support for stub clocks, it requests the dedicated mailbox channel at initialization; then later uses this channel to send message to MCU to execute frequency scaling. The four stub clocks share the same mailbox channel, but every stub clock has its own command id so MCU can distinguish the requirement coming for which clock. A shared memory is used to present effective frequency value, so the clock driver uses I/O mapping for the memory and reads back rate value. Reviewed-by: Leo Yan Signed-off-by: Kai Zhao Signed-off-by: Tao Wang Signed-off-by: Ruyi Wang Signed-off-by: Kaihua Zhong [sboyd: Fix possible out of bounds access in hi3660_stub_clk_hw_get(), use devm_of_clk_add_hw_provider(), devm_ioremap() returns NULL not error pointers] Signed-off-by: Stephen Boyd --- drivers/clk/hisilicon/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/clk/hisilicon/Makefile') diff --git a/drivers/clk/hisilicon/Makefile b/drivers/clk/hisilicon/Makefile index 0e55612112af..4806fc2cb4ac 100644 --- a/drivers/clk/hisilicon/Makefile +++ b/drivers/clk/hisilicon/Makefile @@ -15,3 +15,4 @@ obj-$(CONFIG_COMMON_CLK_HI3798CV200) += crg-hi3798cv200.o obj-$(CONFIG_COMMON_CLK_HI6220) += clk-hi6220.o obj-$(CONFIG_RESET_HISI) += reset.o obj-$(CONFIG_STUB_CLK_HI6220) += clk-hi6220-stub.o +obj-$(CONFIG_STUB_CLK_HI3660) += clk-hi3660-stub.o -- cgit v1.2.3