Commit Graph

172733 Commits

Author SHA1 Message Date
Russell King
4ce92e81ee ARM: sched_clock: allow init_sched_clock() to be called early
sched_clock is supposed to be initialized early - in the recently added
init_early platform hook.  However, in doing so we end up calling
mod_timer() before the timer lists are initialized, resulting in an
oops.

Split the initialization in two - the part which the platform calls
early which starts things off.  The addition of the timer can be
delayed until after we have more of the kernel initialized - when the
normal time sources are initialized.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-11 11:36:09 +08:00
Russell King
78a8e9426d ARM: sched_clock: provide common infrastructure for sched_clock()
Provide common sched_clock() infrastructure for platforms to use to
create a 64-bit ns based sched_clock() implementation from a counter
running at a non-variable clock rate.

This implementation is based upon maintaining an epoch for the counter
and an epoch for the nanosecond time.  When we desire a sched_clock()
time, we calculate the number of counter ticks since the last epoch
update, convert this to nanoseconds and add to the epoch nanoseconds.

We regularly refresh these epochs within the counter wrap interval.
We perform a similar calculation as above, and store the new epochs.

We read and write the epochs in such a way that sched_clock() can easily
(and locklessly) detect when an update is in progress, and repeat the
loading of these constants when they're known not to be stable.  The
one caveat is that sched_clock() is not called in the middle of an
update.  We achieve that by disabling IRQs.

Finally, if the clock rate is known at compile time, the counter to ns
conversion factors can be specified, allowing sched_clock() to be tightly
optimized.  We ensure that these factors are correct by providing an
initialization function which performs a run-time check.

Acked-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Tested-by: Mikael Pettersson <mikpe@it.uu.se>
Tested-by: Eric Miao <eric.y.miao@gmail.com>
Tested-by: Olof Johansson <olof@lixom.net>
Tested-by: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-11 11:34:57 +08:00
root
7fe63eebbe in video mode chage ui to 565 fail 2011-03-10 17:08:32 +08:00
黄涛
f860da4e0e rtc: hym8563: work around set alarm problem and indent 2011-03-10 14:46:33 +08:00
杜坤明
ec3f59ef1c update the conctrl of gpu' clk 2011-03-10 14:13:33 +08:00
杜坤明
0208ee3eda add gpu's earlysuspend & remove soft reset before poweron 2011-03-09 18:39:05 +08:00
root
bb754595de In video mode change to PIXEL_FORMAT_RGB_565 2011-03-09 16:27:27 +08:00
黄涛
21bd655e72 rk29: no reset while panic and fix gcc warning 2011-03-09 15:22:35 +08:00
ChenJQ
852190b9ff reduce the wm8900 pop noise 2011-03-08 23:15:26 -08:00
zyw
cf69e4c66f del CONFIG_MACH_RK29_AIGO in drivers/video/display/screen/lcd_hsd100pxn.c 2011-03-09 14:45:49 +08:00
黄涛
f3e5699fbb rk29: pm: dump irq status when resume 2011-03-09 14:01:40 +08:00
蔡枫
22a3ef29d6 Merge branch 'develop' of 10.10.10.29:/home/rockchip/kernel into develop 2011-03-09 11:32:06 +08:00
蔡枫
ae315af2c6 disable set hardware cursor log 2011-03-09 11:31:33 +08:00
蔡枫
ad9e546646 add hardware cursor support, auto switch to hardware cursor mode when using TVOUT or HDMI output 2011-03-09 11:17:40 +08:00
luowei
32c8242e01 modify wm831x voltage according to hardware 2011-03-09 11:04:42 +08:00
hhb
cd455647f1 migrate touch screen driver xpt2046 2011-03-08 20:45:33 +08:00
ddl
b697fe9f97 camera: FIH defconfig for camera, mt9p111 debug and board config 2011-03-03 22:39:28 +08:00
lyx
bccf1d5352 backlight:set bl_pwm as gpio and set it low, make sure backlight be off 2011-03-07 00:44:45 -08:00
cch
15d8aa5d91 fix the Audio indicators(S/R), and the speak Playback distortion 2011-03-07 14:42:33 +08:00
陈辉
2997fa8f65 Merge branch 'develop' of 10.10.10.29:/home/rockchip/kernel into develop 2011-03-04 18:05:30 +08:00
陈辉
3ddadcad61 update rk29sdk-v0.16 rk29_sdk_defconfig: support host 3G 2011-03-04 18:04:54 +08:00
ChenJQ
f1a47fe013 Open SPK playback channel 2011-03-04 01:08:11 -08:00
邱建斌
84a568df72 添加wm8994驱动支持 2011-03-04 14:31:56 +08:00
陈恒明
6d74f4e4f1 rk29: vpu: fix bug on pp reset 2011-03-04 12:38:38 +08:00
宋秀杰
41ef7d91e3 fix bq27510 read error 2011-03-03 20:26:10 -08:00
ubuntu
92bf30d7fd cwz update tps65910 irq 2011-03-03 19:09:16 -08:00
杜坤明
65dec0f994 update gpu_shutdown & gpu_suspend 2011-03-04 10:31:43 +08:00
root
d1bde7242d swj add pwm reinit function for reboot 2011-03-04 09:56:25 +08:00
黄涛
71d7d8f486 rk29: backlight: fix kernel BUG by double add_timer while fast suspend/resume
fix this bug:
kernel BUG at kernel/timer.c:791!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0404000
[00000000] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/devices/platform/rk29_i2c.0/i2c-0/0-0055/power_supply/bq27510-battery/status
Modules linked in: wlan
CPU: 0    Not tainted  (2.6.32.27 #2)
PC is at __bug+0x18/0x24
LR is at __bug+0x14/0x24
[<c042b3c8>] (__bug+0x18/0x24) from [<c0453680>] (add_timer+0x1c/0x2c)
[<c0453680>] (add_timer+0x1c/0x2c) from [<c0476348>] (late_resume+0x104/0x158)
[<c0476348>] (late_resume+0x104/0x158) from [<c045a7bc>] (worker_thread+0x180/0x22c)
[<c045a7bc>] (worker_thread+0x180/0x22c) from [<c045dfac>] (kthread+0x78/0x80)
[<c045dfac>] (kthread+0x78/0x80) from [<c042899c>] (kernel_thread_exit+0x0/0x8)
2011-03-03 19:33:40 +08:00
宋秀杰
092493929b close log print in bq27510 2011-03-03 00:51:18 -08:00
宋秀杰
d12af32690 modify fuel gauge bq27510's function 2011-03-02 23:55:48 -08:00
陈恒明
b0c9707a23 rk29: vpu use kernel register config 2011-03-03 14:41:38 +08:00
lyx
3dc6b43363 update l/p sensor isl29028 driver for phonesdk 2011-03-02 03:26:12 -08:00
ddl
705f39eb70 camera:fix camera power down pin and flash pin macro define error 2011-03-02 17:41:42 +08:00
root
d5ea4d6505 (xxm) FIH:update touch screen atmel_mxt224.c 2011-03-02 16:18:15 +08:00
lyx
62afb9ef31 add idle wakelock for vmac 2011-03-01 22:37:58 -08:00
root
af1411f7c5 Merge branch 'develop' of 10.10.10.29:/home/rockchip/kernel into develop 2011-03-01 20:39:34 +08:00
root
3ace2326bc (xxm) update FIH: 1,add mpu3050 2,update rk29_FIH_defconfig 3,update touch screen 2011-03-01 20:36:31 +08:00
ubuntu
bf846b47ed cwz update FIH 2011-02-28 21:04:16 -08:00
root
962d657451 (xxm) support FIH 2011-03-01 11:26:12 +08:00
kfx
75d0269d5d disable adc_test 2011-02-28 17:35:00 +08:00
黄涛
0888f26ff0 rk29: pm: add flush_tlb_all 2011-02-28 17:26:49 +08:00
kfx
1b96f3e9a6 update adc drivers 2011-02-28 17:12:52 +08:00
黄涛
b0aee76e42 rk29: pm: set core voltage after ddr suspend 2011-02-28 11:36:15 +08:00
ubuntu
520c6215ad cwz add tps65910 driver 2011-02-27 18:19:53 -08:00
luowei
23be3ef235 add wm831x support for in board-rk29-phonesdk.c 2011-02-28 09:24:41 +08:00
lbt
7326c08c3c wifi:bcm4329:driver: remove rssi print message 2011-02-26 19:26:41 +08:00
ddl
45dfa1fe1e camera: fix camera resume may be fail 2011-02-26 19:26:38 +08:00
杜坤明
b405028e62 add soft reset of gpu 2011-03-01 15:29:35 +08:00
lbt
8e1d42022e sdmmc:driver: change RK29_SDMMC_DMA_THRESHOLD to fix bcm4329 firmware run crashed, the reason isn't cleared yet. 2011-02-26 19:08:44 +08:00