[U-Boot] [PATCH 3/4] Tegra114: MMC: Add SD bus power-rail init routine
Tom Warren
twarren.nvidia at gmail.com
Tue Mar 12 19:05:59 CET 2013
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
>
>> +#if defined(CONFIG_TEGRA_MMC)
>
> It always is for Dalmore, right?
Yep, but I always like to provide the means to disable a feature
(whether it be SPI, or MMC, or USB) so you can build a stripped-down
or de-featured version for testing.
Having said that, I haven't tested lately whether T114 (or T20 or T30)
will build OK w/MMC undefined/removed.
>
>> +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.
>
> AFAIK, the kernel driver for the PMIC doesn't retry these if they fail.
> Hopefully it doesn't need to start doing so.
More information about the U-Boot
mailing list