From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 15 Dec 2015 12:47:47 +0100 Subject: [U-Boot] [PATCH] eeprom: fix eeprom write procedure In-Reply-To: <1450166819.4241.8.camel@synopsys.com> References: <1450107934-7362-1-git-send-email-abrodkin@synopsys.com> <201512150127.09020.marex@denx.de> <1450166819.4241.8.camel@synopsys.com> Message-ID: <201512151247.47877.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday, December 15, 2015 at 09:07:01 AM, Alexey Brodkin wrote: > Hi Marek, > > On Tue, 2015-12-15 at 01:27 +0100, Marek Vasut wrote: > > On Monday, December 14, 2015 at 04:45:34 PM, Alexey Brodkin wrote: > > > This fixes commit 1a37889b0ad084a740b4f785031d7ae9955d947b: > > > ----------------------->8-------------------- > > > eeprom: Pull out the RW loop > > > > > > Unify the code for doing read/write into single function, since the > > > code for both the read and write is almost identical. This again > > > trims down the code duplication. > > > ----------------------->8-------------------- > > > > > > where the same one routine is utilized for both EEPROM writing and > > > reading. The only difference was supposed to be a "read" flag which > > > in both cases was set with 1 somehow. > > > > > > That lead to a missing delay in case of writing which lead to write > > > failure (in my case no data was written). > > > > > > Signed-off-by: Alexey Brodkin > > > Cc: Marek Vasut > > > Cc: Simon Glass > > > Cc: Tom Rini > > > Cc: Heiko Schocher > > > > Obviously correct, > > > > Acked-by: Marek Vasut > > > > Thanks for spotting this, nice! > > That was a nice exercise for me. > From the first glance DW SPI and ARC-specific changes > were not guilty so I tried some previous RC-s and found that > v2016.01-rc1 is good while rc2 is not. > > So I recalled articles and talks about git bisect. > And literally in few next minutes I knew commit that introduced > that breakage. At that point problem became really obvious. ... and then you cursed at me, yeah, I did not sleep very well last night ;-) > That said it's really fantastic what cool tools we have now that > simplify our life as developers significantly. :) Best regards, Marek Vasut