Changeset 186
- Timestamp:
- 11.11.2008 22:17:44 (2 months ago)
- Files:
-
- boards/xilinx-ml401/rtl/setup.v (modified) (1 diff)
- boards/xilinx-ml401/synthesis/Makefile (modified) (1 diff)
- boards/xilinx-ml401/test/Makefile (modified) (1 diff)
- software/bios/main.c (modified) (3 diffs)
- software/include/hw/hpdmc.h (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
boards/xilinx-ml401/rtl/setup.v
r183 r186 28 28 //`define ENABLE_GPIO 29 29 //`define ENABLE_ACEUSB 30 //`define ENABLE_DDRAM30 `define ENABLE_DDRAM 31 31 //`define ENABLE_INTC 32 32 //`define ENABLE_TIMER boards/xilinx-ml401/synthesis/Makefile
r180 r186 48 48 SYNCLEAN+=system.map system_summary.xml timing.twr 49 49 SYNCLEAN+=system-routed* system_usage* system.ngc param.opt netlist.lst 50 SYNCLEAN+= system.prj50 SYNCLEAN+=xst system.prj 51 51 SYNCLEAN+=xlnx_auto_0.ise system_par.xrpt smartpreview.twr system.ngc_xst.xrpt 52 52 SYNCLEAN+=system_ngdbuild.xrpt system_map.xrpt xlnx_auto_0_xdb _impactbatch.log boards/xilinx-ml401/test/Makefile
r183 r186 54 54 55 55 clean: 56 rm -f verilog.log 56 rm -f verilog.log system 57 57 58 58 .PHONY: clean cversim isim software/bios/main.c
r184 r186 22 22 #include <hw/board.h> 23 23 #include <hw/uart.h> 24 #include <hw/hpdmc.h> 24 25 #include <libc.h> 25 26 #include <console.h> … … 230 231 } 231 232 233 static void ddrinit() 234 { 235 volatile unsigned int i; 236 237 printf("Initializing DDRAM\n"); 238 CSR_HPDMC_SYSTEM = 0x07; /* Bring CKE high */ 239 for(i=0;i<2;i++); 240 CSR_HPDMC_BYPASS = 0x400B; /* Precharge All */ 241 for(i=0;i<2;i++); 242 CSR_HPDMC_BYPASS = 0x2000F; /* Load Extended Mode Register */ 243 for(i=0;i<2;i++); 244 CSR_HPDMC_BYPASS = 0x123F; /* Load Mode Register */ 245 for(i=0;i<200;i++); 246 CSR_HPDMC_BYPASS = 0x400B; /* Precharge All */ 247 for(i=0;i<2;i++); 248 CSR_HPDMC_BYPASS = 0xD; /* Auto Refresh */ 249 for(i=0;i<8;i++); 250 CSR_HPDMC_BYPASS = 0xD; /* Auto Refresh */ 251 for(i=0;i<8;i++); 252 CSR_HPDMC_BYPASS = 0x23F; /* Load Mode Register, Enable DLL */ 253 for(i=0;i<200;i++); 254 CSR_HPDMC_SYSTEM = 0x04; /* Leave Bypass mode and bring up hardware controller */ 255 printf("DDRAM intialization complete\n"); 256 } 257 232 258 static void do_command(char *c) 233 259 { … … 242 268 else if(strcmp(token, "serialboot") == 0) serialboot(); 243 269 else if(strcmp(token, "cfboot") == 0) cfboot(get_token(&c)); 270 else if(strcmp(token, "ddrinit") == 0) ddrinit(); 244 271 else if(strcmp(token, "") != 0) 245 272 printf("Command not found\n");
