package/boot/uboot-oxnas/src/board/ox820/ddr.c
//Function used to Setup SDRAM in DDR/SDR mode
Function used to Setup SDRAM in DDR/SDR mode
Function used to Setup SDRAM in DDR / SDR mode
void init_ddr(int mhz)
{
	enable_clock(SYS_CTRL_CLK_DDRPHY);
	enable_clock(SYS_CTRL_CLK_DDR);
	enable_clock(SYS_CTRL_CLK_DDRCK);
	reset_block(SYS_CTRL_RST_DDR_PHY, 0);
	reset_block(SYS_CTRL_RST_DDR, 0);
	ddr_setup(mhz >> 1);
	return;
}
void init_ddr ( int mhz ) { enable_clock ( SYS_CTRL_CLK_DDRPHY ) ; enable_clock ( SYS_CTRL_CLK_DDR ) ; enable_clock ( SYS_CTRL_CLK_DDRCK ) ; reset_block ( SYS_CTRL_RST_DDR_PHY , 0 ) ; reset_block ( SYS_CTRL_RST_DDR , 0 ) ; ddr_setup ( mhz >> 1 ) ; return ; }
Function used to Setup SDRAM in DDR/SDR mode
Function used to Setup SDRAM in DDR / SDR mode
/* start clocks */ /* bring phy and core out of reset */ /* DDR runs at half the speed of the CPU */