From: Shawn Lin Date: Tue, 9 Jun 2015 08:15:28 +0000 (+0800) Subject: mmc: rk_sdmmc: add new property for mmc_assume_removable X-Git-Tag: firefly_0821_release~3996 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d637489d0654c493afce03a361f7b90dc4d262df;p=firefly-linux-kernel-4.4.55.git mmc: rk_sdmmc: add new property for mmc_assume_removable Signed-off-by: Shawn Lin --- diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index e26b0d4b10e1..63777801e5bf 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -4,7 +4,6 @@ * * Copyright (C) 2009 NXP Semiconductors * Copyright (C) 2009, 2010 Imagination Technologies Ltd. - * * Copyright (C) 2014 - 2015 Fuzhou Rockchip Electronics Co.Ltd. * * This program is free software; you can redistribute it and/or modify @@ -3913,12 +3912,14 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host) if (of_get_property(np, "cd-inverted", NULL)) pdata->caps2 |= MMC_CAP2_CD_ACTIVE_HIGH; + if (of_get_property(np, "bootpart-no-access", NULL)) pdata->caps2 |= MMC_CAP2_BOOTPART_NOACC; if (of_get_property(np, "controller-power-down", NULL)) { - host->regs_buffer = (u32 *)devm_kzalloc(host->dev, - DW_REGS_SIZE, GFP_KERNEL); + host->regs_buffer = + (u32 *)devm_kzalloc(host->dev, + DW_REGS_SIZE, GFP_KERNEL); if (!host->regs_buffer) { dev_err(host->dev, "could not allocate memory for regs_buffer\n"); @@ -3926,9 +3927,11 @@ static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host) } host->rst_ops = &dw_mci_pdrst_ops; - mmc_assume_removable = 0; } + if (of_get_property(np, "assume_removable", NULL)) + mmc_assume_removable = 0; + return pdata; }