diff --git a/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c b/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c index ab3ae24e77c8..d0f10a181b80 100644 --- a/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c +++ b/sys/boot/arm/at91/boot0/at91rm9200_lowlevel.c @@ -44,7 +44,6 @@ _init(void) { AT91PS_USART pUSART = (AT91PS_USART)AT91C_BASE_DBGU; AT91PS_PDC pPDC = (AT91PS_PDC)&(pUSART->US_RPR); - AT91PS_PIO pPio = AT91C_BASE_PIOA; register unsigned value; int i; @@ -152,10 +151,14 @@ _init(void) AT91C_BASE_SDRC->SDRC_MR = SDRAM_WIDTH | AT91C_SDRC_MODE_NORMAL_CMD; *p = 0; +#if SDRAM_WIDTH == AT91C_SDRC_DBW_32_BITS + // Turn on the upper 16 bits on the SDRAM bus. + AT91C_BASE_PIOC->PIO_ASR = 0xffff0000; + AT91C_BASE_PIOC->PIO_PDR = 0xffff0000; +#endif // Configure DBGU -use local routine optimized for space - pPio->PIO_ASR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; - pPio->PIO_BSR = 0; - pPio->PIO_PDR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; + AT91C_BASE_PIOA->PIO_ASR = AT91C_PA31_DTXD | AT91C_PA30_DRXD; + 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;