Commit graph

518760 commits

Author SHA1 Message Date
Stephen Boyd 7926b3f8c6 clk: bcm/kona: Remove ccu_list
This list doesn't look to be used. Let's remove it and any
associated code that would be manipulating this list. This also
silences this error:

drivers/clk/bcm/clk-kona-setup.c:24:1: warning: symbol 'ccu_list' was not declared. Should it be static?

Reviewed-by: Alex Elder <elder@linaro.org>
Cc: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-14 17:11:20 -07:00
Stephen Boyd 4cca1be4bc clk: bcm/kona: Silence sparse warnings
drivers/clk/bcm/clk-kona.c:1243:16: warning: odd constant _Bool cast (ffffffffffffffea becomes 1)

Reviewed-by: Alex Elder <elder@linaro.org>
Cc: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-14 17:11:19 -07:00
Stephen Boyd 9a39222db6 clk: max-gen: Silence sparse warnings
drivers/clk/clk-max-gen.c:82:16: warning: symbol 'max_gen_clk_ops' was not declared. Should it be static?
drivers/clk/clk-max-gen.c:109:5: warning: symbol 'max_gen_clk_probe' was not declared. Should it be static?
drivers/clk/clk-max-gen.c:183:5: warning: symbol 'max_gen_clk_remove' was not declared. Should it be static?

Acked-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-14 17:11:18 -07:00
Stephen Boyd 562ef0b098 clk: Silence sparse warnings about __clk_{get,put}()
drivers/clk/clk.c:2700:5: warning: symbol '__clk_get' was not declared. Should it be static?
drivers/clk/clk.c:2713:6: warning: symbol '__clk_put' was not declared. Should it be static?

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-14 17:11:17 -07:00
Stephen Boyd 2bb5d1b88b clk: gpio-gate: Don't export __init functions
This function is marked as __init, so exposing it to modules
doesn't make any sense and it isn't used by modules anyway.

drivers/clk/clk-gpio-gate.c:192:13: warning: symbol 'of_gpio_gate_clk_setup' was not declared. Should it be static?

Cc: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-14 17:11:16 -07:00
Stephen Boyd d122db7e86 clk: basic-types: Remove useless allocation failure printks
Printing an error on kmalloc() failures is unnecessary. Remove
the print and use *ptr in sizeof() for future-proof code.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-14 16:51:50 -07:00
Krzysztof Kozlowski e0cdcda508 clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference
of_clk_get_from_provider() returns ERR_PTR on failure. The
dra7-atl-clock driver was not checking its return value and
immediately used it in __clk_get_hw().  __clk_get_hw()
dereferences supplied clock, if it is not NULL, so in that case
it would dereference an ERR_PTR.

Fixes: 9ac33b0ce8 ("CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-14 14:04:18 -07:00
Alexander Sverdlin beb7a2a971 clk: axm55xx: Use %zu in pr_info for size_t
Fix the following compiler warning:

drivers/clk/clk-axm5516.c: In function 'axmclk_probe':
drivers/clk/clk-axm5516.c:559:2: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=]
  pr_info("axmclk: supporting %u clocks\n", num_clks);
    ^

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-13 12:32:53 -07:00
Maxime Ripard b1ed311baf clk: asm9260: Fix of_io_request_and_map error check
of_io_request_and map returns an error pointer, but the current code assumes
that on error the returned pointer will be NULL.

Obviously, that makes the check completely useless. Change the test to actually
check for the proper error code.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-13 12:32:52 -07:00
Daniel Thompson 42801ca467 clk: Update docs after removal of clk-private.h
Currently Documentation/clk.txt describes an obsolete techinique to
statically define struct clk objects.

This capability was removed by b09d6d991025("clk: remove clk-private.h")
and is no longer supported. The documentation describing the feature should
be removed.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michael Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-13 12:32:51 -07:00
Stephen Boyd dbc3976d91 clk: bindings: Fix assigned-clock-rates description
The binding uses assigned-clock-parents when it should use
assigned-clock-rates. Furthermore, the part that describes how
they relate to the assigned-clocks property is not clear about
what is related. Correct and clarify this part of the binding.

Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-13 12:32:51 -07:00
Sergej Sawazki 45b03d3e88 clk: si5351: fix .recalc_rate for multisynth 6-7
MS6 and MS7 do not have the MSx_P3 field. Do the 'params.p3 == 0'
check for MS0-M5 only. See [AN619, p. 6] for details.

Referenced document:
[AN619] Manually Generating an Si5351 Register Map, Rev. 0.4

Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
2015-05-13 11:52:06 -07:00
Sergej Sawazki 2073b5e909 clk: si5351: fix .round_rate for multisynth 6-7
The divider calculation for multisynth 6 and 7 differs from the
calculation for multisynth 0-5.

For MS6 and MS7, set MSx_P1 directly, MSx_P1=divide value
[AN619, p. 6].

Referenced document:
[AN619] Manually Generating an Si5351 Register Map, Rev. 0.4

Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
2015-05-13 11:52:05 -07:00
Michael Turquette 8157356015 Merge branch 'clk-fixes' into clk-next 2015-05-08 11:57:23 -07:00
Sebastian Hesselbarth 0cd3be6e9a clk: si5351: Do not pass struct clk in platform_data
When registering clk-si5351 by platform_data, we should not pass struct clk
for the reference clocks. Drop struct clk from platform_data and rework the
driver to use devm_clk_get of named clock references.

While at it, check for at least one valid input clock and properly prepare/
enable valid reference clocks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Reported-by: Michael Welling <mwelling@ieee.org>
Reported-by: Jean-Francois Moine <moinejf@free.fr>
Reported-by: Russell King <rmk+linux@arm.linux.org.uk>
Tested-by: Michael Welling <mwelling@ieee.org>
Tested-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
2015-05-08 11:22:30 -07:00
Sebastian Hesselbarth f94029d880 clk: si5351: Mention clock-names in the binding documentation
Since the introduction of clk-si5351 the way we should deal with DT provided
clocks has changed from indexed to named clock phandles. Amend the binding
documentation to reflect named clock phandles by clock-names property.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
2015-05-08 11:22:29 -07:00
Michael Turquette 2ce8760469 clk/samsung fixes for 4.1
- missing CONFIG_ARCH_EXYNOS5433 -> CONFIG_ARCH_EXYNOS substitution
    to actually enable clk-exynos5433.c compilation,
  - fixes of exynos5433 clk tree definitions: register offsetts, parent
    clocks, PLL coefficients,
  - fix for exynos5420 system sleep regression introduced in 3.19.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJVSIkAAAoJEE1bIKeAnHqLFQEP/RFCtAjGRMNlfK9ICX4CgD/d
 FuAKvNFeEDzkwDKsv3p5yafYpwKPT7KMuAFKjkM+45snJ9rEkJyK3KyN8xlK5Zkd
 djzYLOnncvMV0pkDUV6+2tGoRQJYpoObjiEs3T8XJnSOVPjnYB2ku84d4svOgSmB
 rMR7BmTXE9eLpy6IKBBHJvdsvpG9aEscKwzBAjNG5F0JDrB0NJpYiU4NjEysSZ4h
 fjKDpN91dz+20EKh9kyu3iFl5RrT0+ZZ2rJBT2YxnD9/vKvllFj42a37lFLolRFR
 CqtzQiAQ+fo0iDDkVaf+e1gTb0S4IV0whLhDKodi0kf1kkMD1Cs+4K77JOhHc+nI
 hZxedtfY5SXhXmIBs40DebFCEl1jDkU5B/LEzRN7l45xGlZyQRNM/qQj6dsz75qF
 thZJkHsRco1kbkG4IEdqS2uUElxucWUVNaSUi8CImzKzsYbNQz9vQ6npoeU5bLxN
 95hCsjxudw4ca9tStW47AJ1XetSojgaOfhFZ4dxaA3OwkAwiIntO7vHpS0py65c1
 /+76pBToSvIIoKQty7rRD8CpkTjJ3oYXV/jeaRtnA4ZaJz2KAQIfMaXwyUhxcxGo
 J6DbmxyLbTB3t34L1myRf8O3cgW002TeNrtX2t+ciGI1oNyvvAra5SOkNAimHB0M
 houAkloleelSzyenb6tL
 =NpqX
 -----END PGP SIGNATURE-----

Merge tag 'clk-samsung-fixes-4.1-2' of git://linuxtv.org/snawrocki/samsung into clk-fixes

clk/samsung fixes for 4.1

 - missing CONFIG_ARCH_EXYNOS5433 -> CONFIG_ARCH_EXYNOS substitution
   to actually enable clk-exynos5433.c compilation,
 - fixes of exynos5433 clk tree definitions: register offsetts, parent
   clocks, PLL coefficients,
 - fix for exynos5420 system sleep regression introduced in 3.19.
2015-05-07 16:46:26 -07:00
Sascha Hauer c4b6c26e82 dt-bindings: ARM: Mediatek: use more generic node name in examples
Use 'clock-controller' and 'power-controller' as node names in the
examples rather than the specific names of the units.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-07 15:28:03 -07:00
Stephen Boyd a633472519 clk: Add some more lockdep assertions
We don't check to make sure the enable_lock is held across
enable/disable and we don't check if the prepare_lock is held
across prepare/unprepare. Add some asserts to catch any future
locking problems.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-07 11:32:54 -07:00
Stephen Boyd 18e70efe3e Merge branch 'clk-fixes' into clk-next 2015-05-07 11:32:49 -07:00
Geert Uytterhoeven c542a54fcb clk: emev2: Use generic names for device nodes
uart -> serial

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-07 11:32:41 -07:00
Linus Walleij a6ae41b54c clk: ux500: ape[ate|trace]clk are scaleable
The APEATCLK and APETRACECLK are actually scaleable so register
them as scaleable clocks.

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-07 11:32:39 -07:00
Felipe Balbi 70e9f4dde0 clk: add newline character after dumping all clocks
clk_dump() will dump data about all clocks in JSON
format, but it misses a newline character at the
end of the JSON string. This patch adds that missing
newline character.

Signed-off-by: Felipe Balbi <balbi@ti.com>
[sboyd@codeaurora.org: Squelch checkpatch with seq_puts()]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-07 11:32:37 -07:00
Dong Aisheng d2a5d46b16 clk: add missing lock when call clk_core_enable in clk_set_parent
Before commit 035a61c314 ("clk: Make clk API return per-user
struct clk instances") we acquired the enable_lock in
__clk_set_parent_{before,after}() by means of calling
clk_enable(). After commit 035a61c314 we use clk_core_enable()
in place of the clk_enable(), and clk_core_enable() doesn't
acquire the enable_lock. This opens up a race condition between
clk_set_parent() and clk_enable(). Fix it.

Fixes: 035a61c314 ("clk: Make clk API return per-user struct clk instances")
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-06 16:58:53 -07:00
Krzysztof Kozlowski d5255ec362 clk: s3c2410: Constify platform_device_id
The platform_device_id is not modified by the driver and core uses it as
const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:54 -07:00
Krzysztof Kozlowski 1237dc4430 clk: s3c2410: Staticize local symbols
Staticize symbols not exported and not used outside of file.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:52 -07:00
Krzysztof Kozlowski 2ad8b3fcf5 clk: ls1x: Fix duplicate const for parent names
Replace duplicated const keyword with proper array of const pointers to
const strings.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:50 -07:00
Krzysztof Kozlowski 45195b8f84 clk: sirf: Constify parent names in clock init data
The array of parent names can be made as array of const pointers to
const strings.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:48 -07:00
Krzysztof Kozlowski f3db6f16bd clk: cdce706: Constify parent names in clock init data
The array of parent names can be made as array of const pointers to
const strings.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:46 -07:00
Krzysztof Kozlowski 6b8f9eabec clk: exynos: Staticize file-scope declarations
Add missing static to local (file-scope only) symbols.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:44 -07:00
Krzysztof Kozlowski 9b030bc929 clk: rockchip: Staticize file-scope declarations
Add missing static to local (file-scope only) symbols.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:42 -07:00
Sascha Hauer 9eb67f1093 dt-bindings: ARM: Mediatek: Document devicetree bindings for clock/reset controllers
This adds the binding documentation for the apmixedsys, perisys and
infracfg controllers found on Mediatek SoCs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:40 -07:00
James Liao c1e81a3bef clk: mediatek: Add basic clocks for Mediatek MT8173.
This patch adds basic clocks for MT8173, including TOPCKGEN, PLLs,
INFRA and PERI clocks.

Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:38 -07:00
James Liao a8aede7948 clk: mediatek: Add basic clocks for Mediatek MT8135.
This patch adds basic clocks for MT8135, including TOPCKGEN, PLLs,
INFRA and PERI clocks.

Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:35 -07:00
Sascha Hauer d633fb7ac1 clk: mediatek: Add reset controller support
The pericfg and infracfg units also provide reset lines to several
other SoC internal units. This adds a function which can be called
from the pericfg and infracfg initialization functions which will
register the reset controller using reset_controller_register. The
reset controller will provide support for resetting the units
connected to the pericfg and infracfg controller. The units resetted
by this controller can use the standard reset device tree binding
to gain access to the reset lines.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:33 -07:00
James Liao 9741b1a680 clk: mediatek: Add initial common clock support for Mediatek SoCs.
This patch adds common clock support for Mediatek SoCs, including plls,
muxes and clock gates.

Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[sboyd@codeaurora.org: Squelch checkpatch warning in clk-mtk.h]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:31 -07:00
Sascha Hauer 2893c37946 clk: make strings in parent name arrays const
The clk functions and structs declare the parent_name arrays as
'const char **parent_names' which means the parent name strings
are const, but the array itself is not. Use
'const char * const * parent_names' instead which also makes
the array const. This allows us to put the parent_name arrays into
the __initconst section.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
[sboyd@codeaurora.org: Squelch 80-character checkpatch warnings]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-05 22:50:03 -07:00
Javier Martinez Canillas 97372e5a99 clk: exynos5420: Restore GATE_BUS_TOP on suspend
Commit ae43b32891 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power
Management support v12") added pm support for the pl330 dma driver but
it makes the clock for the Exynos5420 MDMA0 DMA controller to be gated
during suspend and this in turn makes its parent clock aclk266_g2d to
be gated. But the clock needs to be ungated prior suspend to allow the
system to be suspend and resumed correctly.

Add GATE_BUS_TOP register to the list of registers to be restored when
the system enters into a suspend state so aclk266_g2d will be ungated.

Thanks to Abhilash Kesavan for figuring out that this was the issue.

Fixes: ae43b32 ("ARM: 8202/1: dmaengine: pl330: Add runtime Power Management support v12")
Cc: stable@vger.kernel.org # 3.19+
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2015-05-05 10:51:04 +02:00
Stephen Boyd 396e339a77 Merge branch 'clk-fixes' into clk-next 2015-05-01 18:25:10 -07:00
Krzysztof Kozlowski d6c2767867 clk: at91: Constify irq_domain_ops
The irq_domain_ops are not modified by the driver and the irqdomain core
code accepts pointer to a const data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-01 18:25:09 -07:00
Stefan Wahren 7cb81136d2 clk: Fix JSON output in debugfs
key/value pairs in a JSON object must be separated by a comma.
After adding the properties "accuracy" and "phase" the JSON output
of /sys/kernel/debug/clk/clk_dump is invalid.

So add the missing commas to fix it.

Fixes: 5279fc402a ("clk: add clk accuracy retrieval support")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
[sboyd@codeaurora.org: Added comment in function]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-05-01 18:25:08 -07:00
Georgi Djakov 5d45ed8f5b clk: qcom: Fix MSM8916 gfx3d_clk_src configuration
The gfx3d_clk_src parents configuration is incorrect. Fix it.

Fixes: 3966fab8b6 "clk: qcom: Add MSM8916 Global Clock Controller support"
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 18:42:55 -07:00
Georgi Djakov 52cdc33c38 clk: qcom: Fix MSM8916 venus divider value
One of the video codec clock frequencies has incorrect divider
value. Fix it.

Fixes: 3966fab8b6 "clk: qcom: Add MSM8916 Global Clock Controller support"
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 18:42:48 -07:00
Stephen Boyd 6e5ab41b10 clk: Update some comments to reflect reality
The debugfs clk directory no longer expresses a clk tree. Update
the comments around that apporiately. Also drop comments about
prepare locks needing to be held as we have the proper
annotations with lockdep_assert_held().

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 16:28:41 -07:00
Stephen Boyd 4dff95dc94 clk: Remove forward declared function prototypes
Move the code around so that we don't need to declare function
prototypes at the start of the file. Simplify
clk_core_is_prepared() and clk_core_is_enabled() too to make the
diff easier to read.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 16:28:39 -07:00
Stephen Boyd 1f3e198342 clk: Remove impossible if condition in clk_core_get_phase()
This condition can't ever be true because this function is static
and it's always called with a non-NULL pointer.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 16:28:37 -07:00
Stephen Boyd d7d131512b clk: Drop unnecessary OOM prints
We don't need to print error messages when allocations fail.
We'll get a nice backtrace in such situations anyway.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 16:28:35 -07:00
Dong Aisheng 864e160ae5 clk: Squash __clk_{enable,disable}() into callers
These functions are only used in one place. Let's squash them
into their respective callers to save some lines.

Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
[sboyd@codeaurora.org: Redo commit text, add NULL check in
clk_enable()]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 16:28:33 -07:00
Stephen Boyd d6968fca78 clk: s/clk/core/ for struct clk_core
While introducing struct clk_core we tried to minimize the diff
by changing the type of 'clk' variables from struct clk to struct
clk_core without changing the names of the variables. Now that
the split is complete, the code is slightly confusing when it
mixes variables called 'clk' and variables called 'core' that are
of the same type struct clk_core. Let's be consistent and use
'core' everywhere we have a struct clk_core pointer and 'clk'
when we have a struct clk pointer.

Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-04-30 16:28:24 -07:00
Chanwoo Choi 85943d7ea5 clk: exynos5433: Fix wrong PMS value of exynos5433_pll_rates
This patch fixes the wrong PMS value of exynos5433_pll_rates table
for {ATLAS|APOLLO|MEM0|MEM1|BUS|MFC|MPHY|G3D|DISP|ISP|_PLL.
- 720 MHz (mdiv=360, pdiv=6, sdiv=1) -> 700 MHz (mdiv=175, pdiv=3, sdiv=1)
- 350 MHz (mdiv=360, pdiv=6, sdiv=2) -> (mdiv=350, pdiv=6, sdiv=2)
- 133 MHz (mdiv=552, pdiv=6, sdiv=4) -> (mdiv=532, pdiv=6, sdiv=4)

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2015-04-29 14:11:35 +02:00