Date: Thu, 20 Apr 2006 22:52:13 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95735 for review Message-ID: <200604202252.k3KMqD05053920@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95735 Change 95735 by imp@imp_hammer on 2006/04/20 22:51:46 Go ahead and configure the flash for the KB9202. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#4 (text) ==== @@ -93,6 +93,18 @@ while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MCKRDY)) continue; +#ifdef BOOT_KB9202 + // setup flash access (allow ample margin) + // 9 wait states, 1 setup, 1 hold, 1 float for 8-bit device + ((AT91PS_SMC2)AT91C_BASE_SMC2)->SMC2_CSR[0] = + AT91C_SMC2_WSEN | + (9 & AT91C_SMC2_NWS) | + ((1 << 8) & AT91C_SMC2_TDF) | + AT91C_SMC2_DBW_8 | + ((1 << 24) & AT91C_SMC2_RWSETUP) | + ((1 << 29) & AT91C_SMC2_RWHOLD); +#endif + // setup SDRAM access // EBI chip-select register (CS1 = SDRAM controller) // 9 col, 13row, 4 bank, CAS2 @@ -160,7 +172,7 @@ AT91C_BASE_PIOA->PIO_PDR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; pUSART->US_IDR = (unsigned int) -1; pUSART->US_CR = - AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS; + AT91C_US_RSTRX | AT91C_US_RSTTX | AT91C_US_RXDIS | AT91C_US_TXDIS; pUSART->US_BRGR = ((((AT91C_MASTER_CLOCK*10)/(BAUD*16))+5)/10); pUSART->US_TTGR = 0; pPDC->PDC_PTCR = AT91C_PDC_RXTDIS;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604202252.k3KMqD05053920>