* [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0
@ 2010-10-13 4:50 wind_embedded
2010-10-13 5:27 ` Graeme Russ
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: wind_embedded @ 2010-10-13 4:50 UTC (permalink / raw)
To: u-boot
Hello:
Now I port u-boot into mpc8247, I need everyone's help, thanks!
my board configuration is following:
chip select chip size address
CS0 AM29LV040B 512K 0xfff00000
CS1 S29GL256P 64M 0xff800000
CS2 SDRAM 256M 0x00000000
Before I use VxWorks, it works fine. When I port u-boot, my project
based on IDS8247. I changed configuration in IDS8247.h and updated
flash.c, after I compiled u-boot, I burned u-boot.bin into AM29LV040B.
Console output(DEBUG is defined):
CPU: MPC8247 (HiP7 Rev 14, Mask 1.0 1K50M) at 400 MHz
Board: ADS 8247
I2C: ready
DRAM: 128 MB
Top of RAM usable for U-Boot at: 08000000
Reserving 160k for U-Boot at: 07fd7000
Reserving 192k for malloc() at: 07fa7000
Reserving 76 Bytes for Board Info at: 07fa6fb4
Reserving 72 Bytes for Global Data at: 07fa6f6c
Stack Pointer at: 07fa6f48
New Stack Pointer is: 07fa6f48
Now running in RAM - U-Boot at: 07fd7000
FLASH: Manuf. ID @ 0xfff00000: 0x00000004
## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB
flash_protect ON: from 0xFFF00000 to 0xFFF22FFF
flash_protect ON: from 0xFFF70000 to 0xFFF7FFFF
*** failed ***
### ERROR ### Please RESET the board ###
I found the manufacture ID of flash is error , it should be 0x01, but
it is 0x04, it is the first byte that u-boot.bin file was burned into
AM29LV040. In my flash.c file, the code that I get manufacture ID as
following:
...
flash_cmd_autoselect (base);
mfrId= U8_READ (base);
flash_cmd_reset (base);
...
The functions that above code called is as following:
#define U8_WRITE(reg, val) (*((volatile uchar *)(reg)) =
((uchar)((val)&0xFF)))
#define U8_READ(reg) (*((volatile uchar *)(reg)))
static void flash_cmd_reset (ulong base)
{
U8_WRITE (base + 0x0, 0xF0);
}
static void flash_cmd_unlock (ulong base)
{
U8_WRITE (base + 0x555, 0xAA);
U8_WRITE (base + 0x2AA, 0x55);
}
static void flash_cmd_autoselect (ulong base)
{
flash_cmd_unlock (base + 0x555);
U8_WRITE (base + 0x555, 0x90);
}
I want to get everyone's help, thank you very much!
^ permalink raw reply [flat|nested] 11+ messages in thread* [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 4:50 [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 wind_embedded @ 2010-10-13 5:27 ` Graeme Russ 2010-10-13 8:03 ` [U-Boot] 答复: " wind_embedded 2010-10-13 5:36 ` Heiko Schocher 2010-10-13 6:02 ` [U-Boot] " Wolfgang Denk 2 siblings, 1 reply; 11+ messages in thread From: Graeme Russ @ 2010-10-13 5:27 UTC (permalink / raw) To: u-boot On Wednesday, October 13, 2010, wind_embedded <wind_embedded@sina.com> wrote: > Hello: > > ? Now I port u-boot into mpc8247, I need everyone's help, thanks! > > ? my board configuration is following: > ? chip select ?chip ? ? ? ?size ?address > ? CS0 ? ? ? ? ?AM29LV040B ?512K ?0xfff00000 > ? CS1 ? ? ? ? ?S29GL256P ? 64M ? 0xff800000 > ? CS2 ? ? ? ? ?SDRAM ? ? ? 256M ?0x00000000 > > ? Before I use VxWorks, it works fine. When I port u-boot, my project > based on IDS8247. I changed configuration in IDS8247.h and updated > flash.c, after I compiled u-boot, I burned u-boot.bin into AM29LV040B. > Console output(DEBUG is defined): What version of U-Boot are you using? It looks like you are not using the CFI driver which has supported the AM29LV040B for some time now. Have a look at the eNET board from current mainline - it uses the same flash without issue > ? CPU: ? MPC8247 (HiP7 Rev 14, Mask 1.0 1K50M) at 400 MHz > ? Board: ADS 8247 > ? I2C: ? ready > ? DRAM: ?128 MB > ? Top of RAM usable for U-Boot at: 08000000 > ? Reserving 160k for U-Boot at: 07fd7000 > ? Reserving 192k for malloc() at: 07fa7000 > ? Reserving 76 Bytes for Board Info at: 07fa6fb4 > ? Reserving 72 Bytes for Global Data at: 07fa6f6c > ? Stack Pointer at: 07fa6f48 > ? New Stack Pointer is: 07fa6f48 > ? Now running in RAM - U-Boot at: 07fd7000 > ? FLASH: Manuf. ID @ 0xfff00000: 0x00000004 > ? ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB > ? flash_protect ON: from 0xFFF00000 to 0xFFF22FFF > ? flash_protect ON: from 0xFFF70000 to 0xFFF7FFFF > ? *** failed *** > ? ### ERROR ### Please RESET the board ### > > ? I found the manufacture ID of flash is error , it should be 0x01, but > it is 0x04, it is the first byte that u-boot.bin file was burned into > AM29LV040. In my flash.c file, the code that I get manufacture ID as > following: > ? ... > ? flash_cmd_autoselect (base); > ? mfrId= U8_READ (base); > ? flash_cmd_reset (base); > ? ... > ? The functions that above code called is as following: > ? #define U8_WRITE(reg, val) ?(*((volatile uchar ?*)(reg)) = > ((uchar)((val)&0xFF))) > ? #define U8_READ(reg) ? ? ? (*((volatile uchar ?*)(reg))) > ? static void flash_cmd_reset (ulong base) > ? { > ? U8_WRITE (base + 0x0, 0xF0); > ? } > ? static void flash_cmd_unlock (ulong base) > ? { > ? U8_WRITE (base + 0x555, 0xAA); > ? U8_WRITE (base + 0x2AA, 0x55); > ? } > ? static void flash_cmd_autoselect (ulong base) > ? { > ? flash_cmd_unlock (base + 0x555); > ? U8_WRITE (base + 0x555, 0x90); > ? } > > ? I want to get everyone's help, thank you very much! > Use the latest version of U-Boot and the CFI driver rather than this custom driver you are currently using Regards, Graeme ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] 答复: ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 5:27 ` Graeme Russ @ 2010-10-13 8:03 ` wind_embedded 2010-10-13 8:27 ` [U-Boot] " Graeme Russ 2010-10-13 8:27 ` [U-Boot] 答复: " Wolfgang Denk 0 siblings, 2 replies; 11+ messages in thread From: wind_embedded @ 2010-10-13 8:03 UTC (permalink / raw) To: u-boot On Wednesday, October 13, 2010, wind_embedded <wind_embedded@sina.com> wrote: > Hello: > > Now I port u-boot into mpc8247, I need everyone's help, thanks! > > my board configuration is following: > chip select chip size address > CS0 AM29LV040B 512K 0xfff00000 > CS1 S29GL256P 64M 0xff800000 > CS2 SDRAM 256M 0x00000000 > > Before I use VxWorks, it works fine. When I port u-boot, my project > based on IDS8247. I changed configuration in IDS8247.h and updated > flash.c, after I compiled u-boot, I burned u-boot.bin into AM29LV040B. > Console output(DEBUG is defined): What version of U-Boot are you using? It looks like you are not using the CFI driver which has supported the AM29LV040B for some time now. Have a look at the eNET board from current mainline - it uses the same flash without issue > CPU: MPC8247 (HiP7 Rev 14, Mask 1.0 1K50M) at 400 MHz > Board: ADS 8247 > I2C: ready > DRAM: 128 MB > Top of RAM usable for U-Boot at: 08000000 > Reserving 160k for U-Boot at: 07fd7000 > Reserving 192k for malloc() at: 07fa7000 > Reserving 76 Bytes for Board Info at: 07fa6fb4 > Reserving 72 Bytes for Global Data at: 07fa6f6c > Stack Pointer at: 07fa6f48 > New Stack Pointer is: 07fa6f48 > Now running in RAM - U-Boot at: 07fd7000 > FLASH: Manuf. ID @ 0xfff00000: 0x00000004 > ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB > flash_protect ON: from 0xFFF00000 to 0xFFF22FFF > flash_protect ON: from 0xFFF70000 to 0xFFF7FFFF > *** failed *** > ### ERROR ### Please RESET the board ### > > I found the manufacture ID of flash is error , it should be 0x01, but > it is 0x04, it is the first byte that u-boot.bin file was burned into > AM29LV040. In my flash.c file, the code that I get manufacture ID as > following: > ... > flash_cmd_autoselect (base); > mfrId= U8_READ (base); > flash_cmd_reset (base); > ... > The functions that above code called is as following: > #define U8_WRITE(reg, val) (*((volatile uchar *)(reg)) = > ((uchar)((val)&0xFF))) > #define U8_READ(reg) (*((volatile uchar *)(reg))) > static void flash_cmd_reset (ulong base) > { > U8_WRITE (base + 0x0, 0xF0); > } > static void flash_cmd_unlock (ulong base) > { > U8_WRITE (base + 0x555, 0xAA); > U8_WRITE (base + 0x2AA, 0x55); > } > static void flash_cmd_autoselect (ulong base) > { > flash_cmd_unlock (base + 0x555); > U8_WRITE (base + 0x555, 0x90); > } > > I want to get everyone's help, thank you very much! > Use the latest version of U-Boot and the CFI driver rather than this custom driver you are currently using Regards, Graeme Oh, I use u-boot-1.1.4 or u-boot-1.2.0, I have compared them with the latest version, there is little difference. I port AM29lV0404B driver on VxWorks into u-boot, AM29lV0404B driver on VxWorks works fine! Best regard ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 8:03 ` [U-Boot] 答复: " wind_embedded @ 2010-10-13 8:27 ` Graeme Russ 2010-10-13 8:27 ` [U-Boot] 答复: " Wolfgang Denk 1 sibling, 0 replies; 11+ messages in thread From: Graeme Russ @ 2010-10-13 8:27 UTC (permalink / raw) To: u-boot On Wednesday, October 13, 2010, wind_embedded <wind_embedded@sina.com> wrote: > On Wednesday, October 13, 2010, wind_embedded <wind_embedded@sina.com> wrote: >> Hello: >> > > > Oh, I use u-boot-1.1.4 or u-boot-1.2.0, I have compared them with the latest version, there is little difference. > I port AM29lV0404B driver on VxWorks into u-boot, AM29lV0404B driver on VxWorks works fine! > > Best regard A few points: Is the VxWorks driver GPL compatible? If not, you cannot legally distribute your version of U-Boot (private in-house use only) There is massive differences between 1.2.0 and current mainline Why bother porting a proprietary driver and risk legal complications when mainline supports your flash using the CFI driver? Download the latest U-Boot and have a look at the eNET board for getting your flash working Regards Graeme ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] 答复: ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 8:03 ` [U-Boot] 答复: " wind_embedded 2010-10-13 8:27 ` [U-Boot] " Graeme Russ @ 2010-10-13 8:27 ` Wolfgang Denk 2010-10-14 13:38 ` [U-Boot] 答复: " wind_embedded 1 sibling, 1 reply; 11+ messages in thread From: Wolfgang Denk @ 2010-10-13 8:27 UTC (permalink / raw) To: u-boot Dear "wind_embedded", In message <000c01cb6aad$14458d20$a744fea9@E43A> you wrote: > > Oh, I use u-boot-1.1.4 or u-boot-1.2.0, I have compared them with the latest version, there is little difference. > I port AM29lV0404B driver on VxWorks into u-boot, AM29lV0404B driver on VxWorks works fine! well, when you completely ignore all good advice, including to ignore known-to-be working code, and instead insist on using versions that are > 3 years old and hopelessly obsoleted... ...then you must face the fact that you cannot get much help from the community. Update to recent code (v2010.09 at least), and use the generic CFI driver. If you then should still have problems please feel free to ask again. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A list is only as strong as its weakest link. -- Don Knuth ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] 答复: 答复: ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 8:27 ` [U-Boot] 答复: " Wolfgang Denk @ 2010-10-14 13:38 ` wind_embedded 2010-10-14 14:51 ` [U-Boot] " Graeme Russ 0 siblings, 1 reply; 11+ messages in thread From: wind_embedded @ 2010-10-14 13:38 UTC (permalink / raw) To: u-boot well, when you completely ignore all good advice, including to ignore known-to-be working code, and instead insist on using versions that are > 3 years old and hopelessly obsoleted... ..then you must face the fact that you cannot get much help from the community. Update to recent code (v2010.09 at least), and use the generic CFI driver. If you then should still have problems please feel free to ask again. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A list is only as strong as its weakest link. -- Don Knuth Dear Wolfgang Denk: I have enable u-boot working on version u-boot1-1.1.4 and latest version. I found the problem is the time interval between writing and reading flash. The question is very strange, the CPU configuration of VxWorks is same as u-boot, flash driver on VxWorks is good, but bad on u-boot. Whatever thank you very much;) Best regard ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-14 13:38 ` [U-Boot] 答复: " wind_embedded @ 2010-10-14 14:51 ` Graeme Russ 0 siblings, 0 replies; 11+ messages in thread From: Graeme Russ @ 2010-10-14 14:51 UTC (permalink / raw) To: u-boot On Thursday, October 14, 2010, wind_embedded <wind_embedded@sina.com> wrote: > > > well, when you completely ignore all good advice, including to ignore > known-to-be working code, and instead insist on using versions that > are > 3 years old and hopelessly obsoleted... > > ..then you must face the fact that you cannot get much help from the > community. > > > Update to recent code (v2010.09 at least), and use the generic CFI > driver. > > If you then should still have problems please feel free to ask again. > > Best regards, > > Wolfgang Denk > > -- > DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de > A list is only as strong as its weakest link. ? ? ? ? ? ?-- Don Knuth > > Dear Wolfgang Denk: > ? I have enable u-boot working on version u-boot1-1.1.4 and latest Do you mean you are using 1.1.4 or do you mean you are using the latest version from the git repository? > version. I found the problem is the time interval between writing and > reading flash. The question is very strange, the CPU configuration of Are you using the CFI driver or a custom driver which uses time delays? > VxWorks is same as u-boot, flash driver on VxWorks is good, but bad on > u-boot. > ?Whatever thank you very much;) I repeat: Using the CFI driver and the latest version of U-Boot, this flash works without issue. Look at the eNET board for guidance Regards Graeme ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 4:50 [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 wind_embedded 2010-10-13 5:27 ` Graeme Russ @ 2010-10-13 5:36 ` Heiko Schocher 2010-10-13 8:08 ` [U-Boot] 答复: " wind_embedded 2010-10-13 6:02 ` [U-Boot] " Wolfgang Denk 2 siblings, 1 reply; 11+ messages in thread From: Heiko Schocher @ 2010-10-13 5:36 UTC (permalink / raw) To: u-boot Hello wind_embedded, wind_embedded wrote: > Hello: > > Now I port u-boot into mpc8247, I need everyone's help, thanks! > > my board configuration is following: > chip select chip size address > CS0 AM29LV040B 512K 0xfff00000 > CS1 S29GL256P 64M 0xff800000 > CS2 SDRAM 256M 0x00000000 > > Before I use VxWorks, it works fine. When I port u-boot, my project > based on IDS8247. I changed configuration in IDS8247.h and updated > flash.c, after I compiled u-boot, I burned u-boot.bin into AM29LV040B. > Console output(DEBUG is defined): > CPU: MPC8247 (HiP7 Rev 14, Mask 1.0 1K50M) at 400 MHz Which version of u-boot do you use? > Board: ADS 8247 > I2C: ready > DRAM: 128 MB > Top of RAM usable for U-Boot at: 08000000 > Reserving 160k for U-Boot at: 07fd7000 > Reserving 192k for malloc() at: 07fa7000 > Reserving 76 Bytes for Board Info at: 07fa6fb4 > Reserving 72 Bytes for Global Data at: 07fa6f6c > Stack Pointer at: 07fa6f48 > New Stack Pointer is: 07fa6f48 > Now running in RAM - U-Boot at: 07fd7000 > FLASH: Manuf. ID @ 0xfff00000: 0x00000004 > ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB > flash_protect ON: from 0xFFF00000 to 0xFFF22FFF > flash_protect ON: from 0xFFF70000 to 0xFFF7FFFF > *** failed *** > ### ERROR ### Please RESET the board ### > > I found the manufacture ID of flash is error , it should be 0x01, but > it is 0x04, it is the first byte that u-boot.bin file was burned into > AM29LV040. In my flash.c file, the code that I get manufacture ID as > following: > ... > flash_cmd_autoselect (base); > mfrId= U8_READ (base); > flash_cmd_reset (base); Hmm.. what code is this? It looks to me, that you don;t use the CFI drvier! Please try this driver to access your flash. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] 答复: ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 5:36 ` Heiko Schocher @ 2010-10-13 8:08 ` wind_embedded 0 siblings, 0 replies; 11+ messages in thread From: wind_embedded @ 2010-10-13 8:08 UTC (permalink / raw) To: u-boot Hello wind_embedded, wind_embedded wrote: > Hello: > > Now I port u-boot into mpc8247, I need everyone's help, thanks! > > my board configuration is following: > chip select chip size address > CS0 AM29LV040B 512K 0xfff00000 > CS1 S29GL256P 64M 0xff800000 > CS2 SDRAM 256M 0x00000000 > > Before I use VxWorks, it works fine. When I port u-boot, my project > based on IDS8247. I changed configuration in IDS8247.h and updated > flash.c, after I compiled u-boot, I burned u-boot.bin into AM29LV040B. > Console output(DEBUG is defined): > CPU: MPC8247 (HiP7 Rev 14, Mask 1.0 1K50M) at 400 MHz Which version of u-boot do you use? > Board: ADS 8247 > I2C: ready > DRAM: 128 MB > Top of RAM usable for U-Boot at: 08000000 > Reserving 160k for U-Boot at: 07fd7000 > Reserving 192k for malloc() at: 07fa7000 > Reserving 76 Bytes for Board Info at: 07fa6fb4 > Reserving 72 Bytes for Global Data at: 07fa6f6c > Stack Pointer at: 07fa6f48 > New Stack Pointer is: 07fa6f48 > Now running in RAM - U-Boot at: 07fd7000 > FLASH: Manuf. ID @ 0xfff00000: 0x00000004 > ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB > flash_protect ON: from 0xFFF00000 to 0xFFF22FFF > flash_protect ON: from 0xFFF70000 to 0xFFF7FFFF > *** failed *** > ### ERROR ### Please RESET the board ### > > I found the manufacture ID of flash is error , it should be 0x01, but > it is 0x04, it is the first byte that u-boot.bin file was burned into > AM29LV040. In my flash.c file, the code that I get manufacture ID as > following: > ... > flash_cmd_autoselect (base); > mfrId= U8_READ (base); > flash_cmd_reset (base); Hmm.. what code is this? It looks to me, that you don;t use the CFI drvier! Please try this driver to access your flash. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany This code are section of flash_get_size function in flash.c. the related functions are as following: static ulong flash_get_size (volatile uchar * addr, flash_info_t * info) { ulong base; uchar value; base = (ulong) addr; flash_cmd_autoselect (base); asm("sync"); value = U8_READ (base); flash_cmd_reset (base); debug ("Manuf. ID @ 0x%08lx: 0x%02x\n", (ulong)addr, value); switch (value) { case (uchar) AMD_MANUFACT: info->flash_id = FLASH_MAN_AMD; break; default: info->flash_id = FLASH_UNKNOWN; info->sector_count = 0; info->size = 0; addr[0] = (uchar) 0x00FF00FF; /* restore read mode */ return (0); /* no or unknown flash */ } flash_cmd_autoselect (base); asm("sync"); value = U8_READ (base + 1); flash_cmd_reset (base); debug ("Device ID @ 0x%08lx: 0x%02x\n", (ulong)(&addr[0x1]), value); switch (value) { case (uchar) AMD_ID_LV040B: info->flash_id += FLASH_AM040; info->sector_count = 8; info->size = 0x00080000; break; /* => 512K */ default: info->flash_id = FLASH_UNKNOWN; break; } if (info->sector_count > CFG_MAX_FLASH_SECT) { printf ("** ERROR: sector count %d > max (%d) **\n", info->sector_count, CFG_MAX_FLASH_SECT); info->sector_count = CFG_MAX_FLASH_SECT; } return (info->size); } unsigned long flash_init (void) { unsigned long size_b0; int i; volatile immap_t * immr = (immap_t *)CFG_IMMR; volatile memctl8260_t *memctl = &immr->im_memctl; /* Init: no FLASHes known */ for (i = 0; i < CFG_MAX_FLASH_BANKS; ++i) { flash_info[i].flash_id = FLASH_UNKNOWN; } /* Static FLASH Bank configuration here - FIXME XXX */ size_b0 = flash_get_size ((volatile uchar *) CFG_FLASH_BASE, &flash_info[0]); if (flash_info[0].flash_id == FLASH_UNKNOWN) { printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n", size_b0, size_b0 << 20); } memctl->memc_or0 = 0xfff00866; memctl->memc_br0 = 0xfff00801; flash_get_offsets (0xfff00000, &flash_info[0]); #if CFG_MONITOR_BASE >= CFG_FLASH_BASE /* monitor protection ON by default */ (void) flash_protect (FLAG_PROTECT_SET, CFG_MONITOR_BASE, CFG_MONITOR_BASE + monitor_flash_len - 1, &flash_info[0]); #endif #ifdef CFG_ENV_IS_IN_FLASH /* ENV protection ON by default */ flash_protect (FLAG_PROTECT_SET, CFG_ENV_ADDR, CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]); #endif flash_info[0].size = size_b0; return (size_b0); } ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 4:50 [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 wind_embedded 2010-10-13 5:27 ` Graeme Russ 2010-10-13 5:36 ` Heiko Schocher @ 2010-10-13 6:02 ` Wolfgang Denk 2010-10-13 8:12 ` wind_embedded 2 siblings, 1 reply; 11+ messages in thread From: Wolfgang Denk @ 2010-10-13 6:02 UTC (permalink / raw) To: u-boot Dear "wind_embedded", In message <000001cb6a92$34979570$a744fea9@E43A> you wrote: > > Before I use VxWorks, it works fine. When I port u-boot, my project > based on IDS8247. I changed configuration in IDS8247.h and updated > flash.c, after I compiled u-boot, I burned u-boot.bin into AM29LV040B. > Console output(DEBUG is defined): You must never copy any code without trying to understand it. When adapting code from another board, you need to understand not only your own hardware in detail, but also the hardware you are copying from. In your case, you should not use the old flash driver in flash.c at all. Remove that file, and use the CFI flash driver instead. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You don't have to stay up nights to succeed; you have to stay awake days. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 2010-10-13 6:02 ` [U-Boot] " Wolfgang Denk @ 2010-10-13 8:12 ` wind_embedded 0 siblings, 0 replies; 11+ messages in thread From: wind_embedded @ 2010-10-13 8:12 UTC (permalink / raw) To: u-boot Dear "wind_embedded", In message <000001cb6a92$34979570$a744fea9@E43A> you wrote: > > Before I use VxWorks, it works fine. When I port u-boot, my project > based on IDS8247. I changed configuration in IDS8247.h and updated > flash.c, after I compiled u-boot, I burned u-boot.bin into AM29LV040B. > Console output(DEBUG is defined): You must never copy any code without trying to understand it. When adapting code from another board, you need to understand not only your own hardware in detail, but also the hardware you are copying from. In your case, you should not use the old flash driver in flash.c at all. Remove that file, and use the CFI flash driver instead. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You don't have to stay up nights to succeed; you have to stay awake days. Dear Wolfgang Denk: Because AM29LV040B driver has been used on VxWorks and it works fine, so code of flash.c is taken from AM29LV040B driver. I think it should be good, but bad! Best regard ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-10-14 14:51 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-13 4:50 [U-Boot] ppc, flash init on mpc8247, Unknown FLASH on Bank 0 wind_embedded 2010-10-13 5:27 ` Graeme Russ 2010-10-13 8:03 ` [U-Boot] 答复: " wind_embedded 2010-10-13 8:27 ` [U-Boot] " Graeme Russ 2010-10-13 8:27 ` [U-Boot] 答复: " Wolfgang Denk 2010-10-14 13:38 ` [U-Boot] 答复: " wind_embedded 2010-10-14 14:51 ` [U-Boot] " Graeme Russ 2010-10-13 5:36 ` Heiko Schocher 2010-10-13 8:08 ` [U-Boot] 答复: " wind_embedded 2010-10-13 6:02 ` [U-Boot] " Wolfgang Denk 2010-10-13 8:12 ` wind_embedded
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox