- 13 4月, 2013 2 次提交
-
-
由 Sebastian Hesselbarth 提交于
This patch adds a common clock driver for Silicon Labs Si5351a/b/c i2c programmable clock generators. Currently, the driver does not support VXCO feature of si5351b. Passing platform_data or DT bindings selectively allows to overwrite stored Si5351 configuration which is very helpful for clock generators with empty eeprom configuration. Corresponding device tree binding documentation is also added. Signed-off-by: NSebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: NDaniel Mack <zonque@gmail.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Tested-by: NMichal Bachraty <michal.bachraty@streamunlimited.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Gregory CLEMENT 提交于
Add support for DT "fixed-factor-clock" binding to the common fixed factor clock support. Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Tested-by: NChristian Ruppert <christian.ruppert@abilis.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
- 11 4月, 2013 3 次提交
-
-
由 Soren Brinkmann 提交于
Notifiers may return NOTIFY_(OK|DONE|STOP|BAD). The CCF uses an inconsistent mix of checking against NOTIFY_STOP or NOTIFY_BAD. This inconsistency leaves errors undetected in some cases: clk_set_parent() calls __clk_speculate_rates(), which stops when it hits a NOTIFIER_BAD (STOP is ignored), and passes this value back to the caller. clk_set_parent() compares this return value against NOTIFY_STOP only, ignoring NOTIFY_BAD returns. Use NOTIFY_STOP_MASK to detect a negative notifier return value and document all four return value options. Signed-off-by: NSoren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Ulf Hansson 提交于
The patch setups the first version of the clock tree for ab850x, which is used by u8500 platforms. Mainly sysctrl clocks are used. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NFabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Ulf Hansson 提交于
The abx500 sysctrl clocks are using the ab8500 sysctrl driver to modify the clock hardware. Sysctrl clocks are represented by a ab8500 sysctrl register and with a corresponding bitmask. The sysctrl clocks are slow path clocks, which means clk_prepare and clk_unprepare will be used to gate|ungate these clocks. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
- 09 4月, 2013 4 次提交
-
-
由 Axel Lin 提交于
cpu_freq_select is used as array subscript, thus the valid value range is 0 ... ARRAY_SIZE() - 1. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMike Turquette <mturquette@linaro.org> [mturquette@linaro.org: fixed up trivial merge issues]
-
由 Ulf Hansson 提交于
Updating the clock tree topology must be protected with the spinlock when doing clk_set_parent, otherwise we can not handle the migration of the enable_count in a safe manner. While issuing the .set_parent callback to make the clk-hw perform the switch to the new parent, we can not hold the spinlock since it is must be allowed to be slow path. This complicates error handling, but is still possible to achieve. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Ulf Hansson 提交于
Fixup the broken feature of allowing reparent of a clk to the orhpan list and vice verse. When operating on a single-parent clk, the .set_parent callback for the clk hw is optional to implement, but for a multi-parent clk it is mandatory. Moreover improve the errorhandling by verifying the prerequisites before triggering clk notifiers. This will prevent unnecessary rollback with ABORT_RATE_CHANGE. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Ulf Hansson 提交于
Split __clk_reparent into three pieces, one for doing the actual reparent for updating the clock tree topology, one for the COMMON_CLK_DEBUG code and one for doing the rate recalculation. This patch also makes it possible to hold the spinlock over the update of the clock tree topology, which could not be done before when both debugfs updates and clock rate updates was done within the same function. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
- 05 4月, 2013 3 次提交
-
-
由 Emilio López 提交于
clk_register will copy this information, so we can just use a normal array and do one less dynamic allocation. Signed-off-by: NEmilio López <emilio@elopez.com.ar> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Emilio López 提交于
This flag was in place to prevent important clocks from getting gated while they had no users. Now that the UART driver supports clocks properly, we can drop this. Signed-off-by: NEmilio López <emilio@elopez.com.ar> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Emilio López 提交于
This patchset adds DT support for all the AXI, AHB, APB0 and APB1 gates present on sunxi SoCs. Signed-off-by: NEmilio López <emilio@elopez.com.ar> Reviewed-by: NGregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
- 04 4月, 2013 2 次提交
-
-
由 Soren Brinkmann 提交于
Dividers which have CLK_DIVIDER_ONE_BASED set have a redundant state, being a divider value of zero. Some hardware implementations allow a zero divider which simply doesn't alter the frequency. I.e. it acts like a divide by one or bypassing the divider. This flag is used to handle such HW in the clk-divider model. Signed-off-by: NSoren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Jean-Francois Moine 提交于
The use common of_clk_init() function simplifies the clock initialization and adds handling of the DT "fixed-clock". Signed-off-by: NJean-Francois Moine <moinejf@free.fr> Signed-off-by: NMike Turquette <mturquette@linaro.org> [mturquette@linaro.org: fixed $SUBJECT to reflect correct file path]
-
- 03 4月, 2013 2 次提交
-
-
由 Mike Turquette 提交于
Reentrancy into the clock framework is necessary for clock operations that result in nested calls to the clk api. A common example is a clock that is prepared via an i2c transaction, such as a clock inside of a discrete audio chip or a power management IC. The i2c subsystem itself will use the clk api resulting in a deadlock: clk_prepare(audio_clk) i2c_transfer(..) clk_prepare(i2c_controller_clk) The ability to reenter the clock framework prevents this deadlock. Other use cases exist such as allowing .set_rate callbacks to call clk_set_parent to achieve the best rate, or to save power in certain configurations. Yet another example is performing pinctrl operations from a clk_ops callback. Calls into the pinctrl subsystem may call clk_{un}prepare on an unrelated clock. Allowing for nested calls to reenter the clock framework enables both of these use cases. Reentrancy is implemented by two global pointers that track the owner currently holding a global lock. One pointer tracks the owner during sleepable, mutex-protected operations and the other one tracks the owner during non-interruptible, spinlock-protected operations. When the clk framework is entered we try to hold the global lock. If it is held we compare the current task against the current owner; a match implies a nested call and we reenter. If the values do not match then we block on the lock until it is released. Signed-off-by: NMike Turquette <mturquette@linaro.org> Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Cc: David Brown <davidb@codeaurora.org> Tested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Mike Turquette 提交于
Create locking helpers for the global mutex and global spinlock. The definitions of these helpers will be expanded upon in the next patch which introduces reentrancy into the locking scheme. Signed-off-by: NMike Turquette <mturquette@linaro.org> Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org> Cc: David Brown <davidb@codeaurora.org> Tested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 27 3月, 2013 5 次提交
-
-
由 Michal Simek 提交于
Include zynq clk header where init function is declared. It removes this sparse warning: drivers/clk/clk-zynq.c:373:13: warning: symbol 'xilinx_zynq_clocks_init' was not declared. Should it be static? Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Emilio López 提交于
During the introduction of the Allwinner SoC platforms, sunxi was initially meant as a generic name for all the variants of the Allwinner SoC. It was ok at the time of the support of only the A10 and A13 that look pretty much the same; but it's beginning to be troublesome with the future addition of the Allwinner A31 (sun6i) that is quite different, and would introduce some weird logic, where sunxi would actually mean in some case sun4i and sun5i but without sun6i... Moreover, it makes the compatible strings naming scheme not consistent with other architectures, where usually for this kind of compability, we just use the oldest SoC name that has this IP, so let's do just this. Signed-off-by: NEmilio López <emilio@elopez.com.ar> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Emilio López 提交于
This commit implements the base CPU clocks for sunxi devices. It has been tested using a slightly modified cpufreq driver from the linux-sunxi 3.0 tree. Additionally, document the new bindings introduced by this patch. Idling: / # cat /sys/kernel/debug/clk/clk_summary clock enable_cnt prepare_cnt rate --------------------------------------------------------------------- osc32k 0 0 32768 osc24M_fixed 0 0 24000000 osc24M 0 0 24000000 apb1_mux 0 0 24000000 apb1 0 0 24000000 pll1 0 0 60000000 cpu 0 0 60000000 axi 0 0 60000000 ahb 0 0 60000000 apb0 0 0 30000000 dummy 0 0 0 After "yes >/dev/null &": / # cat /sys/kernel/debug/clk/clk_summary clock enable_cnt prepare_cnt rate --------------------------------------------------------------------- osc32k 0 0 32768 osc24M_fixed 0 0 24000000 osc24M 0 0 24000000 apb1_mux 0 0 24000000 apb1 0 0 24000000 pll1 0 0 1008000000 cpu 0 0 1008000000 axi 0 0 336000000 ahb 0 0 168000000 apb0 0 0 84000000 dummy 0 0 0 Signed-off-by: NEmilio López <emilio@elopez.com.ar> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Maxime Coquelin 提交于
In clk_reg_prcmu(), clk->hw.init field is assigned with a reference local to clk_reg_prcmu() function. This patch replaces references to clk->hw.init with calls to __clk_get_name when called after clock registration. This patch applies on top of v3.9-rc4. Signed-off-by: NMaxime Coquelin <maxime.coquelin@st.com> Acked-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org> [mturquette@linaro.org: resolved trivial merge issues]
-
由 Prashant Gaikwad 提交于
Not all clocks are required to be decomposed into basic clock types but at the same time want to use the functionality provided by these basic clock types instead of duplicating. For example, Tegra SoC has ~100 clocks which can be decomposed into Mux -> Div -> Gate clock types making the clock count to ~300. Also, parent change operation can not be performed on gate clock which forces to use mux clock in driver if want to change the parent. Instead aggregate the basic clock types functionality into one clock and just use this clock for all operations. This clock type re-uses the functionality of basic clock types and not limited to basic clock types but any hardware-specific implementation. Signed-off-by: NPrashant Gaikwad <pgaikwad@nvidia.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
- 23 3月, 2013 3 次提交
-
-
由 Peter De Schrijver 提交于
Add a table lookup feature to the mux clock. Also allow arbitrary masks instead of the width. This will be used by some clocks on Tegra114. Also adapt the tegra periph clk because it uses struct clk_mux directly. Signed-off-by: NPeter De Schrijver <pdeschrijver@nvidia.com> Tested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Sachin Kamat 提交于
Return type of function clk_propagate_rate_change is a pointer. But 0 was being returned. Change it to NULL. Silences the following warning: drivers/clk/clk.c:977:24: warning: Using plain integer as NULL pointer Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Reviewed-by: NPankaj Jangra <jangra.pankaj9@gmail.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Wei Yongjun 提交于
In case of error, the function clk_get() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: NBarry Song <21cnbao@gmail.com> Signed-off-by: NMike Turquette <mturquette@linaro.org> [mturquette@linaro.org: added missing parenthesis to fix compile break]
-
- 22 3月, 2013 1 次提交
-
-
由 Vipul Kumar Samar 提交于
This patch corrects wrongly configured parent clock for following devices: * Video enc/decoder * Video ip * Pin control * ACP * camx Signed-off-by: NVipul Kumar Samar <vipulkumar.samar@st.com> Reviewed-by: NShiraz Hashim <shiraz.hashim@st.com> Acked-by: NViresh Kumar <viresh.kumar@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
- 20 3月, 2013 6 次提交
-
-
由 Lars-Peter Clausen 提交于
This driver adds support for the AXI clkgen pcore to the common clock framework. The AXI clkgen pcore is a AXI front-end to the MMCM_ADV frequency synthesizer commonly found in Xilinx FPGAs. The AXI clkgen pcore is used in Analog Devices' reference designs targeting Xilinx FPGAs. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Ulf Hansson 提交于
To be able to gate unused prcmu clocks from the clk_disable_unused sequence, clk-prcmu now implements the is_prepared callback. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Ulf Hansson 提交于
An unprepare_unused callback is introduced due to the same reasons to why the disable_unused callback was added. During the clk_disable_unused sequence, those clk_hw that needs specific treatment with regards to being unprepared, shall implement the unprepare_unused callback. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Ulf Hansson 提交于
The unused ungated fast clocks are already being disabled from clk_disable_unused at late init. This patch extend this sequence to the slow unused prepared clocks to be unprepared. Unless the optional .is_prepared callback is implemented by a clk_hw the clk_disable_unused sequence will not unprepare any unused clocks, since it will fall back to use the software prepare counter. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org> [mturquette@linaro.org: fixed hlist accessors per b67bfe0d]
-
由 Ulf Hansson 提交于
To reflect whether a clk_hw is prepared the clk_hw may implement the optional is_prepared callback. If not implemented we fall back to use the software prepare counter. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
由 Fabio Estevam 提交于
Fix the following sparse warnings: drivers/clk/mxs/clk.c:17:1: warning: symbol 'mxs_lock' was not declared. Should it be static? drivers/clk/mxs/clk.c:19:5: warning: symbol 'mxs_clk_wait' was not declared. Should it be static? Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NMike Turquette <mturquette@linaro.org>
-
- 15 3月, 2013 2 次提交
-
-
由 Arnd Bergmann 提交于
4740f73f "mfd: remove use of __devexit" removed the __devexit annotation on the twl4030_madc_remove function, but left an __exit_p() present on the pointer to this function. Using __exit_p was as wrong with the devexit in place as it is now, but now we get a gcc warning about an unused function. In order for the twl4030_madc_remove to work correctly in built-in code, we have to remove the __exit_p. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
-
由 Guenter Roeck 提交于
On LTC2978, only READ_TEMPERATURE is supported. It reports the internal junction temperature. This register is unpaged. On LTC3880, READ_TEMPERATURE and READ_TEMPERATURE2 are supported. READ_TEMPERATURE is paged and reports external temperatures. READ_TEMPERATURE2 is unpaged and reports the internal junction temperature. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Cc: stable@vger.kernel.org # 3.2+ Acked-by: NJean Delvare <khali@linux-fr.org>
-
- 14 3月, 2013 6 次提交
-
-
由 David Woodhouse 提交于
If krealloc() returns NULL, it *doesn't* free the original. So any code of the form 'foo = krealloc(foo, …);' is almost certainly a bug. Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Axel Lin 提交于
Signed-off-by: NAxel Lin <axel.lin@ingics.com> Cc: stable@vger.kernel.org Acked-by: NJean Delvare <khali@linux-fr.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Tejun Heo 提交于
idr_get_new*() and friends are about to be deprecated. Convert to the new idr_alloc() interface. There are some peculiarities and possible bugs in the converted functions. This patch preserves those. * drv_insert_node_res_element() returns -ENOMEM on alloc failure, -EFAULT if id space is exhausted. -EFAULT is at best misleading. * drv_proc_insert_strm_res_element() is even weirder. It returns -EFAULT if kzalloc() fails, -ENOMEM if idr preloading fails and -EPERM if id space is exhausted. What's going on here? * drv_proc_insert_strm_res_element() doesn't free *pstrm_res after failure. Only compile tested. Signed-off-by: NTejun Heo <tj@kernel.org> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Cc: Rene Sapiens <rene.sapiens@ti.com> Cc: Armando Uribe <x0095078@ti.com> Cc: Omar Ramirez Luna <omar.ramirez@ti.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Tejun Heo 提交于
idr_get_new*() and friends are about to be deprecated. Convert to the new idr_alloc() interface. Only compile tested. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Dan Magenheimer <dan.magenheimer@oracle.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Tejun Heo 提交于
Commit 6a920060 ("IB/mlx4: convert to idr_alloc()") forgot to remove idr_pre_get() call in mlx4_ib_cm_paravirt_init(). It's unnecessary and idr_pre_get() will soon be deprecated. Remove it. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: Jack Morgenstein <jackm@dev.mellanox.co.il> Cc: Or Gerlitz <ogerlitz@mellanox.com> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Bill Pemberton 提交于
The commit 2e124b4a removed the checks that prevented qt2_process_read_urb() from trying to put chars into ttys that weren't actually opened. This resulted in 'tty is NULL' warnings from flush_to_ldisc() when the device was used. The devices use just one read urb for all ports. As a result qt2_process_read_urb() may be called with the current port set to a port number that has not been opened. Add a check if the port is open before calling tty_flip_buffer_push(). Signed-off-by: NBill Pemberton <wfp5p@virginia.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 13 3月, 2013 1 次提交
-
-
由 Dan Williams 提交于
Turns out we just need altsetting 1 and then we can talk to it. Signed-off-by: NDan Williams <dcbw@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-