Commit Graph

265942 Commits

Author SHA1 Message Date
宋秀杰
863facb1bb rk30 phone: modify headset detect request irq location 2012-06-03 16:38:27 +08:00
张晴
22e9b8cfde rk30:phone loquat:modify the battery capacity reported 2012-06-03 11:28:35 +08:00
CMY
5c7f38813e Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0 2012-06-02 17:27:06 +08:00
CMY
c828864a4d fixed bug: build failed if disable BT_WAKE_HOST_SUPPORT 2012-06-02 17:25:20 +08:00
CMY
d08fe7abfe 3g dongle 2012-06-02 17:23:59 +08:00
zhanghao
d1afea4d43 WIMO : compile as default y 2012-06-02 16:59:21 +08:00
zhanghao
8d713e3c4f add WIMO supported 2012-06-02 16:52:19 +08:00
yangkai
b638988d9f fix hcd panic when xacterr happen 2012-06-02 16:16:38 +08:00
yangkai
82534e37d4 fix one of mtp cancel bug 2012-06-02 16:11:23 +08:00
lw
6574323b8c rk30_phone_loquat:enable 1.4GHZ frequency 2012-06-02 10:22:54 +08:00
zsq
2a346d5522 fix rga power off flag init error 2012-06-01 18:19:10 +08:00
Zheng Yang
0d857ed7bb rk30 hdmi: only unregister earlysuspend when shutdown. 2012-05-31 15:02:14 +08:00
Zheng Yang
1b1a8704f3 rk30 hdmi: fix hdmi shut down is called twice error. 2012-05-31 14:44:00 +08:00
黄涛
88538f55bb ts: rk29_i2c_goodix: unregister earlysuspend when shutdown 2012-05-31 09:43:27 +08:00
黄涛
517021c00d lightsensor: cm3217: unregister earlysuspend when shutdown 2012-05-31 09:43:27 +08:00
黄涛
646646a50d gsensor: mma8452: remove unused earlysuspend implementation 2012-05-31 09:43:26 +08:00
黄涛
709e7adf2c rk: backlight: unregister earlysuspend when shutdown
fix this warning:
WARNING: at drivers/gpio/gpiolib.c:101 gpio_ensure_requested+0x48/0x114()
autorequest GPIO-331
[<c043b170>] (unwind_backtrace+0x0/0xf0) from [<c0461800>] (warn_slowpath_common+0x4c/0x64)
[<c0461800>] (warn_slowpath_common+0x4c/0x64) from [<c0461898>] (warn_slowpath_fmt+0x2c/0x3c)
[<c0461898>] (warn_slowpath_fmt+0x2c/0x3c) from [<c05bb514>] (gpio_ensure_requested+0x48/0x114)
[<c05bb514>] (gpio_ensure_requested+0x48/0x114) from [<c05bbbb4>] (gpio_direction_output+0x7c/0xfc)
[<c05bbbb4>] (gpio_direction_output+0x7c/0xfc) from [<c044ccf8>] (rk29_backlight_pwm_suspend+0x54/0x74)
[<c044ccf8>] (rk29_backlight_pwm_suspend+0x54/0x74) from [<c05c3d0c>] (rk29_bl_suspend+0x78/0x90)
[<c05c3d0c>] (rk29_bl_suspend+0x78/0x90) from [<c0494374>] (early_suspend+0xc4/0x12c)
[<c0494374>] (early_suspend+0xc4/0x12c) from [<c04745c4>] (process_one_work+0x250/0x3ac)
[<c04745c4>] (process_one_work+0x250/0x3ac) from [<c0474b08>] (worker_thread+0x22c/0x3ec)
[<c0474b08>] (worker_thread+0x22c/0x3ec) from [<c047a484>] (kthread+0x80/0x88)
[<c047a484>] (kthread+0x80/0x88) from [<c04365f8>] (kernel_thread_exit+0x0/0x8)
2012-05-31 09:43:26 +08:00
黄涛
e631fd9aeb rk30: hdmi: unregister earlysuspend when shutdown 2012-05-31 09:43:26 +08:00
黄涛
edcb4494a6 rk: fb: fix earlysuspend bug
fix this bug:
rk30_pm_power_off start...
Unable to handle kernel NULL pointer dereference at virtual address 00000054
pgd = c0404000
[00000054] *pgd=00000000pre WM831X_POWER_STATE = 0x8800
wm831x_last_deinit

Internal error: Oops: 17 [#1] PREEMPT SMP
CPU: 0    Tainted: G         C   (3.0.8+ #2)
PC is at rkfb_early_suspend+0x18/0x70
LR is at early_suspend+0xc4/0x12c
2012-05-31 09:43:26 +08:00
黄涛
193a36f096 rk: earlysuspend: only works on system is running 2012-05-31 09:43:26 +08:00
Zheng Yang
58d057c40f rk30 hdmi: set phy register to ip vendor recommended value. 2012-05-30 18:27:54 +08:00
kfx
61e6526e5c sc8800: tmp_buf: Cross-border access 2012-05-30 15:31:23 +08:00
邱建斌
ff84dd87c3 fix compiler warnings and add calling adjust volume code 2012-05-30 10:54:23 +08:00
黄涛
da0cd824ad rk30: sdk: temporary increase voltage for SDK release 2012-05-29 19:49:20 +08:00
陈恒明
ad7eb306e3 Revert "vpu_service: replace spin_lock by mutex and use irq_thread to handle irq"
This reverts commit d21aa29342.
2012-05-29 16:27:51 +08:00
hecanyang
68e72ad5f4 rename some simple function's name 2012-05-29 14:59:17 +08:00
陈恒明
d21aa29342 vpu_service: replace spin_lock by mutex and use irq_thread to handle irq 2012-05-29 14:49:32 +08:00
hecanyang
3f322d5aab fix data training bug, add ODT disable frequency macro,
and reduce change frequency period
2012-05-29 14:21:52 +08:00
Russell King
c0dab5ce4f ARM: prevent VM_GROWSDOWN mmaps extending below FIRST_USER_ADDRESS
commit 9b61a4d1b2 upstream.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:18:10 +08:00
Tim Bird
74cfe8b84a ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
commit e787ec1376 upstream.

The inline assembly in kernel_execve() uses r8 and r9.  Since this
code sequence does not return, it usually doesn't matter if the
register clobber list is accurate.  However, I saw a case where a
particular version of gcc used r8 as an intermediate for the value
eventually passed to r9.  Because r8 is used in the inline
assembly, and not mentioned in the clobber list, r9 was set
to an incorrect value.

This resulted in a kernel panic on execution of the first user-space
program in the system.  r9 is used in ret_to_user as the thread_info
pointer, and if it's wrong, bad things happen.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:14:57 +08:00
Will Deacon
62ef46fdc5 ARM: 7403/1: tls: remove covert channel via TPIDRURW
commit 6a1c53124a upstream.

TPIDRURW is a user read/write register forming part of the group of
thread registers in more recent versions of the ARM architecture (~v6+).

Currently, the kernel does not touch this register, which allows tasks
to communicate covertly by reading and writing to the register without
context-switching affecting its contents.

This patch clears TPIDRURW when TPIDRURO is updated via the set_tls
macro, which is called directly from __switch_to. Since the current
behaviour makes the register useless to userspace as far as thread
pointers are concerned, simply clearing the register (rather than saving
and restoring it) will not cause any problems to userspace.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:14:36 +08:00
Jonathan Austin
053926b960 ARM: 7384/1: ThumbEE: Disable userspace TEEHBR access for !CONFIG_ARM_THUMBEE
commit 078c04545b upstream.

Currently when ThumbEE is not enabled (!CONFIG_ARM_THUMBEE) the ThumbEE
register states are not saved/restored at context switch. The default state
of the ThumbEE Ctrl register (TEECR) allows userspace accesses to the
ThumbEE Base Handler register (TEEHBR). This can cause unexpected behaviour
when people use ThumbEE on !CONFIG_ARM_THUMBEE kernels, as well as allowing
covert communication - eg between userspace tasks running inside chroot
jails.

This patch sets up TEECR in order to prevent user-space access to TEEHBR
when !CONFIG_ARM_THUMBEE. In this case, tasks are sent SIGILL if they try to
access TEEHBR.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jonathan Austin <jonathan.austin@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:12:11 +08:00
Rabin Vincent
2188bbff4f ARM: 7325/1: fix v7 boot with lockdep enabled
commit 8e43a905dd upstream.

Bootup with lockdep enabled has been broken on v7 since b46c0f7465
("ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR").

This is because v7_setup (which is called very early during boot) calls
v7_flush_dcache_all, and the save_and_disable_irqs added by that patch
ends up attempting to call into lockdep C code (trace_hardirqs_off())
when we are in no position to execute it (no stack, MMU off).

Fix this by using a notrace variant of save_and_disable_irqs.  The code
already uses the notrace variant of restore_irqs.

Reviewed-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:09:55 +08:00
Stephen Boyd
ff39948f3c ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR
commit b46c0f7465 upstream.

armv7's flush_cache_all() flushes caches via set/way. To
determine the cache attributes (line size, number of sets,
etc.) the assembly first writes the CSSELR register to select a
cache level and then reads the CCSIDR register. The CSSELR register
is banked per-cpu and is used to determine which cache level CCSIDR
reads. If the task is migrated between when the CSSELR is written and
the CCSIDR is read the CCSIDR value may be for an unexpected cache
level (for example L1 instead of L2) and incorrect cache flushing
could occur.

Disable interrupts across the write and read so that the correct
cache attributes are read and used for the cache flushing
routine. We disable interrupts instead of disabling preemption
because the critical section is only 3 instructions and we want
to call v7_dcache_flush_all from __v7_setup which doesn't have a
full kernel stack with a struct thread_info.

This fixes a problem we see in scm_call() when flush_cache_all()
is called from preemptible context and sometimes the L2 cache is
not properly flushed out.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:09:32 +08:00
Will Deacon
1bfcac2772 ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers
commit 8130b9d7b9 upstream.

If we are context switched whilst copying into a thread's
vfp_hard_struct then the partial copy may be corrupted by the VFP
context switching code (see "ARM: vfp: flush thread hwstate before
restoring context from sigframe").

This patch updates the ptrace VFP set code so that the thread state is
flushed before the copy, therefore disabling VFP and preventing
corruption from occurring.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:09:09 +08:00
Dave Martin
7b93e41954 ARM: 7307/1: vfp: fix ptrace regset modification race
commit 247f4993a5 upstream.

In a preemptible kernel, vfp_set() can be preempted, causing the
hardware VFP context to be switched while the thread vfp state is
being read and modified.  This leads to a race condition which can
cause the thread vfp state to become corrupted if lazy VFP context
save occurs due to preemption in between the time thread->vfpstate
is read and the time the modified state is written back.

This may occur if preemption occurs during the execution of a
ptrace() call which modifies the VFP register state of a thread.
Such instances should be very rare in most realistic scenarios --
none has been reported, so far as I am aware.  Only uniprocessor
systems should be affected, since VFP context save is not currently
lazy in SMP kernels.

The problem was introduced by my earlier patch migrating to use
regsets to implement ptrace.

This patch does a vfp_sync_hwstate() before reading
thread->vfpstate, to make sure that the thread's VFP state is not
live in the hardware registers while the registers are modified.

Thanks to Will Deacon for spotting this.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:08:43 +08:00
Will Deacon
c94ffc3b1c ARM: 7306/1: vfp: flush thread hwstate before restoring context from sigframe
commit 2af276dfb1 upstream.

Following execution of a signal handler, we currently restore the VFP
context from the ucontext in the signal frame. This involves copying
from the user stack into the current thread's vfp_hard_struct and then
flushing the new data out to the hardware registers.

This is problematic when using a preemptible kernel because we could be
context switched whilst updating the vfp_hard_struct. If the current
thread has made use of VFP since the last context switch, the VFP
notifier will copy from the hardware registers into the vfp_hard_struct,
overwriting any data that had been partially copied by the signal code.

Disabling preemption across copy_from_user calls is a terrible idea, so
instead we move the VFP thread flush *before* we update the
vfp_hard_struct. Since the flushing is performed lazily, this has the
effect of disabling VFP and clearing the CPU's VFP state pointer,
therefore preventing the thread from being updated with stale data on
the next context switch.

Tested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-29 10:08:02 +08:00
Catalin Marinas
fefa6c1370 ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
commit 8428e84d42 upstream.

Recent gcc versions generate unaligned accesses by default on ARMv6 and
later processors. This patch ensures that the SCTLR.A bit is always
cleared on such processors to avoid kernel traping before
alignment_init() is called.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: John Linn <John.Linn@xilinx.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-05-29 10:06:02 +08:00
宋秀杰
fdbf540e99 rk30 phone: modify headset detect irq level for actul device 2012-05-28 23:16:16 +08:00
hhb
e3d8e46711 rk30 phone loquat: modify lcd driver 2012-05-28 22:33:51 +08:00
hhb
0c70ed1791 Revert "rk30 phone loquat: modify lcd driver"
This reverts commit 0355a52ff6b48bc565dec18ca45bca233e819117.
2012-05-28 22:29:47 +08:00
hhb
8dc8ae11b0 rk30 phone loquat: modify lcd driver 2012-05-28 22:29:47 +08:00
hhb
83d604b555 rk30 phone loquat: optimize touch screen report points 2012-05-28 22:29:47 +08:00
hhb
485d428d32 rk30 phone loquat: fix bug touch screen don't work when resume from suspend 2012-05-28 22:29:47 +08:00
张晴
f8869d536a rk30:phone loquat:reduce arm and logic voltage when pmu enter sleep,set spi gpio pullup and down disable when in sleep 2012-05-28 22:19:05 +08:00
张晴
a2cf542e12 rk30:sdk:Solve the RTC alarm automatic startup 2012-05-28 20:22:36 +08:00
chenxing
d12c9020e9 rk30:sdk: clock_data add cpu 1.1G and 1.3G support 2012-05-28 19:57:55 +08:00
张晴
3317f45d6b rk30:phone loquat:modify the pmu battery charger work quenes 2012-05-28 19:46:44 +08:00
root
eeaa1163b4 camera rk30 : add fps detection code. 2012-05-28 18:49:24 +08:00
张晴
7e937c0cfd rk30:phone loquat:add clk switch from 24M to 32K when in sleep 2012-05-28 18:35:21 +08:00