aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* sdio: add sdio_f0_readb() and sdio_f0_writeb()David Vrabel2007-09-23
| | | | | | | | | Add sdio_f0_readb() and sdio_f0_writeb() functions to reading and writing function 0 registers. Writes outside the vendor specific CCCR registers (0xF0 - 0xFF) are not permitted. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: replace BUG_ON with WARN_ONPierre Ossman2007-09-23
| | | | | | | | Replace all cases of BUG_ON with WARN_ON where there is a chance (with varying degrees of slim) that the kernel can continue without incidence. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: kmalloc + memset conversion to kzallocMariusz Kozlowski2007-09-23
| | | | | Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: extend sdio_readsb() and friends to handle any length of bufferDavid Vrabel2007-09-23
| | | | | | | | | | | | | | | Extend sdio_readsb(), sdio_writesb(), sdio_memcpy_fromio(), and sdio_memcpy_toio() to handle any length of buffer by splitting the transfer into several IO_RW_EXTENDED commands. Typically, a transfer would be split into a single block mode transfer followed by a byte mode transfer for the remainder but we also handle lack of block mode support and the block size being greater than 512 (the maximum byte mode transfer size). host->max_seg_size <= host->max_req_size so there's no need to check both when determining the maximum data size for a single command. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: set the functions' block sizeDavid Vrabel2007-09-23
| | | | | | | | | | | | | | | Before a driver is probed, set the function's block size to the default so the driver is sure the block size is something sensible and it needn't explicitly set it. The default block size is the largest that's supported by both the card and the host, with a maximum of 512 to ensure aribitrarily sized transfer use the optimal (least) number of commands. See http://lkml.org/lkml/2007/8/7/150 for reasons for the block size choice. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add SDIO_FBR_BASE(f) macroDavid Vrabel2007-09-23
| | | | | Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: fix sdio timeout calculationPierre Ossman2007-09-23
| | | | | | | SDIO doesn't have a CSD so it uses different timeout values than SD memory. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: fix incorrect divisor in debug outputPierre Ossman2007-09-23
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: enable wide bus modePierre Ossman2007-09-23
| | | | | | | Enable 4-bit data bus mode, according to host and card capabilities. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: change clock speedPierre Ossman2007-09-23
| | | | | | Change clock speed to the highest supported by the card. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* make struct sdio_dev_attrs[] staticAdrian Bunk2007-09-23
| | | | | | | | | | | | | | | | On Wed, Jul 25, 2007 at 04:03:04AM -0700, Andrew Morton wrote: >... > Changes since 2.6.22-rc6-mm1: >... > git-mmc.patch >... > git trees >... sdio_dev_attrs[] can become static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add interface for host side SDIO interrupt reportingNicolas Pitre2007-09-23
| | | | | Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: support IO_RW_EXTENDEDPierre Ossman2007-09-23
| | | | | | | Support the multi-byte transfer operation, including handlers for common operations like writel()/readl(). Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add /proc interface to sdio_uart driverNicolas Pitre2007-09-23
| | | | | | | This mimics what the serial_core does. Useful for diagnostics. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: UART/GPS driverNicolas Pitre2007-09-23
| | | | | | | | This currently only accepts the GPS class since that's all I have for testing. Tested with a Matsushita GPS and gpsd version 2.34. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: core support for SDIO function interruptNicolas Pitre2007-09-23
| | | | | Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: allow for mmc_claim_host to be abortedNicolas Pitre2007-09-23
| | | | | | | | | | It is sometimes necessary to give up on trying to claim the host lock, especially if that happens in a thread that has to be stopped. While at it, fix the description for mmc_claim_host() which was wrong. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: defines for some standard interface typesNicolas Pitre2007-09-23
| | | | | Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add basic sysfs attributesPierre Ossman2007-09-23
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add modalias supportPierre Ossman2007-09-23
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: whip bus uevent handler into shapePierre Ossman2007-09-23
| | | | | | Make the mmc bus uevent callback look like all other subsystems. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: add device id table and matchingPierre Ossman2007-09-23
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: initialize mmc subsystem with subsys_initcall()Nicolas Pitre2007-09-23
| | | | | | | | | | | | | | | | | | | | The problem is that the sdio_bus must be registered before any SDIO drivers are registered against it otherwise the kernel sulks. Because the sdio_bus registration happens through module_init (equivalent to device_initcall), then any SDIO drivers linked before the SDIO core code in the kernel will be initialized first. Upcoming SDIO function drivers are likely to be located outside the drivers/mmc directory as it is common practice to group drivers according to their function rather than the bus they use. SDIO drivers are therefore likely to appear at random location in the kernel link. To make sure the sdio_bus is always initialized before any SDIO drivers, let's move the MMC init to the subsys_initcall level. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: split up common and function CIS parsingPierre Ossman2007-09-23
| | | | | | | | Add a more clean separation between global, common CIS information and the function specific one as we need the common information in places where no specific function is specified. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: link unknown CIS tuples to the sdio_func structureNicolas Pitre2007-09-23
| | | | | | | | | This way those tuples that the core cares about are consumed by the core code, and tuples that only function drivers might make sense of are available to drivers. Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: initial CIS parsing codeNicolas Pitre2007-09-23
| | | | | Signed-off-by: Nicolas Pitre <npitre@mvista.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: basic parsing of FBRPierre Ossman2007-09-23
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* sdio: read and decode interesting parts of the CCCRPierre Ossman2007-09-23
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: enable/disable functions for SDIOPierre Ossman2007-09-23
| | | | | | | | Like many other buses, the devices (functions) on the SDIO bus must be enabled before they can be used. Add functions that allow drivers to do so. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: add basic SDIO I/O operationsPierre Ossman2007-09-23
| | | | | | | Add command wrappers that simplify register access from SDIO function drivers. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: add SDIO driver handlingPierre Ossman2007-09-23
| | | | | | Add basic driver handling to the SDIO device model. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: basic SDIO device modelPierre Ossman2007-09-23
| | | | | | Add the sdio bus type and basic device handling. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: implement SDIO IO_RW_DIRECT operationPierre Ossman2007-09-23
| | | | Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: detect SDIO cardsPierre Ossman2007-09-23
| | | | | | Really basic init sequence for SDIO cards. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: at91_mci: disable handling of blocks with size not multiple of 4 bytesMarc Pignat2007-09-23
| | | | | | | | This kind of transfer is not supported, so don't advertise it and make it fail early. Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: add missing printk levelsPierre Ossman2007-09-23
| | | | | | Some printk:s were missing an explicit level. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove confusing flagPierre Ossman2007-09-23
| | | | | | | | The MMC_DATA_MULTI flag never had a proper definition of what it means, so remove it and let the drivers check the block count in the request. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove BYTEBLOCK capabilityPierre Ossman2007-09-23
| | | | | | | Remove the BYTEBLOCK capability and let the broken hosts fail the requests with -EINVAL instead. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: mmc_set_data_timeout() parameter write is redundantPierre Ossman2007-09-23
| | | | | | | | The write parameter in mmc_set_data_timeout() is redundant as the data structure contains information about the direction of the transfer. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: read ext_csd version numberPierre Ossman2007-09-23
| | | | | | | Make sure we do not try to parse a structure we do not understand. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: improve error code feedbackPierre Ossman2007-09-23
| | | | | | | Now that we use "normal" error codes, improve the reporting and response to error codes in the core. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* mmc: remove custom error codesPierre Ossman2007-09-23
| | | | | | | Convert the MMC layer to use standard error codes and not its own, incompatible values. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* clockevents: remove the suspend/resume workaround^WthinkoThomas Gleixner2007-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | In a desparate attempt to fix the suspend/resume problem on Andrews VAIO I added a workaround which enforced the broadcast of the oneshot timer on resume. This was actually resolving the problem on the VAIO but was just a stupid workaround, which was not tackling the root cause: the assignement of lower idle C-States in the ACPI processor_idle code. The cpuidle patches, which utilize the dynamic tick feature and go faster into deeper C-states exposed the problem again. The correct solution is the previous patch, which prevents lower C-states across the suspend/resume. Remove the enforcement code, including the conditional broadcast timer arming, which helped to pamper over the real problem for quite a time. The oneshot broadcast flag for the cpu, which runs the resume code can never be set at the time when this code is executed. It only gets set, when the CPU is entering a lower idle C-State. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Andrew Morton <akpm@linux-foundation.org> Cc: Len Brown <lenb@kernel.org> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ACPI: disable lower idle C-states across suspend/resumeThomas Gleixner2007-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device_suspend() calls ACPI suspend functions, which seems to have undesired side effects on lower idle C-states. It took me some time to realize that especially the VAIO BIOSes (both Andrews jinxed UP and my elfstruck SMP one) show this effect. I'm quite sure that other bug reports against suspend/resume about turning the system into a brick have the same root cause. After fishing in the dark for quite some time, I realized that removing the ACPI processor module before suspend (this removes the lower C-state functionality) made the problem disappear. Interestingly enough the propability of having a bricked box is influenced by various factors (interrupts, size of the ram image, ...). Even adding a bunch of printks in the wrong places made the problem go away. The previous periodic tick implementation simply pampered over the problem, which explains why the dyntick / clockevents changes made this more prominent. We avoid complex functionality during the boot process and we have to do the same during suspend/resume. It is a similar scenario and equaly fragile. Add suspend / resume functions to the ACPI processor code and disable the lower idle C-states across suspend/resume. Fall back to the default idle implementation (halt) instead. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Andrew Morton <akpm@linux-foundation.org> Cc: Len Brown <lenb@kernel.org> Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'release' of ↵Linus Torvalds2007-09-22
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: ACPI: suspend: consolidate handling of Sx states addendum ACPI: suspend: consolidate handling of Sx states. ACPI: video: remove dmesg spam ACPI: video: _DOS=0 by default to prevent hotkey hang
| * Pull suspend.now into release branchLen Brown2007-09-21
| |\
| | * ACPI: suspend: consolidate handling of Sx states addendumFrans Pop2007-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the S0 state be always reported as supported Signed-off: Frans Pop <elendil@planet.nl> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
| | * ACPI: suspend: consolidate handling of Sx states.Alexey Starikovskiy2007-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes to sleep initialization in ACPI dropped reporting of supported Sx states above S3. Fix that and also move S5 init into same file as other Sx. The only functional change is adding printk() for S4 and S5 cases. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
| * | Pull now into release branchLen Brown2007-09-21
| |\ \ | | |/ | |/|
| | * ACPI: video: remove dmesg spamMaik Broemme2007-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i am actually heavily using the ACPI video extension for my Thinkpad X61 Tablet. I have bound the input events triggered by the brightness up/down keys to a simple echo <value> > /sys/class/backlight/acpi_video1/brightness but everytime the event is triggered and acpi_video_device_lcd_set_level() is called i got a notificication in my kernel log like: set_level status: 0 set_level status: 0 set_level status: 0 set_level status: 0 ... Signed-off-by: Maik Broemme <mbroemme@plusserver.de> Signed-off-by: Len Brown <len.brown@intel.com>