Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch adds implementation for platform specific tuning in order
to support HS200 bus speed mode on Qualcomm SDHCI controller.
Signed-off-by: Asutosh Das <[email protected]>
Signed-off-by: Venkat Gopalakrishnan <[email protected]>
Signed-off-by: Georgi Djakov <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This platform driver adds the initial support of Secure Digital Host
Controller Interface compliant controller found in Qualcomm chipsets.
Signed-off-by: Asutosh Das <[email protected]>
Signed-off-by: Venkat Gopalakrishnan <[email protected]>
Tested-by: Ivan T. Ivanov <[email protected]>
Signed-off-by: Georgi Djakov <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch adds the device-tree binding documentation for Qualcomm
SDHCI driver. It contains the differences between the core properties
in mmc.txt and the properties used by the sdhci-msm driver.
Signed-off-by: Georgi Djakov <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
When the host->tuning_count is zero it means that the retuning is
disabled. This is checked on the first run of sdhci_execute_tuning()
by the if statement below:
if (!(host->flags & SDHCI_NEEDS_RETUNING) && host->tuning_count &&
(host->tuning_mode == SDHCI_TUNING_MODE_1)) {
So only when tuning_count is non-zero it will set the host flag
SDHCI_USING_RETUNING_TIMER. The else statement is only for re-programming
the timer, which means that flag must be set. Because that is not checked
the else statement is executed in the first run when tuning_count is zero.
This was seen on a host controller which indicated SDHCI_TUNING_MODE_1 (0)
and tuning_count being zero. Suspect that (one of) these registers is not
properly set.
Signed-off-by: Arend van Spriel <[email protected]>
Acked-by: Ulf Hansson <[email protected]>
Reviewed-by: Aaron Lu <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Currently ARCH_BCM has been used for Broadcom Mobile V7 based SoCs.
In order to allow other Broadcom SoCs to also use mach-bcm directory and
files, this patch renames the original ARCH_BCM to ARCH_BCM_MOBILE, and
uses ARCH_BCM to define any Broadcom chip residing in mach-bcm directory.
Signed-off-by: Christian Daudt <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
If the SDHCI irq is shared with another device then the interrupt
handler can get called while SDHCI is runtime suspended. That is
harmless but the warning message is not useful so remove it. Also
returning IRQ_NONE is more appropriate.
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Add ACPI HID 80860F16 as a host controller for a SD card.
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Some 80860F14 devices do not support card detect and must rely
completely on GPIO. Presently the card detect GPIO is used
only to wake-up from runtime suspend. Change to using
mmc_gpioid_request_cd() which will cause the SDHCI driver to
prefer the GPIO to the host controller's native card detect.
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Add functions to request a CD GPIO using the GPIO descriptor API.
Note that the new request function is paired with mmc_gpiod_free_cd()
not mmc_gpio_free_cd(). Note also that it must be called prior to
mmc_add_host() otherwise the caller must also call
mmc_gpiod_request_cd_irq().
Signed-off-by: Adrian Hunter <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
In preparation for adding a descriptor-based CD GPIO API, split out
CD IRQ request into a separate function.
Signed-off-by: Adrian Hunter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
In preparation for adding a descriptor-based CD GPIO API, switch from
recording GPIO numbers to recording GPIO descriptors.
Signed-off-by: Adrian Hunter <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This reverts commit d9c3f5df539a8a74cc830b35838670fe0541fed1, which
should not have been merged via mmc-next. It's in arm-soc instead now.
|
|
sdhci has support for using GPIOs for card detection. If we have a
GPIO specified, we can use that directly, without needing our own
interrupt handler.
Signed-off-by: Russell King <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
None of this code is currently used: there are no definitions of
struct sdhci_plat_data in arch/arm, neither are there any DT properties
which use card_power_gpio/power_active_high/power_always_enb. In any
case, slot power control should be rigged up via vmmc and the regulator
subsystem in the DT case.
Signed-off-by: Russell King <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Use devm_ioremap_resource() to simplify iomem resource handling in the
probe path.
Signed-off-by: Russell King <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
sdhci-spear is unsafe should a probe fail or defer, since it overwrites
the platform_data with its own driver-private data. It's trivial to
fix as SDHCI allows for driver-private data to be appended to its own
structure - we just need to arrange the code to allow this.
Signed-off-by: Russell King <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Fix the error handling paths for DT and simplify using the devm_* API
for clk_get().
Signed-off-by: Russell King <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
`sdhci_bcm_kona_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
Fixes: 058feb53666f ("mmc: sdhci-bcm-kona: make linker-section warning go away")
Signed-off-by: Russell King <[email protected]>
Tested-by: Markus Mayer <[email protected]>
Acked-by: Matt Porter <[email protected]>
Cc: <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Add support for autocmd23 support
Signed-off-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Add set block count command support for close ended multiblock read/write.
Signed-off-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
split start dma function into setup and start dma to keep track of
host_cookie when cmd23 support is enabled along with async request.
Signed-off-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
mrq is not populated for set block count(cmd23) command.
Use block read/write mmc_commond pointer for request done and
avoid NULL pointer access in error case for sbc (cmd23).
Signed-off-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
clk_get_rate throws DEBUG_LOCKS_WARN_ON(in_interrupt()) warning
if called from interrupt context.
use cached clock rate in set_data_timeout, so that
set_data_timeout can be called from interrupt context.
Signed-off-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Remove redundant reset done check since omap hwmod layer ensures IP reset.
Signed-off-by: Balaji T K <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
of_get_hsmmc_pdata returns a pointer, returning NULL is invalid,
return ERR_PTR for error case.
Signed-off-by: Balaji T K <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
remove pbias workaround
Signed-off-by: Balaji T K <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Tested-by: Florian Vaussard <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Enable REGULATOR_PBIAS needed for SD card on most OMAPs.
Signed-off-by: Balaji T K <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Tested-by: Florian Vaussard <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Add pbias regulator node as a child of system control
module - syscon.
Signed-off-by: Balaji T K <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Tested-by: Florian Vaussard <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
In DT case, PBAIS registers are programmed via regulator,
use regulator APIs to control PBIAS.
Signed-off-by: Balaji T K <[email protected]>
Tested-by: Florian Vaussard <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
pbias register controls internal power supply to sd card i/o pads
in most OMAPs (OMAP2-5, DRA7).
Control bits for selecting voltage level and
enabling/disabling are in the same PBIAS register.
Signed-off-by: Balaji T K <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Acked-by: Mark Brown <[email protected]>
Tested-by: Florian Vaussard <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
handle vcc and vcc_aux independently to reduce indent.
Signed-off-by: Balaji T K <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Tested-by: Florian Vaussard <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Use devm_regulator API, while at it use
devm_regulator_get_optional for optional vmmc_aux supply
Signed-off-by: Balaji T K <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Tested-by: Florian Vaussard <[email protected]>
Tested-by: Stefan Roese <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This should probably be done implicitly through mmc_of_parse(), but that
doesn't play well along with the multi-slot model the hsmmc driver
features. Hence, for now, do it manually. The properties are already
documented in Documentation/devicetree/bindings/mmc/mmc.txt.
Signed-off-by: Daniel Mack <[email protected]>
Acked-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
MMC1 is the only MMC interface available on the platform. Further,
since the platform is based on older revision of SoC which is not
capable of doing multi-block reads, mark it with compatibility for the
same and add pinmux to ensure that all relevant pins are configured
for non-MMC boot mode.
Signed-off-by: Nishanth Menon <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Acked-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
When device is booted using devicetree, platforms impacted by Erratum
2.1.1.128 is not detected easily in the mmc driver. This erratum
indicates that the module cannot do multi-block transfers. Platforms
such as LDP which use OMAP3 ES revision prior to ES3.0 are impacted by
this.
Provide a new compatible property "ti,omap3-pre-es3-hsmmc" to allow
driver to determine if driver needs to implement quirks associated
with the specific module version (primarily because the IP revision
information is not sufficient for the same).
Signed-off-by: Nishanth Menon <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Acked-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Static checkers complain that testing for both "next" and "!next" is
duplicative.
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Balaji T K <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Fix the following build errors:
drivers/mmc/host/dw_mmc-k3.c: In function ‘dw_mci_k3_suspend’:
drivers/mmc/host/dw_mmc-k3.c:58:2: error: implicit declaration of
function ‘dw_mci_suspend’ [-Werror=implicit-function-declaration]
ret = dw_mci_suspend(host);
^
drivers/mmc/host/dw_mmc-k3.c: In function ‘dw_mci_k3_resume’:
drivers/mmc/host/dw_mmc-k3.c:76:2: error: implicit declaration of
function ‘dw_mci_resume’ [-Werror=implicit-function-declaration]
return dw_mci_resume(host);
^
drivers/mmc/host/dw_mmc-k3.c: At top level:
drivers/mmc/host/dw_mmc-k3.c:53:12: warning: ‘dw_mci_k3_suspend’ defined
but not used [-Wunused-function]
static int dw_mci_k3_suspend(struct device *dev)
^
drivers/mmc/host/dw_mmc-k3.c:65:12: warning: ‘dw_mci_k3_resume’ defined
but not used [-Wunused-function]
static int dw_mci_k3_resume(struct device *dev)
^
Signed-off-by: Felipe Balbi <[email protected]>
Acked-by: Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch modifies sdhci_s3c_consider_clock() to fail if bus clock
being considered can not provide frequency lower or equal requested,
instead of returning the lowest supported.
Signed-off-by: Tomasz Figa <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Acked-by; Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Currently the driver assumes at probe that controller is configured for
last valid enumerated bus clock. This assumption is completely wrong, as
there is no way to ensure such configuration until the hardware gets
first configured (by calling sdhci_s3c_set_clock()).
This patch modifies the driver to set current clock at probe to unknown
state (represented by negative value) and make sure that the hardware
gets actually configured to selected clock in sdhci_s3c_set_clock().
Signed-off-by: Tomasz Figa <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Acked-by; Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
This patch reimplements functions calculating minimum and maximum clock
rates to leverage clock rate cache introduced by previous patches.
In addition, the calculation is simplified to just comparing input
clock rates (max case) or input clock rates divided by maximum divisor
(min case), which is basically what the original code did, but with much
more unnecessary work.
Signed-off-by: Tomasz Figa <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Acked-by; Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
IS_ERR() must be used to make sure that not a valid clock was returned
by clk_get() and company.
Signed-off-by: Tomasz Figa <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Acked-by; Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
To fix scheduling while atomic happening in sdhci_s3c_set_clock() caused
by calling clk_get_rate() that might sleep, this patch modifies the
driver to cache rates of all bus clocks at probe time and then only use
those cache values.
Signed-off-by: Tomasz Figa <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Acked-by; Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Current implementation of sdhci_s3c_consider_clock() is highly
inefficient due to multiple integer divisions by variable performed in a
loop. Since only divisors that are powers of two are considered, this
patch replaces them with respective shifts, removing all the integer
divisions.
Signed-off-by: Tomasz Figa <[email protected]>
Tested-by: Heiko Stuebner <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Tested-by: Jaehoon Chung <[email protected]>
Acked-by; Jaehoon Chung <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Introduce "altr,socfpga-dw-mshc" to enable Altera's SOCFPGA platform
specific implementation of the dw_mmc driver.
Also add the "syscon" binding to the "altr,sys-mgr" node. The clock
driver can use the syscon driver to toggle the register for the SD/MMC
clock phase shift settings.
Finally, fix an indentation error for the sysmgr node.
Signed-off-by: Dinh Nguyen <[email protected]>
Acked-by: Steffen Trumtrar <[email protected]>
Tested-by: Steffen Trumtrar <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Like the rockchip, Altera's SOCFPGA platform specific implementation of the
dw_mmc driver requires using the HOLD register for SD commands. This patch
renames dw_mci_rockchip_prepare_command to dw_mci_pltfm_prepare_command so
that SOCFPGA and Rockchip can use it.
Signed-off-by: Dinh Nguyen <[email protected]>
Acked-by: Steffen Trumtrar <[email protected]>
Tested-by: Steffen Trumtrar <[email protected]>
Acked-by: Seungwon Jeon <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
It turns now that the only really platform specific code that is needed for
SOCFPGA is using the SDMMC_CMD_USE_HOLD_REG in the prepare_command function.
Since the Rockchip already has this functionality, re-use the code that is
already in dw_mmc-pltfm.c.
Signed-off-by: Dinh Nguyen <[email protected]>
Acked-by: Jaehoon Chung <[email protected]>
Acked-by: Steffen Trumtrar <[email protected]>
Tested-by: Steffen Trumtrar <[email protected]>
Acked-by: Seungwon Jeon <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
If mrq->sbc is not NULL but data->stop happens to be NULL,
it will lead to NULL pointer dereferencing. Avoid this by
having a NULL check for data->stop.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Seungwon Jeon <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Commit c02cecb92ed4 ("ARM: orion: move platform_data definitions")
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Commit 1ef21f6343ff ("ARM: msm: move platform_data definitions")
moved the file to the current location but forgot to remove the pointer
to its previous location. Clean it up. While at it also change the header
file protection macros appropriately.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|
|
Commit 0976f16d ("mmc: dw_mmc: add support tuning scheme") introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Jaehoon Chung <[email protected]>
Acked-by: Seungwon Jeon <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
|