summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mtk-sd.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174Thomas Gleixner2019-05-301-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 655 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* mmc: mtk-sd: enable internal card-detect logic.NeilBrown2019-05-061-4/+60
| | | | | | | | | | | | | | | | The mtk-sd silicon has integrated card-detect logic that is enabled on the MT7621. The circuit is phased out on newer hardware so we should be careful to only enabled it on hardware known to support it. This a new "use_internal_cd" flag in struct mtk_mmc_compatible. If the sdhci isn't marked non-removable and doesn't have a cd-gpio configured, and if use_internal_cd is set, then assume the internal cd logic should be used as recommended by Documentation/devicetree/bindings/mmc/mmc.txt Signed-off-by: NeilBrown <neil@brown.name> Reviewed-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mtk-sd: add support for config found in mt7620 family SOCs.NeilBrown2019-05-061-0/+12
| | | | | | | | | mt7620 family MIPS SOCs contain the mtk-sd silicon. Add support for this. Signed-off-by: NeilBrown <neil@brown.name> Reviewed-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mtk-sd: don't hard-code interrupt trigger typeNeilBrown2019-05-061-1/+1
| | | | | | | | | | | | | | | | | | When using devicetree for configuration, interrupt trigger type should be described in the dts file, not hard-coded in the C code. The mtk-sd silicon in the mt7621 soc uses an active-high interrupt and so cannot be used with the current code. So replace IRQF_TRIGGER_LOW with IRQF_TRIGGER_NONE. Also IRQF_ONESHOT is not needed - it is used for threaded interrupt handlers, and this driver does not used a threaded interrupt handler. So remove that setting. Signed-off-by: NeilBrown <neil@brown.name> Reviewed-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mtk-sd: check for valid optional memory resourceFabien Parent2019-04-151-3/+5
| | | | | | | | | 'top_base' memory region is optional. Check that the resource is valid before using it. This avoid getting a "invalid resource" error message printed by the kernel. Signed-off-by: Fabien Parent <fparent@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mtk-sd: add support for MT8516Fabien Parent2019-04-151-0/+11
| | | | | | | Add the MSDC configuration for the MT8516 SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: fix incorrect register setting of hs400_cmd_int_delayChaotian Jing2019-01-281-1/+1
| | | | | | | | | | to set cmd internal delay, need set PAD_TUNE register but not PAD_CMD_TUNE register. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Fixes: 1ede5cb88a29 ("mmc: mediatek: Use data tune for CMD line tune") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Add MMC_CAP_SDIO_IRQ supportjjian zhou2018-12-191-3/+50
| | | | | | | | | | | This patch enables support SDIO IRQs. It enables MMC_CAP_SDIO_IRQ & MMC_CAP2_SDIO_IRQ_NOTHREAD and implement the ->ack_sdio_irq callback. Signed-off-by: Jjian Zhou <jjian.zhou@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Yong Mao <yong.mao@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: drop too much code of tuning methodChaotian Jing2018-10-151-95/+38
| | | | | | | | the tuning code is becoming more and more bloated, let's make the set cmd/data delay to inline function to avoid too much redundant code. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add MT8183 MMC driver supportChaotian Jing2018-10-151-50/+233
| | | | | | | | MT8183 puts the tune register at top layer, so need add new code to support it. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: tune CMD/DATA togetherChaotian Jing2018-10-151-0/+87
| | | | | | | | | for MSDC IP which supports both data tune and async fifo, it can tune cmd/data together. which can save the time and make the tune result of CMD more stable as data line are 4bit or 8bit. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: fix cannot receive new request when msdc_cmd_is_ready failChaotian Jing2018-10-151-1/+1
| | | | | | | | | | | when msdc_cmd_is_ready return fail, the req_timeout work has not been inited and cancel_delayed_work() will return false, then, the request return directly and never call mmc_request_done(). so need call mod_delayed_work() before msdc_cmd_is_ready() Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: fill the actual clock for mmc debugfsChaotian Jing2018-10-151-6/+7
| | | | | | | | as the mmc core layer has the mmc->actual_clock, so fill it and drop msdc_host->sclk. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add bus_clk controlChaotian Jing2018-10-081-0/+6
| | | | | | | | | when gate MSDC0_HCLK, access register will hang, even the MSDC driver will never accessing register after HCLK was gated, but for safety, need gate the bus_clk(which used to access register) too. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add 64G DRAM DMA supportChaotian Jing2018-05-021-7/+49
| | | | | | | | MT2712 MSDC supports 64G DRAM DMA access, it needs update gpd/bd structure. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: use of_device_get_match_data()Ryder Lee2018-05-021-5/+2
| | | | | | | | | | The usage of of_device_get_match_data() reduce the code size a bit. Also, the only way to call msdc_drv_probe() is to match an entry in msdc_of_ids[], so of_id cannot be NULL. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add support for MT7622 SoCSean Wang2018-03-051-0/+12
| | | | | | | | | | | Just applying the existing logic and adding its own characteristics into the space pointed by an extra entry of struct of_device_id to have support of MT7622 SoC. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Tested-by: Jumin Li <jumin.li@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: perfer to use rise edge latching for cmd lineChaotian Jing2017-11-021-1/+2
| | | | | | | | | data lines have applied to perfer to use rise edge, also need apply it to cmd line. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: improve eMMC hs400 mode read performanceChaotian Jing2017-11-021-0/+9
| | | | | | | | enlarge outstanding value to improve read performance Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add latch-ck supportChaotian Jing2017-11-021-0/+6
| | | | | | | | | | some platform(eg.mt2701) does not support "stop clk fix", in this case, need set correct latch-ck to avoid crc error caused by stop clock block-internally. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add support of source_cg clockChaotian Jing2017-11-021-1/+22
| | | | | | | | | source clock need an independent cg to control, when doing clk mode switch, need gate source clock to avoid hw issue(multi-bit sync hw hang) Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add stop_clk fix and enhance_rx supportChaotian Jing2017-11-021-4/+43
| | | | | | | | | mt2712 supports stop_clk fix and enhance_rx, which can improve host stability. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add busy_check supportChaotian Jing2017-11-021-0/+7
| | | | | | | | | | bit7 of PATCH_BIT1 has different meaning in new design, to compatible with previous platform, clear this bit in new platform. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add async fifo and data tune supportChaotian Jing2017-11-021-2/+50
| | | | | | | | | mt2701/mt2712 supports async fifo & data tune, which can improve host stability. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add pad_tune0 supportChaotian Jing2017-11-021-18/+33
| | | | | | | | | from mt2701, the register of PAD_TUNE has been phased out, while there is a new register of PAD_TUNE0 Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: make hs400_tune_response only for mt8173Chaotian Jing2017-11-021-2/+9
| | | | | | | | | | the origin design of hs400_tune_response is for mt8173 because of mt8173 has a special design. for doing that, we add a new member "compatible", by now it's only for mt8173. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add support of mt2701/mt2712Chaotian Jing2017-10-301-13/+69
| | | | | | | | | | mt2701/mt2712 has 12bit clock div, which is not compatible with mt8135/mt8173. and, some additional features will be added in mt2701/mt2712, so that need distinguish it by comatibale name. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Tested-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mtk-sd: catch all errors when getting regulatorsWolfram Sang2017-10-301-1/+1
| | | | | | | | | | | | | Bail out everytime when mmc_regulator_get_supply() returns an errno, not only when probing gets deferred. This is currently a no-op, because this function only returns -EPROBE_DEFER or 0 right now. But if it will throw another error somewhen, it will be for a reason. (This still doesn't change that getting regulators is optional, so 0 can still mean no regulators found). So, let us a) be future proof and b) have driver code which is easier to understand. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: 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: mediatek: add ops->get_cd() supportChaotian Jing2017-08-301-0/+1
| | | | | | | | | | | | if user plug out sd card slowly, finally card is plugged out but cat /proc/partitions can find that card is still exist in kernel. that's because alougth get card detect interrupt but CMD13 still can get correct response(all other pins are connected expect card detect pin). add ops->get_cd() can avoid this issue. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Fixed size in dma_free_coherentPhong LE2017-06-201-1/+1
| | | | | | | | | The dma gpd dma_free_coherent call size in invalid. Fixes: 208489032bdd ("mmc: mediatek: Add Mediatek MMC driver") Signed-off-by: Phong LE <ple@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: use new core function mmc_get_dma_dirHeiner Kallweit2017-04-241-6/+2
| | | | | | | Use new core function mmc_get_dma_dir(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Use data tune for CMD line tuneyong mao2017-04-241-16/+152
| | | | | | | | | | | | | | | | | | | | | If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, our emmc driver also should change to use data tune for CMD line. Because our emmc host use the different clock source to sample the CMD signal between HS200 and HS400 mode, the parameters are also different between these two modes. Separate cmd internal delay for HS200/HS400 mode. This change can fix "System can not boot up" issue. Signed-off-by: Yong Mao <yong.mao@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Fixed bug where clock frequency could be set wrongyong mao2017-03-161-2/+2
| | | | | | | | | | | | | | | | | | This patch can fix two issues: Issue 1: In previous code, div may be overflow when setting clock frequency as f_min. We can use DIV_ROUND_UP to fix this boundary related issue. Issue 2: In previous code, we can not set the correct clock frequency when div equals 0xff. Signed-off-by: Yong Mao <yong.mao@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: correct the implementation of msdc_card_busyyong mao2017-02-131-5/+2
| | | | | | | | | msdc_card_busy only need check if the data0 is low. In sdio data1 irq mode, data1 may be low because of interruption. Signed-off-by: Yong Mao <yong.mao@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: host: Include interrupt.h in mmc host drivers that depends on itUlf Hansson2017-02-131-0/+1
| | | | | | | | | An mmc host driver shouldn't rely on interrupt.h being included by another public mmc header. Instead make that dependency explicit by including interrupt.h in those host drivers that depends on it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
* mmc: delete is_first_req parameter from pre-request callbackLinus Walleij2016-11-291-2/+1
| | | | | | | | | | | | | | | | | | The void (*pre_req) callback in the struct mmc_host_ops vtable is passing an argument "is_first_req" indicating whether this is the first request or not. None of the in-kernel users use this parameter: instead, since they all just do variants of dma_map* they use the DMA cookie to indicate whether a pre* callback has already been done for a request when they decide how to handle it. Delete the parameter from the callback and all users, as it is just pointless cruft. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Fix module autoloadJavier Martinez Canillas2016-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/mmc/host/mtk-sd.ko | grep alias $ After this patch: $ modinfo drivers/mmc/host/mtk-sd.ko | grep alias alias: of:N*T*Cmediatek,mt8135-mmcC* alias: of:N*T*Cmediatek,mt8135-mmc Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: perfer to use rise edge latchingChaotian Jing2016-07-251-9/+14
| | | | | | | | in our host design, rise edge latching is more stable than fall edge latching. so that if rise edge has enough margin, no need scan fall edge. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: fix CMD21/CMD19 timeout issueChaotian Jing2016-07-251-2/+12
| | | | | | | | | | | | | we did not deal with the read data of CMD21/CMD19 if there is response CRC error of CMD21/CMD19, in this case, eMMC/SD may still in send-data state. therefore, all of next commands cannot get response as device is not in transfer state. for resolving this issue, still need deal with the data receive to make device back to transfer state. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: fix CRC error when calling mmc_select_hs400()Chaotian Jing2016-07-251-0/+23
| | | | | | | | | the tune result of hs200 mode at 200Mhz is not suitable for 50Mhz, mmc_select_hs400() will set clock frequency to 50Mhz, use defalut tune setting for 50Mhz to avoid CRC error. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: do not tune data for HS400 modeChaotian Jing2016-07-251-3/+7
| | | | | | | | | | for hs400 mode, should only tune DS delay, should not tune PAD_TUNE for data path. if eMMC will run at hs400 mode, do not tune data while call ops->execute_tuning(). Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Remove redundant runtime PM callsUlf Hansson2016-05-021-17/+2
| | | | | | | | | | Commit 9250aea76bfc ("mmc: core: Enable runtime PM management of host devices"), made some calls to the runtime PM API from the driver redundant. Especially those which deals with runtime PM reference counting, so let's remove them. Cc: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Use mmc_regulator_set_vqmmc in start_signal_voltage_switchNicolas Boichat2016-03-171-12/+5
| | | | | | | | | | | | | | | | | | | We've introduced a new helper in the MMC core: mmc_regulator_set_vqmmc(). Let's use this in mtk-sd. Using this new helper has some advantages: 1. We get the mmc_regulator_set_vqmmc() behavior of trying to match VQMMC and VMMC when the signal voltage is 3.3V. This ensures max compatibility. 2. We get rid of a few more warnings when probing unsupported voltages. 3. We get rid of some non-mediatek specific code in mtk-sd. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Change signal voltage error to dev_dbg()Nicolas Boichat2016-03-171-1/+1
| | | | | | | | | | | In commit ceae98f20e36 ("mmc: core: Try other signal levels during power up") we can see that there are times when it's valid to try several signal voltages. Don't print an ugly error in the logs when that happens. Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add SD write protect supportChaotian Jing2016-02-291-0/+2
| | | | | | | use mmc core layer's API to support sd write protect Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: change some dev_err to dev_dbgChaotian Jing2015-12-221-4/+4
| | | | | | | | | there are too many error logs shown when use CMD21/CMD19 to do tune, and it will appear at each resume time, print out so many logs to the uart console cost too mush time. so change it to dev_dbg. Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: core: Remove MMC_CAP_RUNTIME_RESUME as it's redundantUlf Hansson2015-12-221-1/+0
| | | | Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: Preinitialize delay_phase in get_best_delay()Geert Uytterhoeven2015-11-091-1/+1
| | | | | | | | | | | | drivers/mmc/host/mtk-sd.c: In function ‘get_best_delay’: drivers/mmc/host/mtk-sd.c:1284: warning: ‘delay_phase.start’ is used uninitialized in this function drivers/mmc/host/mtk-sd.c:1284: warning: ‘delay_phase.maxlen’ is used uninitialized in this function If delay is zero, these fields are indeed not initialized. Let the compiler preinitialize the whole struct to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: mediatek: add HS400 supportChaotian Jing2015-10-271-5/+244
| | | | | | | add HS400 mode and tune support Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>