summaryrefslogtreecommitdiffstats
path: root/drivers/clk/hisilicon/clk-hi3660.c
AgeCommit message (Collapse)AuthorFilesLines
2019-10-03clk: hisilicon: fix sparse warnings in clk-hi3660.cBen Dooks1-30/+30
Fix sparse warnings of a 0 being used for a pointer by removing it from the initialiser. drivers/clk/hisilicon/clk-hi3660.c:336:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:338:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:340:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:342:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:344:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:346:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:348:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:350:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:352:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:354:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:356:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:358:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:360:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:362:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:364:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:366:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:368:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:370:69: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:372:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:374:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:376:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:378:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:423:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:425:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:427:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:429:68: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:449:70: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:451:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:453:71: warning: Using plain integer as NULL pointer drivers/clk/hisilicon/clk-hi3660.c:455:71: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Link: https://lkml.kernel.org/r/20190925112347.14141-2-ben.dooks@codethink.co.uk Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner1-5/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19clk: hi3660: Mark clk_gate_ufs_subsys as criticalLeo Yan1-1/+5
clk_gate_ufs_subsys is a system bus clock, turning off it will introduce lockup issue during system suspend flow. Let's mark clk_gate_ufs_subsys as critical clock, thus keeps it on during system suspend and resume. Fixes: d374e6fd5088 ("clk: hisilicon: Add clock driver for hi3660 SoC") Cc: stable@vger.kernel.org Cc: Zhong Kaihua <zhongkaihua@huawei.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Zhangfei Gao <zhangfei.gao@linaro.org> Suggested-by: Dong Zhang <zhangdong46@hisilicon.com> Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2017-11-14clk: hi3660: fix incorrect uart3 clock freqencyZhong Kaihua1-1/+1
UART3 clock rate is doubled in previous commit. This error is not detected until recently a mezzanine board which makes real use of uart3 port (through LS connector of 96boards) was setup and tested on hi3660-hikey960 board. This patch changes clock source rate of clk_factor_uart3 to 100000000. Signed-off-by: Zhong Kaihua <zhongkaihua@huawei.com> Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-06-19clk: hi3660: Set PPLL2 to 2880MZhong Kaihua1-2/+2
Set PPLL2 to 2880M. With this patch, we saw better compatibility on various 1080p HDMI monitors. Signed-off-by: Zhong Kaihua <zhongkaihua@huawei.com> Signed-off-by: Zheng Shaobo <zhengshaobo1@huawei.com> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> [sboyd@codeaurora.org: Add UL to long number to silence C90 warning] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-06-19clk: hi3660: add clocks for video encoder, decoder and ISPChen Jun1-0/+40
This patch adds more clocks for hi3660, including: - video encoder and decoder - ISP (Image Signal Processing) Signed-off-by: Chen Jun <chenjun14@huawei.com> Signed-off-by: Zhong Kaihua <zhongkaihua@huawei.com> Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Reviewed-by: Zhangfei Gao <zhangfei.gao@linaro.org> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-06-19clk: hi3660: fix wrong parent name of clk_mux_sysbusChen Jun1-2/+4
Parent name of clk_mux_sysbus is not correct. This patch fixes it. Signed-off-by: Chen Jun <chenjun14@huawei.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-06-19clk: Hi3660: register fixed_rate_clks with CLK_OF_DECLARE_DRIVERLeo Yan1-10/+38
The timer will register into system at very early phase at kernel boot; if timer needs to use clock, the clock should be get ready in function of_clk_init() so later the timer driver probe can retrieve clock successfully. This is finished in below flow on arm64: start_kernel() `-> time_init() `-> of_clk_init(NULL) => register timer's clock `-> clocksource_probe() => register timer On Hi3660 the sp804 timer uses clock "osc32k", this clock is registered as platform driver rather than CLK_OF_DECLARE_DRIVER method. As result, sp804 timer probe returns failure due if cannot bind clock properly. To fix the failure, this patch is to split crgctrl clocks into two subsets. One part is for fixed_rate_clks which includes pre-defined fixed rate clocks, and "osc32k" clock is in this category; So we change their registration to CLK_OF_DECLARE_DRIVER method, as result the clocks can be registered ahead with function of_clk_init() and timer driver can bind timer clock successfully; the rest of the crgctrl clocks are still registered by the probe of the platform driver. This patch also adds checking for all crgctrl clocks registration and print out log if any clock has failure. Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-01-09clk: hisilicon: Add clock driver for hi3660 SoCZhangfei Gao1-0/+567
Add clock drivers for hi3660 SoC, this driver controls the SoC registers to supply different clocks to different IPs in the SoC. Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> [sboyd@codeaurora.org: Simplify probe with function pointer] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>