diff options
author | Michael Sparmann <theseven@rockbox.org> | 2010-02-01 01:23:43 +0000 |
---|---|---|
committer | Michael Sparmann <theseven@rockbox.org> | 2010-02-01 01:23:43 +0000 |
commit | 40a3e806974ff482006d4ee99b718a52d1e85224 (patch) | |
tree | 03b2bb561eb1207522f019cacffae69afb3a710f | |
parent | d99440c4fa33438b0c32fa28575a269c4d8d3d52 (diff) | |
download | rockbox-40a3e806974ff482006d4ee99b718a52d1e85224.tar.gz rockbox-40a3e806974ff482006d4ee99b718a52d1e85224.zip |
Fix iPod Nano 2G bank detection broken in r24414.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24431 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c index d4839893d3..6b2020a980 100644 --- a/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c +++ b/firmware/target/arm/s5l8700/ipodnano2g/nand-nano2g.c | |||
@@ -339,7 +339,7 @@ void nand_power_up(void) | |||
339 | if(nand_type[i] != 0xFFFFFFFF) | 339 | if(nand_type[i] != 0xFFFFFFFF) |
340 | { | 340 | { |
341 | if(nand_reset(i)) | 341 | if(nand_reset(i)) |
342 | if(nand_reset(i)) panicf("nand_power_up: nand_reset(bank=%d) failed.",(unsigned int)i); | 342 | panicf("nand_power_up: nand_reset(bank=%d) failed.",(unsigned int)i); |
343 | } | 343 | } |
344 | } | 344 | } |
345 | nand_powered = 1; | 345 | nand_powered = 1; |
@@ -511,7 +511,14 @@ uint32_t nand_device_init(void) | |||
511 | 511 | ||
512 | uint32_t type; | 512 | uint32_t type; |
513 | uint32_t i, j; | 513 | uint32_t i, j; |
514 | |||
515 | /* Assume there are 0 banks, to prevent | ||
516 | nand_power_up from talking with them yet. */ | ||
517 | for(i = 0; i < 4; i++) nand_type[i] = 0xFFFFFFFF; | ||
514 | nand_power_up(); | 518 | nand_power_up(); |
519 | |||
520 | /* Now that the flash is powered on, detect how | ||
521 | many banks we really have and initialize them. */ | ||
515 | for (i = 0; i < 4; i++) | 522 | for (i = 0; i < 4; i++) |
516 | { | 523 | { |
517 | nand_tunk1[i] = 7; | 524 | nand_tunk1[i] = 7; |
@@ -519,7 +526,6 @@ uint32_t nand_device_init(void) | |||
519 | nand_tunk2[i] = 7; | 526 | nand_tunk2[i] = 7; |
520 | nand_tunk3[i] = 7; | 527 | nand_tunk3[i] = 7; |
521 | type = nand_get_chip_type(i); | 528 | type = nand_get_chip_type(i); |
522 | nand_type[i] = 0xFFFFFFFF; | ||
523 | if (type == 0xFFFFFFFF) continue; | 529 | if (type == 0xFFFFFFFF) continue; |
524 | for (j = 0; ; j++) | 530 | for (j = 0; ; j++) |
525 | { | 531 | { |