mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 07:25:01 +07:00
4f16f7ff3b
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 <leo.yan@linaro.org> Signed-off-by: Kai Zhao <zhaokai1@hisilicon.com> Signed-off-by: Tao Wang <kevin.wangtao@hisilicon.com> Signed-off-by: Ruyi Wang <wangruyi@huawei.com> Signed-off-by: Kaihua 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: Stephen Boyd <sboyd@codeaurora.org>
58 lines
1.4 KiB
Plaintext
58 lines
1.4 KiB
Plaintext
config COMMON_CLK_HI3516CV300
|
|
tristate "HI3516CV300 Clock Driver"
|
|
depends on ARCH_HISI || COMPILE_TEST
|
|
select RESET_HISI
|
|
default ARCH_HISI
|
|
help
|
|
Build the clock driver for hi3516cv300.
|
|
|
|
config COMMON_CLK_HI3519
|
|
tristate "Hi3519 Clock Driver"
|
|
depends on ARCH_HISI || COMPILE_TEST
|
|
select RESET_HISI
|
|
default ARCH_HISI
|
|
help
|
|
Build the clock driver for hi3519.
|
|
|
|
config COMMON_CLK_HI3660
|
|
bool "Hi3660 Clock Driver"
|
|
depends on ARCH_HISI || COMPILE_TEST
|
|
default ARCH_HISI
|
|
help
|
|
Build the clock driver for hi3660.
|
|
|
|
config COMMON_CLK_HI3798CV200
|
|
tristate "Hi3798CV200 Clock Driver"
|
|
depends on ARCH_HISI || COMPILE_TEST
|
|
select RESET_HISI
|
|
default ARCH_HISI
|
|
help
|
|
Build the clock driver for hi3798cv200.
|
|
|
|
config COMMON_CLK_HI6220
|
|
bool "Hi6220 Clock Driver"
|
|
depends on ARCH_HISI || COMPILE_TEST
|
|
default ARCH_HISI
|
|
help
|
|
Build the Hisilicon Hi6220 clock driver based on the common clock framework.
|
|
|
|
config RESET_HISI
|
|
bool "HiSilicon Reset Controller Driver"
|
|
depends on ARCH_HISI || COMPILE_TEST
|
|
select RESET_CONTROLLER
|
|
help
|
|
Build reset controller driver for HiSilicon device chipsets.
|
|
|
|
config STUB_CLK_HI6220
|
|
bool "Hi6220 Stub Clock Driver"
|
|
depends on COMMON_CLK_HI6220 && MAILBOX
|
|
default ARCH_HISI
|
|
help
|
|
Build the Hisilicon Hi6220 stub clock driver.
|
|
|
|
config STUB_CLK_HI3660
|
|
bool "Hi3660 Stub Clock Driver"
|
|
depends on COMMON_CLK_HI3660 && MAILBOX
|
|
help
|
|
Build the Hisilicon Hi3660 stub clock driver.
|