[U-Boot-Users] PATCH: Add support for EmbeddedPlanet EP88x boards

The attached patch adds support for EmbeddedPlanet EP88x boards. It was tested on EP88xC board with MPC885 processor, 64MB RAM, and 16MB flash.
CHANGELOG
Add support for EmbeddedPlanet EP88x boards

Yuli Barcohen <yuli <at> arabellasw.com> writes:
The attached patch adds support for EmbeddedPlanet EP88x boards. It was tested on EP88xC board with MPC885 processor, 64MB RAM, and 16MB flash.
Thank you for the patch. The code should help me a lot. However, when I tried to test it with my board and EP885C, I got no output to the terminal. When I try to step through it, everything goes fine until it appears to go into an infinite loop in sdram_table. The point where it loops looks like this in the debugger:
0xfc01b410 in sdram_table () (gdb) 0xfc01b348 in sdram_table () (gdb)
Do you have any idea why it would be doing this?
Also, because it may solve the problem, what version of u-boot did you write the patch against? I am using the stable 1.1.2 build, but I guess you may have used some CVS version.

Will Haines <will.haines <at> embedded-sys.com> writes:
Thank you for the patch. The code should help me a lot. However, when I tried to test it with my board and EP885C, I got no output to the terminal.
I think that that specific error stemmed from my BDI configuration file; however, I still cannot get the port to even print anything to the terminal. My steps for putting to the board are as follows:
make distclean make EP8xx_config make all
Then with the BDI: erase 0xfc000000 erase 0xfc020000 prog u-boot.bin bin reset
When I reboot the board there is no output to the console.
When I try to run this using the debugger it appears that things work correctly until the intialization gets trapped in speed.c's function: init_pll_866. I have no idea why a function with no loops in it would seem to loop forever. My only idea is that something is going wrong with plprcr_write_866's return jump.
Any suggestions at all to get this port running on my board would be much appreciated!
Will Haines

Will Haines writes:
Yuli> The attached patch adds support for EmbeddedPlanet EP88x Yuli> boards. It was tested on EP88xC board with MPC885 processor, Yuli> 64MB RAM, and 16MB flash.
Will> Thank you for the patch. The code should help me a lot. Will> However, when I tried to test it with my board and EP885C,
What is your board? This code is intended for EP88x ONLY. Don't expect it to run unchanged on any other board.
Will> I got no output to the terminal. When I try to step through Will> it, everything goes fine until it appears to go into an Will> infinite loop in sdram_table. The point where it loops looks Will> like this in the debugger:
Will> 0xfc01b410 in sdram_table () (gdb) 0xfc01b348 in sdram_table Will> () (gdb)
Will> Do you have any idea why it would be doing this?
Will> Also, because it may solve the problem, what version of u-boot Will> did you write the patch against? I am using the stable 1.1.2 Will> build, but I guess you may have used some CVS version.
The patch is (as always) against top of CVS. Version 1.1.2 is too old to be used in any new project.
Will> I think that that specific error stemmed from my BDI Will> configuration file; however, I still cannot get the port to Will> even print anything to the terminal. My steps for putting to Will> the board are as follows:
Will> make distclean make EP8xx_config make all
Will> Then with the BDI: erase 0xfc000000 erase 0xfc020000 prog Will> u-boot.bin bin reset
Will> When I reboot the board there is no output to the console.
Will> When I try to run this using the debugger it appears that Will> things work correctly until the intialization gets trapped in Will> speed.c's function: init_pll_866. I have no idea why a Will> function with no loops in it would seem to loop forever. My Will> only idea is that something is going wrong with Will> plprcr_write_866's return jump.
Will> Any suggestions at all to get this port running on my board Will> would be much appreciated!
There are too many possible reasons. First of all, EP885C exists in several different configurations. If your SDRAM is different from mine, U-Boot can fail. I haven't got all possible configurations to test. PLL can get stuck if init_pll_866 has to change bus division factor (EBDF), so check the default CPU frequency and the requested one. There also can be a toolchain-related problem. I discussed it with Wolfgang almost a year ago but we were not sure what the fix should be so I fixed it locally in my repository. For some reason, nobody else reported such a problem so it was not urgent. The problem is as follows: GCC 3.3 (and newer) put variables explicitly initialised to zero to .bss section. Older GCCs put them to .data section. This means that with newer compilers, until U-Boot is copied to RAM, these variables contain junk and not zero. This caused terminal output problems on several MPC8xx boards I worked with, due to the following definitions in common/serial.c:
static struct serial_device *serial_devices = NULL; static struct serial_device *serial_current = NULL;
I changed these to
static struct serial_device *serial_devices __attribute__ ((section (".data"))) = NULL; static struct serial_device *serial_current __attribute__ ((section (".data"))) = NULL;
and the problem disappeared. I don't think we should/can add such __attribute__ to every zero-initialised variable so I didn't submit patch. I'd suggest using GCC flag -fno-zero-initialized-in-bss which exists exactly for fixing such problems. Any opinions?

Yuli Barcohen <yuli <at> arabellasw.com> writes:
Will Haines writes:
Will> Any suggestions at all to get this port running on my board Will> would be much appreciated!
There are too many possible reasons.
Thank everyone very much for their help. I finally have a running version of u-boot on my EP885C. It turns out that the changes that I had to make to get everything working were:
#define CONFIG_8xx_CPUCLK_DEFAULT 133000000 #define CONFIG_BAUDRATE 9600
Everything seems to be alright now. Thanks for the help--I learned a lot about u-boot and even more about gdb.
Will

In message 17109.6259.382029.838736@astp0002.localdomain you wrote:
The attached patch adds support for EmbeddedPlanet EP88x boards. It was tested on EP88xC board with MPC885 processor, 64MB RAM, and 16MB flash.
CHANGELOG
Add support for EmbeddedPlanet EP88x boards
Added, thanks.
Best regards,
Wolfgang Denk
participants (3)
-
Will Haines
-
Wolfgang Denk
-
Yuli Barcohen