Skip to contentSkip to conversation

Fix NC650 nand support

PATCH New Detlev Zundel 4 participants 8 messages Apr 20, 2007 – Apr 24, 2007

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Fix NC650 nand support

Hi Detlev,

Quoted 2 lines · Detlev Zundel

as noted in the subject attached a patch to fix the nand support for NC650 boards.

You might want to clean up the compiler warnings too (ELDK 4.1)? ;-)

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
=====================================================================

#2 lore raw

PATCH 1/1 Fix NC650 nand support

Quoted 2 lines · In message <[email protected]> you wrote:

You might want to clean up the compiler warnings too (ELDK 4.1)? ;-)

Done. [4.2 actually :-) ]

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Only in our dreams we are free.  The rest of the time we need  wages.
                                    - Terry Pratchett, _Wyrd Sisters_
#3 lore raw

PATCH 1/1 Fix NC650 nand support

Hi Wolfgang,

Quoted 5 lines
Quoted 2 lines · In message <[email protected]> you wrote:

You might want to clean up the compiler warnings too (ELDK 4.1)? ;-)

Done. [4.2 actually :-) ]

Hm. I am eager to see the changes. If you *really* cleaned *all* warnings then I am sure you also fixed the warning in extable.c and 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). Otherwise the sorting of the table is missing and thus the searching with a bisecting algorithm will not work as is.

I am *really looking* forward to the patch fixing that :)

Cheers
Detlev

Signature · 7 lines
PUBLIC NOTICE AS REQUIRED BY LAW:    Any Use of  This Product,  in Any Manner
Whatsoever, Will Increase the Amount of Disorder in the Universe. Although No
Liability Is  Implied Herein,  the Consumer Is Warned  That This Process Will
Ultimately Lead to the Heat Death of the Universe.
--
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany +49 8142 66989 40
#4 lore raw

PATCH 1/1 Fix NC650 nand support

Quoted 2 lines · In message <[email protected]> you wrote:

Hm. I am eager to see the changes. If you *really* cleaned *all*

Not all, just those for the NC650 build.

Quoted 1 line

warnings then I am sure you also fixed the warning in extable.c and

Indeed.

Quoted 5 lines

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). Otherwise the sorting of the table is missing and thus the searching with a bisecting algorithm will not work as is.

I didn'tnotice this, I just cleaned up the compiler warning.

Quoted 1 line

I am *really looking* forward to the patch fixing that :)

Don't tell me, tell the author of the code.

Roy, are you listening?

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Man did not weave the web of life; he  is  merely  a  strand  in  it.
Whatever he does to the web, he does to himself.     - Seattle [1854]
#5 lore raw

PATCH 1/1 Fix NC650 nand support

Quoted 6 lines · Wolfgang Denk

In message <[email protected]> you wrote:

[snip]

Quoted 3 lines

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.

Quoted 3 lines

Otherwise the sorting of the

Quoted 2 lines

table is missing and thus the searching with a bisecting algorithm will not work as is.

Why?

Quoted 5 lines

I didn'tnotice this, I just cleaned up the compiler warning.

Quoted 1 line

I am *really looking* forward to the patch fixing that :)

I am also.

Quoted 3 lines

Don't tell me, tell the author of the code.

Roy, are you listening?

Yes. I am listening.
Roy

#6 lore raw

PATCH 1/1 Fix NC650 nand support

Hi Roy,

Quoted 7 lines · Wolfgang Denk
Quoted 6 lines

In message <[email protected]> you wrote:

[snip]

Quoted 3 lines

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).

Quoted 7 lines

Tsi108/9 pci config read will introduce a exception. I do not see other exception after code relocation.

Quoted 3 lines

Otherwise the sorting of the

Quoted 2 lines

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.

So either sorting the table at some point or instead doing a linear search would fix the problems.

Cheers
Detlev

Signature · 7 lines
It's very important  that you sleep because that's  when your brain is
garbage  collecting.  And a  dream is  if you  are interrupted  in the
middle and have junk left in the registers.
                                          -- Gerald Sussman
--
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany +49 8142 66989 40
#7 lore raw

PATCH 1/1 Fix NC650 nand support

Quoted 1 line · Detlev Zundel

Hi Roy,

[snip]

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

while doing this noticed that the whole fixup only works because

we

Quoted 1 line
Quoted 1 line
Quoted 1 line

have a maximum of one fixup entry (./drivers/tsi108_pci.c, I

cannot

Quoted 2 lines
Quoted 1 line
Quoted 1 line

find any user of addr_probe anywhere).

Tsi108/9 pci config read will introduce a exception. I do not see

other

Quoted 4 lines

exception after code relocation.

Quoted 2 lines

Otherwise the sorting of the

Quoted 1 line

table is missing and thus the searching with a bisecting

Quoted 9 lines

algorithm

Quoted 2 lines
Quoted 1 line
Quoted 1 line

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.

Quoted 2 lines

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