mmc: host: rockchip: add warning for non-pinctrl project

This commit is contained in:
lintao
2014-03-26 17:03:27 +08:00
parent aac38a1217
commit 47ab5818e8

View File

@@ -2653,15 +2653,24 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
/* Pinctrl set default iomux state to fucntion port.
* Fixme: DON'T TOUCH EMMC SETTING!
*/
if(!(host->mmc->restrict_caps & RESTRICT_CARD_TYPE_EMMC))
*/
if(!(host->mmc->restrict_caps & RESTRICT_CARD_TYPE_EMMC))
{
host->pinctrl = devm_pinctrl_get(host->dev);
host->pins_default = pinctrl_lookup_state(host->pinctrl,PINCTRL_STATE_DEFAULT);
if(!host->pins_default)
host->pinctrl = devm_pinctrl_get(host->dev);
if(IS_ERR(host->pinctrl))
printk("%s: Warning : No pinctrl used!\n",mmc_hostname(host->mmc));
else
printk("%s: Warning : No default pinctrl matched!\n",mmc_hostname(host->mmc));
else
{
host->pins_default = pinctrl_lookup_state(host->pinctrl,PINCTRL_STATE_DEFAULT);
if(IS_ERR(host->pins_default))
printk("%s: Warning : No default pinctrl matched!\n", mmc_hostname(host->mmc));
else
{
if(pinctrl_select_state(host->pinctrl, host->pins_default) < 0)
printk("%s: Warning : Default pinctrl setting failed!\n", mmc_hostname(host->mmc));
}
}
}
#if defined(CONFIG_DEBUG_FS)