diff --git a/drivers/clk/rockchip/Kconfig b/drivers/clk/rockchip/Kconfig index 103d53e85df5..4056ae0bbab8 100644 --- a/drivers/clk/rockchip/Kconfig +++ b/drivers/clk/rockchip/Kconfig @@ -24,7 +24,7 @@ config CLK_RV110X Build the driver for RV110x Clock Driver. config CLK_RK1808 - bool "Rockchip RK1808 clock controller support" + tristate "Rockchip RK1808 clock controller support" depends on ARM64 || COMPILE_TEST default y help diff --git a/drivers/clk/rockchip/clk-rk1808.c b/drivers/clk/rockchip/clk-rk1808.c index 1b7b8b8f153e..98b48293067a 100644 --- a/drivers/clk/rockchip/clk-rk1808.c +++ b/drivers/clk/rockchip/clk-rk1808.c @@ -4,8 +4,10 @@ * Author: Elaine Zhang */ #include +#include #include #include +#include #include #include #include "clk.h" @@ -1239,3 +1241,31 @@ static void __init rk1808_clk_init(struct device_node *np) } CLK_OF_DECLARE(rk1808_cru, "rockchip,rk1808-cru", rk1808_clk_init); + +static int __init clk_rk1808_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev->dev.of_node; + + rk1808_clk_init(np); + + return 0; +} + +static const struct of_device_id clk_rk1808_match_table[] = { + { + .compatible = "rockchip,rk1808-cru", + }, + { } +}; +MODULE_DEVICE_TABLE(of, clk_rk1808_match_table); + +static struct platform_driver clk_rk1808_driver = { + .driver = { + .name = "clk-rk1808", + .of_match_table = clk_rk1808_match_table, + }, +}; +builtin_platform_driver_probe(clk_rk1808_driver, clk_rk1808_probe); + +MODULE_DESCRIPTION("Rockchip RK1808 Clock Driver"); +MODULE_LICENSE("GPL");