17 Jul, 2020
1 commit
-
Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings (e.g.
"unused variable"). If the compiler thinks it is uninitialized, either
simply initialize the variable or make compiler changes. As a precursor
to removing[2] this[3] macro[4], initialize "i" to zero. The compiler
warning was not a false positive, since clk_pll_set_rate()'s call to
clk_pll_round_rate_index() will always fail (since "prate" is NULL), so
"i" was never being initialized.[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/Fixes: 7d4998f71b29 ("clk: SPEAr: Vco-pll: Fix compilation warning")
Acked-by: Stephen Boyd
Signed-off-by: Kees Cook
07 Sep, 2019
1 commit
-
Static structure i2s_sclk_masks, having type aux_clk_masks, is only used
when it is passed as the sixth argument to function clk_register_aux().
However, clk_register_aux() is defined with its sixth argument as const.
Hence i2s_sclk_masks is not modified by clk_register_aux, which is also
the only usage of the former. Therefore make i2s_sclk_masks constant as
it is never modified.
Issue found with Coccinelle.Signed-off-by: Nishka Dasgupta
Link: https://lkml.kernel.org/r/20190813085714.8079-1-nishkadg.linux@gmail.com
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
07 Apr, 2018
1 commit
-
There is no SPEAr600 device named "wdt". Instead, the description of the
WDT (watchdog) was recently added to the Device Tree, and the device
name is "fc880000.wdt", so we should associate the WDT fixed rate clock
to this device name.Signed-off-by: Quentin Schulz
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
07 Dec, 2017
2 commits
-
pr_err() messages should end with a new-line to avoid other messages
being concatenated.Signed-off-by: Arvind Yadav
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd -
pr_err() messages should end with a new-line to avoid other messages
being concatenated.Signed-off-by: Arvind Yadav
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
18 Nov, 2017
1 commit
-
Pull clk updates from Stephen Boyd:
"We have two changes to the core framework this time around.The first being a large change that introduces runtime PM support to
the clk framework. Now we properly call runtime PM operations on the
device providing a clk when the clk is in use. This helps on SoCs
where the clks provided by a device need something to be powered on
before using the clks, like power domains or regulators. It also helps
power those things down when clks aren't in use.The other core change is a devm API addition for clk providers so we
can get rid of a bunch of clk driver remove functions that are just
doing of_clk_del_provider().Outside of the core, we have the usual addition of clk drivers and
smattering of non-critical fixes to existing drivers. The biggest diff
is support for Mediatek MT2712 and MT7622 SoCs, but those patches
really just add a bunch of data.By the way, we're trying something new here where we build the tree up
with topic branches. We plan to work this into our workflow so that we
don't step on each other's toes, and so the fixes branch can be merged
on an as-needed basis.Summary:
Core:
- runtime PM support for clk providers
- devm API for of_clk_add_hw_provider()New Drivers:
- Mediatek MT2712 and MT7622
- Renesas R-Car V3M SoCUpdates:
- runtime PM support for Samsung exynos5433/exynos4412 providers
- removal of clkdev aliases on Samsung SoCs
- convert clk-gpio to use gpio descriptors
- various driver cleanups to match kernel coding style
- Amlogic Video Processing Unit VPU and VAPB clks
- sigma-delta modulation for Allwinner audio PLLs
- Allwinner A83t Display clks
- support for the second display unit clock on Renesas RZ/G1E
- suspend/resume support for Renesas R-Car Gen3 CPG/MSSR
- new clock ids for Rockchip rk3188 and rk3368 SoCs
- various 'const' markings on clk_ops structures
- RPM clk support on Qualcomm MSM8996/MSM8660 SoCs"* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (137 commits)
clk: stm32h7: fix test of clock config
clk: pxa: fix building on older compilers
clk: sunxi-ng: a83t: Fix i2c buses bits
clk: ti: dra7-atl-clock: fix child-node lookups
clk: qcom: common: fix legacy board-clock registration
clk: uniphier: fix DAPLL2 clock rate of Pro5
clk: uniphier: fix parent of miodmac clock data
clk: hi3798cv200: correct parent mux clock for 'clk_sdio0_ciu'
clk: hisilicon: Delete an error message for a failed memory allocation in hisi_register_clkgate_sep()
clk: hi3660: fix incorrect uart3 clock freqency
clk: kona-setup: Delete error messages for failed memory allocations
ARC: clk: fix spelling mistake: "configurarion" -> "configuration"
clk: cdce925: remove redundant check for non-null parent_name
clk: versatile: Improve sizeof() usage
clk: versatile: Delete error messages for failed memory allocations
clk: ux500: Improve sizeof() usage
clk: ux500: Delete error messages for failed memory allocations
clk: spear: Delete error messages for failed memory allocations
clk: ti: Delete error messages for failed memory allocations
clk: mmp: Adjust checks for NULL pointers
...
16 Nov, 2017
1 commit
-
* clk-cleanup:
clk: kona-setup: Delete error messages for failed memory allocations
ARC: clk: fix spelling mistake: "configurarion" -> "configuration"
clk: cdce925: remove redundant check for non-null parent_name
clk: versatile: Improve sizeof() usage
clk: versatile: Delete error messages for failed memory allocations
clk: ux500: Improve sizeof() usage
clk: ux500: Delete error messages for failed memory allocations
clk: spear: Delete error messages for failed memory allocations
clk: ti: Delete error messages for failed memory allocations
clk: mmp: Adjust checks for NULL pointers
clk: mmp: Use common error handling code in mmp_clk_register_mix()
clk: mmp: Delete error messages for failed memory allocations
clk: clk-xgene: Adjust six checks for null pointers
clk: clk-xgene: Delete error messages for failed memory allocations
clk: clk-u300: Fix a typo in two comment lines
clk: clk-u300: Add some spaces for better code readability
clk: clk-u300: Improve sizeof() usage
clk: clk-u300: Delete error messages for failed memory allocations
clk: clk-mux: Improve a size determination in clk_hw_register_mux_table()
clk: clk-mux: Delete an error message for a failed memory allocation
14 Nov, 2017
1 commit
-
Omit extra messages for a memory allocation failure in these
functions.This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
02 Nov, 2017
4 commits
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman -
Make these const as they are only stored in the const field of a
clk_init_data structure.Signed-off-by: Bhumika Goyal
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd -
Make these const as they are either stored in the masks 'const' field
of a clk_aux structure or passed to the function clk_register_aux
having the argument as const.Signed-off-by: Bhumika Goyal
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd -
Make the masks field of clk_aux structure const as it do not modify the
fields of the aux_clk_masks structure it points to.Make the struct aux_clk_masks *aux argument of the function
clk_register_aux as const as the argument is only stored in the masks
field of a clk_aux structure which is now made const.Signed-off-by: Bhumika Goyal
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
20 Apr, 2017
1 commit
-
There is no SPEAr600 device named "adc". Instead, the description of the
ADC was recently added to the Device Tree, and the device name is
"d820b000.adc", so we should associate the ADC gatable clock to this
device name.Signed-off-by: Thomas Petazzoni
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
03 Mar, 2016
1 commit
-
This flag is a no-op now. Remove usage of the flag.
Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
01 Sep, 2015
1 commit
-
Pull clk updates from Michael Turquette:
"The clk framework changes for 4.3 are mostly updates to existing
drivers and the addition of new clock drivers. Stephen Boyd has also
done a lot of subsystem-wide driver clean-ups (thanks!). There are
also fixes to the framework core and changes to better split clock
provider drivers from clock consumer drivers"* tag 'clk-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (227 commits)
clk: s5pv210: add missing call to samsung_clk_of_add_provider()
clk: pistachio: correct critical clock list
clk: pistachio: Fix PLL rate calculation in integer mode
clk: pistachio: Fix override of clk-pll settings from boot loader
clk: pistachio: Fix 32bit integer overflows
clk: tegra: Fix some static checker problems
clk: qcom: Fix MSM8916 prng clock enable bit
clk: Add missing header for 'bool' definition to clk-conf.h
drivers/clk: appropriate __init annotation for const data
clk: rockchip: register pll mux before pll itself
clk: add bindings for the Ux500 clocks
clk/ARM: move Ux500 PRCC bases to the device tree
clk: remove duplicated code with __clk_set_parent_after
clk: Convert __clk_get_name(hw->clk) to clk_hw_get_name(hw)
clk: Constify clk_hw argument to provider APIs
clk: Hi6220: add stub clock driver
dt-bindings: clk: Hi6220: Document stub clock driver
dt-bindings: arm: Hi6220: add doc for SRAM controller
clk: atlas7: fix pll missed divide NR in fraction mode
clk: atlas7: fix bit field and its root clk for coresight_tpiu
...
25 Aug, 2015
1 commit
-
We're removing struct clk from the clk provider API, so switch
this code to using the clk_hw based provider APIs.Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
21 Jul, 2015
1 commit
-
Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.Acked-by: Viresh Kumar
Signed-off-by: Stephen Boyd
18 Jul, 2015
1 commit
-
Switch to my kernel.org alias instead of a badly named gmail address,
which I rarely use.Signed-off-by: Viresh Kumar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Jul, 2014
3 commits
-
The uarts only work when the parent is ras_ahb_clk. The stale 3.5
based ST tree does this in the board file.Add it to the clk init function. Not pretty, but the mess there is
amazing anyway.Signed-off-by: Thomas Gleixner
Acked-by: Viresh Kumar
Signed-off-by: Mike Turquette -
The control register is at offset 0x10, not 0x0. This is wreckaged
since commit 5df33a62c (SPEAr: Switch to common clock framework).Signed-off-by: Thomas Gleixner
Cc: stable@vger.kernel.org
Acked-by: Viresh Kumar
Signed-off-by: Mike Turquette
11 Jul, 2014
1 commit
-
Follow dt clock naming convention for PCIe clocks.
Signed-off-by: Pratyush Anand
Acked-by: Viresh Kumar
[viresh: fixed logs/cclist]
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette
20 Dec, 2013
1 commit
-
clk_frac_ops is local to this file. Make it static.
Signed-off-by: Sachin Kamat
Acked-by: Viresh Kumar
Signed-off-by: Mike Turquette
20 Aug, 2013
1 commit
-
Add a CLK_SET_RATE_NO_REPARENT clock flag, which will prevent muxes
being reparented during clk_set_rate.To avoid breaking existing platforms, all callers of clk_register_mux()
are adjusted to pass the new flag. Platform maintainers are encouraged
to remove the flag if they wish to allow mux reparenting on set_rate.Signed-off-by: James Hogan
Reviewed-by: Stephen Boyd
Cc: Mike Turquette
Cc: Russell King
Cc: Sascha Hauer
Cc: Stephen Warren
Cc: Viresh Kumar
Cc: Kukjin Kim
Cc: Haojian Zhuang
Cc: Chao Xie
Cc: Arnd Bergmann
Cc: "Emilio López"
Cc: Gregory CLEMENT
Cc: Maxime Ripard
Cc: Prashant Gaikwad
Cc: Thierry Reding
Cc: Peter De Schrijver
Cc: Pawel Moll
Cc: Catalin Marinas
Cc: Andrew Chew
Cc: Doug Anderson
Cc: Heiko Stuebner
Cc: Paul Walmsley
Cc: Sylwester Nawrocki
Cc: Thomas Abraham
Cc: Tomasz Figa
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: spear-devel@list.st.com
Cc: linux-tegra@vger.kernel.org
Tested-by: Haojian Zhuang
Acked-by: Stephen Warren [tegra]
Acked-by: Maxime Ripard [sunxi]
Acked-by: Sören Brinkmann [Zynq]
Signed-off-by: Mike Turquette
12 Jun, 2013
1 commit
-
This patch is required to be able to disable spear320 support
after the spear320_clk_init() prototype changed for the real
function but not for the dummy.Signed-off-by: Arnd Bergmann
Acked-by: Viresh Kumar
Signed-off-by: Mike Turquette
03 May, 2013
1 commit
-
Pull ARM SoC multiplatform updates from Olof Johansson:
"More multiplatform enablement for ARM platforms. The ones converted
in this branch are:- bcm2835
- cns3xxx
- sirf
- nomadik
- msx
- spear
- tegra
- ux500We're getting close to having most of them converted!
One of the larger platforms remaining is Samsung Exynos, and there are
a bunch of supporting patches in this merge window for it. There was
a patch in this branch to a early version of multiplatform conversion,
but it ended up being reverted due to need of more bake time. The
revert commit is part of the branch since it would have required
rebasing multiple dependent branches and they were stable by then"* tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits)
mmc: sdhci-s3c: Fix operation on non-single image Samsung platforms
clocksource: nomadik-mtu: fix up clocksource/timer
Revert "ARM: exynos: enable multiplatform support"
ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ"
ARM: exynos: enable multiplatform support
rtc: s3c: make header file local
mtd: onenand/samsung: make regs-onenand.h file local
thermal/exynos: remove unnecessary header inclusions
mmc: sdhci-s3c: remove platform dependencies
ARM: samsung: move mfc device definition to s5p-dev-mfc.c
ARM: exynos: move debug-macro.S to include/debug/
ARM: exynos: prepare for sparse IRQ
ARM: exynos: introduce EXYNOS_ATAGS symbol
ARM: tegra: build assembly files with -march=armv7-a
ARM: Push selects for TWD/SCU into machine entries
ARM: ux500: build hotplug.o for ARMv7-a
ARM: ux500: move to multiplatform
ARM: ux500: make remaining headers local
ARM: ux500: make irqs.h local to platform
ARM: ux500: get rid of
...
22 Mar, 2013
1 commit
-
This patch corrects wrongly configured parent clock for following
devices:* Video enc/decoder
* Video ip
* Pin control
* ACP
* camxSigned-off-by: Vipul Kumar Samar
Reviewed-by: Shiraz Hashim
Acked-by: Viresh Kumar
Signed-off-by: Mike Turquette
13 Mar, 2013
1 commit
-
Device drivers should not access MMIO registers through hardcoded
platform specific address constants. Instead, we can pass the
MMIO token to the spear clock driver in the initialization routine
to contain that knowledge in the platform code itself.Ideally, the clock driver would use of_iomap() or similar to
get the address, and that can be used later, but for now, this
is the minimal change.Signed-off-by: Arnd Bergmann
Acked-by: Viresh Kumar
15 Dec, 2012
1 commit
-
Pull ARM SoC device-tree updates, take 2, from Olof Johansson:
"This branch contains device-tree updates for the SPEAr platform. They
had dependencies on earlier branches from this merge window, which is
why they were broken out in a separate branch."* tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: SPEAr3xx: Shirq: Move shirq controller out of plat/
ARM: SPEAr320: DT: Add SPEAr 320 HMI board support
ARM: SPEAr3xx: DT: add shirq node for interrupt multiplexor
ARM: SPEAr3xx: shirq: simplify and move the shared irq multiplexor to DT
ARM: SPEAr1310: Fix AUXDATA for compact flash controller
ARM: SPEAr13xx: Remove fields not required for ssp controller
ARM: SPEAr1310: Move 1310 specific misc register into machine specific files
ARM: SPEAr: DT: Update device nodes
ARM: SPEAr: DT: add uart state to fix warning
ARM: SPEAr: DT: Modify DT bindings for STMMAC
ARM: SPEAr: DT: Fix existing DT support
ARM: SPEAr: DT: Update partition info for MTD devices
ARM: SPEAr: DT: Update pinctrl list
ARM: SPEAr13xx: DT: Add spics gpio controller nodes
26 Nov, 2012
1 commit
-
This patch moves some global macro definitions to the files where they are used.
Its a step towards removing spear.h completely later on.Signed-off-by: Vipul Kumar Samar
Signed-off-by: Viresh Kumar
22 Nov, 2012
8 commits
-
Dummy clocks were added for ARM platforms, so that clk_get() for interface clk
doesn't fail for amba devices from amba_probe(). Because there is no amba device
for SPEAr that doesn't have a valid clock with dev_id for SPEAr, we don't need
these dummy clocks. Hence, remove them.Signed-off-by: Vipul Kumar Samar
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette -
The patch corrects the case when the rate table is being scanned for a
given frequency, and the search frequency is beyond the maximum
frequency indexed in the table.By default, the system should be set at max frequency present in the
rate table. This patch correctly returns the corresponding index value.Signed-off-by: Deepak Sikri
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette -
This patch updates the existing rate tables with new frequencies.
Signed-off-by: Deepak Sikri
Signed-off-by: Vipul Kumar Samar
Signed-off-by: Rajeev Kumar
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette -
This patch adds missing clocks: twd and macb.
Signed-off-by: Vipul Kumar Samar
Signed-off-by: Deepak Sikri
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette -
Flag CLK_SET_RATE_PARENT is required for a clock, where we want to
propagate clk_set_rate to its parent. This patch adds this to multiple clocks.Signed-off-by: Vipul Kumar Samar
Signed-off-by: Shiraz Hashim
Signed-off-by: Rajeev Kumar
Signed-off-by: Vijay Kumar Mishra
Signed-off-by: Vijay Kumar Mishra
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette -
This patch fixes parent names of multiple clocks.
Signed-off-by: Shiraz Hashim
Signed-off-by: Vipul Kumar Samar
Signed-off-by: Rajeev Kumar
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette -
This patch updates mux clock names of multiple clocks. It updates _clk with
_mclk to make it more readable.Signed-off-by: Shiraz Hashim
Signed-off-by: Rajeev Kumar
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette -
dev_id & con_id names of multiple clocks are incorrect. This patch fixes these
names with the names that come via DT.Signed-off-by: Rajeev Kumar
Signed-off-by: Shiraz Hashim
Signed-off-by: Bhavna Yadav
Signed-off-by: Vipul Kumar Samar
Signed-off-by: Deepak Sikri
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette
16 Nov, 2012
1 commit
-
This fixes compile error if one of SPEAr3xx implementations is not selected.
CC drivers/clk/spear/spear3xx_clock.o
drivers/clk/spear/spear3xx_clock.c: In function 'spear3xx_clk_init':
drivers/clk/spear/spear3xx_clock.c:599:3: error: implicit declaration of function 'spear300_clk_init' [-Werror=implicit-function-declaration]
drivers/clk/spear/spear3xx_clock.c:601:3: error: implicit declaration of function 'spear310_clk_init' [-Werror=implicit-function-declaration]
drivers/clk/spear/spear3xx_clock.c:603:3: error: implicit declaration of function 'spear320_clk_init' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/clk/spear/spear3xx_clock.o] Error 1
make[2]: *** [drivers/clk/spear] Error 2
make[1]: *** [drivers/clk] Error 2
make: *** [drivers] Error 2Signed-off-by: Axel Lin
Acked-by: Viresh Kumar
Signed-off-by: Mike Turquette
30 Oct, 2012
1 commit
-
Currently we are getting following warning for SPEAr clk-vco-pll.
"warning: i is used uninitialized in this function."
This is because we are getting value of i by passing its pointer to another
routine.The variables here are really not used uninitialized.
Signed-off-by: Viresh Kumar
Signed-off-by: Mike Turquette