On 10 August 2015 at 18:50, Joakim Tjernlund
<joakim.tjernl...@transmode.se> wrote:
> in mmc_power_up() we have:
>         /* Try to set signal voltage to 3.3V but fall back to 1.8v or 1.2v */
>         if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330) == 0)
>                 dev_err(mmc_dev(host), "Initial signal voltage of 3.3v\n");
>         else if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180) == 0)
>                 dev_err(mmc_dev(host), "Initial signal voltage of 1.8v\n");
>         else if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120) == 0)
>                 dev_err(mmc_dev(host), "Initial signal voltage of 1.2v\n");
>
> Here one jut brutally tries to set the initial power to 3.3 but nowhere in
> general code there is a check if the controller can handle this w.r.t
> HOST CAPS.

You are right, it's brutal. :-)

Perhaps the host driver should return -EINVAL when a voltage level
can't be reached. The above code should not print messages as errors,
at least as long some voltage level can be used.

> Where should this check be performed, I am guessing either here or in sdhci?
> This is all new to me so I am just throwing this out there

Do you want to send a patch?

>
>  Jocke--
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to