From: Zang Roy-r61911 Date: 24 Apr 2007 14:32:58 +0800 Subject: [U-Boot-Users] [patch] Fix NC650 nand support In-Reply-To: References: <20070420154922.3F10B35363E@atlas.denx.de> <1177285951.26489.5.camel@localhost.localdomain> Message-ID: <1177396378.31559.21.camel@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2007-04-23 at 21:00, Detlev Zundel wrote: > Hi Roy, [snip] > >> > while doing this noticed that the whole fixup only works because > we > >> > have a maximum of one fixup entry (./drivers/tsi108_pci.c, I > cannot > >> > find any user of addr_probe anywhere). > > Tsi108/9 pci config read will introduce a exception. I do not see > other > > exception after code relocation. > > > >> Otherwise the sorting of the > >> > table is missing and thus the searching with a bisecting > algorithm > >> > will not work as is. > > Why? > > As I said, the search algorithm only works with a sorted table - just > what "sort_main_extable" does in Linux. To be honest I did not look > too hard but I couldn't find anything similar in U-Boot so the table > will be unsorted and thus very likely fail if more entries are added. > Unsorted table will induce error for more entries. Until now, I can only see tsi108_pci.c adds exception item for the exception table. Other boards have empty addr_probe. They are commented out. > So either sorting the table at some point or instead doing a linear > search would fix the problems. I prefer the second. I will do some test on my board and give the patch. Thanks. Roy