mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
tmio: add a platform flag to disable card write-protection detection
Write-protection status is not always available, e.g., micro-SD cards do not have a write-protection switch at all. This patch adds a flag to let platforms force tmio_mmc to consider the card writable. Signed-off-by: Guennadi Liakhovetski <[email protected]> Acked-by: Ian Molton <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
This commit is contained in:
parent
65a1b0347a
commit
ac8fb3e862
2 changed files with 8 additions and 1 deletions
|
|
@ -748,8 +748,11 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
|||
static int tmio_mmc_get_ro(struct mmc_host *mmc)
|
||||
{
|
||||
struct tmio_mmc_host *host = mmc_priv(mmc);
|
||||
struct mfd_cell *cell = host->pdev->dev.platform_data;
|
||||
struct tmio_mmc_data *pdata = cell->driver_data;
|
||||
|
||||
return (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT) ? 0 : 1;
|
||||
return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
|
||||
(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1;
|
||||
}
|
||||
|
||||
static const struct mmc_host_ops tmio_mmc_ops = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue