Exemplo n.º 1
0
int init_soc(int soc_type)
{
	switch(soc_type)	
	{
		case MCIMX233:
			init_all_pins(); //base on board layout
			
			init_clock_power();
			//init_dma();

			serial_init(); //heading by serial_ means this function is from serial.c
			printf("INIT: \n<..uart..>\n");
			printf("INIT: sdram...\n");
			init_sdram();
			//gpmi_init(); //heading by gpmi_ means this function is from gpmi.c

			printf("INIT: sd card...\n");
			sd_init();
			
			printf("INIT: dm9k...\n");
			dm9000_initialize();

			printf("INIT: tag-list...\n");
//			init_taglist(0x40000000);

			printf("INIT: booting...\n");
			break;
	}
	return 0;
}
Exemplo n.º 2
0
/* ------------------------------------------------------------------------- */
int board_early_init_f (void)
{
	/* Running from ROM: global data is still READONLY */
	init_sdram ();
	mtdcr (uicsr, 0xFFFFFFFF);	/* clear all ints */
	mtdcr (uicer, 0x00000000);	/* disable all ints */
	mtdcr (uiccr, 0x00000020);	/* set all but FPGA SMI to be non-critical */
	mtdcr (uicpr, 0xFFFFFFE0);	/* set int polarities */
	mtdcr (uictr, 0x10000000);	/* set int trigger levels */
	mtdcr (uicvcr, 0x00000001);	/* set vect base=0,INT0 highest priority */
	mtdcr (uicsr, 0xFFFFFFFF);	/* clear all ints */
	return 0;
}
/***********************************************************************
 * initialize  - One-time initialization routines included here
 *
 *
 * Used for initializing the SDRAM memory, test result region, 
 * SDRAM init registers
 **********************************************************************/
void _reentrant initialize(){

	/* initialize test result region: */
	for (i = 0; i < 0x200; i++)
		test_result[i] = 0x00;

	if (gpiopwrupall() != 1)
		TEST_FAILED;

	if (sdraminitregs(CLK_DIV) != 1)
		TEST_FAILED;

	init_sdram();

	j = 0; // no of tests failed
	
	return;
}