aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-21mmc: core: correct invalid error checkingAlan Cox1-1/+1
The effect of the existing code is that we continue blindly when we should warn about an invalid allocation unit. Reported-by: [email protected] Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44061 Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: only support voltage (vdd) that regulator agrees withPhilip Rakity1-0/+17
If we are using a regulator the SD Host Controller and the regulator should agree about the voltages supported. Use the common subset that is supported. Signed-off-by: Philip Rakity <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sdhci: only set 200mA support for 1.8v if 200mA is availablePhilip Rakity3-12/+14
max_current_caps can return 0 if not available from the sd controller. If no regulator is present or the regulator specifies a current less then 200ma, we no longer still set the 200mA caps bit anyway. Signed-off-by: Philip Rakity <[email protected]> Reviewed-by: Aaron Lu <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sdhci: if MAX_CURRENT is 0, try getting current from regulatorPhilip Rakity2-6/+23
The sd host controller spec indicates the the MAX_CURRENT value may be returned as 0. In this case other methods need to be used to return the current. If 0 is returned and there is a regulator, ask the regulator for how much current is available. Signed-off-by: Philip Rakity <[email protected]> Signed-off-by: Mark F. Brown <[email protected]> Reviewed-by: Aaron Lu <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mmcif: support generic card-detectionGuennadi Liakhovetski2-0/+20
Extend the sh_mmcif driver to support GPIO card detection, provided by the slot function module. The original .get_cd() platform callback is also preserved for now. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: prohibit card detection when host is not readyGuennadi Liakhovetski2-0/+4
Currently mmc host drivers have to decide whether to enable card detection before calling mmc_add_host() -- in which case a card insertion event can arrive before the host has been completely initialised -- or after mmc_add_host(), in which case the initial card detection can be problematic. This patch adds an explicit indication of when card detection should not be carried out. With it in place enabling card detection before calling mmc_add_host() should be safe. Similarly, disabling it again after calling mmc_remove_host() will avoid any races. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh-mmcif: add OF support, make platform data optionalGuennadi Liakhovetski1-9/+20
Add primitive OF support to the sh-mmcif driver, which also makes it necessary to be able to run without platform data. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sdhi: add OF support, make platform data optionalGuennadi Liakhovetski1-12/+23
Add primitive support for OF to the SDHI TMIO glue, which also makes it necessary to be able to run without platform data. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: tmio: use generic GPIO CD and WP handlersGuennadi Liakhovetski1-0/+6
The tmio-mmc driver is already using the generic GPIO CD handler in IRQ mode. This patch adds support for CD polling mode and also checks for availability of a WP GPIO. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mobile_sdhi: support caps2 flagsGuennadi Liakhovetski2-0/+2
Let SDHI platforms specify mmc_host::caps2 flags in their platform data. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: tmio: support caps2 flagsGuennadi Liakhovetski2-0/+2
Allow tmio mmc glue drivers to pass mmc_host::caps2 flags down to the mmc layer. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: core: add WP pin handler to slot functionsGuennadi Liakhovetski2-1/+55
Card Write-Protect pin is often implemented, using a GPIO, which makes it simple to provide a generic handler for it. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: core: convert slot functions to managed allocationGuennadi Liakhovetski3-13/+43
This prepares for the addition of further slot functions. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: add CD GPIO polling support to slot functionsGuennadi Liakhovetski2-13/+45
A simple extension of mmc slot functions add support for CD GPIO polling for cases where the GPIO cannot produce interrupts, or where this is not desired for some reason. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: add two capability flags for CD and WP signal polarityGuennadi Liakhovetski1-0/+2
To handle CD and WP SD/MMC slot pins we need generic flags to specify their polarity. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: core: use a more generic name for slot function types and fieldsGuennadi Liakhovetski3-7/+20
struct mmc_host::hotplug is becoming a generic hook for slot functions. Rename it accordingly. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mmcif: add regulator supportGuennadi Liakhovetski1-7/+31
Add regulator support to the sh_mmcif driver, but also preserve the current power-callback. Also note, that the card power is not switched off during clock gating periods, hence there's no need to power it on every time the card is re-activated. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviwed-by: Mark Brown <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mmcif: remove redundant .down_pwr() callbackGuennadi Liakhovetski1-2/+2
From the original version of sh_mmcif the .set_pwr() callback has only been used to turn the card's power on, and the .down_pwr() callback has been used to turn it off. .set_pwr() can be used for both these tasks, which is also how it is implemented by the only user of this API: the SH7724 ecovec board. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mmcif: re-read the clock frequency every time it is turned onGuennadi Liakhovetski1-5/+18
With aggressive clock gating the clock can be disabled during interface inactivity. During this time its frequency can be changed by another its user. Therefore when the interface is activated again and the clock is re-enabled, its frequency has to be re-read. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mmcif: fix clock managementGuennadi Liakhovetski1-23/+23
Regardless of whether the MMC bus clock is the same as the PM clock on this specific interface, it has to be managed separately. Its proper management should also include enabling and disabling of the clock, whenever the interface is becoming active or going idle respectively. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mmcif: simplify and use meaningful label names in error-handlingGuennadi Liakhovetski1-21/+20
A check for NULL platform data can be conveniently made in the very beginning of probing. Replace numbered error-handling labels in .probe() with meaningful names to make any future reorganisation simpler. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: tmio: remove a duplicated comment lineGuennadi Liakhovetski1-1/+0
Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sdhi: do not install dummy callbacksGuennadi Liakhovetski1-8/+6
Currently the SDHI glue for the TMIO MMC driver installs dummy .get_cd() and .set_pwr() callbacks even if the platform didn't supply them. This is not necessary, since the TMIO MMC driver itself checks for NULL callbacks. This is also dubious if the platform provides a regulator for SD-card power switching. It is better to only install those callbacks, if they are really provided by the platform. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: tmio: add regulator supportGuennadi Liakhovetski1-8/+29
Currently the TMIO MMC driver derives the OCR mask from the platform data and uses a platform callback to turn card power on and off. This patch adds regulator support to the driver. Signed-off-by: Guennadi Liakhovetski <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Mark Brown <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sdhi: implement tmio-mmc clock enable-update and disable callbacksGuennadi Liakhovetski1-1/+23
Instead of delivering one static clock frequency value, read from the hardware during probing, enable the tmio-mmc driver to re-read the frequency dynamically. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: tmio: add callbacks to enable-update and disable the interface clockGuennadi Liakhovetski2-3/+35
Every time the clock is enabled after possibly being disabled, we have to re-read its frequency and update our configuration. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: tmio: don't needlessly enable interrupts during probingGuennadi Liakhovetski1-10/+11
We don't have to force-enable MMC interrupts in our .probe() method, mmc_add_host() will trigger card detection, that will enable all the necessary interrupts. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: dw_mmc: Fix null dma_ops access when use_dma is falseJonathan Kliegman1-1/+1
host->dma_ops is not valid if host->usa dma is 0 so protect host->dma_ops reference in dw_mci_resume Signed-off-by: Jonathan Kliegman <[email protected]> Acked-by: Jaehoon Chung <[email protected]> Acked-by: Will Newton <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: add a function to get regulators, supplying card's powerGuennadi Liakhovetski2-2/+37
Add a function to get regulators, supplying card's Vdd and Vccq on a specific host. If a Vdd supplying regulator is found, the function checks, whether a valid OCR mask can be obtained from it. The Vccq regulator is optional. A failure to get it is not fatal. Signed-off-by: Guennadi Liakhovetski <[email protected]> Reviwed-by: Mark Brown <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: tmio: Don't access hardware registers after stopping clocksLaurent Pinchart1-8/+10
The tmio_mmc_set_ios() function configures the MMC power, clock and bus width. When the mmc core requests the driver to power off the card, we inform runtime PM, that the controller can be suspended. This can lead to the MSTP clock being turned off. Writing to any 16-bit hardware registers with the MSTP clock off leads to timeouts and errors being printed to the kernel log. This can occur both when stopping the MMC clock and when configuring the bus width. To fix this, stop the MMC clock before calling put_runtime_pm(), and skip bus width configuration when power is off. Signed-off-by: Laurent Pinchart <[email protected]> Tested-by: Kuninori Morimoto <[email protected]> Tested-by: Simon Horman <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sh_mmcif: Support MMC_SLEEP_AWAKE commandLaurent Pinchart1-10/+4
The MMC_SLEEP_AWAKE and SD_IO_SEND_OP_COND commands share the same opcode. SD_IO_SEND_OP_COND isn't supported by the SH MMCIF, but MMC_SLEEP_AWAKE is. Discriminate between the two commands using the command flags, and reject SD_IO_SEND_OP_COND only. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: dw_mmc: Add check for IDMAC configurationGirish K S1-2/+13
In the current dwmmc driver there is support for selecting IDMAC from the menu config option. If the support for IDMAC is enabled in the menu config and the hardware configuration register's DMA_INTERFACE field is 0, the driver will still try to do the DMA initialization. The dw_mci_idmac_init function currently implemented returns only success indicating that the DMA initialization is always successful. This patch adds a check for existence of the DMA IP to allow the DMA initialization. Signed-off-by: Girish K S <[email protected]> Acked-by: Will Newton <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2012-07-21mmc: sdhci-pxa: Add device tree supportChris Ball3-0/+127
Tested on an OLPC XO-1.75. (MMP2, sdhci-pxav3, CONFIG_MACH_MMP2_DT=y) Signed-off-by: Chris Ball <[email protected]> Acked-by: Haojian Zhuang <[email protected]>
2012-07-20staging: csr: delete a bunch of unused library functionsGreg Kroah-Hartman6-616/+1
These functions were never being called, so they can be safely deleted. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20staging: csr: remove csr_utf16.cGreg Kroah-Hartman10-1155/+28
Only one function was being used in the file, so move it to where it was being called and delete the rest of the file, and csr_unicode.h as it's no longer needed as well. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20staging: csr: remove csr_pmem.hGreg Kroah-Hartman36-134/+1
It's no longer needed. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20staging: csr: remove CsrPmemAllocGreg Kroah-Hartman26-605/+534
It's just a wrapper around kmalloc(, GFP_KERNEL) + a call to panic() if we are out of memory, which is a very foolish thing to do (the panic that is.) So replace it with calls to kmalloc() and ignore the out-of-memory casese for now, odds are it will not be hit, and if it does, hey, we will end up panicing just the same as with the old code. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20forcedeth: spin_unlock_irq in interrupt handler fixDenis Efremov1-2/+2
The replacement of spin_lock_irq/spin_unlock_irq pair in interrupt handler by spin_lock_irqsave/spin_lock_irqrestore pair. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-20Merge branch 'master' of ↵David S. Miller13-18/+30
git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch Jesse Gross says: ==================== A few bug fixes and small enhancements for net-next/3.6. ... Ansis Atteka (1): openvswitch: Do not send notification if ovs_vport_set_options() failed Ben Pfaff (1): openvswitch: Check gso_type for correct sk_buff in queue_gso_packets(). Jesse Gross (2): openvswitch: Enable retrieval of TCP flags from IPv6 traffic. openvswitch: Reset upper layer protocol info on internal devices. Leo Alterman (1): openvswitch: Fix typo in documentation. Pravin B Shelar (1): openvswitch: Check currect return value from skb_gso_segment() Raju Subramanian (1): openvswitch: Replace Nicira Networks. ==================== Signed-off-by: David S. Miller <[email protected]>
2012-07-20ipv4: Fix neigh lookup keying over loopback/point-to-point devices.David S. Miller1-3/+0
We were using a special key "0" for all loopback and point-to-point device neigh lookups under ipv4, but we wouldn't use that special key for the neigh creation. So basically we'd make a new neigh at each and every lookup :-) This special case to use only one neigh for these device types is of dubious value, so just remove it entirely. Reported-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-20staging: csr: remove CsrPmemFree()Greg Kroah-Hartman23-303/+282
It's just a wrapper around kfree() so call that instead. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20staging: csr: remove CsrMemAllocDma()Greg Kroah-Hartman5-53/+4
It's just a call to kmalloc(, GFP_KERNEL | GFP_DMA); But, all memory allocated by kmalloc can be DMAed, and that's not what GFP_DMA means, so remove that flag, and just call kmalloc(, GFP_KERNEL); Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20staging: csr: remove CsrMemCalloc()Greg Kroah-Hartman2-52/+0
No one calls it, so it doesn't need to be here. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20staging: csr: remove CsrMemAlloc()Greg Kroah-Hartman7-62/+12
It's just calling kmalloc(, GFP_KERNEL), so call that instead. A few places should be calling kzalloc(), so do that, and remove the call to memset at the same time. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20staging: csr: remove CsrMemFree() and CsrMemFreeDma()Greg Kroah-Hartman8-107/+30
They were just wrappers around kfree() so call that instead. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-21Merge branch 'lpc32xx/core2' of git://git.antcom.de/linux-2.6 into next/socArnd Bergmann3-2/+23
From Roland Stigge <[email protected]>: this LPC32xx core update (branch lpc32xx/core2) builds upon the previously provided lpc32xx/core-fixes. Basically including PWM support (for the PWM driver from Alexandre already in the pwm tree), and CPU ID. * 'lpc32xx/core2' of git://git.antcom.de/linux-2.6: ARM: LPC32xx: Add PWM support ARM: LPC32xx: Add PWM clock ARM: LPC32xx: Set system serial based on cpu unique id Signed-off-by: Arnd Bergmann <[email protected]>
2012-07-20staging: csr: remove csr_util.hGreg Kroah-Hartman19-36/+18
Now that the header file has nothing in it, remove it from the tree, and adjust the places that were including it. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-21Merge branch 'lpc32xx/dts2' of git://git.antcom.de/linux-2.6 into next/dtArnd Bergmann1-0/+5
From Roland Stigge <[email protected]>: this is a late addition to LPC32xx DTS files for v3.6. * 'lpc32xx/dts2' of git://git.antcom.de/linux-2.6: ARM: LPC32xx: Add PWM to base dts file Signed-off-by: Arnd Bergmann <[email protected]>
2012-07-20staging: csr: remove CsrOffSetOf()Greg Kroah-Hartman2-107/+96
It's really just offsetof, so call that instead. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-20stating: csr: remove unneeded #includes in csr_util.cGreg Kroah-Hartman1-5/+0
This .c file only holds the MODULE_* stuff for the module, so remove the other #include calls as they are not needed anymore. Cc: Mikko Virkkilä <[email protected]> Cc: Lauri Hintsala <[email protected]> Cc: Riku Mettälä <[email protected]> Cc: Veli-Pekka Peltola <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>