Commit Graph

404519 Commits

Author SHA1 Message Date
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
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
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
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
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
guoyi
a95b17f7f4 3368_P9: dts: renamed 818 DCDC2 regulator to vdd_logic 2015-03-13 15:57:41 +08:00
Alpha Lin
f27b31eae5 VPU: remove dev_set_name.
dev_set_name is prohibit in linux, and may casue system
warning dump.

Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2015-03-13 10:33:46 +08:00
hjc
5f8a929f59 rk312x lcdc: add to get hwc layer status
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-12 16:19:57 +08:00
Mark Yao
cb49914a9d bmp_helper: fix bmp rle8 display abnormal
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2015-03-12 16:19:57 +08:00
Huang, Tao
9a742e52b1 rtc: HYM8563: don't call rtc_year_days
If i2c error, the driver may call rtc_year_days with month -1, which will
cause crash. Fix this by never call rtc_year_days at all.

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2015-03-12 15:48:12 +08:00
CMY
29dc0928ee arm64: ion: fix scatterlist alloc fault on ion_system heap
Fix this bug:
WARNING: at lib/scatterlist.c:251 __sg_alloc_table+0x5c/0x15c()
Modules linked in: pvrsrvkm(O)
CPU: 2 PID: 582 Comm: Binder_5 Tainted: G           O 3.10.0 #10
Call trace:
[<ffffffc000088164>] dump_backtrace+0x0/0x140
[<ffffffc0000882b4>] show_stack+0x10/0x1c
[<ffffffc0008ccaf0>] dump_stack+0x1c/0x28
[<ffffffc0000a13c0>] warn_slowpath_common+0x74/0x9c
[<ffffffc0000a14ac>] warn_slowpath_null+0x14/0x20
[<ffffffc0002fadc4>] __sg_alloc_table+0x58/0x15c
[<ffffffc0002faee8>] sg_alloc_table+0x20/0x50
[<ffffffc00067ab7c>] ion_system_heap_allocate+0x188/0x318
[<ffffffc00067823c>] ion_alloc+0x134/0x788
[<ffffffc000678d68>] ion_ioctl+0x15c/0x344
[<ffffffc0001840ac>] vfs_ioctl+0x20/0x3c
[<ffffffc0001849b4>] do_vfs_ioctl+0x478/0x550
[<ffffffc000184ae8>] SyS_ioctl+0x5c/0x88

Signed-off-by: CMY <cmy@rock-chips.com>
2015-03-10 15:45:14 +08:00
hjc
68c0a19fed rk3368 dtsi: update vop iommu compatible name
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-10 15:05:27 +08:00
Mark Brown
e8f1cafd74 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2015-03-09 12:27:34 +00:00
Mark Brown
c810fcb930 Merge remote-tracking branch 'lsk/v3.10/topic/cpufreq' into linux-linaro-lsk 2015-03-09 12:27:27 +00:00
Mark Brown
db295c8937 cpufreq: Revert "cpufreq: suspend governors on system suspend/hibernate"
This reverts commit adb665056a.

The commit has too many hidden dependencies to be sensibly backported.

Signed-off-by: Mark Brown <broonie@linaro.org>
2015-03-09 12:27:09 +00:00
Mark Brown
d255fcab2b cpufreq: Revert "cpufreq: Don't iterate over all CPUs when suspending and resuming governors"
This reverts commit 212df5dd32.

The commit it's fixing has too many other dependencies.

Signed-off-by: Mark Brown <broonie@linaro.org>
2015-03-09 12:26:10 +00:00
hjc
5e69085097 rk3368 lcdc: FBDC_ABGR_888 data format support alpha
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-09 18:32:01 +08:00
hjc
0d615e8cda rk fb: if not want the config effect,set reserved[3] bit[0] 1
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-09 18:10:19 +08:00
hwg
6086f8f486 update wifi bcmdhd driver:
solve kernel panic when use gmac and hotspots at same time
2015-03-09 17:23:03 +08:00
dkl
6271af33fe dts: rk3036/rk312x/rk3288: add dma clk to fit
commit 75ce2b9330

Signed-off-by: dkl <dkl@rock-chips.com>
2015-03-09 15:34:13 +08:00
hjc
1cefe0404b rk3368 lcdc: add fbdc data format: HAL_PIXEL_FORMAT_FBDC_RGBA888 2015-03-09 15:52:06 +08:00
hjc
36841c672b rk3368 lcdc:
1. check act and size in win2 win3 layer;
    2. add support yuv420sp nv21 data format;
    3. in read bit func,not need to backup reg;
    4. complete get win state func;

Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-09 15:04:04 +08:00
hjc
367a5c837d rk fb: add memsize check
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-09 14:54:05 +08:00
hjc
dbdab722d9 rk lcdc: if win not support scale, make sure dsp size equal to act size
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-09 14:54:05 +08:00
hjc
f653373db0 rk fb: add support yuv420sp nv21 data format
Signed-off-by: hjc <hjc@rock-chips.com>

Conflicts:
	drivers/video/rockchip/rkfb_sysfs.c
	include/linux/rk_fb.h
2015-03-09 14:54:05 +08:00
hjc
789a229b33 rk fb: make sure win close state take effect when update regs
Signed-off-by: hjc <hjc@rock-chips.com>
2015-03-09 14:54:05 +08:00
dkl
98d0d65e06 rk3368: clk: modify relation in software of clocks under PD_VIO
It is necessary to enable hclk_vio_h2p\pclk_vio_h2p\hclk_vio_ahb_arbi
for devices under power doamin PD_VIO wen they work. Thus these clks
are modified to be parent of other clks from hclk_vio.

Signed-off-by: dkl <dkl@rock-chips.com>
2015-03-09 14:04:55 +08:00
dkl
75ce2b9330 DMA: rk3368: add dma clk enable/disable
Signed-off-by: dkl <dkl@rock-chips.com>
2015-03-09 14:04:55 +08:00
Zheng Yang
874f30142e HDMI: Modify color output policy.
Introduce feature SUPPORT_YCBCR_INPUT. If VOP can
        output YCbCr, VOP output color mode is equal to HDMI
        output color mode. Otherwise, VOP just output RGB,
        HDMI will conver color space.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2015-03-09 11:30:24 +08:00
Zheng Yang
c353bcdcf1 HDMI: add mutex lock when hdmi is set to auto mode, to avoid
system crash by NULL pointer.

Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
2015-03-09 11:30:10 +08:00
David Wu
c39e33f52b rk3368: thermal: add log trigger for tsadc
enable log:
	echo t > sys/rockchip_thermal/temp
	disable log:
	echo f > sys/rockchip_thermal/temp

Signed-off-by: David Wu <wdc@rock-chips.com>
2015-03-07 13:08:39 +08:00
David Wu
88db77f947 rk3368: tb_8846: change 8846 mode for tsadc
Signed-off-by: David Wu <wdc@rock-chips.com>
2015-03-07 00:28:42 +08:00
David Wu
6460e425e4 rk3368: add tsadc for p9
Signed-off-by: David Wu <wdc@rock-chips.com>
2015-03-06 21:03:39 +08:00
David Wu
7616e7d0de rk3368: tsadc: remove tsadc-int pin for p9
Signed-off-by: David Wu <wdc@rock-chips.com>
2015-03-06 21:03:39 +08:00
chenzhi
19343d9c8d ethernet: fix dts for rk3368-box
Signed-off-by: chenzhi <roger.chen@rock-chips.com>
2015-03-06 17:55:06 +08:00
David Wu
106c5fc6fc rk3368: thermal: remove dbg log
Signed-off-by: David Wu <wdc@rock-chips.com>
2015-03-06 17:43:01 +08:00
David Wu
5ed2c99f8c rk3368: use pvtm for 32k tep
Signed-off-by: David Wu <wdc@rock-chips.com>
2015-03-06 17:08:06 +08:00