firefly-linux-kernel-4.4.55.git
10 years agopwm-bl: rename of pwm-rockhip.c and change the backlight-driver configuration
许盛飞 [Tue, 21 Jan 2014 11:51:19 +0000 (19:51 +0800)]
pwm-bl: rename of pwm-rockhip.c and change the backlight-driver configuration

10 years agopwm-bl: change some warning
许盛飞 [Tue, 21 Jan 2014 10:47:26 +0000 (18:47 +0800)]
pwm-bl: change some warning

10 years agoChange path of audio platform device from rk to rockchip
陈金泉 [Tue, 21 Jan 2014 10:16:11 +0000 (18:16 +0800)]
Change path of audio platform device from rk to rockchip

10 years agopwm-bl: add pwm backlight driver for rockchip
许盛飞 [Tue, 21 Jan 2014 09:53:11 +0000 (17:53 +0800)]
pwm-bl: add pwm backlight driver for rockchip

10 years agoupdate codec driver
陈金泉 [Tue, 21 Jan 2014 09:24:35 +0000 (17:24 +0800)]
update codec driver

10 years agoclk: rockchip: add clk_core ops support
dkl [Tue, 21 Jan 2014 08:55:26 +0000 (16:55 +0800)]
clk: rockchip: add clk_core ops support

10 years agoclk: rockchip: add apll set_rate support
dkl [Mon, 20 Jan 2014 13:15:10 +0000 (21:15 +0800)]
clk: rockchip: add apll set_rate support

10 years agoARM: rockchip: rk_fiq_debugger use 32-bit read/write, workaround for rk3288
黄涛 [Tue, 21 Jan 2014 06:26:09 +0000 (14:26 +0800)]
ARM: rockchip: rk_fiq_debugger use 32-bit read/write, workaround for rk3288

10 years agoARM: add support for the Cortex-A12 processor
Jonathan Austin [Fri, 6 Dec 2013 15:04:42 +0000 (15:04 +0000)]
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>
10 years agoclock: rockchip: ignore unused clocks temporarily.
dkl [Mon, 20 Jan 2014 11:36:52 +0000 (19:36 +0800)]
clock: rockchip: ignore unused clocks temporarily.

Include "clk_ignore_unused" in the bootargs to the kernel.

10 years agoRevert "rk_clk: not disable unused clocks temporarily"
dkl [Mon, 20 Jan 2014 11:31:05 +0000 (19:31 +0800)]
Revert "rk_clk: not disable unused clocks temporarily"

This reverts commit 97c8dc7c30de9e04136ce9d52c2cdda0bb828db8.

10 years agoARM: rockchip: rk3188 use timer-based delay
黄涛 [Mon, 20 Jan 2014 10:49:30 +0000 (18:49 +0800)]
ARM: rockchip: rk3188 use timer-based delay

10 years agoclocksource: rockchip_timer: support timer-based delay
黄涛 [Mon, 20 Jan 2014 10:49:12 +0000 (18:49 +0800)]
clocksource: rockchip_timer: support timer-based delay

10 years agork_clk: not disable unused clocks temporarily
dkl [Mon, 20 Jan 2014 09:40:16 +0000 (17:40 +0800)]
rk_clk: not disable unused clocks temporarily

10 years agork fb:base version for linux3.10
yxj [Tue, 14 Jan 2014 13:12:20 +0000 (21:12 +0800)]
rk fb:base version for linux3.10

10 years agork_clk: modify clk-ops.c to reuse and fit the common clk framework.
dkl [Fri, 17 Jan 2014 09:52:17 +0000 (17:52 +0800)]
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.

10 years agoclk: composite: pass mux_hw into determine_rate
Mike Turquette [Tue, 14 Jan 2014 20:56:01 +0000 (12:56 -0800)]
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>
10 years agoclk: composite: .determine_rate support
Emilio López [Sun, 15 Sep 2013 00:37:59 +0000 (21:37 -0300)]
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>
10 years agoARM: rockchip: add cortex-a9 cpuidle support
黄涛 [Thu, 16 Jan 2014 04:15:17 +0000 (12:15 +0800)]
ARM: rockchip: add cortex-a9 cpuidle support

10 years agoARM: rockchip: rk3188 add restart support
黄涛 [Wed, 15 Jan 2014 08:40:50 +0000 (16:40 +0800)]
ARM: rockchip: rk3188 add restart support

10 years agoARM: rockchip: rk3188 add uart2 static iomap
黄涛 [Mon, 13 Jan 2014 03:14:11 +0000 (11:14 +0800)]
ARM: rockchip: rk3188 add uart2 static iomap

10 years agoARM: rockchip: rk3188 add DDR init
黄涛 [Mon, 13 Jan 2014 02:59:13 +0000 (10:59 +0800)]
ARM: rockchip: rk3188 add DDR init

10 years agoARM: rockchip: rk3188 add pie init
黄涛 [Mon, 13 Jan 2014 02:51:01 +0000 (10:51 +0800)]
ARM: rockchip: rk3188 add pie init

10 years agork: fix PIE support multi cpu
黄涛 [Mon, 13 Jan 2014 02:43:41 +0000 (10:43 +0800)]
rk: fix PIE support multi cpu

10 years agork_clk: add common pll and gpll set_rate support
dkl [Thu, 9 Jan 2014 07:59:18 +0000 (15:59 +0800)]
rk_clk: add common pll and gpll set_rate support

10 years agork_clk: add clk-pll.c support
dkl [Wed, 8 Jan 2014 12:22:28 +0000 (20:22 +0800)]
rk_clk: add clk-pll.c support
        support pll recalc_rate/round_rate except apll

10 years agoclk: add CLK_SET_RATE_NO_REPARENT flag
James Hogan [Mon, 29 Jul 2013 11:25:01 +0000 (12:25 +0100)]
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>
10 years agoclk: of: helper for determining number of parent clocks
Mike Turquette [Tue, 8 Oct 2013 06:12:13 +0000 (23:12 -0700)]
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>
10 years agoclk: Correct lookup logic in clk_fetch_parent_index()
Tomasz Figa [Sun, 29 Sep 2013 00:37:16 +0000 (02:37 +0200)]
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>
10 years agoclk: Use kcalloc() to allocate arrays
Tomasz Figa [Sun, 29 Sep 2013 00:37:15 +0000 (02:37 +0200)]
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>
10 years agoclk: Add error handling to clk_fetch_parent_index()
Tomasz Figa [Sun, 29 Sep 2013 00:37:14 +0000 (02:37 +0200)]
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>
10 years agoclk: only call get_parent if there is one
Alex Elder [Thu, 5 Sep 2013 13:33:24 +0000 (08:33 -0500)]
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>
10 years agoclk: Move symbol export to proper location
Thierry Reding [Tue, 3 Sep 2013 07:43:51 +0000 (09:43 +0200)]
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>
10 years agoclk: fix new_parent dereference before null check
James Hogan [Thu, 29 Aug 2013 11:10:51 +0000 (12:10 +0100)]
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>
10 years agoclk: get matching entry under lock in of_clk_init()
Alex Elder [Thu, 22 Aug 2013 16:31:31 +0000 (11:31 -0500)]
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>
10 years agoclk: handle NULL struct clk gracefully
Mike Turquette [Thu, 22 Aug 2013 06:58:09 +0000 (23:58 -0700)]
clk: handle NULL struct clk gracefully

At some point changes to clk_set_rate and clk_set_parent introduced a
bug whereby NULL struct clk pointers were treated as an error. This is
in violation of the API in include/linux/clk.h. Reintroduce graceful
handling of NULL clk's by bailing from clk_set_rate and clk_set_parent
with return codes of zero.

Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: clk-mux: implement remuxing on set_rate
James Hogan [Mon, 29 Jul 2013 11:25:02 +0000 (12:25 +0100)]
clk: clk-mux: implement remuxing on set_rate

Implement clk-mux remuxing if the CLK_SET_RATE_NO_REPARENT flag isn't
set. This implements determine_rate for clk-mux to propagate to each
parent and to choose the best one (like clk-divider this chooses the
parent which provides the fastest rate <= the requested rate).

The determine_rate op is implemented as a core helper function so that
it can be easily used by more complex clocks which incorporate muxes.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: add support for clock reparent on set_rate
James Hogan [Mon, 29 Jul 2013 11:25:00 +0000 (12:25 +0100)]
clk: add support for clock reparent on set_rate

Add core support to allow clock implementations to select the best
parent clock when rounding a rate, e.g. the one which can provide the
closest clock rate to that requested. This is by way of adding a new
clock op, determine_rate(), which is like round_rate() but has an extra
parameter to allow the clock implementation to optionally select a
different parent clock. The core then takes care of reparenting the
clock when setting the rate.

The parent change takes place with the help of some new private data
members. struct clk::new_parent specifies a clock's new parent (NULL
indicates no change), and struct clk::new_child specifies a clock's new
child (whose new_parent member points back to it). The purpose of these
are to allow correct walking of the future tree for notifications prior
to actually reparenting any clocks, specifically to skip child clocks
who are being reparented to another clock (they will be notified via the
new parent), and to include any new child clock. These pointers are set
by clk_calc_subtree(), and the new_child pointer gets cleared when a
child is actually reparented to avoid duplicate POST_RATE_CHANGE
notifications.

Each place where round_rate() is called, determine_rate() is checked
first and called in preference. This restructures a few of the call
sites to simplify the logic into if/else blocks.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: move some parent related functions upwards
James Hogan [Mon, 29 Jul 2013 11:24:59 +0000 (12:24 +0100)]
clk: move some parent related functions upwards

Move some parent related functions up in clk.c so they can be used by
the modifications in the following patch which enables clock reparenting
during set_rate. No other changes are made so this patch makes no
functional difference in isolation. This is separate from the following
patch primarily to ease readability of that patch.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: abstract parent cache
James Hogan [Mon, 29 Jul 2013 11:24:58 +0000 (12:24 +0100)]
clk: abstract parent cache

Abstract access to the clock parent cache by defining
clk_get_parent_by_index(clk, index). This allows access to parent
clocks from clock drivers.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: fix typos
Peter Meerwald [Sat, 29 Jun 2013 13:14:19 +0000 (15:14 +0200)]
clk: fix typos

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: Always notify whole subtree when reparenting
Soren Brinkmann [Tue, 16 Apr 2013 17:06:50 +0000 (10:06 -0700)]
clk: Always notify whole subtree when reparenting

A clock's notifier count only reflects notifiers which are registered
directly for that clock. A reparent operation though affects the whole
subtree because of a potential rate change.
When issuing the pre rate change notifications only the notifier count
for the clock to be changed is considered and notifiers for subclocks
may never be called. Resulting in clocks in the subtree which have
registered notifiers, may receive a POST_- or ABORT_RATE_CHANGE
notification, without a PRE_RATE_CHANGE_NOTIFICATION.
Therefore always traverse the whole subtree when issueing pre rate
change notifications during a reparent operation.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: honor CLK_GET_RATE_NOCACHE in clk_set_rate
Peter De Schrijver [Wed, 5 Jun 2013 15:06:36 +0000 (18:06 +0300)]
clk: honor CLK_GET_RATE_NOCACHE in clk_set_rate

clk_set_rate() uses clk->rate directly. This causes problems if the clock
is marked as CLK_GET_RATE_NOCACHE. Hence call clk_get_rate() to get the
current rate.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: use clk_get_rate() for debugfs
Peter De Schrijver [Wed, 5 Jun 2013 15:06:35 +0000 (18:06 +0300)]
clk: use clk_get_rate() for debugfs

debugfs uses the rate field directly. However this ignores the
CLK_GET_RATE_NOCACHE flag. Call clk_get_rate() instead.

Tested-by: Mark Zhang <markz@nvidia.com>
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: Disable unused clocks after deferred probing is done
Saravana Kannan [Thu, 9 May 2013 18:35:01 +0000 (11:35 -0700)]
clk: Disable unused clocks after deferred probing is done

With deferred probing, late_initcall() is too soon to declare a clock as
unused. Wait for deferred probing to finish before declaring a clock as
unused. Since deferred probing is done in late_initcall(), do the unused
check to late_initcall_sync.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: Fix race condition between clk_set_parent and clk_enable()
Saravana Kannan [Thu, 16 May 2013 04:07:24 +0000 (21:07 -0700)]
clk: Fix race condition between clk_set_parent and clk_enable()

Without this patch, the following race condition is possible.
* clk-A has two parents - clk-X and clk-Y.
* All three are disabled and clk-X is current parent.
* Thread A: clk_set_parent(clk-A, clk-Y).
* Thread A: <snip execution flow>
* Thread A: Grabs enable lock.
* Thread A: Sees enable count of clk-A is 0, so doesn't enable clk-Y.
* Thread A: Updates clk-A SW parent to clk-Y
* Thread A: Releases enable lock.
* Thread B: clk_enable(clk-A).
* Thread B: clk_enable() enables clk-Y, then enabled clk-A and returns.

clk-A is now enabled in software, but not clocking in hardware since the
hardware parent is still clk-X.

The only way to avoid race conditions between clk_set_parent() and
clk_enable/disable() is to ensure that clk_enable/disable() calls don't
require changes to hardware enable state between changes to software clock
topology and hardware clock topology.

The options to achieve the above are:
1. Grab the enable lock before changing software/hardware topology and
   release it afterwards.
2. Keep the clock enabled for the duration of software/hardware topology
   change so that any additional enable/disable calls don't try to change
   the hardware state. Once the topology change is complete, the clock can
   be put back in its original enable state.

Option (1) is not an acceptable solution since the set_parent() ops might
need to sleep.

Therefore, this patch implements option (2).

This patch doesn't violate any API semantics. clk_disable() doesn't
guarantee that the clock is actually disabled. So, no clients of a clock
can assume that a clock is disabled after their last call to clk_disable().
So, enabling the clock during a parent change is not a violation of any API
semantics.

This also has the nice side effect of simplifying the error handling code.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[mturquette@linaro.org: fixed up whitespace issue]

10 years agoi2c: rockchip: support check idle
黄涛 [Mon, 6 Jan 2014 04:45:00 +0000 (12:45 +0800)]
i2c: rockchip: support check idle

10 years agopinctrl: rockchip: enable clock support, disable pinmux disable and RK30_PIN_PXX...
黄涛 [Mon, 6 Jan 2014 04:43:08 +0000 (12:43 +0800)]
pinctrl: rockchip: enable clock support, disable pinmux disable and RK30_PIN_PXX to GPIO_XX

10 years agork: l2c: only init when chip is rockchip
黄涛 [Mon, 6 Jan 2014 02:43:36 +0000 (10:43 +0800)]
rk: l2c: only init when chip is rockchip

10 years agork: support make kernel.img and board_kernel.img
黄涛 [Mon, 6 Jan 2014 02:36:57 +0000 (10:36 +0800)]
rk: support make kernel.img and board_kernel.img

10 years agork: fix PIE support, libpie_stage2.o depends on pie_rename.syms
黄涛 [Mon, 6 Jan 2014 02:35:20 +0000 (10:35 +0800)]
rk: fix PIE support, libpie_stage2.o depends on pie_rename.syms

10 years agopinctrl: Remove duplicate code in pinctrl_pm_select_state functions
Tony Lindgren [Thu, 18 Jul 2013 15:15:04 +0000 (08:15 -0700)]
pinctrl: Remove duplicate code in pinctrl_pm_select_state functions

There's no need to duplicate essentially the same functions. Let's
introduce static int pinctrl_pm_select_state() and make the other
related functions call that.

This allows us to add support later on for multiple active states,
and more optimized dynamic remuxing.

Note that we still need to export the various pinctrl_pm_select
functions as we want to keep struct pinctrl_state private to the
pinctrl code, and cannot replace those with inline functions.

Cc: Felipe Balbi <balbi@ti.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: export pinctrl_pm_select_*_state
Arnd Bergmann [Mon, 17 Jun 2013 15:12:28 +0000 (17:12 +0200)]
pinctrl: export pinctrl_pm_select_*_state

The three functions pinctrl_pm_select_default_state,
pinctrl_pm_select_sleep_state, and pinctrl_pm_select_idle_state
are used in drivers that can be loadable modules, and should
be exported.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agodrivers: pinctrl sleep and idle states in the core
Linus Walleij [Wed, 5 Jun 2013 13:30:33 +0000 (15:30 +0200)]
drivers: pinctrl sleep and idle states in the core

If a device have sleep and idle states in addition to the
default state, look up these in the core and stash them in
the pinctrl state container.

Add accessor functions for pinctrl consumers to put the pins
into "default", "sleep" and "idle" states passing nothing but
the struct device * affected.

Solution suggested by Kevin Hilman, Mark Brown and Dmitry
Torokhov in response to a patch series from Hebbar
Gururaja.

Cc: Hebbar Gururaja <gururaja.hebbar@ti.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoadd clock init
xxx [Fri, 3 Jan 2014 06:28:11 +0000 (14:28 +0800)]
add clock init

10 years agopinctrl:fix irq operation bug
luowei [Mon, 30 Dec 2013 01:39:15 +0000 (09:39 +0800)]
pinctrl:fix irq operation bug

10 years agofiq debugger: modify switch_cpu()
hhb [Thu, 26 Dec 2013 02:32:04 +0000 (10:32 +0800)]
fiq debugger: modify switch_cpu()

10 years agork3188: set mux/divider/gate flags && fix some bugs
chenxing [Mon, 23 Dec 2013 04:06:09 +0000 (12:06 +0800)]
rk3188: set mux/divider/gate flags && fix some bugs

10 years agoclk: gate: add CLK_GATE_HIWORD_MASK
Haojian Zhuang [Sat, 8 Jun 2013 14:47:19 +0000 (22:47 +0800)]
clk: gate: add CLK_GATE_HIWORD_MASK

In Rockchip Cortex-A9 based chips, they don't use paradigm of
reading-changing-writing the register contents.  Instead they
use a hiword mask to indicate the changed bits.

When b1 should be set as gate, it also needs to indicate the change
by setting hiword mask (b1 << 16).

The patch adds gate flag for this usage.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: divider: add CLK_DIVIDER_HIWORD_MASK flag
Haojian Zhuang [Sat, 8 Jun 2013 14:47:18 +0000 (22:47 +0800)]
clk: divider: add CLK_DIVIDER_HIWORD_MASK flag

In both Hisilicon & Rockchip Cortex-A9 based chips, they don't use the
paradigm of reading-changing-writing the register contents.
Instead they use a hiword mask to indicate the changed bits.

When b01 should be set as setting divider, it also needs to indicate
the change by setting hiword mask (b11 << 16).

The patch adds divider flag for this usage.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: mux: add CLK_MUX_HIWORD_MASK
Haojian Zhuang [Sat, 8 Jun 2013 14:47:17 +0000 (22:47 +0800)]
clk: mux: add CLK_MUX_HIWORD_MASK

In both Hisilicon & Rockchip Cortex-A9 based chips, they don't use the
paradigm of reading-changing-writing the register contents.
Instead they use a hiword mask to indicate the changed bits.

When b01 should be set as switching mux, it also needs to indicate
the change by setting hiword mask (b11 << 16).

The patch adds mux flag for this usage.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
10 years agork3188: revert clk-divider.c and clk-mux.c in drivers/clk/
chenxing [Mon, 23 Dec 2013 02:48:57 +0000 (10:48 +0800)]
rk3188: revert clk-divider.c and clk-mux.c in drivers/clk/

10 years agork3188: add clock support
chenxing [Fri, 20 Dec 2013 11:07:23 +0000 (19:07 +0800)]
rk3188: add clock support

10 years agopinctrl:delete unused code
luowei [Thu, 19 Dec 2013 10:38:22 +0000 (18:38 +0800)]
pinctrl:delete unused code

10 years agoARM: Fix "Make low-level printk work" to use a separate config option
Arve Hjønnevåg [Sat, 15 Jun 2013 02:54:40 +0000 (19:54 -0700)]
ARM: Fix "Make low-level printk work" to use a separate config option

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Conflicts:
kernel/printk.c

10 years agoMerge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android+android...
黄涛 [Tue, 17 Dec 2013 06:48:54 +0000 (14:48 +0800)]
Merge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android+android-common-3.10' into develop-3.10

10 years agoMerge remote-tracking branch 'origin/upstream/android-common-3.10' into linux-linaro...
黄涛 [Tue, 17 Dec 2013 06:41:39 +0000 (14:41 +0800)]
Merge remote-tracking branch 'origin/upstream/android-common-3.10' into linux-linaro-lsk-v3.10-android+android-common-3.10

10 years agoMerge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android' into...
黄涛 [Tue, 17 Dec 2013 06:41:09 +0000 (14:41 +0800)]
Merge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android' into linux-linaro-lsk-v3.10-android+android-common-3.10

Conflicts:
kernel/printk.c

10 years agogpiolib: safer implementation of desc_to_gpio()
Alexandre Courbot [Fri, 4 Oct 2013 17:59:57 +0000 (10:59 -0700)]
gpiolib: safer implementation of desc_to_gpio()

The current implementation of desc_to_gpio() relies on the chip pointer
to be set to a valid value in order to compute the GPIO number. This
was done in the hope that we can get rid of the gpio_desc global array,
but this is not happening anytime soon.

This patch reimplements desc_to_gpio() in a fashion similar to that of
gpio_to_desc(). As a result, desc_to_gpio(gpio_to_desc(gpio)) == gpio is
now always true. This allows to call desc_to_gpio() on non-initialized
descriptors as some error-handling code currently does.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reported-by: Dr. H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoion: Fix build warning
John Stultz [Fri, 13 Dec 2013 03:09:47 +0000 (19:09 -0800)]
ion: Fix build warning

Add #include <linux/device.h> to fix the following warning seen
with gcc 4.7.3:

In file included from drivers/staging/android/ion/ion_heap.c:26:0:
drivers/staging/android/ion/ion_priv.h:358:21: warning: ‘struct device’ declared inside parameter list [enabled by default]
drivers/staging/android/ion/ion_priv.h:358:21: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Change-Id: Icc249b32d877a5b76b1669c99bef2b05d9e322da
Signed-off-by: John Stultz <john.stultz@linaro.org>
10 years agoion: remove ion_user_handle_t from ion_test.h
Colin Cross [Tue, 17 Dec 2013 00:33:00 +0000 (16:33 -0800)]
ion: remove ion_user_handle_t from ion_test.h

ion_test.h should not define ion_user_handle_t, and defining it
causes a warning:
In file included from drivers/staging/android/ion/ion_test.c:31:
drivers/staging/android/ion/../uapi/ion_test.h:23: error: redefinition of typedef 'ion_user_handle_t'
drivers/staging/android/ion/../uapi/ion.h:23: note: previous declaration of 'ion_user_handle_t' was here

Change-Id: I541897745a5ff128790a7e51b23f3034f5d3d6d9
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Colin Cross <ccross@android.com>
10 years agoion: Don't allow building ION as a module.
John Stultz [Sat, 14 Dec 2013 20:06:45 +0000 (12:06 -0800)]
ion: Don't allow building ION as a module.

ION doesn't export the proper symbols for it to be a module. This
causes build issues when ION is configured as a module.

Since Andorid kernels rarely use modules (I think recent policy
requires no modules?), go ahead and set the ION config to a bool
from the tristate option.

If folks decide ION as a module is important, we will have to go
through and export the various needed symbols.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Mark Brown [Mon, 16 Dec 2013 16:28:09 +0000 (16:28 +0000)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android

10 years agoMerge remote-tracking branch 'lsk/v3.10/topic/arm64-fvp' into linux-linaro-lsk
Mark Brown [Mon, 16 Dec 2013 16:27:59 +0000 (16:27 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-fvp' into linux-linaro-lsk

10 years agoarm64: dts: Add properties required for CLCD enumeration
Mark Brown [Mon, 16 Dec 2013 16:26:36 +0000 (16:26 +0000)]
arm64: dts: Add properties required for CLCD enumeration

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agopinctrl:add vol_domain dts support
luowei [Mon, 16 Dec 2013 14:23:44 +0000 (22:23 +0800)]
pinctrl:add vol_domain dts support

10 years agork: fix PIE support, better support clean
黄涛 [Mon, 16 Dec 2013 11:34:04 +0000 (19:34 +0800)]
rk: fix PIE support, better support clean

10 years agoMerge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android' into...
黄涛 [Mon, 16 Dec 2013 06:23:41 +0000 (14:23 +0800)]
Merge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android' into develop-3.10

10 years agopinctrl:add interface for drive and vol setting
luowei [Sat, 14 Dec 2013 11:14:15 +0000 (19:14 +0800)]
pinctrl:add interface for drive and vol setting

10 years agotimerfd: support CLOCK_BOOTTIME clock
Greg Hackmann [Fri, 13 Dec 2013 21:02:31 +0000 (13:02 -0800)]
timerfd: support CLOCK_BOOTTIME clock

Add CLOCK_BOOTTIME support to timerfd

Change-Id: I14dee6d1104f15a05f463a632268ac4564753faf
Signed-off-by: Greg Hackmann <ghackmann@google.com>
10 years agoandroid: configs: require TCPMSS, remove SCHED_TRACER and TIMER_STATS
JP Abgrall [Sat, 23 Nov 2013 01:29:57 +0000 (17:29 -0800)]
android: configs: require TCPMSS, remove SCHED_TRACER and TIMER_STATS

TCPMSS is required for the Android Vpn service to correctly
handle the MTU on tun/ppp devices.  Bug: 11579326
We don't really need SCHED_TRACER and the TIMER_STATS.

Change-Id: I10c5767a6324a496713752d4fe9eff361dc8e06a
(cherry picked from commit 23f01e8e81f3c53985958fa291b39c84293ad047)

10 years agoMerge remote-tracking branch 'lsk/v3.10/topic/aosp-warnings' into linux-linaro-lsk...
Mark Brown [Fri, 13 Dec 2013 18:53:19 +0000 (18:53 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/aosp-warnings' into linux-linaro-lsk-android

10 years agoMerge remote-tracking branch 'lsk/v3.10/topic/aosp' into linux-linaro-lsk-android
Mark Brown [Fri, 13 Dec 2013 18:52:59 +0000 (18:52 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/aosp' into linux-linaro-lsk-android

Conflicts:
drivers/staging/android/ion/ion_chunk_heap.c
kernel/printk.c

10 years agoMerge branch 'android-3.10' of https://android.googlesource.com/kernel/common into...
Mark Brown [Fri, 13 Dec 2013 18:50:12 +0000 (18:50 +0000)]
Merge branch 'android-3.10' of https://android.googlesource.com/kernel/common into lsk-v3.10-aosp

10 years agonetfilter: fix function return types for 64bit
Mark Hambleton [Fri, 29 Nov 2013 13:44:53 +0000 (13:44 +0000)]
netfilter: fix function return types for 64bit

Fix functions to return ssize_t instead of int to match
prototypes.

Signed-off-by: Mark Hambleton <mahamble@broadcom.com>
Reviewed-by: Edwin Chan <echan@broadcom.com>
Reviewed-by: James King <jamesk@broadcom.com>
Reviewed-by: John Garry <jgarry@broadcom.com>
Reviewed-by: Mark Hambleton <mark.hambleton@broadcom.com>
Reviewed-by: Joyjit Nath <joyjit@broadcom.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Mark Brown [Fri, 13 Dec 2013 17:25:16 +0000 (17:25 +0000)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android

10 years agoMerge remote-tracking branch 'lsk/v3.10/topic/arm64-hmp' into linux-linaro-lsk
Mark Brown [Fri, 13 Dec 2013 17:24:35 +0000 (17:24 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-hmp' into linux-linaro-lsk

10 years agoarm64: Enable HMP for ARMv8
Mark Hambleton [Wed, 27 Nov 2013 13:30:29 +0000 (13:30 +0000)]
arm64: Enable HMP for ARMv8

Signed-off-by: Mark Hambleton <mahamble@broadcom.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Mark Brown [Fri, 13 Dec 2013 12:31:39 +0000 (12:31 +0000)]
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android

10 years agoMerge remote-tracking branch 'lsk/v3.10/topic/arm64-cpu' into linux-linaro-lsk
Mark Brown [Fri, 13 Dec 2013 12:28:13 +0000 (12:28 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-cpu' into linux-linaro-lsk

10 years agoARM64: DT: define ARM64 specific arch_match_cpu_phys_id
Sudeep KarkadaNagesha [Mon, 21 Oct 2013 12:29:42 +0000 (13:29 +0100)]
ARM64: DT: define ARM64 specific arch_match_cpu_phys_id

OF/DT core library provides architecture specific hook to match the
logical cpu index with the corresponding physical identifier.

On ARM64, the MPIDR_EL1 contains specific bitfields(MPIDR_EL1.Aff{3..0})
which uniquely identify a CPU, in addition to some non-identifying
information and reserved bits. The ARM cpu binding defines the 'reg'
property to only contain the affinity bits, and any cpu nodes with other
bits set in their 'reg' entry are skipped.

This patch overrides the weak definition of arch_match_cpu_phys_id
with ARM64 specific version using MPIDR_EL1.Aff{3..0} as cpu physical
identifiers.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 6e15d0e04bfeaa5662a289ee915273307326e45a)

10 years agoARM: rockchip: add grf.h
黄涛 [Fri, 13 Dec 2013 11:53:50 +0000 (19:53 +0800)]
ARM: rockchip: add grf.h

10 years agoARM: rockchip: update rockchip_defconfig to support module and i2c, etc
黄涛 [Fri, 13 Dec 2013 11:49:51 +0000 (19:49 +0800)]
ARM: rockchip: update rockchip_defconfig to support module and i2c, etc

10 years agoi2c: rockchip: i2c_msg add scl_rate for compat support old driver
黄涛 [Fri, 13 Dec 2013 11:44:36 +0000 (19:44 +0800)]
i2c: rockchip: i2c_msg add scl_rate for compat support old driver

10 years agoARM: rockchip: rk3188-tb enable i2c
黄涛 [Fri, 13 Dec 2013 11:42:23 +0000 (19:42 +0800)]
ARM: rockchip: rk3188-tb enable i2c

10 years agoi2c: add rockchip i2c driver
黄涛 [Fri, 13 Dec 2013 11:41:11 +0000 (19:41 +0800)]
i2c: add rockchip i2c driver

10 years agoMerge remote-tracking branch 'lsk/v3.10/topic/arm64-topology' into linux-linaro-lsk
Mark Brown [Fri, 13 Dec 2013 10:56:15 +0000 (10:56 +0000)]
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-topology' into linux-linaro-lsk

10 years agoarm64: Add scheduler multicore and SMT Kconfig options
Mark Brown [Fri, 13 Dec 2013 10:52:45 +0000 (10:52 +0000)]
arm64: Add scheduler multicore and SMT Kconfig options

Enable additional use of additional scheduler features with the topology
information.

Reported-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoARM: rockchip: l2 and cpu_axi_bus DT add rockchip prefix
黄涛 [Fri, 13 Dec 2013 09:19:07 +0000 (17:19 +0800)]
ARM: rockchip: l2 and cpu_axi_bus DT add rockchip prefix

10 years agoARM: rockchip: rk_fiq_debugger DT add rockchip prefix
黄涛 [Fri, 13 Dec 2013 08:52:39 +0000 (16:52 +0800)]
ARM: rockchip: rk_fiq_debugger DT add rockchip prefix