aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)Author
2008-11-19change-glamo-mci-try-memcpy.patchAndy Green
Trial to see if (mainly 32-bit) memcpy is any better than u16 loop Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamofb-remove-soft-delays.patchAndy Green
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>
2008-11-19clean-glamofb-cruft.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19Fixing trivial warningsNelson Castillo
Removed unused variable. Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
2008-11-19Fixing trivial warningsNelson Castillo
The function glamo_mci_reset is not being used. Let's comment it out. Signed-off-by: Nelson Castillo <nelsoneci@gmail.com>
2008-11-19glamo_fb: Implement screen blankingHarald Welte
This patch implements fb_blank() for the glamo-fb driver, which switches off the pixel clock (DCLK) for power saving. We currently delay the actual pixel clock switch until we enter FB_BLANK_POWERDOWN, since the backlight fade is slow and we don't want the user to see artefacts on the screen while the backlight is fading out. So since the X server first sends FB_BLANK_{V,H}SYNC_SUSPEND, we start the backlight fade here, and only once we get FB_BLANK_POWERDOWN the pixel clock is disabled. There are no measurements yet, but the power savings should be double, since there is no longer any generation of the high-frequency LCM signals, and there are no video-related SDRAM accesses anymore. Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-11-19glamo_fb: sync comment with codeHarald Welte
the comment claims that DHCLK is enabled, while the code actually disables it. No code change, purely cosmetic patch. Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-11-19glamo_fb: Cosmetic cleanupHarald Welte
Remove dead code and coding style fixes. Purely cosmetic. Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-11-19revert-fix-build-with-no-config_mmc-glamo-resume-callback-part.patchAndy Green
Thomas White noticed that the recent patch from Andrzej cleaning up a nasty cast in the resume_dependency stuff for Glamo broke resume. The problem was that the wrong resume callback was arrived at by the new code, the one in the device's device_driver struct rather than the struct platform_driver that actually holds the right pointer. Since this code will be gone in 2.6.26, I reverted this part of Andrzej's patch, tidying the cast a bit anyway. Reported-by: Thomas White <taw27@cam.ac.uk> Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19always-call-resume-dependencies.patch\\\\\\\\\\\\\\\"Mike (mwester)\\\\\\\\\\\\
Attached is a patch that has greatly reduced the frequency of failures to resume (due to an oops from the glamo resume handler), and the dreaded "white screen after resume". I can't say that it fixes all of these, although I have yet to see the white-screen since applying this patch and suspending/resuming several hundred times (with the 30-second suspend on the 2008.8 image and the endless stream of GSM error messages generated by something in that image, it has proved to be very useful to do an automated stress test!) This patch will apply to stable, and should make stable slightly more, well, "stable". [Feel free to remove the debug messages if someone feels strongly about that; I left them in because I think they might be useful in triaging further crashes; I'm not at all convinced that this patch will fix all the cases of resume failures.] [[And, yes, this is ugly, really ugly.]] [[[Oh yeah - there's still one extreme case that will result in an oops: if a dependent driver is built as a module, and it is unloaded, and it happened that the preceding suspend/resume was aborted, and that abort happened between the dependent driver and the driver upon which it is dependent, then a list entry will be left behind referencing the unloaded module. There's just no good way to fix that given the way the resume dependency plumbing is connected up right now, so just avoid using modules for any of the drivers involved in the resume dependency stuff.]]] Regards, Mike (mwester) commit 905d2fc9c45f622418ce9ef4e67c23453aab7571 Author: Mike Westerhof <mwester@dls.net> Date: Mon Aug 11 11:11:25 2008 -0500 always-call-resume-dependencies.patch Ensure that a dependent resume handler is always executed, even if the resume handler for driver upon which it is dependent never suspends (and therefore never resumes either). Also make sure that we do not end up with duplicate dependencies registered, something that can happen if the suspend is aborted due to driver failure or an early resume (such as occurs when the GSM interrupts during suspend). Signed-off-by: Mike Westerhof <mwester@dls.net>
2008-11-19fix-build-with-no-CONFIG_MMCAndrzej Zaborowski
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>
2008-11-19fix-glamo-mci-slow-clock-until-first-bulk.patchAndy Green
This patch adds another module parameter to glamo-mci which sets the SD Card clock rate used inbetween powering the card and the completion of the first bulk transfer. You can set it from kernel commandline like this. glamo_mci.sd_post_power_clock=1000000 The period between changing the power state and the first bulk transfer completion is critical because larger SDHC cards take longer to initialize before they can service the bulk transfer, and the Glamo MMC unit has a fixed timeout length of a maximum of 4095 x 16 x SD Card clocks. Large cards like 8GB Sandisk SDHC are not ready before this timeout is used up at default 16MHz. Subsequently, the card can handle 16MHz SD Clock and timeout durations okay. By default this patch operates the SD Clock at only 1MHz until the first bulk transfer is completed after each powerup action from the MCI stack. It also keeps the SD Clock running during this time, and disables the SD Clock if the card is not present and the MCI stack removes power. Signed-off-by: Andy Green <andy@openmoko.com>
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-19tracking-2.6.27-rc2-include-path-changes.patchAndy Green
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-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-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-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-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-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-19Subject: [PATCH] glamo: Don't disable hwcursor for blinking and use vsync-wait.Andrzej Zaborowski
2008-11-19fix-glamo-suspend-resume-dram-and-engines.patchAndy Green
Two issues... we never took care to take down engines in suspend and bring them back in resume. This was part of the display corruption that could be seen briefly on resume. The other issue that made the "noise" corruption was bad ordering of resume steps. This patch simplifies (removing needless re-init) resume actions and makes explicit the suspend and resume steps. It also adds code to track which engines are up and push them down in suspend and bring them back in resume. The result is no more corruption of display buffer in suspend, it comes back completely clean. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-pcf50633-kill-white-splash-of-death-on-suspend.patchAndy Green
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>
2008-11-19fix-glamo-mci-resume-dependency-on-pcf50633.patchAndy Green
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>
2008-11-19add-use-pcf50633-resume-callback-jbt6k74.patchAndy Green
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>
2008-11-19Subject: [PATCH] Hardware glamo-fb cursor, some clean-up.Andrzej Zaborowski
2008-11-19OpenMoko => OpenmokoHolger Freyther
Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19debug-glamo-add-lcd-regs-to-dump.patchwarmcat
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamofb-cmd-mode-locking.patchAndy Green
Glamo "cmd mode" is modal, but nothing took care about locking. Also cmd mode was entered recursively in rotate_lcd(). Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamofb-cmdqueue-timeout.patchAndy Green
loglevl=9 can cause failure to init glamo-fb problem seems to be too low timeout when text scrolling can delay commandqueue going empty Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19debug-glamo-dump-regs.patchwarmcat
From: Andy Green <andy@openmoko.com> Sigend-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamo-mci-fake-reset-opcode-in-suspend.patchwarmcat
2008-11-19fix-lcm-reinit-post-resume.patchwarmcat
2008-11-19fix-glamo-mci-defeat-ops-during-suspend.patchAndy Green
We need to be able to use the config option CONFIG_MMC_UNSAFE_RESUME that allows the rootfs to live on SD. But when we use this, it tries to send a reset command to the SD card during suspend -- and unfortunately many things like Power have suspended by then. This patch again rejects IO on the MMC device during suspend of the MMC device, and it gives the result the rootfs on SD card works okay. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19glamo-cmdqueue-bandaid.patchmokopatches
[ Stop kernel from hanging every once in a while during Glamo initialization. ] debug-glamo-fb-cmdqueue-wait-timeout.patch From: warmcat <andy@warmcat.com>
2008-11-19suspend-prelim1.patchmokopatches
2008-11-19glamo-mmc.patchmokopatches
2008-11-19smedia-glamo.patchmokopatches
[ FIXME: include/asm-arm/arch-s3c2410/irqs.h shouldn't contain device-specific changes. ] This is a Linux kernel driver for the Smedia Glamo336x / Glamo337x multi-function peripheral device. Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-11-01missing dependencies on HAVE_CLK in drivers/mfdAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-24mfd: Make WM8400 depend on I2C until SPI is submittedMark Brown
Otherwise we could build in WM8400 but not I2C. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-10-24mfd: add missing Kconfig entry for da903xSamuel Ortiz
This one was accidentally left out during the rc1 mfd merge. Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-10-22mfd: check for platform_get_irq() return value in sm501Roel Kluin
sm501_devdata->irq is unsigned, while platform_get_irq() returns a signed int. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>