aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2008-11-19fix-glamo-idleclock-around-suspend.patchAndy Green
Possible implementation of SD Card corruption workaround reported here https://docs.openmoko.org/trac/ticket/1802#comment:5 Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-one-mmc-race.patchAndy Green
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>
2008-11-19gta02-accel-isr-fix-more.patchAndy Green
Fix all of the mismatches Andrzej put us on to. Found-by: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19checkpatch-accel-fixes.patchAndy Green
style cleanups for accel threshold setting patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19interface for configuring freefall/wakeup interrupts for the accelerometersSimon Kagstrom
Hi! First: Unfortunately, the freerunner currently wakes up immediately on suspend when the accelerometer IRQ is selected as a wakeup source. I'm posting this for comments and if someone else wants to have a look at this problem. The patch should be safe to apply even though the sleep portion doesn't work - as long as it's configured it will not disturb anything. // Simon -- lis302dl-configure-wakeup-interrupts.patch From: simon.kagstrom <simon.kagstrom@gmail.com> First: Unfortunately, the freerunner currently wakes up immediately on suspend when the accelerometer IRQ is selected as a wakeup source. Add configuration of wakeup/freefall interrupts through a sysfs interface. Configuration is done through echoing a value of the form X Y Z THRESHOLD DURATION SPEC to freefall_wakeup_1/2. X, Y and Z are threshold values, given as a value > 0, < 0 or 0 to specify if an interrupt should be generated for high or low thresholds or neither (off). THRESHOLD specifies the threshold that must be exceeded. DURATION specifies the time in milliseconds for which the acceleration should be measured. SPEC is either '1' or '0' and specifies if the thresholds should be taken all together or one at a time ('and' or 'or' mode). Echoing '0' to the file turns off the interrupts. Example: echo "1 1 1 60 60 0" > freefall_wakeup_1 # Turn on x,y,z, 60ms/60 threshold, or-mode echo "0" > freefall_wakeup_1 # Turn off interrupt The hardware supports two simulataneous wakeup sources to be configured, but the freerunner only connects one of the interrupt outputs. The patch exports both. Similarly, only the "top" accelerometer can be used as a wake-up source, and it's not possible to generate DATA_READY interrupts while the wakeup interrupts are active. Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
2008-11-19From 5ee1ee9e1c8a652b0f9cde72ad5e547db87d4d67 Mon Sep 17 00:00:00 2001Holger Freyther
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.
2008-11-19From 98d97ee93af676f7d6d0bf55aaae17e11304598a Mon Sep 17 00:00:00 2001Holger Freyther
Subject: [PATCH] Revert "s3c2440-nand-disable-hwecc.patch" This reverts commit 1d89da736ed33d3f7c398fb9f8dfddecb7c7c7a9.
2008-11-19lis302dl-allow-unloading-module.patchSimon Kagstrom
This patch fixes module unloading for the accelerometer (actually module loading failed before). The two problems were that the interrupt was not unregistered, and that the device was left in a "strange" state. Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
2008-11-19tracking-2.6.27-rc2-fix-fiq.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19add-s3c-serial-total-meddlings.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19revert-drivers-serial-s3c2410.c-meddlings.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-rc2-include-path-changes.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-no-discharging.patchAndy Green
We failed to report status of "discharging", instead reporting "not charging" even if we knew that the charger was not present. This patch corrects it and reports "discharging" when charger is absent. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19checkpatch-fixes.patchAndy Green
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>
2008-11-19fix-suspend-backlight-timing-gta01.patchMike Westerhof
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>
2008-11-19gta01-pcf50606-disable-irq-from-suspend-until-resume.patchMike Westerhof
This patch is the pcf50606 equivalent of the pcf50633 patch that disables interrupts from the chip until after resume is complete. In order to ensure no data is lost, the work function is called post-resume to process any pending interrupts. Most of the code was quite literally re-used from Andy Green's original patch. Signed-off-by: Mike Westerhof <mwester@dls.net>
2008-11-19silence-serial-console-gta01.patchMike Westerhof
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>
2008-11-19commit 830ea3d0c27c0c750b7bf1b56c002ee7943f3edcMike Westerhof
gta0x-log-serial-rx-error.patch This patch causes a KERN_DEBUG message to be printed each time an error status is read from a UART. This is intended to facilitate the reporting of more useful problem and bug reports from users in the field. Signed-off-by: Mike Westerhof <mwester@dls.net>
2008-11-19From fa269b44512a03523b164c3cebc20312748c524b Mon Sep 17 00:00:00 2001Holger Freyther
Subject: [PATCH] [ar6k] Build the wireless driver without DEBUG - Remove DEBUG from the Makefile - Do not send events through netlink to userspace. We might need to reevaluate this. But we seem to use wireless_send_event at the right places. (SEND_EVENT_TO_APP) - Do not report debug logs to apps (REPORT_DEBUG_LOGS_TO_APP) Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19fix-pcf50633-usbrem-charging-led.patchAndy Green
If the charger was removed, we fell through back to old hdq-driven code with normally wrong but slightly random results for charging LED behaviour in that circumstance This patch makes us use the tracked charger status callbacks alone if they are defined in the platform data. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamo-crank-memory-to-90MHz.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamo-turbo-host-interface.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19pcf50606: fix gllin compat linkCesar Eduardo Barros
Uses bus_create_device_link to correctly create the gllin compat link. Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
2008-11-19device model: Allow the creation of symlinks on /sys/bus/*/devicesCesar Eduardo Barros
Allows the direct creation of symlinks on /sys/bus/*/devices. This is needed for a compat symlink from gta01-pm-gps.0 to neo1973-pm-gps.0 on the Openmoko Neo1973 GTA01. Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
2008-11-19Signed-Off-Number: Holger Freyther <zecke@openmoko.org>Andy Green
2008-11-19tracking-2.6.27-rc1-broken-cfg-uninit-nand.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-rc1-ar6000.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-rc1-last-2400-ordering.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-rc1-borked-eth-gadget.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-rc1-tty-not-in-uart_port.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-mmc-ultiwrite-gone.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-rc1-irqtype-falling-glamo.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-backlight-def-pcf50633.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.27-rc1-pcf50306-defs.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19add-glamo-mci-slower-clocking-dynamic-switching.patchAndy Green
This patch gives glamo-mci a concept of a platform-defined dynamic clock slowing callback. It means that platform code can associate some completely external state to decide if we run the SD clock at normal rate or a rate divided by a module parameter "sd_slow_ratio", which you can set on kernel commandline like this: glamo_mci.sd_slow_ratio=8 you can also change it at runtime by echo 8 > /sys/module/glamo_mci/parameters/sd_slow_ratio If no platform callback is defined, then no slow mode is used. If it is defined, then the default division action is / 8, eg, 16MHz normal -> 2MHz slow mode. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamo-mci-dont-filter-voltage-change.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-allow-full-sd-voltage-range-selection.patchAndy Green
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>
2008-11-19fix-glamo-mci-ensure-more-than-74-clocks-after-power.patchAndy Green
We are meant to run SD_CLK a little while after power-on for the SD Card, but with the no idle clock changes we didn't take care about it. This makes us sleep a little bit before disabling clock if we just powered up the SD Card. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamo-mci-possible-timeout-overflow.patchAndy Green
The MMC stack hands us a timeout calibrated in SD_CLK clocks, but the Glamo can only deal with up to 65520 clocks of timeout. If the stack handed us a request bigger than this, it would just wrap and the timeout we actually used would be way too short. With this patch if that happens, we use the longest timeout we can, 65520 clocks and give it our best shot. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-pcf50633-only-do-platform-callback-once-per-event.patchAndy Green
Reported-by: Holger Freyther <zecke@openmoko.org> We harmlessly repeated PMU platform callbacks about charging state twice. Clean it up and leave it to pcf50633_charge_enable() to report once. Also tidies the sequencing so we set current limit before we enable charger now. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-pcf50633-remove-charger-curlim-and-enable-apis-from-export.patchAndy Green
Setting the current limit directly and enabling the charger isn't anyone's business except pcf50633 driver itself, so these two functions should not be exported and become static. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamo-mci-set-default-drive-level-0.patchAndy Green
Tests on access to SD Card with Glamo drive level "0" show that it reduces SD_CLK energy at 1.5GHz by 24dBm compared to drive level 3. This puts it only 6dB above the background noise floor compared to 30dB and should make a solution for GPS trouble with SD Card in. SD card communication seems unaffected so far on the Sandisk 512MB card we ship. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-bq27000-charger-state-tracking.patchAndy Green
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>
2008-11-19debug-add-glamo-drive-strength-module-param.patchAndy Green
Suggested-by: Werner Almesberger <werner@openmoko.org> This patch allows users to control two additional settings in Glamo MCI driver from kernel commandline or module parameters. First is Glamo drive strength on SD IOs including CLK. This ranges from 0 (weakest) to 3 (strongest). echo 0 > /sys/module/glamo_mci/parameters/sd_drive (Changes to this take effect on next SD Card transaction) or, from kernel commandline glamo_mci.sd_drive=0 On tests here with 0 strength, communication to SD card (shipped 512MB Sandisk) seemed fine, and a dd of 10MB urandom had the same md5 when written to cache as after a reboot. I set the default to 2. Second is whether we allow SD_CLK when the SD interface is idle. # stop the clock when we are idle (default) echo 0 > /sys/module/glamo_mci/parameters/sd_idleclk # run the SD clock all the time echo 1 > /sys/module/glamo_mci/parameters/sd_idleclk (changes take effect on next SD Card transaction) From kernel commandline, eg: glamo_mci.sd_idleclk=1 Normally you don't want to run the SD Clock all the time. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19debug-move-dev-info-to-dbg.patchAndy Green
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>
2008-11-19fix-scard-stop-on-resume.patchAndy Green
Reported-by: Ville-Pekka Vainio <vpivaini@cs.helsinki.fi> The reporter noticed SD Card clock is running again after resume. After looking at the code I saw I missed two tricks, this will force it off after resume and will do better generally depending on what the last SD Card packet was. Since bulk read packet is normally last action (which set the clock off even without this) the old patch worked for normal cases. But after resume, the last packet on the wire was not a bulk transfer and we didn't take care about the clock then. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19add-limit-sdcard-clk-cmdline.patchAndy Green
This patch allows you to control the maximum clock rate that will be selected for SD Card access, from the kernel commandline using glamo_mci.sd_max_clk=10000000 and also from echo 10000000 > /sys/module/glamo_mci/parameters/sd_max_clk although you have to suspend and resume to make the limit operational on the actual SD_CLK line. Clocks that are possible are divided down from ~50MHz, so 25000000, 16666666, 12500000, 10000000, etc. With Freerunner A5 revision that has 100R series resistors in SD Card signals, I didn't get reliable operation above 16MHz. With A6 revision the series resistors went down to 75R, maybe it can work at 25MHz. Reducing the clock rate is something to try if you find that your SD Card is not communicating properly with the default speed. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-force-sdcard-clk-off-when-idle.patchAndy Green
Existing Glamo bit for stopping SD Card Clock when there is no transfer taking place does not work. This patch adds stuff around the transfer code to force the SD clock up when something is going on and down when it is idle. This'll save a little power and noise ;-) I tested it briefly and was able to SD Boot normally on Sandisk 512M. Wider testing is appreciated. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19change-backlight-level-not-forced-up-on-resume.patchAndy Green
We at least always enabled backlight on resume, this patch changes us to set backlight back to last requested backlight brightness level on resume. Note it means that you can resume with screen blanked, but it should come back if that happened with touchscreen action as usual. /sys/class/backlight/pcf50633-bl/actual_brightness and /sys/class/backlight/pcf50633-bl/brightness seem to agree after resume when reportedly they didn't before. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19add-pcf50633-allow-force-charger-type.patchAndy Green
This patch adds a sysfs node: /sys/class/i2c-adapter/i2c-0/0-0073/force_usb_limit_dangerous it allows to force the charging limit regardless of the one chosen by pcf50633 kernel driver. As such, if you write a charging limit here that is not suitable for the power source, and the power source is not current limited on its side, it could draw more current than your power source can handle, burn down you house, etc. If you're certain that your power supply can handle it, you can use this on your own responsibility to make the amount drawn by the PMU match what you believed your power supply could handle. Example usage, in case where you have a dumb 500mA USB charger that does not have the ID resistor: # cat /sys/class/i2c-adapter/i2c-0/0-0073/charger_type host/500mA usb mode 100mA <=== dumb charger does not ennumerate us # echo 500 > /sys/class/i2c-adapter/i2c-0/0-0073/force_usb_limit_dangerous # cat /sys/class/i2c-adapter/i2c-0/0-0073/charger_type host/500mA usb mode 500mA Signed-off-by: Andy Green <andy@openmoko.com>