Commit Graph

397090 Commits

Author SHA1 Message Date
dkl
3bfb2e97f2 clk: rockchip: fix clk reg address description in dts
1.Descripe cru address mapping in clocks node's "ranges" property, and
change children nodes' "reg" property accordingly.
2.Get cru base from clock_regs node's "reg" property.
2014-02-07 11:30:51 +08:00
dkl
4af160253c Recommit "clk: rockchip: add clk init data and enable clk init"
This recommit commit 4673090895 with
fix that lower clk_core init rate to 594 MHZ.
2014-02-07 09:50:53 +08:00
yxj
c8c1d278af rk fb:rename layer to win, add iomux for rk3188 lcdc 2014-01-26 16:42:58 +08:00
陈金泉
7a74e7eab9 update audio platform driver, add spdif codec dts property 2014-01-26 16:28:43 +08:00
黄涛
2971908618 ARM: rockchip: set rk3188 machine name RK30board to keep android happy 2014-01-26 15:58:50 +08:00
张晴
5d87f43f8a rk:pmu:rk808&act8846:support dts for linux 3.1 2014-01-26 09:58:37 +08:00
dkl
be994cdbfb Revert "clk: rockchip: add clk init data and enable clk init"
This reverts commit 4673090895.
2014-01-26 09:34:30 +08:00
dkl
4673090895 clk: rockchip: add clk init data and enable clk init
Mainly add rk3188 clk_core\cpu_clks\peri_clks init data and apply
it.
2014-01-23 17:51:14 +08:00
黄涛
247134ec9e ARM: rockchip: update rockchip_defconfig to support devtmpfs 2014-01-22 16:39:19 +08:00
黄涛
f537d4dada ARM: rockchip: add rk3288 fpga support 2014-01-22 16:13:20 +08:00
黄涛
5fad3b4ac2 ARM: rockchip: rk3188 add RK3188_UART_SIZE 2014-01-22 16:03:27 +08:00
黄涛
a89fbe854f ARM: rockchip: rk3188-tb remove wrong serial-id 2014-01-22 16:01:17 +08:00
黄涛
f41e6812d3 clocksource: rockchip_timer: support count up and consistency with arch timer 2014-01-22 15:57:49 +08:00
许盛飞
ad362bec5b PWM: add CONFIG_PWM_ROCKCHIP configuration 2014-01-22 09:24:06 +08:00
许盛飞
87a777982c pwm: CONFIG_PWM_ROCKCHIPS rename CONFIG_PWM_ROCKCHIP 2014-01-21 20:03:22 +08:00
许盛飞
b9732c840e pwm-bl: rename of pwm-rockhip.c and change the backlight-driver configuration 2014-01-21 19:51:19 +08:00
许盛飞
3d60fec285 pwm-bl: change some warning 2014-01-21 18:47:26 +08:00
陈金泉
02006e10ce Change path of audio platform device from rk to rockchip 2014-01-21 18:16:11 +08:00
许盛飞
74ee2d20de pwm-bl: add pwm backlight driver for rockchip 2014-01-21 17:53:11 +08:00
陈金泉
53d00cb8c3 update codec driver 2014-01-21 17:24:35 +08:00
dkl
46b5245015 clk: rockchip: add clk_core ops support 2014-01-21 17:06:22 +08:00
dkl
a713b86ca3 clk: rockchip: add apll set_rate support 2014-01-21 17:06:22 +08:00
黄涛
c278ce337a ARM: rockchip: rk_fiq_debugger use 32-bit read/write, workaround for rk3288 2014-01-21 14:26:09 +08:00
Jonathan Austin
a5151dfaa8 ARM: add support for the Cortex-A12 processor
The A12 behaves as the A7/A15 does with respect to setting the SMP bit, and
doesn't require TLB ops broadcasting to be explicitly enabled like the A9 does.

Note that as the ACTLR cannot (usually) be written from non-secure, it is the
responsibility of the bootloader/firmware to set this bit per core - it is
done here in Linux as last resort in case of bad firmware.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
2014-01-20 19:42:53 +08:00
dkl
5bb16a57ac clock: rockchip: ignore unused clocks temporarily.
Include "clk_ignore_unused" in the bootargs to the kernel.
2014-01-20 19:36:52 +08:00
dkl
c09b58f93c Revert "rk_clk: not disable unused clocks temporarily"
This reverts commit 97c8dc7c30.
2014-01-20 19:31:05 +08:00
黄涛
e88c7b949d ARM: rockchip: rk3188 use timer-based delay 2014-01-20 18:49:30 +08:00
黄涛
3e5a837e29 clocksource: rockchip_timer: support timer-based delay 2014-01-20 18:49:12 +08:00
dkl
97c8dc7c30 rk_clk: not disable unused clocks temporarily 2014-01-20 17:40:16 +08:00
yxj
0a615bbd79 rk fb:base version for linux3.10 2014-01-20 14:16:25 +08:00
dkl
c37288b6f4 rk_clk: modify clk-ops.c to reuse and fit the common clk framework.
After the .determine_rate operation was introduced, many ops and
clocks can be implemented more easily by the common clock framework,
and many unnessary old codes can be removed as a result.
2014-01-17 17:52:17 +08:00
Mike Turquette
342b0a63bd clk: composite: pass mux_hw into determine_rate
The composite clock's .determine_rate implementation can call the
underyling .determine_rate callback corresponding to rate_hw or the
underlying .determine_rate callback corresponding to mux_hw. In both
cases we pass in rate_hw, which is wrong. Fixed by passing mux_hw into
the correct callback.

Reported-by: Lemon Dai <dailemon.gl@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-17 14:26:45 +08:00
Emilio López
e8b3fb940b clk: composite: .determine_rate support
This commit adds .determine_rate support to the composite clock. It will
use the .determine_rate callback from the rate component if available,
and fall back on the mux component otherwise. This allows composite
clocks to enjoy the benefits of automatic clock reparenting.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2014-01-17 14:25:20 +08:00
黄涛
0c092fe690 ARM: rockchip: add cortex-a9 cpuidle support 2014-01-16 12:15:17 +08:00
黄涛
75180cac61 ARM: rockchip: rk3188 add restart support 2014-01-15 16:40:50 +08:00
黄涛
39c51fba66 ARM: rockchip: rk3188 add uart2 static iomap 2014-01-13 11:14:11 +08:00
黄涛
4ba553fd1a ARM: rockchip: rk3188 add DDR init 2014-01-13 10:59:13 +08:00
黄涛
bd8164da47 ARM: rockchip: rk3188 add pie init 2014-01-13 10:51:01 +08:00
黄涛
0d3914fff0 rk: fix PIE support multi cpu 2014-01-13 10:43:41 +08:00
dkl
a574676e96 rk_clk: add common pll and gpll set_rate support 2014-01-09 15:59:18 +08:00
dkl
828ecbcca8 rk_clk: add clk-pll.c support
support pll recalc_rate/round_rate except apll
2014-01-08 20:22:28 +08:00
James Hogan
0cf097587e clk: add CLK_SET_RATE_NO_REPARENT flag
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 <james.hogan@imgtec.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Chao Xie <xiechao.mail@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Emilio López" <emilio@elopez.com.ar>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Paul Walmsley <pwalmsley@nvidia.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Tomasz Figa <t.figa@samsung.com>
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 <haojian.zhuang@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com> [tegra]
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [sunxi]
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> [Zynq]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:14:00 +08:00
Mike Turquette
e47ed5fb5f clk: of: helper for determining number of parent clocks
Walks the "clocks" array of parent clock phandles and returns the
number.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:06:18 +08:00
Tomasz Figa
c370acc510 clk: Correct lookup logic in clk_fetch_parent_index()
This function is supposed to iterate over all parents of given child
clock to find the index of given parent clock in its parent list,
using parent cache if possible and falling back to string compare
otherwise. However currently the logic falls back to string compare in
every iteration in which clock cache entry does not match given parent,
due to wrong check conditions.

This patch corrects the logic to continue the loop if parent cache entry
is present and does not match requested parent clock. In addition,
redundant checks for parent cache array presence are removed, because it
is always allocated in the beginning of the function.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:06:01 +08:00
Tomasz Figa
862896e269 clk: Use kcalloc() to allocate arrays
Instead of calculating sizes of arrays manually, kcalloc() can be used
to allocate arrays of elements with defined size. This is just a cleanup
patch without any functional changes.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:05:49 +08:00
Tomasz Figa
0ab5e56cb4 clk: Add error handling to clk_fetch_parent_index()
There are at least two different error cases that can happen in
clk_fetch_parent_index() function:
 - allocation failure,
 - parent clock lookup failure,
however it returns only an u8, which is supposed to contain parent clock
index.

This patch modified the function to return full int instead allowing
positive clock indices and negative error codes to be returned. All
users of this function are adjusted as well to handle the return value
correctly.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:05:38 +08:00
Alex Elder
f3620ba73f clk: only call get_parent if there is one
In __clk_init(), after a clock is mostly initialized, a scan is done
of the orphan clocks to see if the clock being registered is the
parent of any of them.

This code assumes that any clock that provides a get_parent method
actually has at least one parent, and that's not a valid assumption.

As a result, an orphan clock with no parent can return *something*
as the parent index, and that value is blindly used to dereference
the orphan's parent_names[] array (which will be ZERO_SIZE_PTR or
NULL).

Fix this by ensuring get_parent is only called for orphans with at
least one parent.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:05:24 +08:00
Thierry Reding
05ce4e7d0b clk: Move symbol export to proper location
The __clk_get_flags() symbol is exported immediately following the
clk_unprepare_unused_subtree() function. This is unusual, since a symbol
export typically follows body of the function that it exports.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:05:16 +08:00
James Hogan
025dbbf707 clk: fix new_parent dereference before null check
Commit 71472c0 (clk: add support for clock reparent on set_rate) added a
dereference of the new_parent pointer in clk_reparent(), but as detected
by smatch clk_reparent() later checks whether new_parent is NULL.

The dereference was in order to clear the new parent's new_child pointer
to avoid duplicate POST_RATE_CHANGE notifications, so clearly isn't
necessary if the new parent is NULL, so move it inside the "if
(new_parent)" block.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:04:43 +08:00
Alex Elder
a79d253168 clk: get matching entry under lock in of_clk_init()
Currently of_clk_init() finds a matching device node while holding
the device tree spinlock.  When a matching device node is found, the
lock is dropped and then re-acquired in order to get a reference
to the matching device id structure.

Acquiring the spinlock twice is unnecessary (and it opens a
vulnerable window that could conceivably lead to errors).

There already exists an interface for both finding and taking a
reference to a device id under lock, so use it.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Christian Daudt <csd@broadcom.com>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
2014-01-08 11:04:34 +08:00