From: Peter Pan Date: Wed, 28 Oct 2009 09:35:48 +0800 Subject: [U-Boot] about ## Unknown FLASH on Bank 0 In-Reply-To: <20091027083336.E6AFAE916D5@gemini.denx.de> References: <48abf2c20910251922o7251d876hebfedc6aed5b8c03@mail.gmail.com> <20091026191444.616D128B9B@gemini.denx.de> <48abf2c20910261812g75d17990jd1793f0560bc882c@mail.gmail.com> <20091027083336.E6AFAE916D5@gemini.denx.de> Message-ID: <48abf2c20910271835s62fc3328l22bf88fbb2957477@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk: Our hardware should be fine. We run VxWorks on it before and it works fine. The hardware running VxWorks is already a mature product of our company. We recently want to run linux on it because of the high price of VxWorks. I do a little experiments on the U-Boot-2009-08, any I successfully make the "Unknown Flash on Bank 0" appear without any code modification on common files. I only add my board specification files and my config file, change the Makefile to support my board files to compile, then the "unknown flash on bank 0" appears. I use ELDK for cross compile, and the ELDK gcc version is : ppc_6xx-gcc(GCC) 4.2.2 Which part of the code may cause this kind of problem? Maybe I can send your that part of my codes. 2009/10/27 Wolfgang Denk > Dear Peter Pan, > > please keel the mailinmg list on Cc: > > In message <48abf2c20910261812g75d17990jd1793f0560bc882c@mail.gmail.com> > you wrote: > > > > I also think the 1.2.0 is an ancient version, so I migrate my u-boot from > > 1.2.0 to u-boot-2009-08 yestoday, the same "Unknown Flash Bank" problem > > happened. > > I changed a little in the common files, all of which I think should not > lead > > to this "Unknown Flash Bank" problem. > > I use MPC8247, and all my changes are: > > Which exact board are you using? > > > 1. in /common/env_common.c, I add my environment variables to array > > default_environment. > > Bad, very bad. You should never meddle with this file. You should add > your custom settings to your board config file only. > > > 2. in /cpu/mpc8260/cpu_init.c, in function cpu_init_f, I common this line > > "immr->im_clkrst.car_rsr = RSR_ALLBITS;", because I will need RSR > register > > value later > > 3. in /cpu/mpc8260/serial_smc.c, we use BRG1 for SMC1 instead of BRG7 > > You are not supposed to meddle with these files. No changes to such > common files are necessary to port U-Boot to custom hardware. > > > 4. in /include/mpc8260.h, we add a hardware dog kick function, and > modified > > functiion "reset_8260_watchdog" a little to kick the hardware dog. > > 5. in /common/main.c, we add support to the two jumper on our board, > which > > is just two "if... else...". > > Such changes should be done in board specific code, not in common > files. > > > 6. in our board specific files, they all works fine before and I did not > > change a thing. > > Make all the changes above, the u-boot works fine. then I modified the > > /common/cmd_mem.c, we make the mtest command to test memory only once(in > > CFG_ALT_MEMTEST mode). > > I change the "for(;;)" to for(;iterations == 1;)", then the "Unknown > Flash > > Bank" happens. > > I printed out the 4 Flash IDs, the Manufacture Id changes from > 0x01(normal) > > to 0x808(wrong!!), other IDs are all normal. > > This makes zero sense to me. > > I understand you have a custom board with local modifications. That > means we don't know neither your hardware nor your code, which makes > it impossible to help. From the symptoms you describe, there must be > something fundamentally broken with your port, but without seeing your > code we cannot even guess what this might be. > > 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 > The high cost of living hasn't affected its popularity. >