Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4f16f7ff authored by Kaihua Zhong's avatar Kaihua Zhong Committed by Stephen Boyd
Browse files

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: default avatarLeo Yan <leo.yan@linaro.org>
Signed-off-by: default avatarKai Zhao <zhaokai1@hisilicon.com>
Signed-off-by: default avatarTao Wang <kevin.wangtao@hisilicon.com>
Signed-off-by: default avatarRuyi Wang <wangruyi@huawei.com>
Signed-off-by: default avatarKaihua Zhong <zhongkaihua@huawei.com>
[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: default avatarStephen Boyd <sboyd@codeaurora.org>
parent a4a124c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment