Age | Commit message (Collapse) | Author |
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Without this the backlight remains stubbornly down on resume
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Minimal set of kernel changes to support Android operation.
Note arch/arm/configs/gta02-android-defconfig
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Try to make sure about no compiler malarky by volatile. Change hdq busy
detect. Change error handling path in hdq interface to fiq.
Signed-off-by: Sean McNeil <sean@mcneil.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
This large patch removes motion sensor from Linux SPI bitbang driver.
Previously, some access was done through Linux SPI protected
by a mutex, and the ISR access was done by platform bitbang code due
to inability of Linux SPI driver to work in the interrupt context.
Now all access is done by bitbang callbacks in mach_gta02.c and are
protected by single scheme of interrupt lockout for the duration --
I line-by-line'd the driver to confirm that best I could, adding
protection and taking more care on several /sys related paths.
Because this is no longer a Linux SPI bus driver, the path for various
/sys things have changed. They can now be found down, eg,
/sys/devices/platform/lis302dl.1/sample_rate
lis302dl.1 is the top sensor and .2 the bottom. The names of the input
susbsytem paths remain the same as before.
Not working in interrupt context made trouble using interrupt lockout as
locking
[21474615.495000] BUG: sleeping function called from invalid context at kernel/sched.c:4684
[21474615.495000] in_atomic():0, irqs_disabled():128
[21474615.495000] 2 locks held by bash/779:
[21474615.495000] #0: (&buffer->mutex){....}, at: [<c00ec1b0>] sysfs_write_file+0x30/0x80
[21474615.495000] #1: (pm_mutex){....}, at: [<c007a34c>] enter_state+0xd4/0x10c
[21474615.495000] [<c0032a14>] (dump_stack+0x0/0x14) from [<c0049410>] (__might_sleep+0xdc/0xf8)
[21474615.495000] [<c0049334>] (__might_sleep+0x0/0xf8) from [<c0316c38>] (wait_for_common+0x28/0x190)
[21474615.495000] r5:c79ffd00 r4:c79ffd4c
[21474615.495000] [<c0316c10>] (wait_for_common+0x0/0x190) from [<c0316e30>] (wait_for_completion+0x18/0x1c)
[21474615.495000] r8:c79ffd84 r7:c79c4800 r6:c79ffd00 r5:c79ffd20 r4:c79ffd4c
[21474615.495000] [<c0316e18>] (wait_for_completion+0x0/0x1c) from [<c01d28ec>] (spi_sync+0xa0/0xb8)
[21474615.495000] [<c01d284c>] (spi_sync+0x0/0xb8) from [<c020ca10>] (__reg_write+0x88/0x94)
[21474615.495000] [<c020c988>] (__reg_write+0x0/0x94) from [<c020cc30>] (lis302dl_resume+0x54/0x198)
[21474615.495000] r6:60000013 r5:c79c4800 r4:c79bc9c0
[21474615.495000] [<c020cbdc>] (lis302dl_resume+0x0/0x198) from [<c01d2fb0>] (spi_resume+0x38/0x44)
[21474615.495000] r6:00000010 r5:c79c4800 r4:c79c4974
[21474615.495000] [<c01d2f78>] (spi_resume+0x0/0x44) from [<c0198f34>] (resume_device+0x8c/0x1b0)
[21474615.495000] [<c0198ea8>] (resume_device+0x0/0x1b0) from [<c01990c0>] (dpm_resume+0x68/0x134)
[21474615.495000] r7:00000003 r6:00000010 r5:c79c4800 r4:c79c4974
[21474615.495000] [<c0199058>] (dpm_resume+0x0/0x134) from [<c01991b4>] (device_resume+0x28/0x38)
[21474615.495000] r6:00000003 r5:c08b7188 r4:00000010
[21474615.495000] [<c019918c>] (device_resume+0x0/0x38) from [<c007a0f8>] (suspend_devices_and_enter+0x110/0x180)
[21474615.495000] r4:00000000
[21474615.495000] [<c0079fe8>] (suspend_devices_and_enter+0x0/0x180) from [<c007a320>] (enter_state+0xa8/0x10c)
[21474615.495000] r6:00000003 r5:c03aa414 r4:00000000
[21474615.495000] [<c007a278>] (enter_state+0x0/0x10c) from [<c007a430>] (state_store+0xac/0xc0)
[21474615.495000] r6:c7b80000 r5:00000003 r4:c03aa414
[21474615.495000] [<c007a384>] (state_store+0x0/0xc0) from [<c014dfb4>] (kobj_attr_store+0x24/0x30)
[21474615.495000] [<c014df90>] (kobj_attr_store+0x0/0x30) from [<c00ebe58>] (flush_write_buffer+0x54/0x68)
[21474615.495000] [<c00ebe04>] (flush_write_buffer+0x0/0x68) from [<c00ec1d8>] (sysfs_write_file+0x58/0x80)
[21474615.495000] r8:c7acca80 r7:c79fff78 r6:000be408 r5:00000004 r4:c7a19ea0
[21474615.495000] [<c00ec180>] (sysfs_write_file+0x0/0x80) from [<c00a91b8>] (vfs_write+0xbc/0x14c)
[21474615.495000] [<c00a90fc>] (vfs_write+0x0/0x14c) from [<c00a9774>] (sys_write+0x4c/0x7c)
[21474615.495000] r7:00000004 r6:00000000 r5:00000000 r4:c7acca80
[21474615.495000] [<c00a9728>] (sys_write+0x0/0x7c) from [<c002dc20>] (ret_fast_syscall+0x0/0x2c)
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Last rebase to stable-2.6.26 left some trash from rebasing the patches on top of this,
clean it back out
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
We always return -EINVAL when changing s3c2410 USB host and device modes
due to lack of { }.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
More effort to refine power code that does the suspend and resume actions
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Weeks of frantic effort to control Glamo, traced the issue to two outcomes:
nWAIT is forced down and the device is hard locked, or we survive immediate
Glamo resume and die again with nWAIT forced down when the framebuffer driver
tries to flash the soft cursor.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Big chunk of trying to own Glamo resume and not really succeeding
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Stop the debugging stuff, see if that impacts resume error (not really, it
was actually Glamo)
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Light an LED in the dark crashing hell of dead resume... the problems come from
Glamo it turns out
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
All that stuff should be enforced by device tree now, out with it
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Hum well that's the idea, Glamo did not play ball
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
We panic on SD boot now we changed Glamo order, because it
didn't succeed to bring up mmcblk0p1. But, if you do loglevel=8
then it works OK. So we are racing with something...
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Nasty temporary patch that is VERY useful, basically if you hit AUX key
during suspend time, it will force an OOPS, which due to another debug patch
forces a spew on serial console showing dmesg to date and the oops.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Backout from failed probe was quite broken.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
We shouldn't have to reset it in glamo probe
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Running heavily instrumented kernel, get report about glamo IRQ spinlock
probem.
[ 8.795000] =============================================
[ 8.795000] [ INFO: possible recursive locking detected ]
[ 8.795000] 2.6.24 #782
[ 8.795000] ---------------------------------------------
[ 8.795000] swapper/1 is trying to acquire lock:
[ 8.795000] (&irq_desc_lock_class){++..}, at: [<c0077ae4>] handle_level_irq+0x24/0x120
[ 8.795000]
[ 8.795000] but task is already holding lock:
[ 8.795000] (&irq_desc_lock_class){++..}, at: [<c01be628>] glamo_irq_demux_handler+0x24/0x140
[ 8.795000]
[ 8.795000] other info that might help us debug this:
[ 8.795000] 1 lock held by swapper/1:
[ 8.795000] #0: (&irq_desc_lock_class){++..}, at: [<c01be628>] glamo_irq_demux_handler+0x24/0x140
[ 8.795000]
[ 8.795000] stack backtrace:
[ 8.795000] [<c002ec28>] (dump_stack+0x0/0x14) from [<c006ad74>] (__lock_acquire+0x9a0/0xdec)
[ 8.795000] [<c006a3d4>] (__lock_acquire+0x0/0xdec) from [<c006b264>] (lock_acquire+0xa4/0xc0)
[ 8.795000] [<c006b1c0>] (lock_acquire+0x0/0xc0) from [<c02f7878>] (_spin_lock+0x44/0x78)
[ 8.795000] [<c02f7834>] (_spin_lock+0x0/0x78) from [<c0077ae4>] (handle_level_irq+0x24/0x120)
[ 8.795000] r6:c03e11c0 r5:0000005c r4:c03e11c0
[ 8.795000] [<c0077ac0>] (handle_level_irq+0x0/0x120) from [<c01be708>] (glamo_irq_demux_handler+0x104/0x140)
[ 8.795000] r7:00000038 r6:c03e11c0 r5:00000008 r4:c03e0560
[ 8.795000] [<c01be604>] (glamo_irq_demux_handler+0x0/0x140) from [<c003c934>] (s3c_irq_demux_extint8+0x94/0xa4)
[ 8.795000] r8:00000002 r7:00000003 r6:00000000 r5:c03df958 r4:00000000
[ 8.795000] [<c003c8a0>] (s3c_irq_demux_extint8+0x0/0xa4) from [<c0029048>] (__exception_text_start+0x48/0x64)
[ 8.795000] r4:00000015
[ 8.795000] [<c0029000>] (__exception_text_start+0x0/0x64) from [<c0029a5c>] (__irq_svc+0x3c/0xb4)
Patch removes desc->lock locking around glamo_irq_demux_handler... guess it is OK
since we didn't clear interrupt source, can't recurse?
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
If we ever fall through to the yield when we turned off interrupts...
it wouldn't be pretty.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Along the same lines as FIQ, HDQ can have children in device tree terms too.
Allow the same kind of callback in machine-specific code
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Trial to see if (mainly 32-bit) memcpy is any better than u16 loop
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
The delay versions of the access to registers were based on a misunderstanding of
the Glamo docs: it can force nWAIT differently depending on the access type. Therefore
we don't need to take special care about delays on CPU side.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Rather than using conservative default timings for the NAND flash,
use the timings as specified in the S3C2442B MCP data sheet.
Signed-off-by: Harald Welte <laforge@openmoko.org>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Removed unused variable.
Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
|
|
The function glamo_mci_reset is not being used. Let's comment it out.
Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
|
|
This patch carries over the OpenMoko modifications at
include/asm-arm/arch-s3c2410/spi-gpio.h to
arch/arm/mach-s3c2410/include/mach/spi-gpio.h
Note: board_size and board_info have been removed upstream, but as we
still rely on them we'll just put them back for now. These will need to
be removed (and the corresponding driver changes made, of course) before
this can go upstream.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
This pulls the Moko changes to regs-sdi.h that were in
include/asm-arm/arch-s3c2410 over to the file at arch/arm/../mach and
deletes the file at include/asm-arm.
Note: we have been using a mix of regs-sdi.h from the two different
locations. The unification of these two files may have some unknown
consequences... keep your eyes open for oddities after applying this.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|