summaryrefslogtreecommitdiffstats
path: root/drivers/mci/tegra-sdmmc.c
Commit message (Collapse)AuthorAgeFilesLines
* mci: tegra: Use sdhci_set_cmd_xfer_mode()Sascha Hauer2019-11-211-30/+3
| | | | | | Use sdhci_set_cmd_xfer_mode() to share more code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: sdhci: remove duplicate register defines for prsstat bitsSascha Hauer2019-11-211-1/+1
| | | | | | | We have duplicate register bit defines for the prsstat register. Remove the duplicates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: sdhci: remove duplicate register defines for interrupt bitsSascha Hauer2019-11-211-5/+5
| | | | | | We have duplicate bit defines for the interrupt bits. Remove the duplicates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: sdhci: remove duplicate transfer mode register definesSascha Hauer2019-11-211-3/+3
| | | | | | | We have duplicate register bit defines for the transfer mode register. Remove the duplicates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: tegra: Use 16bit register definitionsSascha Hauer2019-11-211-9/+11
| | | | | | | We have some register defines in a 16bit access version and a 32bit access version. Use the former to get rid of the latter later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: tegra: use sdhci helpersSascha Hauer2019-11-211-58/+64
| | | | | | | To use the sdhci helpers we have to switch to the sdhci accessors. Also use sdhci_read_response(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: tegra-sdmmc: Drop explicit devname setup codeAndrey Smirnov2018-12-101-3/+0
| | | | | | | | Drop explicit devname setup code. Same setup will be done by mci_of_parse(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2015-03-091-0/+3
|\
| * mci: tegra: handle mmc aliasesLucas Stach2015-03-041-0/+3
| | | | | | | | | | | | | | | | This allows to have fixed device names for the SDMMC controllers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | MCI: tegra-sdmmc: convert to streaming DMA opsLucas Stach2015-03-061-12/+14
|/ | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-161-2/+3
| | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: tegra: add Tegra124 compatibleLucas Stach2014-06-051-0/+2
| | | | | | | | | The controller is similar enough to the ones found on earlier generation SoCs to not need any additional changes. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: tegra: don't set 8bit mode unconditionallyLucas Stach2014-05-151-2/+1
| | | | | | | Those flags should be set from the DT parsing code. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: tegra: apply pad autocalibration on T30Lucas Stach2014-05-151-0/+25
| | | | | | | | Needed for SD cards connected to sdmmc1 or sdmmc3 to work properly. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: tegra: add reset controlLucas Stach2014-05-151-0/+9
| | | | | | | Enable the driver to reset the device itself. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mmc: tegra: fix typoLucas Stach2014-04-231-2/+2
| | | | | | | | | Missed OR, so we never enabled failure interrupt status bits, which prevented the eMMC detect logic to work properly. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tegra: add SDMMC controller driverLucas Stach2013-12-041-0/+464
Confirmed working on Tegra 2, may need some small adjustments for Tegra 3. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>