1
0
Fork 0
forked from len0rd/rockbox

Fix iPod Nano 2G bank detection broken in r24414.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24431 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sparmann 2010-02-01 01:23:43 +00:00
parent d99440c4fa
commit 40a3e80697

View file

@ -339,7 +339,7 @@ void nand_power_up(void)
if(nand_type[i] != 0xFFFFFFFF)
{
if(nand_reset(i))
if(nand_reset(i)) panicf("nand_power_up: nand_reset(bank=%d) failed.",(unsigned int)i);
panicf("nand_power_up: nand_reset(bank=%d) failed.",(unsigned int)i);
}
}
nand_powered = 1;
@ -511,7 +511,14 @@ uint32_t nand_device_init(void)
uint32_t type;
uint32_t i, j;
/* Assume there are 0 banks, to prevent
nand_power_up from talking with them yet. */
for(i = 0; i < 4; i++) nand_type[i] = 0xFFFFFFFF;
nand_power_up();
/* Now that the flash is powered on, detect how
many banks we really have and initialize them. */
for (i = 0; i < 4; i++)
{
nand_tunk1[i] = 7;
@ -519,7 +526,6 @@ uint32_t nand_device_init(void)
nand_tunk2[i] = 7;
nand_tunk3[i] = 7;
type = nand_get_chip_type(i);
nand_type[i] = 0xFFFFFFFF;
if (type == 0xFFFFFFFF) continue;
for (j = 0; ; j++)
{