aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-01-08mmc: Register debugfs dir before calling card probe function.Viresh Kumar1-4/+4
This way, the probe function may register debugfs files if it wants to. This fixes a bug with mmc_test where mmc_test_register_file_test() is called before the card's debugfs dir exists, and so it fails. Signed-off-by: Viresh Kumar <[email protected]> Tested-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: MMC_BLOCK_MINORS should depend on MMC_BLOCK.Chris Ball1-0/+1
Signed-off-by: Chris Ball <[email protected]> Tested-by: Chris Ball <[email protected]> Acked-by: Olof Johansson <[email protected]>
2011-01-08mmc: Explain why we make adjacent mmc_bus_{put,get} calls during rescan.Chris Ball1-2/+4
Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: Fix sd/sdio/mmc initialization frequency retriesAndy Ross5-99/+68
Rewrite and clean up mmc_rescan() to properly retry frequencies lower than 400kHz. Failures can happen both in sd_send_* calls and mmc_attach_*. Break out "mmc_rescan_try_freq" from the frequency selection loop. Symmetrize claim/release logic in mmc_attach_* API, and move the sd_send_* calls there to make mmc_rescan easier to read. Signed-off-by: Andy Ross <[email protected]> Reviewed-and-Tested-by: Hein Tibosch <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: fix mmc_set_bus_width_ddr() call without bus-width-test capTakashi Iwai1-2/+2
With the bus-width test patch, mmc_set_bus_width*() isn't called properly when the driver doesn't set MMC_CAP_BUS_WIDTH and no DDR mode. This patch fixes the regression by moving the call up before the cap test. Signed-off-by: Takashi Iwai <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: dw_mmc: Add Synopsys DesignWare mmc host driver.Will Newton5-0/+2198
This adds the mmc host driver for the Synopsys DesignWare mmc host controller, found in a number of embedded SoC designs. Signed-off-by: Will Newton <[email protected]> Reviewed-by: Matt Fleming <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: add sdhci-tegra driver for Tegra SoCsOlof Johansson6-0/+301
SDHCI driver for Tegra. This driver plugs in as a new variant of sdhci-pltfm, using the platform data structure passed in to specify the GPIOs to use for card detect, write protect and card power enablement. Original driver (of which only the header file is left): Signed-off-by: Yvonne Yip <[email protected]> The rest, which has been rewritten by now: Signed-off-by: Olof Johansson <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Acked-by: Mike Rapoport <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdhci: add quirk for max len ADMA descriptorsOlof Johansson2-3/+9
Some controllers misparse segment length 0 as being 0, not 65536. Add a quirk to deal with it. Signed-off-by: Olof Johansson <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: check for > 1 clk_requests when disabling gatingLinus Walleij1-1/+2
Since we make sure the clock is enabled in the mmc_host_clk_exit() function we should expect a reference counter of 1, not 0. Signed-off-by: Linus Walleij <[email protected]> Tested-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdhci-s3c: Support controllers with no internal clock dividerJeongbae Seo1-0/+62
This patch supports controllers with no internal clock divider in SDHCI, such as the s5pc210 board. The external clock divider can be used to make a proper clock because SDHCI doesn't support internal clock divider by itself. If external clock divider type is selected, some functions related to clock control will be overrided by other functions. The current clock control index is added to let you know which clock bus is used for SDHCI when overriding functions. Checking functions are added into sdhci_s3c_consider_clock, because the clock divider step is different from that of host controller. Signed-off-by: Jeongbae Seo <[email protected]> Cc: Jaehoon Chung <[email protected]> Cc: Ben Dooks <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Acked-by: Kyungmin Park <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdhci-s3c: Support additional host capabilitiesJeongbae Seo1-0/+4
This patch adds support for additional host capabilities like SD/MMC high speed, SDHCI bus width, etc. Signed-off-by: Jeongbae Seo <[email protected]> Signed-off-by: Kukjin Kim <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdhci: Enable bus-width test for JMicron controllersTakashi Iwai1-0/+2
Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: Test bus-width for old MMC devicesAries Lee7-30/+159
Some old MMC devices fail with the 4/8 bits the driver tries to use exclusively. This patch adds a test for the given bus setup and falls back to the lower bit mode (until 1-bit mode) when the test fails. [Major rework and refactoring by tiwai] [Quirk addition and many fixes by prakity] Signed-off-by: Aries Lee <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Philip Rakity <[email protected]> Tested-by: Philip Rakity <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08of/flattree: forward declare struct device_node in of_fdt.hGrant Likely1-0/+2
This patch forward declares struct device_node to fix a compile error when of_fdt.h is included, but of.h is not. Alternately, including linux/of.h could have been added to of_fdt.h, but that pulls in a lot of unnecessary declarations when only working with the flattened form. Signed-off-by: Grant Likely <[email protected]>
2011-01-08mmc: fix detection of memory part of SD-combo card with broken SDIOMichal Miroslaw1-0/+5
In case of failure, mmc_attach_sdio() will power off the SD bus. Power it up and reinitialize before trying SD memory detection. Reported-by: Sahitya Tummala <[email protected]> Signed-off-by: Michał Mirosław <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdio: don't reinitialize nonremovable powered-resumed cardsOhad Ben-Cohen2-2/+19
Upon system resume, SDIO core must reinitialize cards that were powered off during suspend. If the card had its power kept during suspend (and thus it is 'powered-resumed'), SDIO core performs only a limited reinitializing, mainly needed to make sure that the card wasn't removed/replaced. If a __nonremovable__ card is powered-resumed, we can safely skip the reinitializing phase. Note: 9b966aa (mmc: sdio: fully reconfigure oldcard on resume) removed the bus width reconfiguration since mmc_sdio_init_card already does it. It is brought back now in case mmc_sdio_init_card is skipped. Signed-off-by: Ohad Ben-Cohen <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdio: don't power up cards on system suspendOhad Ben-Cohen2-32/+13
Initial SDIO runtime PM implementation took a conservative approach of powering up cards (and fully reinitializing them) on system suspend, just before the suspend handlers of the relevant drivers were executed. To avoid redundant power and reinitialization cycles, this patch removes this behavior: if a card is already powered off when system suspend kicks in, it is left at that state. If a card is active when a system sleep starts, everything is straightforward and works exactly like before. But if the card was already suspended before the sleep began, then when the MMC core powers it back up on resume, its run-time PM status has to be updated to reflect the actual post-system sleep status. The technique to do that is borrowed from the I2C runtime PM implementation (for more info see Documentation/power/runtime_pm.txt). Signed-off-by: Ohad Ben-Cohen <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: skip detection of nonremovable cards on rescanOhad Ben-Cohen1-2/+6
mmc_rescan() checks whether registered cards are still present before skipping them, by calling the bus-specific ->detect() handler. With buses that support runtime PM, the card may be powered off at this point, so they need to be powered on and fully reinitialized before ->detect() executes. This whole process is redundant with nonremovable cards; in those cases, we can safely skip calling ->detect() and implicitly assume its success. Signed-off-by: Ohad Ben-Cohen <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: Add support for JMicron 388 SD/MMC controllerTakashi Iwai8-12/+76
JMicron 388 SD/MMC combo controller supports the 1.8V low-voltage for SD, but MMC doesn't work with the low-voltage, resulting in an error at probing. This patch adds the support for multiple voltage mask per device type, so that SD works with 1.8V while MMC forces 3.3V. Here new ocr_avail_* fields for each device are introduced, so that the actual OCR mask is switched dynamically. Also, the restriction of low-voltage in core/sd.c is removed when the bit is allowed explicitly via ocr_avail_sd mask. This patch was rewritten from scratch based on Aries' original code. Signed-off-by: Aries Lee <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: davinci_mmc: Remove unnecessary semicolonJoe Perches1-1/+1
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdhci: print SD Command and CAPABILITY_1 when dumping registersPhilip Rakity2-2/+5
More information should be shown when sdhci_dumpregs is called. Knowing the command is useful for debugging, and Capability 1 is useful for SD v3. Signed-off-by: Philip Rakity <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: Aggressive clock gating frameworkLinus Walleij7-2/+315
This patch modifies the MMC core code to optionally call the set_ios() operation on the driver with the clock frequency set to 0 (gate) after a grace period of at least 8 MCLK cycles, then restore it (ungate) before any new request. This gives the driver the option to shut down the MCI clock to the MMC/SD card when the clock frequency is 0, i.e. the core has stated that the MCI clock does not need to be generated. It is inspired by existing clock gating code found in the OMAP and Atmel drivers and brings this up to the host abstraction. Gating is performed before and after any MMC request. This patchset implements this for the MMCI/PL180 MMC/SD host controller, but it should be simple to switch OMAP/Atmel over to using this instead. mmc_set_{gated,ungated}() add variable protection to the state holders for the clock gating code. This is particularly important when ordinary .set_ios() calls would race with the .set_ios() call resulting from a delayed gate operation. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Chris Ball <[email protected]> Tested-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: sdhci: Disable ADMA on some O2Micro SD/MMC parts.Jennifer Li2-0/+117
This patch disables the broken ADMA on selected O2Micro devices. Signed-off-by: Jennifer Li <[email protected]> Reviewed-by: Chris Ball <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: mxcmmc: remove a unnecessary release_resource() callAxel Lin1-1/+0
Remove release_resource() after release_mem_region(). Signed-off-by: Axel Lin <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: mxcmmc: update the regulator support code to the latest APIAlberto Panizzo1-8/+12
This also fixes the build problem introduced by my previous patch due to unhandled API changes introduced by commit: 99fc513101 (mmc: Move regulator handling closer to core) Signed-off-by: Alberto Panizzo <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: mxcmmc: Allow binding a regulator to manage the MMC card voltageAlberto Panizzo1-6/+42
This implementation is based on the pxamci.c driver and it will be used to support the mx31_3ds machine. Signed-off-by: Alberto Panizzo <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08ARM: dove: Switch SDHCI devices over to "sdhci-dove" driverMike Rapoport1-2/+2
Signed-off-by: Mike Rapoport <[email protected]> CC: Saeed Bishara <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08mmc: Add support for the Marvell Dove SDHCI controllerMike Rapoport5-0/+86
Implement an sdhci-pltfm driver for the controller found in the Marvell Dove SoC. Signed-off-by: Mike Rapoport <[email protected]> CC: Saeed Bishara <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-01-08hwmon: driver for Sensirion SHT21 humidity and temperature sensorUrs Fleisch4-0/+367
Signed-off-by: Urs Fleisch <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: Add humidity attribute to sysfs ABIGuenter Roeck1-0/+9
The humidity attribute is already supported by the sht15 driver, and another driver supporting it is about to be added. Make it official. Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Acked-by: Jean Delvare <[email protected]>
2011-01-08hwmon: sysfs ABI updatesGuenter Roeck1-7/+33
Add attributes supported by various PMBus devices to hwmon sysfs ABI. Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (via-cputemp) sync hotplug handling with coretemp/pkgtempJan Beulich1-14/+11
Signed-off-by: Jan Beulich <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (lm95241) Rewrite to avoid using macrosDavide Rizzo1-262/+233
Signed-off-by: Davide Rizzo <[email protected]> [[email protected]: Formatting changes] Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Fix checkpatch errors and fix value range checksGuenter Roeck1-18/+16
This patch fixes all checkpatch errors and most of the checkpatch warnings. It also fixes the range check in applesmc_store_fan_speed(). Signed-off-by: Guenter Roeck <[email protected]> Acked-by: Henrik Rydberg <[email protected]>
2011-01-08hwmon: (applesmc) Update copyright informationHenrik Rydberg1-0/+1
With the preceding patches, git blame assigns about half of the file to the present author. Add a line to the copyright to reflect this. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Silence driverHenrik Rydberg1-4/+0
Make the driver report a single line on success. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Simplify feature sysfs handlingHenrik Rydberg1-93/+76
Given the dynamic node construction method, the setup of the accelerometer, light sensor and keyboard backlight sysfs nodes can be simplified. This patch does not contain any logic changes. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Dynamic creation of fan filesHenrik Rydberg1-145/+43
With the dynamic temperature group in place, the setup of fans can be simplified. This patch sets up the fans dynamically, removing a hundred lines of code. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Extract all features genericallyHenrik Rydberg1-182/+59
With temperature keys being determined automatically, the dmi match data is only used to assign features that can easily be detected from the smc. This patch removes the dmi match data altogether, and reduces the match table to the main machine models. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Handle new temperature formatHenrik Rydberg1-3/+9
The recent Macbooks have temperature registers of a new type. This patch adds the logic to handle them. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Dynamic creation of temperature filesHenrik Rydberg1-389/+111
The current driver creates temperature files based on a list of temperature keys given per device. Apart from slow adaption to new machine models, the number of sensors also depends on the number of processors. This patch looks up the temperature keys dynamically, thereby supporting all models. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Introduce a register lookup tableHenrik Rydberg1-242/+297
One main problem with the current driver is the inability to quickly search for supported keys, resulting in detailed feature maps per machine model which are cumbersome to maintain. This patch adds a register lookup table, which enables binary search for supported keys. The lookup also reduces the io frequency, so the original mutex is replaced by locks around the actual io. Signed-off-by: Henrik Rydberg <[email protected]> [[email protected]: Added value range check to key_at_index_store()] Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Use pr_fmt and pr_<level>Joe Perches1-32/+26
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Relax the severity of device init failureHenrik Rydberg1-31/+7
The device init is used to reset the accelerometer. Failure to reset is not severe enough to stop loading the module or to resume from hibernation. This patch relaxes failure to a warning and drops output in case of success. Cc: [email protected] Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (applesmc) Add MacBookAir3,1(3,2) supportEdgar Hucek1-0/+10
This patch add support for the MacBookAir3,1 and MacBookAir3,2 to the applesmc driver. [[email protected]: minor cleanup] Cc: [email protected] Signed-off-by: Edgar Hucek <[email protected]> Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (w83627hf) Use pr_fmt and pr_<level>Joe Perches1-9/+8
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (w83627ehf) Use pr_fmt and pr_<level>Joe Perches1-13/+10
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (vt8231) Use pr_fmt and pr_<level>Joe Perches1-5/+5
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (vt1211) Use pr_fmt and pr_<level>Joe Perches1-17/+13
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
2011-01-08hwmon: (via686a) Use pr_fmt and pr_<level>Joe Perches1-5/+5
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>