diff options
Diffstat (limited to 'cpu/nios')
| -rw-r--r-- | cpu/nios/asmi.c | 6 | ||||
| -rw-r--r-- | cpu/nios/interrupts.c | 20 | ||||
| -rw-r--r-- | cpu/nios/serial.c | 8 | ||||
| -rw-r--r-- | cpu/nios/spi.c | 24 | ||||
| -rw-r--r-- | cpu/nios/start.S | 16 | 
5 files changed, 37 insertions, 37 deletions
| diff --git a/cpu/nios/asmi.c b/cpu/nios/asmi.c index c2cd8fead..2c2e838de 100644 --- a/cpu/nios/asmi.c +++ b/cpu/nios/asmi.c @@ -27,8 +27,8 @@  #include <command.h>  #include <nios-io.h> -#if !defined(CFG_NIOS_ASMIBASE) -#error "*** CFG_NIOS_ASMIBASE not defined ***" +#if !defined(CONFIG_SYS_NIOS_ASMIBASE) +#error "*** CONFIG_SYS_NIOS_ASMIBASE not defined ***"  #endif  /*-----------------------------------------------------------------------*/ @@ -69,7 +69,7 @@  #define ASMI_STATUS_WIP		(1<<0)	/* Write in progress */  #define ASMI_STATUS_WEL		(1<<1)	/* Write enable latch */ -static nios_asmi_t *asmi = (nios_asmi_t *)CFG_NIOS_ASMIBASE; +static nios_asmi_t *asmi = (nios_asmi_t *)CONFIG_SYS_NIOS_ASMIBASE;  /***********************************************************************   * Device access diff --git a/cpu/nios/interrupts.c b/cpu/nios/interrupts.c index 75e491d84..55a571857 100644 --- a/cpu/nios/interrupts.c +++ b/cpu/nios/interrupts.c @@ -68,15 +68,15 @@ void set_timer (ulong t)  /* The board must handle this interrupt if a timer is not   * provided.   */ -#if defined(CFG_NIOS_TMRBASE) +#if defined(CONFIG_SYS_NIOS_TMRBASE)  void timer_interrupt (struct pt_regs *regs)  {  	/* Interrupt is cleared by writing anything to the  	 * status register.  	 */ -	nios_timer_t *tmr = (nios_timer_t *)CFG_NIOS_TMRBASE; +	nios_timer_t *tmr = (nios_timer_t *)CONFIG_SYS_NIOS_TMRBASE;  	tmr->status = 0; -	timestamp += CFG_NIOS_TMRMS; +	timestamp += CONFIG_SYS_NIOS_TMRMS;  #ifdef CONFIG_STATUS_LED  	status_led_tick(timestamp);  #endif @@ -125,14 +125,14 @@ int interrupt_init (void)  {  	int vec; -#if defined(CFG_NIOS_TMRBASE) -	nios_timer_t *tmr = (nios_timer_t *)CFG_NIOS_TMRBASE; +#if defined(CONFIG_SYS_NIOS_TMRBASE) +	nios_timer_t *tmr = (nios_timer_t *)CONFIG_SYS_NIOS_TMRBASE;  	tmr->control &= ~NIOS_TIMER_ITO;  	tmr->control |= NIOS_TIMER_STOP; -#if defined(CFG_NIOS_TMRCNT) -	tmr->periodl = CFG_NIOS_TMRCNT & 0xffff; -	tmr->periodh = (CFG_NIOS_TMRCNT >> 16) & 0xffff; +#if defined(CONFIG_SYS_NIOS_TMRCNT) +	tmr->periodl = CONFIG_SYS_NIOS_TMRCNT & 0xffff; +	tmr->periodh = (CONFIG_SYS_NIOS_TMRCNT >> 16) & 0xffff;  #endif  #endif @@ -143,11 +143,11 @@ int interrupt_init (void)  	}  	/* Need timus interruptus -- start the lopri timer */ -#if defined(CFG_NIOS_TMRBASE) +#if defined(CONFIG_SYS_NIOS_TMRBASE)  	tmr->control |= ( NIOS_TIMER_ITO |  			  NIOS_TIMER_CONT |  			  NIOS_TIMER_START ); -	ipri (CFG_NIOS_TMRIRQ + 1); +	ipri (CONFIG_SYS_NIOS_TMRIRQ + 1);  #endif  	enable_interrupts ();  	return (0); diff --git a/cpu/nios/serial.c b/cpu/nios/serial.c index 5ecdc6d7e..44aa6001f 100644 --- a/cpu/nios/serial.c +++ b/cpu/nios/serial.c @@ -33,7 +33,7 @@ DECLARE_GLOBAL_DATA_PTR;   *-----------------------------------------------------------------*/  #if defined(CONFIG_CONSOLE_JTAG) -static nios_jtag_t *jtag = (nios_jtag_t *)CFG_NIOS_CONSOLE; +static nios_jtag_t *jtag = (nios_jtag_t *)CONFIG_SYS_NIOS_CONSOLE;  void serial_setbrg( void ){ return; }  int serial_init( void ) { return(0);} @@ -71,9 +71,9 @@ int serial_getc (void)   *-----------------------------------------------------------------*/  #else -static nios_uart_t *uart = (nios_uart_t *)CFG_NIOS_CONSOLE; +static nios_uart_t *uart = (nios_uart_t *)CONFIG_SYS_NIOS_CONSOLE; -#if defined(CFG_NIOS_FIXEDBAUD) +#if defined(CONFIG_SYS_NIOS_FIXEDBAUD)  /* Everything's already setup for fixed-baud PTF   * assignment @@ -98,7 +98,7 @@ int serial_init (void)  	return (0);  } -#endif /* CFG_NIOS_FIXEDBAUD */ +#endif /* CONFIG_SYS_NIOS_FIXEDBAUD */  /*----------------------------------------------------------------------- diff --git a/cpu/nios/spi.c b/cpu/nios/spi.c index 640818014..89f9797fa 100644 --- a/cpu/nios/spi.c +++ b/cpu/nios/spi.c @@ -28,19 +28,19 @@  #include <nios-io.h>  #include <spi.h> -#if !defined(CFG_NIOS_SPIBASE) -#error "*** CFG_NIOS_SPIBASE not defined ***" +#if !defined(CONFIG_SYS_NIOS_SPIBASE) +#error "*** CONFIG_SYS_NIOS_SPIBASE not defined ***"  #endif -#if !defined(CFG_NIOS_SPIBITS) -#error "*** CFG_NIOS_SPIBITS not defined ***" +#if !defined(CONFIG_SYS_NIOS_SPIBITS) +#error "*** CONFIG_SYS_NIOS_SPIBITS not defined ***"  #endif -#if (CFG_NIOS_SPIBITS != 8) && (CFG_NIOS_SPIBITS != 16) -#error "*** CFG_NIOS_SPIBITS should be either 8 or 16 ***" +#if (CONFIG_SYS_NIOS_SPIBITS != 8) && (CONFIG_SYS_NIOS_SPIBITS != 16) +#error "*** CONFIG_SYS_NIOS_SPIBITS should be either 8 or 16 ***"  #endif -static nios_spi_t	*spi	= (nios_spi_t *)CFG_NIOS_SPIBASE; +static nios_spi_t	*spi	= (nios_spi_t *)CONFIG_SYS_NIOS_SPIBASE;  /* Warning:   * You cannot enable DEBUG for early system initalization, i. e. when @@ -139,7 +139,7 @@ int spi_xfer(struct spi_slave *slave, int bitlen, const void *dout,  	if (flags & SPI_XFER_BEGIN)  		spi_cs_activate(slave); -	if (!(flags & SPI_XFER_END) || bitlen > CFG_NIOS_SPIBITS) { +	if (!(flags & SPI_XFER_END) || bitlen > CONFIG_SYS_NIOS_SPIBITS) {  		/* leave chip select active */  		spi->control |= NIOS_SPI_SSO;  	} @@ -147,7 +147,7 @@ int spi_xfer(struct spi_slave *slave, int bitlen, const void *dout,  	for (	j = 0;				/* count each byte in */  		j < ((bitlen + 7) / 8);		/* dout[] and din[] */ -#if	(CFG_NIOS_SPIBITS == 8) +#if	(CONFIG_SYS_NIOS_SPIBITS == 8)  		j++) {  		while ((spi->status & NIOS_SPI_TRDY) == 0) @@ -158,7 +158,7 @@ int spi_xfer(struct spi_slave *slave, int bitlen, const void *dout,  			;  		rxd[j] = (unsigned char)(spi->rxdata & 0xff); -#elif	(CFG_NIOS_SPIBITS == 16) +#elif	(CONFIG_SYS_NIOS_SPIBITS == 16)  		j++, j++) {  		while ((spi->status & NIOS_SPI_TRDY) == 0) @@ -175,12 +175,12 @@ int spi_xfer(struct spi_slave *slave, int bitlen, const void *dout,  			rxd[j+1] = (unsigned char)(spi->rxdata & 0xff);  #else -#error "*** unsupported value of CFG_NIOS_SPIBITS ***" +#error "*** unsupported value of CONFIG_SYS_NIOS_SPIBITS ***"  #endif  	} -	if (bitlen > CFG_NIOS_SPIBITS && (flags & SPI_XFER_END)) { +	if (bitlen > CONFIG_SYS_NIOS_SPIBITS && (flags & SPI_XFER_END)) {  		spi->control &= ~NIOS_SPI_SSO;  	} diff --git a/cpu/nios/start.S b/cpu/nios/start.S index 9e73941a5..5d15e8d1d 100644 --- a/cpu/nios/start.S +++ b/cpu/nios/start.S @@ -71,10 +71,10 @@ _start:  	/*  	 * STACK  	 */ -	pfx	%hi(CFG_INIT_SP) -	movi	%sp, %lo(CFG_INIT_SP) -	pfx	%xhi(CFG_INIT_SP) -	movhi	%sp, %xlo(CFG_INIT_SP) +	pfx	%hi(CONFIG_SYS_INIT_SP) +	movi	%sp, %lo(CONFIG_SYS_INIT_SP) +	pfx	%xhi(CONFIG_SYS_INIT_SP) +	movhi	%sp, %xlo(CONFIG_SYS_INIT_SP)  	mov	%fp, %sp  	pfx	%hi(4*16) @@ -152,10 +152,10 @@ reloc:  	/*  	 * INIT VECTOR TABLE  	 */ -	pfx	%hi(CFG_VECT_BASE) -	movi	%g0, %lo(CFG_VECT_BASE) -	pfx	%xhi(CFG_VECT_BASE) -	movhi	%g0, %xlo(CFG_VECT_BASE)	/* dst */ +	pfx	%hi(CONFIG_SYS_VECT_BASE) +	movi	%g0, %lo(CONFIG_SYS_VECT_BASE) +	pfx	%xhi(CONFIG_SYS_VECT_BASE) +	movhi	%g0, %xlo(CONFIG_SYS_VECT_BASE)	/* dst */  	mov	%l0, %g0  	pfx	%hi(_vectors) |