[U-Boot] [PATCH 3/4] Tegra114: MMC: Add SD bus power-rail init routine

Stephen Warren swarren at wwwdotorg.org
Tue Mar 12 19:13:30 CET 2013


On 03/12/2013 12:05 PM, Tom Warren wrote:
> Stephen,
> 
> On Tue, Mar 12, 2013 at 10:54 AM, Stephen Warren <swarren at wwwdotorg.org> wrote:
>> On 03/12/2013 10:17 AM, Tom Warren wrote:
>>> T114 requires SD bus power-rail bringup for the SDIO card on SDMMC3.
>>
>>> diff --git a/board/nvidia/dalmore/dalmore.c b/board/nvidia/dalmore/dalmore.c

>>> +void board_sdmmc_voltage_init(void)
>>
>>> +     /* TPS65913: LDO9_VOLTAGE = 3.3V */
>>> +     data_buffer[0] = 0x31;
>>> +     reg = 0x61;
>>> +
>>> +     for (i = 0; i < MAX_I2C_RETRY; ++i) {
>>> +             ret = i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1);
>>> +             if (ret) {
>>> +                     udelay(100);
>>> +                     printf("%s: PMU i2c_write %02X<-%02X returned %d\n",
>>> +                             __func__, reg, data_buffer[0], ret);
>>> +             }
>>> +     }
>>
>> Is there actually a need to retry these transactions; is there any
>> evidence they're expected to fail? Hopefully the HW isn't flaky like that.
>
> This is how it was done in the original internal U-Boot code I got the
> I2C writes from (also done this way on T30). I did add the printf
> error writes, though, when I was having a PWR_I2C/I2C5/dev 0 problem.
> I think Whistler does something similar.

Whistler doesn't do any retries. That's why I was surprised by this. I
would assert we should remove the retry logic unless there's a specific
need for it, in which case we need to port it to the kernel too.


More information about the U-Boot mailing list