[U-Boot] [PATCH v3 0/3] Tegra: MMC: Add DT support for MMC to T20 boards

Tom Warren twarren.nvidia at gmail.com
Fri Feb 15 00:33:10 CET 2013


Stephen,

On Thu, Feb 14, 2013 at 4:27 PM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> On 02/13/2013 02:44 PM, Tom Warren wrote:
>> This patchset adds device-tree support to the Tegra MMC driver.
>> All device config is done via properties in the DT files instead
>> of hard-coded config options/function arguments.
>>
>> I've tested this on my Seaboard and everything works fine,
>> including card detect. For the other T20 boards, I've used
>> the Linux kernel DTS files for the sdhci nodes where there
>> wasn't one already, or expanded the info that was already
>> there. Everything builds fine, but I haven't tested anything
>> but Seaboard.
>
> With the incremental patch below applied,
>
> Tested-by: Stephen Warren <swarren at nvidia.com>
> On: Harmony, Seaboard(really Springbank), Ventana, Whistler,
> Paz00/AC100, TrimSlice.
>
>> commit a5be5907d77eb4ca18dd9a11dd09183148c9d1b2
>> Author: Stephen Warren <swarren at nvidia.com>
>> Date:   Thu Feb 14 16:02:24 2013 -0700
>>
>>     Fix MMC DT rework
>>
>> diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
>> index e8e8512..630f6bd 100644
>> --- a/drivers/mmc/tegra_mmc.c
>> +++ b/drivers/mmc/tegra_mmc.c
>> @@ -497,7 +497,6 @@ static int do_mmc_init(int dev_index)
>>         struct mmc_host *host;
>>         char gpusage[12]; /* "SD/MMCn PWR" or "SD/MMCn CD" */
>>         struct mmc *mmc;
>> -       int card_det = 0;
>>
>>         /* DT should have been read & host config filled in */
>>         host = &mmc_host[dev_index];
>> @@ -514,16 +513,15 @@ static int do_mmc_init(int dev_index)
>>         if (fdt_gpio_isvalid(&host->pwr_gpio)) {
>>                 sprintf(gpusage, "SD/MMC%d PWR", dev_index);
>>                 gpio_request(host->pwr_gpio.gpio, gpusage);
>> -               fdtdec_set_gpio(&host->pwr_gpio, 1);
>> +               gpio_direction_output(host->pwr_gpio.gpio, 1);
>>                 debug(" Power GPIO name = %s\n", host->pwr_gpio.name);
>>         }
>>
>>         if (fdt_gpio_isvalid(&host->cd_gpio)) {
>>                 sprintf(gpusage, "SD/MMC%d CD", dev_index);
>>                 gpio_request(host->cd_gpio.gpio, gpusage);
>> -               card_det = fdtdec_get_gpio(&host->cd_gpio);
>> +               gpio_direction_input(host->cd_gpio.gpio);
>>                 debug(" CD GPIO name = %s\n", host->cd_gpio.name);
>> -               debug("%s: CD state = %d\n", __func__, card_det);
>>         }
>>
>>         mmc = &mmc_dev[dev_index];
>
Thanks. I'll look at merging this w/my v4 patchset when I get back
from Kansas on Weds.

Tom


More information about the U-Boot mailing list