Age | Commit message (Collapse) | Author |
|
This makes the GTA02 work with the new-style WM8753 ALSA I2C driver.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
These fixes are required to build without MACH_NEO1973_GTA02
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
I2C devices should be registered with i2c_register_board_info in the machine
setup code. This allows the devices to be auto-probed when the requred driver
is loaded.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
I hit this when updating to 2.6.26. Also if CONFIG_MMC is enabled this
patch converts this horrible horrible hack into a horrible hack by using
dev->resume() (untested).
Signed-off-by: Andrzej Zaborowski <balrog@zabor.org>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Some boots from Qi trigger a symptom from this interesting race -->
[ 2.730000] Unable to handle kernel NULL pointer dereference at virtual address 00000248
[ 2.730000] pgd = c0004000
[ 2.735000] [00000248] *pgd=00000000
[ 2.735000] Internal error: Oops: 5 [#1] PREEMPT
[ 2.735000] Modules linked in:
[ 2.735000] CPU: 0 Not tainted (2.6.24-stable10_0c1587137aaf0ee3-mokodev #1071)
[ 2.735000] PC is at pcf50633_voltage_set+0x1c/0xfc
[ 2.735000] LR is at gta02_glamo_mmc_set_power+0xdc/0x128
[ 2.735000] pc : [<c01df570>] lr : [<c0034324>] psr: 60000013
[ 2.735000] sp : c7c57eb0 ip : c7c57ec8 fp : c7c57ec4
[ 2.735000] r10: c7cfca28 r9 : 00000000 r8 : c7c57f68
[ 2.735000] r7 : c7cfca68 r6 : c7cfcae0 r5 : 00000c80 r4 : 00000000
[ 2.735000] r3 : 00000000 r2 : 00000c80 r1 : 0000000a r0 : 00000c80
[ 2.735000] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 2.735000] Control: c000717f Table: 30004000 DAC: 00000017
[ 2.735000] Process kmmcd (pid: 102, stack limit = 0xc7c56268)
[ 2.735000] Stack: (0xc7c57eb0 to 0xc7c58000)
[ 2.735000] 7ea0: c0608c58 00000c80 c7c57edc c7c57ec8
[ 2.735000] 7ec0: c0034324 c01df564 c7cfca28 c7cfc800 c7c57f1c c7c57ee0 c0194de0 c0034258
[ 2.735000] 7ee0: c7c57f34 c7c57ef0 c01e6230 c005de5c 60000013 c7cfca28 c7cfc800 60000013
[ 2.735000] 7f00: c7cfca68 c7c57f68 00000000 c01e6778 c7c57f34 c7c57f20 c01e5d68 c0194da8
[ 2.735000] 7f20: c7cfc800 c7cfca08 c7c57f5c c7c57f38 c01e6810 c01e5cbc c0059278 c7c57f48
[ 2.735000] 7f40: c02d2ba0 00000002 c7c44420 c7c56000 c7c57f9c c7c57f60 c00592e0 c01e6788
[ 2.735000] 7f60: 00000002 c0059278 c0608d74 c04321cc c036e16c 00000000 c7c57fb0 c7c44420
[ 2.735000] 7f80: c7c56000 00000000 00000000 00000000 c7c57fd4 c7c57fa0 c005a068 c00591ec
[ 2.735000] 7fa0: c02d0624 00000000 c7c4c0e0 c005dc2c c7c57fb0 c7c57fb0 00000000 c7c56000
[ 2.735000] 7fc0: c7c44420 c0059f84 c7c57ff4 c7c57fd8 c005db28 c0059f94 00000000 00000000
[ 2.735000] 7fe0: 00000000 00000000 00000000 c7c57ff8 c004b170 c005dad8 ffffffff ffffffff
[ 2.735000] Backtrace:
[ 2.735000] [<c01df554>] (pcf50633_voltage_set+0x0/0xfc) from [<c0034324>] (gta02_glamo_mmc_set_power+0xdc/0x128)
[ 2.735000] r5:00000c80 r4:c0608c58
[ 2.735000] [<c0034248>] (gta02_glamo_mmc_set_power+0x0/0x128) from [<c0194de0>] (glamo_mci_set_ios+0x48/0x254)
[ 2.735000] r5:c7cfc800 r4:c7cfca28
[ 2.735000] [<c0194d98>] (glamo_mci_set_ios+0x0/0x254) from [<c01e5d68>] (mmc_power_up+0xbc/0x100)
[ 2.735000] [<c01e5cac>] (mmc_power_up+0x0/0x100) from [<c01e6810>] (mmc_rescan+0x98/0x1a8)
[ 2.735000] r5:c7cfca08 r4:c7cfc800
[ 2.735000] [<c01e6778>] (mmc_rescan+0x0/0x1a8) from [<c00592e0>] (run_workqueue+0x104/0x208)
[ 2.735000] r6:c7c56000 r5:c7c44420 r4:00000002
[ 2.735000] [<c00591dc>] (run_workqueue+0x0/0x208) from [<c005a068>] (worker_thread+0xe4/0xf8)
[ 2.735000] [<c0059f84>] (worker_thread+0x0/0xf8) from [<c005db28>] (kthread+0x60/0x94)
[ 2.735000] r6:c0059f84 r5:c7c44420 r4:c7c56000
[ 2.735000] [<c005dac8>] (kthread+0x0/0x94) from [<c004b170>] (do_exit+0x0/0x6f4)
[ 2.735000] r6:00000000 r5:00000000 r4:00000000
[ 2.735000] Code: e351000a e1a04000 e1a00002 8a000032 (e5943248)
[ 2.745000] ---[ end trace 123ec1d286354824 ]---
This problem was caused by insufficient timeout waiting for pcf50633 to resume
and broken code to detect timeout exhaustion.
Although I'd like to think it has something to do with mmc resume woes it should make a panic
and subsequent emergency spew on UART2 if that had been the case.
Took the opportunity to move the stuff to show completion of probe to later in the
pcf50633 probe and tighten readiness test.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
fix-accel-irq-mismatch.patch
I just found a while to start doing something cool with the
accelerometers but I hit #1613 (both accelerometer nodes can't be read
concurrently for longer than a moment). Turns out to be very silly.
I'll continue the cool stuff another day,
Cheers
|
|
Subject: [PATCH] [gta02] Disable hardware ECC unless we get instructed to enable it
This is restoring the old behavior in regard to ECC. Even if
hardware ECC was compiled in we didn't use it. Make this a runtime
option. If the bootloader passes hardware_ecc we will enable the
hardware ECC for real.
|
|
Fix spelling error on function name
Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
This cleans out some random externs in C files that checkpatch does not like
and introduces a couple of .h files to contain them. Plus some other minor
checkpatch style complaints.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Set the UART FIFO to trigger earlier on the GTA01 device to minimize
UART overruns from the GSM.
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
This patch adds the gta01 backlight callback that defers the
restoring of the backlight until after the jbt driver has
resumed. This doesn't eliminate the flashing of the LCD on
the gta01, but it reduces it considerably.
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
This patch ensures that no console data will go the UART while
the GSM mux is switched to the GSM. This is necessary despite
the code that disables the console due to the fact that the
console resumes before the neo1973_pm_gsm driver, and consoles
always resume in the "on" state.
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
Add the basic GSM flowcontrol code.
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
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>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
This patch uses the new glamo-mci slow clock ratio
patch in order to dynamically reduce SD Card clock
rate when the GPS unit is powered on GTA02.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Until now we just drove the SD Card at 3.3V all the time. But in
fact we can do better, and use a voltage negotiated with the
SD Card itself.
With the shipping 512MB Sandisk SD Card, 2.7V is negotiated which
gives 1.7dBm reduction in power on all the SD Card lines and should
further reduce GPS perturbation during SD Card usage.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Charger trigger stuff goes and asks for POWER_SUPPLY_PROP_STATUS
to figure out what the charger state is. But until now, we only
reported there what we found out from HDQ, and the HDQ registers
are not updated very often in the coulomb counter, it can be 4
or more second lag before it tells us about what it experiences.
When we react to USB insertion and only after 500ms debounce tell
power_supply stuff that something changed, it most times will
see old pre-USB-insertion state from bq27000 over HDQ at that time
and will report it ain't charging, buggering up the LED trigger
tracking.
This patch maintains distance between bq27000 and pcf50633 by
having platform callbacks in bq27000 that it can use to ask about
definitive charger "online" presence and "activity", whether the
charger says it is charging. If these callbacks are implemented
(and we implement them in this patch up in mach_gta02.c) then
this information is used in preference to what is found from
HDQ.
Result is if you set the LED trigger like this:
echo bat-charging > /sys/devices/platform/gta02-led.0/leds/gta02-aux:red/trigger
then it lights up properly on USB insertion now, goes away on
removal properly, as as far as I saw, when charging stops too.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Suggested-by: Sean McNeil <sean@mcneil.com>
To see if some subtle race is involved, Sean has tried
removing syslog traffic during resume and found he was
not seeing the resume crash any more. We're giving it
a try to see if it changes the behaviour for anyone
else. It would mean we have a pretty fine race in there
somewhere.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
A few questions have been flying around about how optimal
our waitstates are for various things including Glamo.
This patch introduces new sysfs nodes
/sys/devices/platform/neo1973-memconfig.0/BANKCON0
...
/sys/devices/platform/neo1973-memconfig.0/BANKCON7
If you cat them you get translated info about bus speed on
that chip select, eg,
# cat /sys/devices/platform/neo1973-memconfig.0/BANKCON1
BANKCON1 = 0x00000A40
Type = ROM / SRAM
PMC = normal (1 data)
Tacp = 2 clocks
Tcah = 0 clocks
Tcoh = 1 clock
Tacc = 3 clocks
Tcos = 1 clock
Tacs = 0 clocks
You can write them in hex too
# echo 0x200 > /sys/devices/platform/neo1973-memconfig.0/BANKCON1
The write format for BANKCON0 - 5 looks like this
b1..b0 PMC Page Mode Config
b3..b2 Tacp Page Mode Access Cycle
b5..b4 Tcah Address hold after CS deasserted
b7..b6 Tcoh CS hold after OE deasserted
b10..b8 Tacc Access Cycle Period
b12..b11 Tcos CS setup before OE asserted
b14..b13 Tacs Address setup before CS asserted
BANKCON 6 and 7 have two extra bits
b16..b15 MT Memory type (00=ROM/SRAM, 11=DRAM)
If it's ROM/SRAM, the rest of the bits are as described above.
For DRAM
b1..b0 SCAN Column address number
b3..b2 RAS to CAS delay
The patch is intended to let people experiement on their own. But
of course you will crash things for sure if the timing is wrong, and
you can also trash SD Card data if you make Glamo unstable, so remove
it or remount ro first. Other horrible things are possible, but
because the settings aren't sticky, you should always be able to
recover by either normal reboot usually or at worst NOR boot and then
dfu. Most likely you will just crash your session and have to reboot
if your settings are bad, but consider yourself warned bad things are
possible. :-)
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
During the suspend current reduction campaign on suspend I
forced the GPS UART to be GPIO and to drive 0 into the GPS
unit so we would not burn current there. On resume it lets
the pins act as UARTs again. But really, we should do this
all the time that the GPS unit is off, lest we leak it
enough power to hold internal state and make trouble.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Subject: [PATCH] [pcf50633] Avoid ooops on start with inserted usb cable
The pcf50633_global might not be initialized when we get the first
usb interrupt. We would oops inside the dev_err because we made up
a struct device.
Signed-Off-By: Holger Freyther <zecke@openmoko.org>
|
|
Add missing initialization for the touchscreen driver for the
gta01 platform.
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
- add an interrupt for ar6k wifi module
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Subject: [PATCH] [battery] Make the bq27000 send an uevent when the charging state possible changed
Remove the todo entries from the pcf50633, make the mach-gta02
call the bq27000 driver from the pmu callback.
|
|
Subject: [PATCH] Hacky CONFIG_NO_IDLE_HZ (dyn-tick) support for S3C24xx.
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Touchscreen on GTA01-02 experiences noise on the channel that serves the
"tall axis" of the LCM. The sample quality of the other axis is good.
The bad samples have a characteristic of one shot excursions that can
reach +/- 20% or more of the sample average.
Previously, we had a simple averaging scheme going in the touchscreen
driver that summed up 32 x and ys and then divided it by 32. This patch
first tidies up the existing code for style, then adds a new "running
average" concept with a FIFO. The running average is separate from the
summing average mentioned above, and is accurate for the last n samples
sample-by-sample, where n is set by 1 << excursion_filter_len_bits in the
machine / platform stuff.
The heuristic the patch implements for the filtering is to accept all
samples, but tag the *previous* sample with a flag if it differed from
the running average by more than reject_threshold_vs_avg in either
axis. The next sample time, a beauty contest is held if the flag was
set to decide if we think the previous sample was a one-shot excursion
(detected by the new sample being closer to the average than to the
flagged previous sample), or if we believe we are moving (detected by
the new sample being closer to the flagged previous sample than the
average. In the case that we believe the previous sample was an
excursion, we simply overwrite it with the new data and adjust the
summing average to use the new data instead of the excursion data.
I only tested this by eyeballing the output of ts_print_raw, but it
seemed to be quite a bit better. Gross movement appeared to be
tracked fine too. If folks want to try different heuristics on top
of this patch, be my guest; either way feedback on what it looks like
with a graphical app would be good.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
A panic is silent on GTA02, it would be good if we got a little hint
if we are crashing (eg, in suspend / resume) from a panic instead of
a deadlock, etc. On a normal PC i8042 blinks the keyboard lights if
we panic, this patch causes AUX to flash at 5Hz in event of a panic.
Tested by giving kernel fake root= that didn't exist.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
pcf50633.c shouldn't know GTAxx at all. Move to using a
platform callback to allow definition of platform devices
with pcf50633 as parent device (good for enforcing suspend /
resume ordering). Remove all code references to GTAxx from
the sources (one string left for compatability).
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Whoops left it up in suspend
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
mach-gta02 meddles with the regulator platform struct after
it is defined, leading to LCM power getting lost in suspend
despite I set it to be left up. Fixing this finally removes
the incredibly stubborn white LCM on suspend "flash".
This is also going to be implicated in Sean McNeil's
experience of monochromatic LCM after resume, which was
previously attacked by resetting and re-initing the LCM
from scratch.
In addition, I realized that we take down core_1v3 in
pcf50633 suspend action, this is happening near the
start of suspend, so we are in a meta-race to finish
suspend in a controlled way before the caps on core_1v3
run out (I only saw 23.3uF total). If it's true, this
is where the weirdo sensitivity to timing during
suspend is coming from.
Therefore in this patch we also remove sleeps and
dev_info() etc (which have to flush on serial console)
from the pc50633 isr workqueue if we are in pcf50633
driver suspend state 1, ie, suspending... because we
don't have time for it.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
The LCM spins for 100ms during resume for not much reason. Leave it powered
(it is meant to pull uA when suspended) and get nice fast resume to video.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
pcf50633 needs to take responsibility for managing current limit
changes asycnhrnously, ie, from USB stack enumeration. It's a feature of
pcf50633 not mach-gta02.c, and we can do better with taking care about
keeping it from firing at a bad time in there too.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Glamo MCI has a resume order dependncy on pcf50633, it has to be able to
power the SD slot via it.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Glamo MCI power setting stuff spins on pcf50633
but it won't hurt if it gives up after a second or
two instead of stalling the resume silently.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
After protecting pcf50633 read and write primitives against
operation after suspend or before resume (by blowing a
stack_trace()) I saw glamo-mci was trying to use pcf50633
at these bad times on its own suspend and resume. Since that
part was already done via platform callback, I added an
export in pcf50633 that tells you if it is ready or busy,
and used it to defer (resume power on case) or ignore
(suspend power off case, since pcf50633 already did it)
the mci power call.
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
- speed up suspend and resume by using one hit i2c bulk transactions
- don't bother storing int mask set on suspend, the default one is
what we use anyway
- put stack_trace() on pcf50633 low level access that fire if we
try to touch them before we resumed
- cosmetic source cleanup
- reduces resume time for pcf50633 from 450ms to 255ms
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Adds the resume callback stuff to glamo, then changes
jbt6k74 to no longer use a sleeping workqueue, but to
make its resume actions dependent on pcf50633 and
glamo resume (for backlight and communication to LCM
respectively)
Signed-off-by: Andy Green <andy@openmoko.com>
|