From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Tue, 12 Mar 2013 12:13:30 -0600 Subject: [U-Boot] [PATCH 3/4] Tegra114: MMC: Add SD bus power-rail init routine In-Reply-To: References: <1363105031-30296-1-git-send-email-twarren@nvidia.com> <1363105031-30296-4-git-send-email-twarren@nvidia.com> <513F6BE4.3000109@wwwdotorg.org> Message-ID: <513F704A.6080205@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 03/12/2013 12:05 PM, Tom Warren wrote: > Stephen, > > On Tue, Mar 12, 2013 at 10:54 AM, Stephen Warren 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.