Commit Graph

404578 Commits

Author SHA1 Message Date
dalon.zhang
bf3c956402 Merge branch 'rk_develop-3.10' into rk_develop-3.10-next
Conflicts:
	drivers/mmc/host/rk_sdmmc.c
2015-03-19 16:42:17 +08:00
dalon.zhang
7325ef9db9 camera: rk3368: add aclk_rga 2015-03-19 16:38:05 +08:00
dalon.zhang
13549edf67 camsys_drv: v0.0x1d.0 2015-03-19 16:17:47 +08:00
Huang, Tao
5ad4b90d11 arm64: rockchip: rk3368 support psci-0.2
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-03-19 15:58:47 +08:00
Huang, Tao
4b0b63a9dd arm64: rockchip: rk3368 fix qos reg define and increase peri priority
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-03-19 14:01:41 +08:00
hwg
d93cf33990 wifi: remove make modules configs 2015-03-19 08:51:42 +08:00
dalon.zhang
49a2dd374c camsys_head: v0.0xb.0 2015-03-18 21:22:06 +08:00
chenjh
c066069b1d rk3368: support cpu suspend to wfi
Signed-off-by: chenjh <chenjh@rock-chips.com>
2015-03-18 20:46:25 +08:00
Alpha Lin
c102973198 IEP: revise the dtsi clock gate number.
Incorrect clock gate provided in previous commit.

Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2015-03-18 18:16:27 +08:00
zhangqing
8d473d7471 rk3x:pmic:rk818:not init rk818_ldo3 in uboot 2015-03-18 10:15:41 -07:00
hjc
774247aa9b rk fb: update pixclock init value and scale mode only support ONE_DUAL mode
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-18 16:29:06 +08:00
guoyi
0589e3d91d rk3368-p9: dts: change rk818 battery configs. 2015-03-18 14:39:25 +08:00
xiaoyao
77e142e21d rk_sdmmc: recalculate audib rx_wmark
AudiB contain a less limitation in rx_wmark.

Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
Signed-off-by: lintao <lintao@rock-chips.com>
2015-03-18 11:43:16 +08:00
Lars-Peter Clausen
55f7b1a4c0 regmap: Make regmap-mmio usable from atomic contexts
regmap-mmio uses a spinlock with spin_lock() and spin_unlock() for locking.
To be able to use the regmap API from different contexts (atomic vs non-atomic),
without the risk of race conditions, we need to use spin_lock_irqsave() and
spin_lock_irqrestore() instead. A new field, the spinlock_flags field, is added
to regmap struct to store the flags between regmap_{,un}lock_spinlock(). The
spinlock_flags field itself is also protected by the spinlock.

Thanks to Stephen Warren for the suggestion of this particular solution.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 92ab1aab59)
2015-03-17 20:12:30 +08:00
Huang, Tao
48e2666fad arm64: rockchip: rk3368 support boot from little core
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-03-17 19:17:05 +08:00
lyz
52a324603c usb: dwc_otg: enable clk and exit suspend when usb_core_reset
Avoid this warning message "WARN::dwc_otg_core_reset:5543:
dwc_otg_core_reset() HANG! AHB Idle GRSTCTL=4000020"
2015-03-17 18:43:17 +08:00
Zheng Yang
393579ee1a rk3368 hdmi: support pd_hdmi.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2015-03-17 17:05:53 +08:00
lintao
77d06da6c3 mmc: use ilog2 for fifoth calculation
Signed-off-by: lintao <lintao@rock-chips.com>
2015-03-17 16:49:47 +08:00
lintao
f8847331f8 dtsi: sdmmc: add card_detect for udbg
Signed-off-by: lintao <lintao@rock-chips.com>
2015-03-17 16:49:47 +08:00
Huang, Tao
05b29f94a4 Merge branch develop-3.10 2015-03-17 15:16:39 +08:00
hjc
b7574401ec rk fb: compatible with 32 bit system
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-17 15:31:59 +08:00
hjc
1c3778cece rk3368 lcdc: add yuv420sp nv21 format at lcdc scale fac
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-17 15:31:58 +08:00
zsq
1e79010fe3 rga2 support 32bit compile at 64bit platform 2015-03-17 14:38:08 +08:00
lintao
21c1d0e049 fix conpile error 2015-03-17 14:23:19 +08:00
hwg
3292ba3d84 wifi: use buildin instand of ko for compatibility 2015-03-17 11:43:32 +08:00
lintao
588b08f8aa mmc: rk_sdmmc: add uart & jtag soft-switch by routine card present signal
Reviewed-and-tested-by: <xiaoyao@rock-chips.com>
Signed-off-by: lintao <lintao@rock-chips.com>
2015-03-17 10:08:26 +08:00
lintao
9d91e1f4ef dtsi: rk3368: add uart & jtag pcl func for sdmmc mux
Signed-off-by: lintao <lintao@rock-chips.com>
2015-03-17 10:08:25 +08:00
Alpha Lin
50351f6547 VPU: revise previous commit.
can not be built in previous commit.

Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2015-03-17 09:43:18 +08:00
huang zhibao
3cfc69712b dts: add work and power led in rk3128-box.dts 2015-03-17 09:29:06 +08:00
huang zhibao
1f68318ca1 Merge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10 2015-03-17 09:18:32 +08:00
Alpha Lin
c3e66e4cbe VPU, enable frequency raise for 4k h.264 decoding.
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2015-03-17 09:08:32 +08:00
Lorenzo Pieralisi
4c1b770ca3 arm64: add PSCI CPU_SUSPEND based cpu_suspend support
This patch implements the cpu_suspend cpu operations method through
the PSCI CPU SUSPEND API. The PSCI implementation translates the idle state
index passed by the cpu_suspend core call into a valid PSCI state according to
the PSCI states initialized at boot through the cpu_init_idle() CPU
operations hook.

The PSCI CPU suspend operation hook checks if the PSCI state is a
standby state. If it is, it calls the PSCI suspend implementation
straight away, without saving any context. If the state is a power
down state the kernel calls the __cpu_suspend API (that saves the CPU
context) and passed the PSCI suspend finisher as a parameter so that PSCI
can be called by the __cpu_suspend implementation after saving and flushing
the context as last function before power down.

For power down states, entry point is set to cpu_resume physical address,
that represents the default kernel execution address following a CPU reset.

Reviewed-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 18910ab0d9)
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>

Conflicts:
	arch/arm64/kernel/psci.c
2015-03-16 21:38:08 +08:00
Lorenzo Pieralisi
32b8483751 arm64: kernel: fix __cpu_suspend mm switch on warm-boot
On arm64 the TTBR0_EL1 register is set to either the reserved TTBR0
page tables on boot or to the active_mm mappings belonging to user space
processes, it must never be set to swapper_pg_dir page tables mappings.

When a CPU is booted its active_mm is set to init_mm even though its
TTBR0_EL1 points at the reserved TTBR0 page mappings. This implies
that when __cpu_suspend is triggered the active_mm can point at
init_mm even if the current TTBR0_EL1 register contains the reserved
TTBR0_EL1 mappings.

Therefore, the mm save and restore executed in __cpu_suspend might
turn out to be erroneous in that, if the current->active_mm corresponds
to init_mm, on resume from low power it ends up restoring in the
TTBR0_EL1 the init_mm mappings that are global and can cause speculation
of TLB entries which end up being propagated to user space.

This patch fixes the issue by checking the active_mm pointer before
restoring the TTBR0 mappings. If the current active_mm == &init_mm,
the code sets the TTBR0_EL1 to the reserved TTBR0 mapping instead of
switching back to the active_mm, which is the expected behaviour
corresponding to the TTBR0_EL1 settings when __cpu_suspend was entered.

Fixes: 95322526ef ("arm64: kernel: cpu_{suspend/resume} implementation")
Cc: <stable@vger.kernel.org> # 3.14+: 18ab7db
Cc: <stable@vger.kernel.org> # 3.14+: 714f599
Cc: <stable@vger.kernel.org> # 3.14+: c3684fb
Cc: <stable@vger.kernel.org> # 3.14+
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit f43c27188a)
2015-03-16 21:06:56 +08:00
Laura Abbott
9953ebb6c1 arm64: Move cpu_resume into the text section
The function cpu_resume currently lives in the .data section.
There's no reason for it to be there since we can use relative
instructions without a problem. Move a few cpu_resume data
structures out of the assembly file so the .data annotation
can be dropped completely and cpu_resume ends up in the read
only text section.

Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Kees Cook <keescook@chromium.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit c3684fbb44)
2015-03-16 20:59:36 +08:00
Lorenzo Pieralisi
41cdcfc2f7 arm64: kernel: refactor the CPU suspend API for retention states
CPU suspend is the standard kernel interface to be used to enter
low-power states on ARM64 systems. Current cpu_suspend implementation
by default assumes that all low power states are losing the CPU context,
so the CPU registers must be saved and cleaned to DRAM upon state
entry. Furthermore, the current cpu_suspend() implementation assumes
that if the CPU suspend back-end method returns when called, this has
to be considered an error regardless of the return code (which can be
successful) since the CPU was not expected to return from a code path that
is different from cpu_resume code path - eg returning from the reset vector.

All in all this means that the current API does not cope well with low-power
states that preserve the CPU context when entered (ie retention states),
since first of all the context is saved for nothing on state entry for
those states and a successful state entry can return as a normal function
return, which is considered an error by the current CPU suspend
implementation.

This patch refactors the cpu_suspend() API so that it can be split in
two separate functionalities. The arm64 cpu_suspend API just provides
a wrapper around CPU suspend operation hook. A new function is
introduced (for architecture code use only) for states that require
context saving upon entry:

__cpu_suspend(unsigned long arg, int (*fn)(unsigned long))

__cpu_suspend() saves the context on function entry and calls the
so called suspend finisher (ie fn) to complete the suspend operation.
The finisher is not expected to return, unless it fails in which case
the error is propagated back to the __cpu_suspend caller.

The API refactoring results in the following pseudo code call sequence for a
suspending CPU, when triggered from a kernel subsystem:

/*
 * int cpu_suspend(unsigned long idx)
 * @idx: idle state index
 */
{
-> cpu_suspend(idx)
	|---> CPU operations suspend hook called, if present
		|--> if (retention_state)
			|--> direct suspend back-end call (eg PSCI suspend)
		     else
			|--> __cpu_suspend(idx, &back_end_finisher);
}

By refactoring the cpu_suspend API this way, the CPU operations back-end
has a chance to detect whether idle states require state saving or not
and can call the required suspend operations accordingly either through
simple function call or indirectly through __cpu_suspend() which carries out
state saving and suspend finisher dispatching to complete idle state entry.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 714f599255)
2015-03-16 20:53:51 +08:00
Lorenzo Pieralisi
6203b69d69 arm64: kernel: add missing __init section marker to cpu_suspend_init
Suspend init function must be marked as __init, since it is not needed
after the kernel has booted. This patch moves the cpu_suspend_init()
function to the __init section.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 18ab7db6b7)
2015-03-16 20:45:40 +08:00
Sudeep KarkadaNagesha
81f35ed60f driver/core: cpu: initialize of_node in cpu's device struture
CPUs are also registered as devices but the of_node in these cpu
devices are not initialized. Currently different drivers requiring
to access cpu device node are parsing the nodes themselves and
initialising the of_node in cpu device.

The of_node in all the cpu devices needs to be initialized properly
and at one place. The best place to update this is CPU subsystem
driver when registering the cpu devices.

The OF/DT core library now provides of_get_cpu_node to retrieve a cpu
device node for a given logical index by abstracting the architecture
specific details.

This patch uses of_get_cpu_node to assign of_node when registering the
cpu devices.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
(cherry picked from commit f86e4718f2)
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>

Conflicts:
	drivers/base/cpu.c
2015-03-16 20:43:15 +08:00
huangzhibao
17685ec17a Merge branch 'develop-3.10-next' of ssh://10.10.10.29/rk/kernel into develop-3.10-next 2015-03-16 20:09:07 +08:00
Huang, Tao
03b9f4949f Merge branch linux-linaro-lsk-v3.10-android 2015-03-16 20:30:06 +08:00
huangzhibao
1958bfe6b9 dts: update rk3368-box dts:1, wifi_bt,2,enabled pwm1;3.emmc clk 2015-03-16 20:08:50 +08:00
dkl
68bdc6aff1 pd: rk3368: add rk3368 power domain support (as pd clk)
Signed-off-by: dkl <dkl@rock-chips.com>
2015-03-16 17:53:51 +08:00
huang zhibao
6d96110dd3 Merge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10 2015-03-16 17:39:19 +08:00
lyz
2e57f1da64 usb: dwc_otg: fix bug in device_init routine
1.wait epenable bit timeout decrease from 10s to 1s
2.fix bug, without 'j++' this loop never break if there is some
problem with ep state
2015-03-16 17:15:28 +08:00
dkl
2d040c7441 dts: rk3368: remove "clk_ignore_unused" from bootargs
Signed-off-by: dkl <dkl@rock-chips.com>
2015-03-16 16:47:00 +08:00
lyz
f8b5e71ded usb: ehci: fix suspend bug 2015-03-16 16:42:32 +08:00
lyz
d5e07b80f1 usb: dwc_otg: change method of checking urb dequeue status
According to commit e9df41c5c, change dwc_otg driver to call
usb_hcd_link_urb_to_ep() and usb_hcd_unlink_urb_from_ep() routine
for checking urb dequeue status instead check for null pointer
by hcd driver to test address.

TEST:
1.rk3126 run host/device change script for 10000 times
2015-03-16 16:41:43 +08:00
许盛飞
7956759a6a rk818-battery: add calibration of charge and discharge
Signed-off-by: 许盛飞 <xsf@rock-chips.com>
2015-03-16 09:20:41 +08:00
许盛飞
98a17a9e41 rk818-battery: enable parse battery params
Signed-off-by: 许盛飞 <xsf@rock-chips.com>
2015-03-16 09:19:02 +08:00
许盛飞
b948a99ebc rk818-battery: reconstruct the voltage discharge algorithm
Signed-off-by: 许盛飞 <xsf@rock-chips.com>
2015-03-16 09:16:57 +08:00
Zheng Yang
5ef7d03446 rk3368-box.dts: set initial display timing to 1080P.
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2015-03-14 10:11:56 +08:00