Skip to content

Commit

Permalink
mmc: tmio: Add hw reset support
Browse files Browse the repository at this point in the history
Add hw reset support.

Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-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>
  • Loading branch information
Ai Kyuse authored and Ulf Hansson committed Nov 29, 2016
1 parent 2f87365 commit e8f36b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mmc/host/tmio_mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ struct tmio_mmc_host {
int (*start_signal_voltage_switch)(struct mmc_host *mmc,
struct mmc_ios *ios);
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);
Expand Down
9 changes: 9 additions & 0 deletions drivers/mmc/host/tmio_mmc_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,14 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host,
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 */
static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
{
Expand Down Expand Up @@ -1005,6 +1013,7 @@ static struct mmc_host_ops tmio_mmc_ops = {
.get_cd = mmc_gpio_get_cd,
.enable_sdio_irq = tmio_mmc_enable_sdio_irq,
.multi_io_quirk = tmio_multi_io_quirk,
.hw_reset = tmio_mmc_hw_reset,
};

static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)
Expand Down

0 comments on commit e8f36b5

Please sign in to comment.