mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-05 12:45:42 +00:00
9973e3c614
This patch changes the return type of initdram() from long int to phys_size_t. This is required for a couple of reasons: long int limits the amount of dram to 2GB, and u-boot in general is moving over to phys_size_t to represent the size of physical memory. phys_size_t is defined as an unsigned long on almost all current platforms. This patch *only* changes the return type of the initdram function (in include/common.h, as well as in each board's implementation of initdram). It does not actually modify the code inside the function on any of the platforms; platforms which wish to support more than 2GB of DRAM will need to modify their initdram() function code. Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc MPC8641HPCN. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> |
||
---|---|---|
.. | ||
config.mk | ||
flash.c | ||
Makefile | ||
README | ||
RPXlite_dw.c | ||
u-boot.lds | ||
u-boot.lds.debug |
After following the step of Yoo. Jonghoon and Wolfgang Denk, I ported u-boot on RPXlite DW version board: RPXlite_DW or LITE_DW. There are at least three differences between the Yoo-ported RPXlite and the RPXlite_DW. Board(in U-Boot) version(in EmbeddedPlanet) CPU SDRAM FLASH RPXlite RPXlite CW 850 16MB 4MB RPXlite_DW RPXlite DW(EP 823 H1 DW) 823e 64MB 16MB This fireware is specially coded for EmbeddedPlanet Co. Software Development Platform(RPXlite DW),which has a NEC NL6448BC20-08 LCD panel. It has the following three features: 1. 64MHz/48MHz system frequence setting options. The default setting is 48MHz.To get a 64MHz u-boot,just add '64' in make command,like make distclean make RPXlite_DW_64_config make all 2. CFG_ENV_IS_IN_FLASH/CFG_ENV_IS_IN_NVRAM The default environment parameter is stored in FLASH because it is a common choice for environment parameter.So I make NVRAM as backup parameter storeage.The reason why I didn't use EEPROM for ENV is that PlanetCore V2.0 use EEPROM as environment parameter home.Because of the possibility of using two firewares on this board,I didn't 'disturb' EEPROM.To get NVRAM support,you may use the following build command: make distclean make RPXlite_DW_NVRAM_config make all 3. LCD panel support To support the Platform better,I added LCD panel(NL6448BC20-08) function. For the convenience of debug, CONFIG_PERBOOT was supported. So you just perss ENTER if you want to get a serial console in boot downcounting. Then you can switch to LCD and serial console freely just typing 'run lcd' or 'run ser'. They are only vaild when CONFIG_LCD was enabled. To get a LCD support u-boot,you can do the following: make distclean make RPXlite_DW_LCD_config make all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The basic make commands could be: make RPXlite_DW_config make RPXlite_DW_64_config make RPXlite_DW_LCD_config make RPXlite_DW_NVRAM_config BTW,you can combine the above features together and get a workable u-boot to meet your need. For example,to get a 64MHZ && ENV_IS_IN_FLASH && LCD panel support u-boot,you can type: make RPXlite_DW_NVRAM_64_LCD_config make all So other combining make commands could be: make RPXlite_DW_NVRAM_64_config make RPXlite_DW_NVRAM_LCD_config make RPXlite_DW_64_LCD_config ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The boot process by "make RPXlite_DW_config" could be: U-Boot 1.1.2 (Aug 29 2004 - 15:11:27) CPU: PPC823EZTnnB2 at 48 MHz: 16 kB I-Cache 8 kB D-Cache Board: RPXlite_DW DRAM: 64 MB FLASH: 16 MB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: SCC ETHERNET u-boot> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A word on the U-Boot enviroment variable setting and usage : In the beginning, you could just need very simple defult environment variable setting, like[include/configs/RPXlite.h] : #define CONFIG_BOOTCOMMAND \ "bootp; " \ "setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ "bootm" This is enough for kernel NFS test. But as debug process goes on, you would expect to save some time on environment variable setting and u-boot/kernel updating. So the default environment variable setting would become more complicated. Just like the one I did in include/configs/RPXlite_DW.h. Two u-boot commands, ku and uu, should be careful to use. They were designed to update kernel and u-boot image file respectively. You must tftp your image to default address '100000' and then use them correctly. Yeah, you can create your own command to do this job. :-) The example u-boot image updating process could be : u-boot>t 100000 RPXlite_DW_LCD.bin Using SCC ETHERNET device TFTP from server 172.16.115.6; our IP address is 172.16.115.7 Filename 'RPXlite_DW_LCD.bin'. Load address: 0x100000 Loading: ############################# done Bytes transferred = 144700 (2353c hex) u-boot>run uu Un-Protect Flash Sectors 0-4 in Bank # 1 Erase Flash Sectors 0-4 in Bank # 1 .... done Copy to Flash... done ff000000: 27051956 552d426f 6f742031 2e312e32 '..VU-Boot 1.1.2 ff000010: 20284175 67203239 20323030 34202d20 (Aug 29 2004 - ff000020: 31353a32 303a3238 29000000 00000000 15:20:28)....... ff000030: 00000000 00000000 00000000 00000000 ................ ff000040: 00000000 00000000 00000000 00000000 ................ ff000050: 00000000 00000000 00000000 00000000 ................ ff000060: 00000000 00000000 00000000 00000000 ................ ff000070: 00000000 00000000 00000000 00000000 ................ ff000080: 00000000 00000000 00000000 00000000 ................ ff000090: 00000000 00000000 00000000 00000000 ................ ff0000a0: 00000000 00000000 00000000 00000000 ................ ff0000b0: 00000000 00000000 00000000 00000000 ................ ff0000c0: 00000000 00000000 00000000 00000000 ................ ff0000d0: 00000000 00000000 00000000 00000000 ................ ff0000e0: 00000000 00000000 00000000 00000000 ................ ff0000f0: 00000000 00000000 00000000 00000000 ................ u-boot updating finished u-boot> Also for environment updating, 'run eu' could let you erase OLD default environment variable and then use the working u-boot environment setting. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Finally, if you want to keep the serial port to possible debug on spot for deployment, you just need to enable 'DEPLOYMENT' in RPXlite_DW.h as 'DEBUG' does. Only the special string defined by CONFIG_AUTOBOOT_STOP_STR like 'st' can stop the autoboot. I'd like to extend my heartfelt gratitute to kind people for helping me work it out. I would particually thank Wolfgang Denk for his nice help. Enjoy, Sam Song, samsongshu@yahoo.com.cn Institute of Electrical Machinery and Controls Shanghai University Oct. 11, 2004