Commit Graph

44 Commits

Author SHA1 Message Date
Pushkar Joshi 42ea0a7031 clk: qcom: clock-local2: Add clk_set_parent for RCGs
Some clients need to explicitly specify the source to be
used for a RCG. Provide an interface to do the same.

Change-Id: I49486af8bcf084d2abb6b5448cd393979fd6b7a7
Signed-off-by: Pushkar Joshi <pushkarj@codeaurora.org>
2015-05-05 16:49:01 -07:00
Vikram Mulukutla 395254b2bc msm: clock-generic: Add a flag to ignore odd divider values
Some hardware implementations do not support odd
divider values. Add a flag to ignore those divider
values.

Change-Id: Iccc2fae8feb4caf80a50da2924efdd14fdf3561c
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2015-01-28 16:55:53 -08:00
Vikram Mulukutla 2d4effef88 clk: qcom: Introduce rate change notifiers
The common clock framework generates notifications
to interested drivers/module in the kernel about rate
changes on a specific clock. Implement the same notification
code in the drivers/clk/qcom/clock.c

Change-Id: I198b3d1967c76f6dc988b8e0713953a619bacec4
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2014-11-20 09:59:23 +05:30
Vikram Mulukutla 01e0be456f clk: qcom: clock-generic: Add a field that indicates a low power source
Implementations may want to differentiate between the
safe source that is used when switching frequencies and
the one used when switching to low power modes. Add a field
to provide this flexibility and alleviating the need for
implementation specific ops.

Change-Id: Icd9ac9d11f0e39a06fe0f70531b3576e888afb2d
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2014-10-31 08:46:35 -07:00
Junjie Wu 7af7e4b29c clk: qcom: Add use_max_uV support for vdd_class
Multiple vdd_class might share same set of regulators. If fmax for
different vdd_class don't have same max level vote, there
could be a conflict when setting voltage on the regulator.

Add a flag use_max_uV to vote INT_MAX as max_uV when calling
regulator_set_voltage(). Constraints in regulator driver makes sure
final voltage meets the requirement of that regulator's
operational range.

Change-Id: I9361510ac31e1c9a46bbb02ddcd25639591e28a2
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2014-10-16 15:05:56 -07:00
Deepak Katragadda 1922db8421 qcom: clock-generic: Allow mux source switching without using safe parent
There are muxes that allow for changing sources without
having to use the intermediate safe parent. Add support
for the same.

CRs-Fixed: 690648
Change-Id: If0ffafaadeb9c5fc5647741e1e25e70d6ed8d40f
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2014-09-22 11:45:24 -07:00
Vikram Mulukutla 2ee4021c2f qcom: clock-generic: Check if a parent is already at a requested rate
If it is guaranteed that taking the prepare lock of a
clock ensures that the rate of downstream sources cannot
change, a mux between that clock and those downstream sources
can safely check the rate of those sources using clk_get_rate
and use clk_round_rate to request new rates.

Sometimes, the first source on a mux may be able to support a
requested rate, but a subsequent source may already be at that
rate. Use clk_get_rate instead of clk_round_rate to find the
latter source instead of reprogramming the former.

Change-Id: I950a04e005c413559b392d847ef3dff4f7d61ef5
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2014-09-19 14:15:50 -07:00
Junjie Wu c769ee0779 clock-generic: Expose parent_set_rate for code reuse
Pass clk_set_rate() onto parent is a behavior that some clk_ops
might want besides external clock types. Expose it for better
code reuse.

Change-Id: Iae4d20fc23003f14f19b4a93ec598096ef088967
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2014-08-19 19:05:23 -07:00
Linux Build Service Account 7179622c3d Merge "qcom: clock: Allow VDD handoff to be optional" 2014-07-30 16:53:10 -07:00
Vikram Mulukutla c5be8b7493 qcom: clock: Allow VDD handoff to be optional
Some dedicated power rails do not require a max
voltage vote during bootup, as the rail is completely
under Linux control and is not touched by the bootchain.
Allow clock drivers to skip handoff for the corresponding
VDD classes.

Change-Id: Ia7a7284bea6d10b1785b6710b22ff73b8a0bb23e
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2014-07-28 15:06:41 -07:00
Patrick Daly ad3894ea5c qcom: clock: Allow setting initial rates during handoff
The qti clock driver not only provides the implementation for the
various clock types, but also may behave as a client under certain
circumstances.
1) Some shared sytem clocks are configured to fixed rates after boot
2) Some clocks necessary for system operation are enabled
3) For historical reasons, the rates of some clocks are initialized
on behalf of other drivers.

Change-Id: I1d7247d3e40aa7d833a633b620ed2f6348964b91
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-07-22 19:02:03 -07:00
Patrick Daly 97b871ad23 qcom: clock-generic: Handle null pointer dereferences on error path
Check whether the clock pointer is null before accessing its name.

Change-Id: Iea22ecdd6f0fbc98837f0e6c3a9b210a00629bad
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-06-11 21:47:52 -07:00
Vikram Mulukutla ab4a7bcf1a qcom: clock-generic: Introduce a "safe" divider value
Some clock tree implementations have a mux that needs
to be switched to a safe source before reprogramming
an upstream source. A downstream divider would also
have to switch to a "safe" divider value to allow for
that safe frequency to be generated.

Change-Id: Id1892501e97cac77e6d89bef7fcd44f2944027a8
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2014-05-09 15:49:11 -07:00
Vikram Mulukutla 45500ac8ae qcom: clock-generic: Optionally set a safe freq on the safe parent
Some mux implementations may have safe parents that are
muxes themselves, and only one of the mux inputs is
actually considered "safe". To allow the selection of
this "safe" input, set a frequency on the safe parent
before switching to it.

Change-Id: I7007eb3ffd444ba38696d36564fef9c04a624da2
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2014-05-08 20:22:09 -07:00
Patrick Daly d9ba36b81b qcom: clk: Support deferred clock initialization
Clocks may depend on other clocks which are not registered yet. Handle
the error code -EPROBE_DEFER during clock initialization by placing
the offender on a clock orphan list, which will redo clock
initialization when another clock is registered successfully. Client
drivers may not obtain references to clocks on the orphan list.

Change-Id: I1a12feebe003884b775381d881e434bc9376f693
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-04-29 17:59:41 -07:00
Patrick Daly 3de561738b clk: qcom: Add parent list to clock structure
Give all clocks the concept of having multiple parents, although
only one parent may be chosen at a time.

Change-Id: I084860b77aca5fb57929dcded59a85ab89bfd121
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-04-29 17:59:40 -07:00
Patrick Daly b51de7806b qcom: clk: Dynamically retrieve parent for ext clocks
Lookup the parent clock for this clock type on the fly, rather than at
compile time.

Change-Id: I6ca30f9c410979f5cec31629d249343744e8427c
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-04-29 17:59:39 -07:00
Patrick Daly e2d3420062 qcom: clock: Use clock lists instead of clock arrays
Add a list node field to the generic clock struct. This simplifies the
code in clock-debug.c and clock.c, and also provides a list field that
can be used in the future for maintaining the orphan list.

Change-Id: I5422c3ff129e31a043f2607c78d04da6e5b276ed
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-04-29 17:59:36 -07:00
Patrick Daly 6352ac5966 clk: clock-debug: Remove deprecated clk_get_sys call
Use a flag to achieve the same behavior. Modify existing targets
to use this flag.

Change-Id: I7b23d62d76f23482c1b2d4da69fe2a1a5366d125
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-04-24 12:09:46 -07:00
Patrick Daly ff100eb7a9 clk: qcom: Remove mux flag
If a mux has on/off capability, always write to the en_offset register
instead of optionally writing to the offset register if a flag is set.
This reduces code complexity.

Change-Id: Ia0ea975403407c716131679d2e94e5bf33b85749
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2014-04-22 15:38:58 -07:00
Junjie Wu 6ef200f603 clock-generic: Use separate list for recursively setting parents
Previous implementation of recursive set parent iterates through all
clocks in mux source list, trying to find the correct parent. This is not
desirable because we only want to recurse on a subset of mux sources.

Split mux source list into parents and rec_parents. Only for sources in
rec_parents, mux_set_parent() will try to recursively search their parent.

Change-Id: I041ac4018105db3459b2135446b948706ead3cae
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2014-04-07 12:56:39 -07:00
Junjie Wu c2e0a8acec clock-generic: Export some ext_clk functions for code reuse
Asking parent to provide rate can be useful beyond ext_clk types. Export
them to clock-generic header to enable more code reuse.

Change-Id: I8a20d1cdd3c15838218a355913a33109eeac7df5
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2014-03-03 19:30:01 -08:00
Xiaogang Cui c7203676c4 msm: clock-generic: Add list reg support to generic clock types
Add list reg support to generic clock types which have their
own *_clk_ops.

Change-Id: I6bd5cf8f51f0ba160ca1401d03de663e6f3983c3
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
2014-02-10 11:06:21 +08:00
Xiaogang Cui 3998d1f400 msm: clock-generic: Add half-integer divider support to mux-div clk
Add half-integer divider support. All the min/max_div have
been doubled if it supports half-integer divider. It means we can
divide by 2, 2.5, 3, 3.5, etc.

Change-Id: Id6a39e75387cf2ce601ed9889420b8da5ee85dfa
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
2014-02-07 09:38:28 +08:00
Junjie Wu 71f1590946 msm: clock: Move fixed_clk to clock-generic header
fixed_clk is a simple wrapper for struct clk. It should be in
clock-generic header instead of clock-local2.h

Change-Id: I24e42f91d84fe34cf29938f48979879ca7bf8f2c
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2014-01-06 11:26:16 -08:00
Junjie Wu db5cda422e msm-clock-provider: Add CLK_LIST macro
Clock lookup table is deprecated, but a list of clocks are still needed
for clock registration. Create a new macro for listing clocks.

Change-Id: I36497949dfa26ce4510c32d2966708800359e993
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2014-01-06 11:26:16 -08:00
Vikram Mulukutla 6d98f57e91 msm: clock-generic: Move the clock-generic header to include/linux/clk
Architectural changes in the ARM Linux kernel tree mandate
the eventual removal of the mach-* directories. Move the
clock-generic header to support this.

Change-Id: I6876f60f7d23dfe162a2b13a374eb4c4b2856df4
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2013-12-12 11:29:14 -08:00
Vikram Mulukutla 6918831f31 msm: clk-provider: Move clock headers to include/linux/clk
Architecutural changes in the ARM Linux kernel tree mandate the
eventual removal of the mach-* directories. Move the
mach/clk-provider and mach/clk header to include/linux/clk.

Change-Id: I495f8332bf5d0d09ccfb236c819dea2bacb13542
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
2013-12-12 11:29:09 -08:00
Linus Torvalds 6fa52ed33b ARM: arm-soc driver changes for 3.10
This is a rather large set of patches for device drivers that for one
 reason or another the subsystem maintainer preferred to get merged
 through the arm-soc tree. There are both new drivers as well as
 existing drivers that are getting converted from platform-specific
 code into standalone drivers using the appropriate subsystem
 specific interfaces.
 
 In particular, we can now have pinctrl, clk, clksource and irqchip
 drivers in one file per driver, without the need to call into
 platform specific interface, or to get called from platform specific
 code, as long as all information about the hardware is provided
 through a device tree.
 
 Most of the drivers we touch this time are for clocksource. Since
 now most of them are part of drivers/clocksource, I expect that we
 won't have to touch these again from arm-soc and can let the
 clocksource maintainers take care of these in the future.
 
 Another larger part of this series is specific to the exynos platform,
 which is seeing some significant effort in upstreaming and
 modernization of its device drivers this time around, which
 unfortunately is also the cause for the churn and a lot of the
 merge conflicts.
 
 There is one new subsystem that gets merged as part of this series:
 the reset controller interface, which is a very simple interface
 for taking devices on the SoC out of reset or back into reset.
 Patches to use this interface on i.MX follow later in this merge
 window, and we are going to have other platforms (at least tegra
 and sirf) get converted in 3.11. This will let us get rid of
 platform specific callbacks in a number of platform independent
 device drivers.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRhKUsAAoJEIwa5zzehBx3Ug4P/RqEen15hxS/NY8SIVRAU5c0
 G9ZiSPcLmvXGR/t1RZFeLWKaKOYRb2oW1EbXrlkddprkmg85RuQE/KMpCgzPPhVC
 Yrs8UaagMGblaLOjwavVjin/CUXZokRdMfsQoIyMGOezmVGFnv4d4Kt64IOf35DF
 24vDv/QO0BAI9k6m6WLqlWvSshb0IkW8r2LneRLnMEAVop7b1xkOxz0sR6l0LWfV
 6JAMXyTjJMg0t8uCVW/QyNdxcxINHhV4SYcNkzF3EZ7ol50OiJsT9fg0XW759+Wb
 vlX6Xuehg+CBOg+g3ZOZuR8JOEkOhAGRSzuJkk/TmLCCxc+ghnuYz8HArxh6GMHK
 KaxvogLIi0ZsD94A/BZIKkDtOLWlzdz2HBrYo9PTz8zrOz/gXhwQ3zq0jPccC5E0
 S+YYiobCBXepknF9301ti7wGD9VDzI8nmqOKG6tEBrD3xuO+RoBv+z4pBugN4/1C
 DlB19gOz60G5kniziL+wlmWER2qXmYrQZqS+s6+B2XoyoETC0Yij3Rck5vyC6qIK
 A2sni+Y9rzNOB9nzmnISP/UiGUffCy8AV4DZJjMSl0XkF4cpOXqRVGZ2nGB4tR5q
 GTOETcDCo5dvMDKX7Wfrz40CQzO39tnPCddg3OIS93ZwMpCeykIlb1FVL7RcsyF7
 3uikzYHlDo3C5pvtJ5TS
 =ZWk9
 -----END PGP SIGNATURE-----

Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC driver changes from Olof Johansson:
 "This is a rather large set of patches for device drivers that for one
  reason or another the subsystem maintainer preferred to get merged
  through the arm-soc tree.  There are both new drivers as well as
  existing drivers that are getting converted from platform-specific
  code into standalone drivers using the appropriate subsystem specific
  interfaces.

  In particular, we can now have pinctrl, clk, clksource and irqchip
  drivers in one file per driver, without the need to call into platform
  specific interface, or to get called from platform specific code, as
  long as all information about the hardware is provided through a
  device tree.

  Most of the drivers we touch this time are for clocksource.  Since now
  most of them are part of drivers/clocksource, I expect that we won't
  have to touch these again from arm-soc and can let the clocksource
  maintainers take care of these in the future.

  Another larger part of this series is specific to the exynos platform,
  which is seeing some significant effort in upstreaming and
  modernization of its device drivers this time around, which
  unfortunately is also the cause for the churn and a lot of the merge
  conflicts.

  There is one new subsystem that gets merged as part of this series:
  the reset controller interface, which is a very simple interface for
  taking devices on the SoC out of reset or back into reset.  Patches to
  use this interface on i.MX follow later in this merge window, and we
  are going to have other platforms (at least tegra and sirf) get
  converted in 3.11.  This will let us get rid of platform specific
  callbacks in a number of platform independent device drivers."

* tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (256 commits)
  irqchip: s3c24xx: add missing __init annotations
  ARM: dts: Disable the RTC by default on exynos5
  clk: exynos5250: Fix parent clock for sclk_mmc{0,1,2,3}
  ARM: exynos: restore mach/regs-clock.h for exynos5
  clocksource: exynos_mct: fix build error on non-DT
  pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()
  irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure
  reset: NULL deref on allocation failure
  reset: Add reset controller API
  dt: describe base reset signal binding
  ARM: EXYNOS: Add arm-pmu DT binding for exynos421x
  ARM: EXYNOS: Add arm-pmu DT binding for exynos5250
  ARM: EXYNOS: Enable PMUs for exynos4
  irqchip: exynos-combiner: Correct combined IRQs for exynos4
  irqchip: exynos-combiner: Add set_irq_affinity function for combiner_irq
  ARM: EXYNOS: fix compilation error introduced due to common clock migration
  clk: exynos5250: Fix divider values for sclk_mmc{0,1,2,3}
  clk: exynos4: export clocks required for fimc-is
  clk: samsung: Fix compilation error
  clk: tegra: fix enum tegra114_clk to match binding
  ...
2013-05-04 12:31:18 -07:00
Olof Johansson 83c15f4c05 Merge branch 'depends/clk-for-3.10' into next/cleanup
Bringin in clk subsystem dependencies needed by sunxi.

* depends/clk-for-3.10: (26 commits)
  clk: sunxi: drop an unnecesary kmalloc
  clk: sunxi: drop CLK_IGNORE_UNUSED
  clk: sunxi: Add support for AXI, AHB, APB0 and APB1 gates
  clk: divider: Introduce CLK_DIVIDER_ALLOW_ZERO flag
  clk: mvebu: Use common of_clk_init() function
  clk: fix clk_mux::flags kerneldoc
  clk: allow reentrant calls into the clk framework
  clk: abstract locking out into helper functions
  clk: zynq: Add missing zynq clk header
  clk: sunxi: rename compatible strings
  arm: sunxi: Add useful information about sunxi clocks
  clk: arm: sunxi: Add a new clock driver for sunxi SOCs
  clk: ux500: Fix prcmu clocks registration
  ARM: imx: adapt clk_busy_mux to new clk_mux struct
  clk: Add composite clock type
  clk: add table lookup to mux
  clk: Fix incorrect return type in clk.c
  clk: prima2: fix return value check in sirfsoc_of_clk_init()
  clk:SPEAr1340: Correct parent clock configuration
  documentation: clk: fix couple of misspelling
  ...
2013-04-11 03:38:03 -07:00
Stephen Warren 441f199a37 clk: tegra: defer application of init table
The Tegra clock driver is initialized during the ARM machine descriptor's
.init_irq() hook. It can't be initialized earlier, since dynamic memory
usage is required. It can't be initialized later, since the .init_timer()
hook needs the clocks initialized. However, at this time, udelay()
doesn't work.

The Tegra clock initialization table may enable some PLLs. Enabling a PLL
may require usage of udelay(). Hence, this can't happen right when the
clock driver is initialized.

To solve this, separate the clock driver initialization from the clock
table processing, so they can execute at separate times.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-04-04 16:09:05 -06:00
Shawn Guo 3cb7825bdc ARM: mxs: remove common.h
All three remaining functions declared in common.h are implemented by
clock driver.  Create header include/linux/clk/mxs.h to contain them
and remove common.h.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2013-04-01 20:42:20 +08:00
Emilio López e874a66977 clk: arm: sunxi: Add a new clock driver for sunxi SOCs
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: Emilio López <emilio@elopez.com.ar>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2013-03-27 08:35:34 -07:00
Linus Torvalds bab588fcfb arm-soc: soc-specific updates
This is a larger set of new functionality for the existing SoC families,
 including:
 
 * vt8500 gains support for new CPU cores, notably the Cortex-A9 based wm8850
 * prima2 gains support for the "marco" SoC family, its SMP based cousin
 * tegra gains support for the new Tegra4 (Tegra114) family
 * socfpga now supports a newer version of the hardware including SMP
 * i.mx31 and bcm2835 are now using DT probing for their clocks
 * lots of updates for sh-mobile
 * OMAP updates for clocks, power management and USB
 * i.mx6q and tegra now support cpuidle
 * kirkwood now supports PCIe hot plugging
 * tegra clock support is updated
 * tegra USB PHY probing gets implemented diffently
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAUSUyPGCrR//JCVInAQI4YA/+Nb0FaA7qMmTPuJhm7aZNfnwBcGxZ7IZp
 s2xByEl3r5zbLKlKGNGE0x7Q7ETHV4y9tohzi9ZduH2b60dMRYgII06CEmDPu6/h
 4vBap2oLzfWfs9hwpCIh7N9wNzxSj/R42vlXHhNmspHlw7cFk1yw5EeJ+ocxmZPq
 H9lyjAxsGErkZyM/xstNQ1Uvhc8XHAFSUzWrg8hvf6AVVR8hwpIqVzfIizv6Vpk6
 ryBoUBHfdTztAOrafK54CdRc7l6kVMomRodKGzMyasnBK3ZfFca3IR7elnxLyEFJ
 uPDu5DKOdYrjXC8X2dPM6kYiE41YFuqOV2ahBt9HqRe6liNBLHQ6NAH7f7+jBWSI
 eeWe84c2vFaqhAGlci/xm4GaP0ud5ZLudtiVPlDY5tYIADqLygNcx1HIt/5sT7QI
 h34LMjc4+/TGVWTVf5yRmIzTrCXZv5YoAak3UWFoM4nVBo/eYVyNLEt5g9YsfjrC
 P/GWrXJJvOCB3gAi31pgGYJzZg8K7kTTAh/dgxjqzU4f6nGRm5PBydiJe18/lWkH
 qtfNE0RbhxCi3JEBnxW48AIEndVSRbd7jf8upC/s9rPURtFSVXp4APTHVyNUKCip
 gojBxcRYtesyG/53nrwdTyiyHx6GocmWnMNZJoDo0UQEkog2dOef+StdC3zhc2Vm
 9EttcFqWJ+E=
 =PRrg
 -----END PGP SIGNATURE-----

Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC-specific updates from Arnd Bergmann:
 "This is a larger set of new functionality for the existing SoC
  families, including:

   - vt8500 gains support for new CPU cores, notably the Cortex-A9 based
     wm8850

   - prima2 gains support for the "marco" SoC family, its SMP based
     cousin

   - tegra gains support for the new Tegra4 (Tegra114) family

   - socfpga now supports a newer version of the hardware including SMP

   - i.mx31 and bcm2835 are now using DT probing for their clocks

   - lots of updates for sh-mobile

   - OMAP updates for clocks, power management and USB

   - i.mx6q and tegra now support cpuidle

   - kirkwood now supports PCIe hot plugging

   - tegra clock support is updated

   - tegra USB PHY probing gets implemented diffently"

* tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (148 commits)
  ARM: prima2: remove duplicate v7_invalidate_l1
  ARM: shmobile: r8a7779: Correct TMU clock support again
  ARM: prima2: fix __init section for cpu hotplug
  ARM: OMAP: Consolidate OMAP USB-HS platform data (part 3/3)
  ARM: OMAP: Consolidate OMAP USB-HS platform data (part 1/3)
  arm: socfpga: Add SMP support for actual socfpga harware
  arm: Add v7_invalidate_l1 to cache-v7.S
  arm: socfpga: Add entries to enable make dtbs socfpga
  arm: socfpga: Add new device tree source for actual socfpga HW
  ARM: tegra: sort Kconfig selects for Tegra114
  ARM: tegra: enable ARCH_REQUIRE_GPIOLIB for Tegra114
  ARM: tegra: Fix build error w/ ARCH_TEGRA_114_SOC w/o ARCH_TEGRA_3x_SOC
  ARM: tegra: Fix build error for gic update
  ARM: tegra: remove empty tegra_smp_init_cpus()
  ARM: shmobile: Register ARM architected timer
  ARM: MARCO: fix the build issue due to gic-vic-to-irqchip move
  ARM: shmobile: r8a7779: Correct TMU clock support
  ARM: mxs_defconfig: Select CONFIG_DEVTMPFS_MOUNT
  ARM: mxs: decrease mxs_clockevent_device.min_delta_ns to 2 clock cycles
  ARM: mxs: use apbx bus clock to drive the timers on timrotv2
  ...
2013-02-21 15:27:22 -08:00
Prashant Gaikwad 52dec4c9ea ARM: tegra: remove legacy clock code
Remove all legacy clock code from mach-tegra.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:33 -07:00
Prashant Gaikwad 61fd290d21 ARM: tegra: migrate to new clock code
Migrate Tegra clock support to drivers/clk/tegra, this involves
moving:
1. definition of tegra_cpu_car_ops to clk.c
2. definition of reset functions to clk-peripheral.c
3. change parent of cpu clock.
4. Remove legacy clock initialization.
5. Initialize clocks using DT.
6. Remove all instance of mach/clk.h

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
[swarren: use to_clk_periph_gate().]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:07 -07:00
Prashant Gaikwad 89572c77cd ARM: tegra: move tegra_cpu_car.h to linux/clk/tegra.h
tegra_cpu_car_ops struct is going to be accessed from drivers/clk/tegra.
Move the tegra_cpu_car_ops to include/linux/clk/tegra.h.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-01-28 11:19:06 -07:00
Prashant Gaikwad 85a181986c clk: sunxi: Use common of_clk_init() function
Use common of_clk_init() function to initialize clocks.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Acked-by: Maxime Ripard <maxime.ripard@anandra.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2013-01-24 11:12:23 -08:00
Linus Torvalds c2714334b9 ARM: arm-soc: Updates for Marvell mvebu/kirkwood
This is a branch with updates for Marvell's mvebu/kirkwood platforms. They
 came in late-ish, and were heavily interdependent such that it didn't
 make sense to split them up across the cross-platform topic branches. So
 here they are (for the second release in a row) in a branch on their own.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQy5i9AAoJEIwa5zzehBx3ZskP/2wxjbwEaNdnR+7j8595bTaa
 GYq8qJ4lUCOKmSqp3bQkg/Plm2D88p78BO5qTm2io527gl10HemzCiGaejclujIw
 sDFZPAE8K0Z8p0gQcBNlRZNuI3J1N6IKRqYH5SIJ2vWmBMfO7nKRR9nmTiDpm5bx
 IcuKX2u/mhyXWN+F0EcHqcupH1K+mdzyGdIQk80Tyqni+UTN+pd0efLM6WL4SFJM
 5fj64dDFpVDA8t+O2Avz8p+lx07vkSy2wIXWt7Ik9BVtsyZQecn+9lpl8FvcrSK/
 MgL3QO4kqDpJDs88M7DJURU1/EdsWZc32M63avctaWnGWItQAbOJYBDmZTlng08x
 ZGrKOgf/I6le7wEpnzdag9ymI/rAL8I0755FkfXxf1R7/X40b+t8/61J/ddOKTDs
 1sTVt+eKyyIMWle4V4zENa03goVBApCIEXcmnuFisFNbBY6azV31inJEp/3PvpgE
 GeMBfxBDkvn+03LkRFcZlhTeDsNTdctD+sfgrNPaQf5bZGIvEz87vgfNTIiaU3GA
 Vd5aiainVDQgmpoFfRG6391gdFlF2l9d67LoG4ClCjn4WL+UxcTRuzBW/liORpUO
 E7CwMHtPq6eoGKywiKMFRzY2QRIKZRkxrC2PCJ/1V9mbIGwgaD/3BQ2/czwrnc8q
 1gnxWx8E5SKEGcDJXD+6
 =7luC
 -----END PGP SIGNATURE-----

Merge tag 'mvebu' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC updates for Marvell mvebu/kirkwood from Olof Johansson:
 "This is a branch with updates for Marvell's mvebu/kirkwood platforms.
  They came in late-ish, and were heavily interdependent such that it
  didn't make sense to split them up across the cross-platform topic
  branches.  So here they are (for the second release in a row) in a
  branch on their own."

* tag 'mvebu' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (88 commits)
  arm: l2x0: add aurora related properties to OF binding
  arm: mvebu: add Aurora L2 Cache Controller to the DT
  arm: mvebu: add L2 cache support
  dma: mv_xor: fix error handling path
  dma: mv_xor: fix error checking of irq_of_parse_and_map()
  dma: mv_xor: use request_irq() instead of devm_request_irq()
  dma: mv_xor: clear the window override control registers
  arm: mvebu: fix address decoding armada_cfg_base() function
  ARM: mvebu: update defconfig with I2C and RTC support
  ARM: mvebu: Add SATA support for OpenBlocks AX3-4
  ARM: mvebu: Add support for the RTC in OpenBlocks AX3-4
  ARM: mvebu: Add support for I2C on OpenBlocks AX3-4
  ARM: mvebu: Add support for I2C controllers in Armada 370/XP
  arm: mvebu: Add hardware I/O Coherency support
  arm: plat-orion: Add coherency attribute when setup mbus target
  arm: dma mapping: Export a dma ops function arm_dma_set_mask
  arm: mvebu: Add SMP support for Armada XP
  arm: mm: Add support for PJ4B cpu and init routines
  arm: mvebu: Add IPI support via doorbells
  arm: mvebu: Add initial support for power managmement service unit
  ...
2012-12-14 14:54:26 -08:00
Linus Torvalds db5b0ae007 ARM: arm-soc: device tree conversions and enablement
Continued device tree conversion and enablement across a number of
 platforms; Kirkwood, tegra, i.MX, Exynos, zynq and a couple of other
 smaller series as well.
 
 ux500 has seen continued conversion for platforms. Several platforms have
 seen pinctrl-via-devicetree conversions for simpler multiplatform. Tegra
 is adding data for new devices/drivers, and Exynos has a bunch of new
 bindings and devices added as well.
 
 So, pretty much the same progression in the right direction as the last
 few releases.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJQySW7AAoJEIwa5zzehBx39xcP/jzEQOTOJdK4zJd1OjgrQoX/
 WnhbGJT941RNjRjvDG6HmZzhpsRoE4q/zkjFEKoKELdikRW0hYoR+zPCGuB7XtN5
 aF1ZQrTx4gHf4KE7doIB8slaWeOq8aG2TLFhylyy+cuaIpRK0NG0pAR0ZqWaoga9
 tZFciqzplLeo50vZ+y+lVVsR40j/w29EjwPXhCV30//gGOYLyp/VDu5PRtrBdgh8
 EgpcT2EWJwMCN/Upcao/q2JbQktPHPpSwnpaUAALYB20uD7k5jo7wtYE/+L9nn6B
 bxcCDTMVmqzNTF+y0P16hDcs5jMLVjpI0xBiyZ1G6gShpggsSZCHY5ynjAtQ19se
 r+2WrNfOR23k6arJuOUAQSEnLdx0T5SlW6CJeFEofKv4uoebxAbKUiNO4ShWskhd
 nNptX1+L3hj3zpjGcEHmL6bd+nGtyMeoG9Yekcv1oZxdVcpKhFxh0s5PEJBEeXcN
 M7aAWlWJkplV22Olqhpc/3INCweq6E+zBrBxZaUBW/JCzGrqBUGC0BULDPAkmC4J
 CKL6IqIB73jGQ4OY14IaMU20GJrIGxZ7wzXOp4aw3OUpRlxsgurfyFQeIjUvVoZL
 PJ8DRoAVwreVHvKfgZZVKpSAY7dwcWbxpWsYlrH3zWIC5vRJ0UFwsD0TpLJWd6Vi
 XA8gQcJRWKGS8E5mRY39
 =Rk9v
 -----END PGP SIGNATURE-----

Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC device tree conversions and enablement from Olof Johansson:
 "Continued device tree conversion and enablement across a number of
  platforms; Kirkwood, tegra, i.MX, Exynos, zynq and a couple of other
  smaller series as well.

  ux500 has seen continued conversion for platforms.  Several platforms
  have seen pinctrl-via-devicetree conversions for simpler
  multiplatform.  Tegra is adding data for new devices/drivers, and
  Exynos has a bunch of new bindings and devices added as well.

  So, pretty much the same progression in the right direction as the
  last few releases."

Fix up conflicts as per Olof.

* tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (185 commits)
  ARM: ux500: Rename dbx500 cpufreq code to be more generic
  ARM: dts: add missing ux500 device trees
  ARM: ux500: Stop registering the PCM driver from platform code
  ARM: ux500: Move board specific GPIO info out to subordinate DTS files
  ARM: ux500: Disable the MMCI gpio-regulator by default
  ARM: Kirkwood: remove kirkwood_ehci_init() from new boards
  ARM: Kirkwood: Add support LED of OpenBlocks A6
  ARM: Kirkwood: Convert to EHCI via DT for OpenBlocks A6
  ARM: kirkwood: Add NAND partiton map for OpenBlocks A6
  ARM: kirkwood: Add support second I2C bus and RTC on OpenBlocks A6
  ARM: kirkwood: Add support DT of second I2C bus
  ARM: kirkwood: Convert mplcec4 board to pinctrl
  ARM: Kirkwood: Convert km_kirkwood to pinctrl
  ARM: Kirkwood: support 98DX412x kirkwoods with pinctrl
  ARM: Kirkwood: Convert IX2-200 to pinctrl.
  ARM: Kirkwood: Convert lsxl boards to pinctrl.
  ARM: Kirkwood: Convert ib62x0 to pinctrl.
  ARM: Kirkwood: Convert GoFlex Net to pinctrl.
  ARM: Kirkwood: Convert dreamplug to pinctrl.
  ARM: Kirkwood: Convert dockstar to pinctrl.
  ...
2012-12-13 10:39:26 -08:00
Sebastian Hesselbarth 97fa4cf442 clk: mvebu: add mvebu core clocks.
This driver allows to provide DT clocks for core clocks found on
Marvell Kirkwood, Dove & 370/XP SoCs. The core clock frequencies and
ratios are determined by decoding the Sample-At-Reset registers.

Although technically correct, using a divider of 0 will lead to
div_by_zero panic. Let's use a ratio of 0/1 instead to fail later
with a zero clock.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by Gregory CLEMENT <gregory.clement@free-electrons.com>
2012-11-20 14:34:08 +01:00
Maxime Ripard 404525d5a7 clk: sunxi: Add dummy fixed rate clock for Allwinner A1X SoCs
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mike Turquette <mturquette@ti.com>
2012-11-16 21:46:39 +01:00
Josh Cartwright 45aa2c27ad clk: Add support for fundamental zynq clks
Provide simplified models for the necessary clocks on the zynq-7000
platform.  Currently, the PLLs, the CPU clock network, and the basic
peripheral clock networks (for SDIO, SMC, SPI, QSPI, UART) are modelled.

OF bindings are also provided and documented.

Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2012-11-14 16:07:55 +01:00
Simon Arlott 75fabc3f64 ARM: bcm2835: add stub clock driver
This patch adds a minimal stub clock driver for the BCM2835. Its sole
purpose is to allow the PL011 AMBA clk_get() API calls to provide
something that looks enough like a clock that the driver probes and
operates correctly.

This patch was extracted from git://github.com/lp0/linux.git branch
rpi-split as of 2012/09/08, and modified as follows:

* Reworked to call clk_register_fixed_rate(), and clk_register_clkdev()
  rather than using static data to represent the clocks.
* Moved implementation to drivers/clk/.
* Modified .dev_id for UART clocks to match UART DT node names.
* s/bcm2708/bcm2835/.
* Modified device tree vendor prefix.

Signed-off-by: Chris Boot <bootc@bootc.net>
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Dom Cobley <dc4@broadcom.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
2012-09-19 19:08:53 -06:00