- Mar 05, 2020
-
-
Heinrich Schuchardt authored
If all branches of a switch statement have a return instruction, all subsequent lines are unreachable. Identified with cppcheck. Signed-off-by:
Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by:
Lukasz Majewski <lukma@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Feb 28, 2020
-
-
Rajan Vaja authored
The clock driver makes EEMI call to get the name of invalid clk when executing versal_get_clock_info() function. This results in error messages. Added check for validating clock before saving clock attribute and calling versal_pm_clock_get_name() in versal_get_clock_info() function. Signed-off-by:
Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com>
-
- Feb 13, 2020
-
-
Patrick Delaunay authored
Solve type issue in stm32mp1_lse_enable and stm32mp1_clktree. This patch solves the warnings when compiling with W=1 on stm32mp1 board: clk_stm32mp1.c: In function ‘stm32mp1_lse_enable’: clk_stm32mp1.c:1238:15: warning: comparison of integer expressions of different signedness: ‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare] clk_stm32mp1.c:1239:13: warning: comparison of integer expressions of different signedness: ‘u32’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare] clk_stm32mp1.c: In function ‘stm32mp1_clktree’: clk_stm32mp1.c:1814:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare] Signed-off-by:
Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by:
Patrice Chotard <patrice.chotard@st.com>
-
- Feb 12, 2020
-
-
Eugeniy Paltsev authored
HDMI PLL has its own xtal with 27 MHz output but we treat it the same way as other PLLs with 33.33 MHz input. Fix that. Signed-off-by:
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by:
Alexey Brodkin <abrodkin@synopsys.com>
-
Eugeniy Paltsev authored
Pll bypass has priority over enable/disable. Signed-off-by:
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by:
Alexey Brodkin <abrodkin@synopsys.com>
-
- Feb 07, 2020
-
-
Simon Glass authored
So far we have avoided adding a clock driver for Intel devices. But the Designware I2C driver needs a different clock (133MHz) on Intel devices than on others (166MHz). Add a simple driver that provides this information. This driver can be expanded later as needed. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Feb 06, 2020
-
-
Simon Glass authored
At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present devres.h is included in all files that include dm.h but few make use of it. Also this pulls in linux/compat which adds several more headers. Drop the automatic inclusion and require files to include devres themselves. This provides a good indication of which files use devres. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Anatolij Gustschin <agust@denx.de>
-
Simon Glass authored
This function name conflicts with our desire to #define free() to something else on sandbox. Since it deals with resources, rename it to rfree(). Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 30, 2020
-
-
Jagan Teki authored
Few of the rockchip family SoC atleast rk3288, rk3399 are sharing some cru register bits so adding common code between these SoC families would require to include both cru include files that indeed resulting function declarations error. So, create a common cru include as cru.h then include the rk3399 arch cru include file and move the common cru register bit definitions into it. The rest of rockchip cru files will add it in future. Reviewed-by:
Kever Yang <kever.yang@rock-chips.com> Signed-off-by:
Jagan Teki <jagan@amarulasolutions.com>
-
- Jan 26, 2020
-
-
Giulio Benetti authored
Guard 'parent_rate==0' to prevent 'divide by zero' issue in clk_pplv3_av_set_rate(). If it is 0, let's return with -EINVAL. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com>
-
Giulio Benetti authored
Guard 'mfd==0' to prevent 'divide by zero' issue in clk_pplv3_av_get_rate(). If it is 0, let's return with EIO since mfd should never be 0 at all. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com>
-
Giulio Benetti authored
Guard 'parent_rate==0' to prevent 'divide by zero' issue in clk_pplv3_sys_get_rate(). If it is 0, let's return with -EINVAL. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com>
-
Sean Anderson authored
dev_read_addr_ptr returns NULL on error, not FDT_ADDR_T_NONE. Signed-off-by:
Sean Anderson <seanga2@gmail.com>
-
Giulio Benetti authored
clk_get_by_name() requires clk_get_by_id() that is not available if CONFIG_OF_PLATDATA is defined, so move clk_get_by_name() into #else condition of #if CONFIG_IS_ENABLED(OF_PLATDATA). Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com>
-
Peng Fan authored
It will ease debug when uclass_get_device_by_name failed with more error info printed out. Signed-off-by:
Peng Fan <peng.fan@nxp.com>
-
Fabien Parent authored
mtk_clk_find_parent_rate is calling clk_get_rate to know the rate of a parent clock. clk_get_rate returns a ulong, while mtk_clk_find_parent_rate returns an int. This implicit cast creates an issue for clock rates big enough to need the full 32 bits to store its data. When that happen the clk rate will become incorrect because of the implicit cast between ulong -> int -> ulong. This commit change the return type of mtk_clk_find_parent_rate to ulong. Signed-off-by:
Fabien Parent <fparent@baylibre.com>
-
- Jan 24, 2020
-
-
Simon Glass authored
This function related to timer and most of the timer functions are in time.h, so move this function there. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 20, 2020
-
-
Lokesh Vutla authored
Add slack to the clock frequency parameters passed to firmware within clk_set_rate. min-freq is changed to 0 and max-rate is changed to ULONG_MAX. This fixes certain issues with pll clock rounding when the firmware is not able to set the frequency exactly to the target, the current implementation fails if the available frequency is even 1Hz off the target. With the change, the firmware still tries its best to set the frequency as close as possible to the target. Reported-by:
Vishal Mahaveer <vishalm@ti.com> Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by:
Tero Kristo <t-kristo@ti.com> Signed-off-by:
Lokesh Vutla <lokeshvutla@ti.com>
-
- Jan 17, 2020
-
-
Simon Glass authored
This function related to timer and most of the timer functions are in time.h, so move this function there. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
These three clock functions don't use driver model and should be migrated. In the meantime, create a new file to hold them. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 16, 2020
-
-
Sam Shih authored
This patch fix clock-rate overflow problem in mediatek clock driver common part. Signed-off-by:
Sam Shih <sam.shih@mediatek.com> Reviewed-by:
Ryder Lee <ryder.lee@mediatek.com>
-
Sam Shih authored
This patch add clock driver for MediaTek MT7622 SoC. Signed-off-by:
Ryder Lee <ryder.lee@mediatek.com> Signed-off-by:
Sam Shih <sam.shih@mediatek.com>
-
Chunfeng Yun authored
This is used to avoid clk_enable() return -ENOSYS. Signed-off-by:
Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ryder Lee <ryder.lee@mediatek.com>
-
Chunfeng Yun authored
Sometimes we may need get (optional) clock without a device, that means use ofnode. e.g. when the phy node has subnode, and there is no device created for subnode, in this case, we need these new APIs to get subnode's clock. Signed-off-by:
Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ryder Lee <ryder.lee@mediatek.com>
-
Chunfeng Yun authored
Add valid check for clk->dev, it's useful when get optional clock even when the clk point is valid, but its dev will be NULL. Signed-off-by:
Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ryder Lee <ryder.lee@mediatek.com>
-
Chunfeng Yun authored
If skip all return error number, it may skip some real error cases, so only skip the error when the clock is not provided in DTS Signed-off-by:
Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ryder Lee <ryder.lee@mediatek.com>
-
Chunfeng Yun authored
The SSUSB IP's clocks come from ssusbsys module on mt7629, so add its driver Signed-off-by:
Chunfeng Yun <chunfeng.yun@mediatek.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ryder Lee <ryder.lee@mediatek.com>
-
mingming lee authored
Add configurable pcw_chg_reg/ibits/fmin to mtk_pll to support mt8512
-
mingming lee authored
Add new set_clr_upd mux type and related operation to mtk common clock driver to support mt8512
-
mingming lee authored
Add clock driver for MediaTek MT8512 SoC, include topckgen, apmixedsys and infracfg support. Signed-off-by:
mingming lee <mingming.lee@mediatek.com>
-
- Jan 14, 2020
-
-
Giulio Benetti authored
Add i.MXRT1050 clk driver support. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com>
-
Giulio Benetti authored
Implement set_rate() for pfd. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
Giulio Benetti authored
Add support for PLLV3 AV type. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com>
-
Giulio Benetti authored
Add PLLV3_SYS support by adding set/get_rate() for PLLV3_SYS but keeping generic enable()/disable(). Add a different driver because ops are different respect to GENERIC/USB. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
Giulio Benetti authored
Add generic set_rate() support. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
Giulio Benetti authored
Add disable() support. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-
Giulio Benetti authored
Before set_rate() pllv3 needs enable() to power the pll up. Add enable() taking into account different power_bit and different powerup_set, because some pll needs its power_bit to be set or reset to be powered on. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com>
-
Giulio Benetti authored
div_mask is different for GENERIC and USB pll, so set it according. Signed-off-by:
Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by:
Lukasz Majewski <lukma@denx.de>
-