提交 e8f36b5d 编写于 作者: A Ai Kyuse 提交者: Ulf Hansson

mmc: tmio: Add hw reset support

Add hw reset support.
Signed-off-by: NAi Kyuse <ai.kyuse.uw@renesas.com>
Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
Acked-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
上级 2f87365f
...@@ -167,6 +167,7 @@ struct tmio_mmc_host { ...@@ -167,6 +167,7 @@ struct tmio_mmc_host {
int (*start_signal_voltage_switch)(struct mmc_host *mmc, int (*start_signal_voltage_switch)(struct mmc_host *mmc,
struct mmc_ios *ios); struct mmc_ios *ios);
int (*write16_hook)(struct tmio_mmc_host *host, int addr); int (*write16_hook)(struct tmio_mmc_host *host, int addr);
void (*hw_reset)(struct tmio_mmc_host *host);
}; };
struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev); struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev);
......
...@@ -789,6 +789,14 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host, ...@@ -789,6 +789,14 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host,
return 0; return 0;
} }
static void tmio_mmc_hw_reset(struct mmc_host *mmc)
{
struct tmio_mmc_host *host = mmc_priv(mmc);
if (host->hw_reset)
host->hw_reset(host);
}
/* Process requests from the MMC layer */ /* Process requests from the MMC layer */
static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
{ {
...@@ -1005,6 +1013,7 @@ static struct mmc_host_ops tmio_mmc_ops = { ...@@ -1005,6 +1013,7 @@ static struct mmc_host_ops tmio_mmc_ops = {
.get_cd = mmc_gpio_get_cd, .get_cd = mmc_gpio_get_cd,
.enable_sdio_irq = tmio_mmc_enable_sdio_irq, .enable_sdio_irq = tmio_mmc_enable_sdio_irq,
.multi_io_quirk = tmio_multi_io_quirk, .multi_io_quirk = tmio_multi_io_quirk,
.hw_reset = tmio_mmc_hw_reset,
}; };
static int tmio_mmc_init_ocr(struct tmio_mmc_host *host) static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册