Esempio n. 1
0
/*OM[1:0] == 0, NAND FLash boot*/
void judgecodeposition()
{
	S3C24X0_MEMCTL *const memctl = S3C24X0_GetBase_MEMCTL();
	if(memctl->BWSCON & 0x6)
	{
		/*boot form nandflash*/
		
	}
	else if(!(memctl->BWSCON & 0x6))
	{
		/*boot form norflash*/
		/*init zi bss*/
	}
}
Esempio n. 2
0
void memoryconfig()
{
	int i;
	S3C24X0_MEMCTL *const memctl = S3C24X0_GetBase_MEMCTL();
	memctl->BWSCON = (2<<28)|(2<<24)|(1<<20)|(2<<16)|(1<<12)|(1<<8)|(1<<4)|(1<<1);
	for(i=0;i<6;i++)
		memctl->BANKCON[i] = 0x0700;
	memctl->BANKCON[6] = (3<<15)|(1<<2)|(1<<0);
	memctl->BANKCON[7] = (3<<15)|(1<<2)|(1<<0);
	memctl->REFRESH = (1<<23)|(0<<22)|(1<<20)|(1<<18)|(1268);
	memctl->BANKSIZE = (1<<5)|(1<<4)|2;
	memctl->MRSRB6 = 0x30;
	memctl->MRSRB7 = 0x30;
}
Esempio n. 3
0
int board_init (void)
{
	S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER();
	S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
	S3C24X0_MEMCTL * const memctl = S3C24X0_GetBase_MEMCTL();
	unsigned long bus_conf;
	
	/*Buzzer_Stop*/
	gpio->GPBCON &= ~3;			//set GPB0 as output
	gpio->GPBCON |= 1;
	gpio->GPBDAT &= ~1;

	/* to reduce PLL lock time, adjust the LOCKTIME register */
	clk_power->LOCKTIME = 0xFFFFFF;

	/* configure MPLL */
	clk_power->MPLLCON = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV);

	/* some delay between MPLL and UPLL */
	delay (4000);

	/* configure UPLL */
	clk_power->UPLLCON = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV);

	/* some delay between MPLL and UPLL */
	delay (8000);

	/* set up the I/O ports */
	gpio->GPACON = 0x007FFFFF;
	gpio->GPBCON = 0x002a9655;
	gpio->GPBUP = 0x000007FF;
	gpio->GPCCON = 0xAAAAAAAA;
	gpio->GPCUP = 0x0000FFFF;
	gpio->GPDCON = 0xAAAAAAAA;
	gpio->GPDUP = 0x0000FFFF;
	gpio->GPECON = 0xAAAAAAAA;
	gpio->GPEUP = 0x0000FFFF;
	gpio->GPFCON = 0x000055AA;
	gpio->GPFUP = 0x000000FF;
	gpio->GPGCON = 0xFD95FFBA;
	gpio->GPGUP = 0x0000FFFF;
#ifdef CONFIG_SERIAL3
	gpio->GPHCON = 0x002AAAAA;
#else
	gpio->GPHCON = 0x002AFAAA;
#endif
	gpio->GPHUP = 0x000007FF;

	gpio->GPJCON = 0x2AAAAAA;

#if 0
	/* USB Device Part */
	/*GPGCON is reset for USB Device */
	gpio->GPGCON = (gpio->GPGCON & ~(3 << 24)) | (1 << 24); /* Output Mode */
	gpio->GPGUP = gpio->GPGUP | ( 1 << 12);			/* Pull up disable */

	gpio->GPGDAT |= ( 1 << 12) ; 
	gpio->GPGDAT &= ~( 1 << 12) ; 
	udelay(20000);
	gpio->GPGDAT |= ( 1 << 12) ; 
#endif
	/*configure for cs8900 chip IO*/
	bus_conf = memctl->BWSCON;
	memctl->BWSCON = (bus_conf & ~0x0000F000) | 0x0000d000;

	/* arch number of AKAE2440-Board */
	gd->bd->bi_arch_number = MACH_TYPE_AKAE2440;

	/* adress of boot parameters */
	gd->bd->bi_boot_params = 0x30000100;

	icache_enable();
	dcache_enable();

	return 0;
}