summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sh_mmcif.c
Commit message (Collapse)AuthorAgeFilesLines
* mmc: sh_mmcif: move platform_data header to proper locationWolfram Sang2022-04-261-1/+1
| | | | | | | | | | We have a dedicated directory for platform_data meanwhile, don't spoil the MMC directory with it. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20220412093102.3428-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Simplify division/shift logicGeert Uytterhoeven2022-02-281-4/+3
| | | | | | | | | | "a / (1 << b)" == "a >> b". No change in generated code. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/68d689c39c769d298b53ee8cb9de0e594a2999b2.1645460780.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Check for null res pointerJiasheng Jiang2022-01-241-0/+3
| | | | | | | | | | | | If there is no suitable resource, platform_get_resource() will return NULL. Therefore in order to avoid the dereference of the NULL pointer, it should be better to check the 'res'. Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Cc: stable@vger.kernel.org # v5.16+ Link: https://lore.kernel.org/r/20220119120006.1426964-1-jiasheng@iscas.ac.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: use proper DMAENGINE API for terminationWolfram Sang2021-08-241-2/+2
| | | | | | | | | | | | dmaengine_terminate_all() is deprecated in favor of explicitly saying if it should be sync or async. Here, we want dmaengine_terminate_sync() because there is no other synchronization code in the driver to handle an async case. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20210623095734.3046-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4Douglas Anderson2020-09-071-0/+1
| | | | | | | | | | | | | This is like commit 3d3451124f3d ("mmc: sdhci-msm: Prefer asynchronous probe") but applied to a whole pile of drivers. This batch converts the drivers that appeared to be around in the v4.4 timeframe. Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> # SH_MMCIF Tested-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20200903162412.1.Id501e96fa63224f77bb86b2135a5e8324ffb9c43@changeid Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Use "kHz" for kilohertzGeert Uytterhoeven2020-07-131-3/+3
| | | | | | | | | | | "K" stands for "kelvin". While at it, make the spacing before units consistent. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20200618080321.16678-1-geert+renesas@glider.be Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Use dma_request_chan() instead dma_request_slave_channel()Peter Ujfalusi2019-12-191-2/+6
| | | | | | | | | | | | dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA if needed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20191217113031.31847-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: convert to devm_platform_ioremap_resourceYangtao Li2019-12-181-3/+1
| | | | | | | | | | Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20191215175120.3290-6-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Use platform_get_irq_optional() for optional interruptGeert Uytterhoeven2019-10-031-4/+2
| | | | | | | | | | | | | | | | | | | | | As platform_get_irq() now prints an error when the interrupt does not exist, a scary warning may be printed for an optional interrupt: sh_mmcif ee200000.mmc: IRQ index 1 not found Fix this by calling platform_get_irq_optional() instead for the second interrupt, which is optional. Remove the now superfluous error printing for the first interrupt, which is mandatory. Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: use SPDX identifier for Renesas driversWolfram Sang2018-10-081-5/+2
| | | | | | Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: remove some cruftWolfram Sang2018-03-051-8/+0
| | | | | | | | | | The TODO section from 2010 is obsolete. We have DMA and PM meanwhile and we always want to handle errors better, if possible. Also DRIVER_VERSION is not used anymore these days. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: remove redundant initialization of 'opc'Colin Ian King2018-01-181-1/+1
| | | | | | | | | | | | | Variable opc is initialized with a value that is never read, opc is later re-assigned a newer value, hence the initialization can be removed. Cleans up clang warning: drivers/mmc/host/sh_mmcif.c:919:6: warning: Value stored to 'opc' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: constify mmc_host_ops structuresJulia Lawall2017-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Remove unused clk_ctrl2_present from the platform dataUlf Hansson2017-02-131-1/+1
| | | | | | | | | | | | | | There are currently no users of the clk_ctrl2_present member from the platform data, so let's remove it. Note, as some of the sh_mmcif variants may support clk_ctrl2, let's keep the current code in the driver, which deals with this. For future support, we should invent a DT binding instead, but let's leave that until it's needed. Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* mmc: sh_mmcif: Remove unused ccs_unsupported from the platform dataUlf Hansson2017-02-131-1/+1
| | | | | | | | | | | | | There are currently no users of the ccs_unsupported member from the platform data, so let's remove it. Note, as some of the sh_mmcif variants may not support ccs, let's keep the current code in the driver, which deals with this. For future support, we should invent a DT binding instead, but let's leave that until it's needed. Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* mmc: sh_mmcif: Remove unused ->get_cd() platform callbackUlf Hansson2017-02-131-17/+1
| | | | | | | | | Removing the callback also enables us to remove the sh_mmcif_get_cd() altogether, as we convert to use mmc_gpio_get_cd() to the same kind of work. Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Remove unused use_cd_gpio/cd_gpio from platform dataUlf Hansson2017-02-131-6/+0
| | | | | | Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* mmc: sh_mmcif: Use a 10s timeout in the error recovery pathUlf Hansson2016-07-251-1/+1
| | | | | | | | | The current value means an mdelay(1) may execute up to 10000000 times, which translates to around ~2.8 hours. This is probably not what the orignal author had in mind. Let's instead use 10s, which is the same value sh_mmcif is using for other timeouts. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Inform the mmc core about the max busy timeoutUlf Hansson2016-07-251-0/+1
| | | | | | | | The sh_mmcif driver is already using a 10s request timeout. Let's also inform the mmc core about this value, as there are situations when it needs to know about it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Use response type to know when to enable busy detectionUlf Hansson2016-07-251-25/+7
| | | | | | | | | | | | | The sh_mmcif explicity checks for certain commands to decide when to enable HW busy detection. Instead, it should only check the response type as it tells if busy detection is needed. In this way, the mmc core also gets full control whether it thinks busy detection should be done or not. In some specific scenarios, like for ERASE and STOP commands it may decide to fall back to use a CMD13 to poll the card status instead. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Enable MMC_CAP2_NO_SD and MMC_CAP2_NO_SDIOUlf Hansson2016-07-251-16/+2
| | | | | | | | Enable the capabilities which tells the mmc core to prevent sending SD and SDIO commands during card initialization. In this way, we can also remove the validation of non-supported commands in the ->request() callback. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmci: Get rid of wrapper function for regulatorsUlf Hansson2016-05-021-12/+4
| | | | | | | As there are two callers of sh_mmcif_set_power() and because its only additional action is to check for a valid regulator, let's just remove it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Restructure ->set_ios()Ulf Hansson2016-05-021-29/+16
| | | | | | | | | | | | | | | | | | | Both from a runtime PM and clock management point of view, the ->set_ios() code is unnecessary complex. A suboptimal path is also executed when the mmc core requests a clock rate of zero. As that happens during the card initialization phase, trying to save power by decreasing the runtime PM usage count and gating the clock via clk_disable_unprepare() is just superfluous. Moreover, from a runtime PM point of view the core will anyway keep the device active during the entire card initialization phase. Restructure the code to rely on the ios->power_mode to understand when the runtime PM usage count needs to be increased. Let's also deal with clock rate changes by simply applying the rate. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Make sure the device stays active when needed in ->probe()Ulf Hansson2016-05-021-7/+8
| | | | | | | | | | While accessing the device, make sure it stays active by increasing the runtime PM usage count for it. Let's also defer to enable runtime PM until we really need access to the device. This also enables the error path in ->probe() to become simpler. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macrosKirill A. Shutemov2016-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time ago with promise that one day it will be possible to implement page cache with bigger chunks than PAGE_SIZE. This promise never materialized. And unlikely will. We have many places where PAGE_CACHE_SIZE assumed to be equal to PAGE_SIZE. And it's constant source of confusion on whether PAGE_CACHE_* or PAGE_* constant should be used in a particular case, especially on the border between fs and mm. Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much breakage to be doable. Let's stop pretending that pages in page cache are special. They are not. The changes are pretty straight-forward: - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>; - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>; - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN}; - page_cache_get() -> get_page(); - page_cache_release() -> put_page(); This patch contains automated changes generated with coccinelle using script below. For some reason, coccinelle doesn't patch header files. I've called spatch for them manually. The only adjustment after coccinelle is revert of changes to PAGE_CAHCE_ALIGN definition: we are going to drop it later. There are few places in the code where coccinelle didn't reach. I'll fix them manually in a separate patch. Comments and documentation also will be addressed with the separate patch. virtual patch @@ expression E; @@ - E << (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ expression E; @@ - E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) + E @@ @@ - PAGE_CACHE_SHIFT + PAGE_SHIFT @@ @@ - PAGE_CACHE_SIZE + PAGE_SIZE @@ @@ - PAGE_CACHE_MASK + PAGE_MASK @@ expression E; @@ - PAGE_CACHE_ALIGN(E) + PAGE_ALIGN(E) @@ expression E; @@ - page_cache_get(E) + get_page(E) @@ expression E; @@ - page_cache_release(E) + put_page(E) Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* mmc: sh_mmcif: use to_delayed_workGeliang Tang2016-02-291-1/+1
| | | | | | | Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Correct TX DMA channel allocationChris Paterson2016-02-101-1/+1
| | | | | | | | | | | | Commit 27cbd7e815a8 ("mmc: sh_mmcif: rework dma channel handling") introduced a typo causing the TX DMA channel allocation to be overwritten by the requested RX DMA channel. Fixes: 27cbd7e815a8 ("mmc: sh_mmcif: rework dma channel handling") Signed-off-by: Chris Paterson <chris.paterson2@renesas.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: rework dma channel handlingArnd Bergmann2015-12-221-46/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling the sh_mmcif driver for ARM64, we currently get a harmless build warning: ../drivers/mmc/host/sh_mmcif.c: In function 'sh_mmcif_request_dma_one': ../drivers/mmc/host/sh_mmcif.c:417:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)pdata->slave_id_tx : ^ ../drivers/mmc/host/sh_mmcif.c:418:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)pdata->slave_id_rx; This could be worked around by adding another cast to uintptr_t, but I decided to simplify the code a little more to avoid that. This splits out the platform data using code into a separate function and builds that only for CONFIG_SUPERH. This part still has a typecast but does not need a second one. The SH platform code could be further modified to pass a pointer directly as we do on other architectures when we have a filter function. The normal case is simplified further and now just calls dma_request_slave_channel() directly without going through the compat handling. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Fix suspend processKoji Matsuoka2015-08-271-0/+2
| | | | | | | | The clock should be enable when SDHI registers are accessed. Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: calculate best clock with parent clockKuninori Morimoto2015-06-011-9/+75
| | | | | | | | | | | | | | | | MMCIF IP on R-Car series has parent clock which can be set several rate, and it was not implemented on old SH-Mobile series (= SH-Mobile series parent clock was fixed rate) R-Car series MMCIF can use more high speed access if it setups parent clock. This patch adds parent clock setup method. It will be used if DT has "max-frequency", and then, this driver assumes it is booted on R-Car Gen2 or later SoC. Because SH-Mobile series (which doesn't boot from DT) and R-Car series (which boots from DT) have different divider. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> [Ulf: Silence compiler warning]
* mmc: sh_mmcif: use sh_mmcif_xxx prefix for all functionsKuninori Morimoto2015-06-011-13/+13
| | | | | | | | | Current sh_mmcif driver is using sh_mmcif_xxx and mmcif_xxx for functions. This patch used sh_mmcif_xxx for all functions. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: add sh_mmcif_host_to_dev() macro and use it.Kuninori Morimoto2015-06-011-43/+71
| | | | | | | | | | Current sh_mmcif driver is directly using &host->pd->dev in all place. It is not big problem, but it is unreadable, and it can be cause of future bug. This patch adds new sh_mmcif_host_to_dev() and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: separate sh_mmcif_clk_update() into setup and prepareKuninori Morimoto2015-05-251-12/+10
| | | | | | | | | | | | | | Current sh_mmcif_clk_update() is called from probe() and set_ios(), but, the purpose of later one is just clk_prepare_enable(). No need to setup mmc->f_max/f_min in many times. This patch separe sh_mmcif_clk_update() into clk_prepare_enable() and mmc->f_max/f_min setup. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: remove unnecessary int clk from struct sh_mmcif_hostKuninori Morimoto2015-05-251-17/+18
| | | | | | | | | | | | | struct sh_mmcif_host has 1) int clk, 2) struct clock *hclk, and host->clk = clk_get_rate(host->hclk). This int clk is not necessary. Let's remove it. And, current hclk is confusable naming. Let's rename it to clk. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: cleanup to use dev instead of &pdev->devKuninori Morimoto2015-05-251-16/+17
| | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: move mmcif_of_match to upsideKuninori Morimoto2015-05-251-6/+6
| | | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Fix timeout value for command requestTakeshi Kihara2015-05-061-1/+1
| | | | | | | | | | | | | | | | | | | f9fd54f22e ("mmc: sh_mmcif: Use msecs_to_jiffies() for host->timeout") changed the timeout value from 1000 jiffies to 1s. In the case where HZ is 1000 the values are the same. However, for smaller HZ values the timeout is now smaller, 1s instead of 10s in the case of HZ=100. Since the timeout occurs in spite of a normal data transfer a timeout of 10s seems more appropriate. This restores the previous timeout in the case where HZ=100 and results in an increase over the previous timeout for larger values of HZ. Fixes: f9fd54f22e ("mmc: sh_mmcif: Use msecs_to_jiffies() for host->timeout") Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> [horms: rewrote changelog to refer to HZ] Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds2015-04-241-8/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull slave-dmaengine updates from Vinod Koul: - new drivers for: - Ingenic JZ4780 controller - APM X-Gene controller - Freescale RaidEngine device - Renesas USB Controller - remove device_alloc_chan_resources dummy handlers - sh driver cleanups for peri peri and related emmc and asoc patches as well - fixes and enhancements spread over the drivers * 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (59 commits) dmaengine: dw: don't prompt for DW_DMAC_CORE dmaengine: shdmac: avoid unused variable warnings dmaengine: fix platform_no_drv_owner.cocci warnings dmaengine: pch_dma: fix memory leak on failure path in pch_dma_probe() dmaengine: at_xdmac: unlock spin lock before return dmaengine: xgene: devm_ioremap() returns NULL on error dmaengine: xgene: buffer overflow in xgene_dma_init_channels() dmaengine: usb-dmac: Fix dereferencing freed memory 'desc' dmaengine: sa11x0: report slave capabilities to upper layers dmaengine: vdma: Fix compilation warnings dmaengine: fsl_raid: statify fsl_re_chan_probe dmaengine: Driver support for FSL RaidEngine device. dmaengine: xgene_dma_init_ring_mngr() can be static Documentation: dma: Add documentation for the APM X-Gene SoC DMA device DTS binding arm64: dts: Add APM X-Gene SoC DMA device and DMA clock DTS nodes dmaengine: Add support for APM X-Gene SoC DMA engine driver dmaengine: usb-dmac: Add Renesas USB DMA Controller (USB-DMAC) driver dmaengine: renesas,usb-dmac: Add device tree bindings documentation dmaengine: edma: fixed wrongly initialized data parameter to the edma callback dmaengine: ste_dma40: fix implicit conversion ...
| * mmc: sh_mmcif: remove slave_id settings for DMAEngineKuninori Morimoto2015-02-231-8/+5
| | | | | | | | | | | | | | | | | | | | Current sh_mmcif sets dma_slave_config :: slave_id field for DMAEngine, but it is no longer needed. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | mmc: sh_mmcif: Add exclusion between cmd and interruptKouichi Tomita2015-03-231-1/+10
| | | | | | | | | | | | | | | | | | | | A command end interrupt should not be processed between command issue and setting of wait_for flag. It expects already the flag to be set. Therefore the exclusive control was added. Signed-off-by: Kouichi Tomita <kouichi.tomita.yn@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* | mmc: sh_mmcif: Move dev_err() of mmcif_timeout_work()Kouichi Tomita2015-03-231-3/+3
|/ | | | | | | | | | | If interruption of command already occurred, mrq pointer in dev_err() would refer to NULL, because the host-state is changed to STATE_IDLE and mrq pointer is changed to NULL by interrupt handler. Therefore dev_err is moved after checking STATE_IDLE. Signed-off-by: Kouichi Tomita <kouichi.tomita.yn@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: remove .owner field for drivers using module_platform_driverPeter Griffin2014-09-091-1/+0
| | | | | | | | | This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Configure DMA slave bus widthLaurent Pinchart2014-07-261-2/+5
| | | | | | | | The data register is 4 bytes wide, hardcode the DMA transfer size to 4 bytes in both directions. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh_mmcif: Fix DMA slave address configurationLaurent Pinchart2014-07-261-3/+7
| | | | | | | | | | Commit e5a233cb647d749de2f188477c9a54b94d90477f ("mmc: sh_mmcif: Factorize DMA channel request and configuration code") incorrectly set the destination address for both slave channels instead of setting the source address for the receive channel. Fix that. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh-mmcif: final error path cleanupBen Dooks2014-07-091-4/+2
| | | | | | | | | Remove the error path items that are no longer needed. The mmc card-detect code cleans up after itself (and registers with devm) and the host error is the same as the clock disable. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh-mmcif: no need to call pm_runtime_suspend on errorBen Dooks2014-07-091-4/+2
| | | | | | | | | | The pm_runtime call should implicitly disable the device once the probe is over if there is no explicit reference gained. There is no need to call pm_runtime_suspend() before the pm_runtime_disable() call. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh-mmcif: use devm_ for irq managementBen Dooks2014-07-091-18/+8
| | | | | | | | | Use devm_request_threaded_irq() for the host interrupt handlers so we do not have to worry about freeing them on exit or error. Tidies up the exit path code for the driver. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh-mmcif: use devm_ for clock managementBen Dooks2014-07-091-10/+8
| | | | | | | | Use the devm_clk_get() code to get the clock and allow it to be freed automatically on release. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh-mmcif: use devm_ for ioremapBen Dooks2014-07-091-18/+6
| | | | | | | | Start tidying the probe/release code by using devm_ioremap_resource() to map the IO registers. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sh-mmcif: update to print version and bus clock rate on probeBen Dooks2014-07-091-4/+5
| | | | | | | | | Change the initial print to show chip version and the bus rate it is working at instead of the driver version. This is more useful information as we already know which driver version from the kernel it is in. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>