Difference between revisions of "Bdinit PM sample"
Jump to navigation
Jump to search
imported>Bkavanagh |
imported>Bkavanagh |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
void bdinit1() { | void bdinit1() { | ||
*(volatile unsigned int *)(0xffe00004) = 0x00bda0c8; | *(volatile unsigned int *)(0xffe00004) = 0x00bda0c8; | ||
//Initialize DDR PHY. If not done and program is accessing address from 0x60000000, the board will be locked | //Initialize DDR PHY. If not done and program is accessing address from 0x60000000, the board will be locked | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
| Line 9: | Line 9: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C000; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 15: | Line 15: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C100; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C100; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 21: | Line 21: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C200; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C200; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 27: | Line 27: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C400; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C400; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 33: | Line 33: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C500; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C500; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 39: | Line 39: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C600; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C600; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 45: | Line 45: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C800; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C800; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 51: | Line 51: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000C900; | *(volatile unsigned int *)(0xffe0001C) = 0x4000C900; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 57: | Line 57: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000CA00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000CA00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 63: | Line 63: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000CC00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000CC00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 69: | Line 69: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000CD00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000CD00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 75: | Line 75: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000CE00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000CE00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 81: | Line 81: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D000; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 87: | Line 87: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D100; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D100; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 93: | Line 93: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D200; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D200; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 99: | Line 99: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D400; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D400; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 105: | Line 105: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D500; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D500; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 111: | Line 111: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D600; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D600; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 117: | Line 117: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D800; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D800; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 123: | Line 123: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000D900; | *(volatile unsigned int *)(0xffe0001C) = 0x4000D900; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 129: | Line 129: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000DA00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000DA00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 135: | Line 135: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000DC00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000DC00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 141: | Line 141: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000DD00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000DD00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 147: | Line 147: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000DE00; | *(volatile unsigned int *)(0xffe0001C) = 0x4000DE00; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x08020802; | *(volatile unsigned int *)(0xffe00018) = 0x08020802; | ||
| Line 153: | Line 153: | ||
*(volatile unsigned int *)(0xffe00018) = 0x08040804; | *(volatile unsigned int *)(0xffe00018) = 0x08040804; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000E000; | *(volatile unsigned int *)(0xffe0001C) = 0x4000E000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x61610060; | *(volatile unsigned int *)(0xffe00018) = 0x61610060; | ||
| Line 159: | Line 159: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00120024; | *(volatile unsigned int *)(0xffe00018) = 0x00120024; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000E100; | *(volatile unsigned int *)(0xffe0001C) = 0x4000E100; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x40404040; | *(volatile unsigned int *)(0xffe00018) = 0x40404040; | ||
| Line 165: | Line 165: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000E200; | *(volatile unsigned int *)(0xffe0001C) = 0x4000E200; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x00004005; | *(volatile unsigned int *)(0xffe00018) = 0x00004005; | ||
| Line 171: | Line 171: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000E400; | *(volatile unsigned int *)(0xffe0001C) = 0x4000E400; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0xfffbfffb; | *(volatile unsigned int *)(0xffe00018) = 0xfffbfffb; | ||
| Line 177: | Line 177: | ||
*(volatile unsigned int *)(0xffe00018) = 0xfffbfffb; | *(volatile unsigned int *)(0xffe00018) = 0xfffbfffb; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000E500; | *(volatile unsigned int *)(0xffe0001C) = 0x4000E500; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0xfffbfffb; | *(volatile unsigned int *)(0xffe00018) = 0xfffbfffb; | ||
| Line 183: | Line 183: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000E600; | *(volatile unsigned int *)(0xffe0001C) = 0x4000E600; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x04000000; | *(volatile unsigned int *)(0xffe0001C) = 0x04000000; | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
| Line 189: | Line 189: | ||
*(volatile unsigned int *)(0xffe00018) = 0x00000000; | *(volatile unsigned int *)(0xffe00018) = 0x00000000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x4000E700; | *(volatile unsigned int *)(0xffe0001C) = 0x4000E700; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x80200000; | *(volatile unsigned int *)(0xffe0001C) = 0x80200000; | ||
*(volatile unsigned int *)(0xffe0001C) = 0xc0206300; | *(volatile unsigned int *)(0xffe0001C) = 0xc0206300; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x8c206300; | *(volatile unsigned int *)(0xffe0001C) = 0x8c206300; | ||
*(volatile unsigned int *)(0xffe0001C) = 0x88216300; | *(volatile unsigned int *)(0xffe0001C) = 0x88216300; | ||
//IS46DR16640C -25D DDR2-800D | //IS46DR16640C -25D DDR2-800D | ||
// Trtp=7.5ns Twr=15ns CL=5ns Trcd=12.5ns Trc=55ns Trp=12.5 Trfc=105 Tras=40ns tREFI=7.8us | // Trtp=7.5ns Twr=15ns CL=5ns Trcd=12.5ns Trc=55ns Trp=12.5 Trfc=105 Tras=40ns tREFI=7.8us | ||
*(volatile unsigned int *)(0xffe00004) = 0x00bda0c8; | *(volatile unsigned int *)(0xffe00004) = 0x00bda0c8; | ||
*(volatile unsigned int *)(0xffe00008) = 0x141d0000; | *(volatile unsigned int *)(0xffe00008) = 0x141d0000; | ||
| Line 204: | Line 204: | ||
*(volatile unsigned int *)(0xffe00010) = 0x309f0309; | *(volatile unsigned int *)(0xffe00010) = 0x309f0309; | ||
*(volatile unsigned int *)(0xffe00000) = 0x96a18c30; | *(volatile unsigned int *)(0xffe00000) = 0x96a18c30; | ||
} | } | ||
void bdinit2 () { | void bdinit2 () { | ||
// Enable UART. After reset to run the program with print statement, UART terminal must be connected or program will stack till output is done | // Enable UART. After reset to run the program with print statement, UART terminal must be connected or program will stack till output is done | ||
//*(volatile unsigned int *)(0x80000108) = 0x80000843; | //*(volatile unsigned int *)(0x80000108) = 0x80000843; | ||
//Enable L2Cache | //Enable L2Cache | ||
*(volatile unsigned int *)(0xf0000008) |= 0x7; //Invalidate all Lines | *(volatile unsigned int *)(0xf0000008) |= 0x7; //Invalidate all Lines | ||
*(volatile unsigned int *)(0xf0000000) = 0xC0040000; //Enable L2Cache | *(volatile unsigned int *)(0xf0000000) = 0xC0040000; //Enable L2Cache | ||
} | } | ||
Latest revision as of 01:02, 22 December 2020
void bdinit1() {
*(volatile unsigned int *)(0xffe00004) = 0x00bda0c8;
//Initialize DDR PHY. If not done and program is accessing address from 0x60000000, the board will be locked
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C000;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C100;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C200;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C400;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C500;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C600;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C800;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000C900;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000CA00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000CC00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000CD00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000CE00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D000;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D100;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D200;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D400;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D500;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D600;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D800;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000D900;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000DA00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000DC00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000DD00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000DE00;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x08020802;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x08040804;
*(volatile unsigned int *)(0xffe0001C) = 0x4000E000;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x61610060;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00120024;
*(volatile unsigned int *)(0xffe0001C) = 0x4000E100;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x40404040;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000E200;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x00004005;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000E400;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0xfffbfffb;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0xfffbfffb;
*(volatile unsigned int *)(0xffe0001C) = 0x4000E500;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0xfffbfffb;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000E600;
*(volatile unsigned int *)(0xffe0001C) = 0x04000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x00000000;
*(volatile unsigned int *)(0xffe00018) = 0x00000000;
*(volatile unsigned int *)(0xffe0001C) = 0x4000E700;
*(volatile unsigned int *)(0xffe0001C) = 0x80200000;
*(volatile unsigned int *)(0xffe0001C) = 0xc0206300;
*(volatile unsigned int *)(0xffe0001C) = 0x8c206300;
*(volatile unsigned int *)(0xffe0001C) = 0x88216300;
//IS46DR16640C -25D DDR2-800D
// Trtp=7.5ns Twr=15ns CL=5ns Trcd=12.5ns Trc=55ns Trp=12.5 Trfc=105 Tras=40ns tREFI=7.8us
*(volatile unsigned int *)(0xffe00004) = 0x00bda0c8;
*(volatile unsigned int *)(0xffe00008) = 0x141d0000;
*(volatile unsigned int *)(0xffe0000c) = 0x2700;
*(volatile unsigned int *)(0xffe00010) = 0x309f0309;
*(volatile unsigned int *)(0xffe00000) = 0x96a18c30;
}
void bdinit2 () {
// Enable UART. After reset to run the program with print statement, UART terminal must be connected or program will stack till output is done
//*(volatile unsigned int *)(0x80000108) = 0x80000843;
//Enable L2Cache
*(volatile unsigned int *)(0xf0000008) |= 0x7; //Invalidate all Lines
*(volatile unsigned int *)(0xf0000000) = 0xC0040000; //Enable L2Cache
}