X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Flinkstation%2Favr.c;h=ec6d400d34e6dcb420116c684c0328e119b23486;hb=d7f71414f4296fbea578e80ada1bf2435ed0a2cd;hp=68bc5450a60d9e7ade8b21a44a217f48d99abfc1;hpb=4b7a6dd89633d60dc4b58476d5ce48247f82a3ca;p=u-boot diff --git a/board/linkstation/avr.c b/board/linkstation/avr.c index 68bc5450a6..ec6d400d34 100644 --- a/board/linkstation/avr.c +++ b/board/linkstation/avr.c @@ -22,7 +22,7 @@ */ #include #include -#include +#include /* Button codes from the AVR */ #define PWRR 0x20 /* Power button release */ @@ -35,7 +35,7 @@ /* LED commands */ #define PWRBLINKSTRT '[' /* Blink power LED */ #define PWRBLINKSTOP 'Z' /* Solid power LED */ -#define HDDLEDON 'W' /* HDD LED on */ +#define HDDLEDON 'W' /* HDD LED on */ #define HDDLEDOFF 'V' /* HDD LED off */ #define HDDBLINKSTRT 'Y' /* HDD LED start blink */ #define HDDBLINKSTOP 'X' /* HDD LED stop blink */ @@ -57,7 +57,7 @@ static char *consoles[] = { "nc", #endif }; -#define MAX_CONS_CHOICE (sizeof(consoles)/sizeof(char *)) +#define MAX_CONS_CHOICE (sizeof(consoles)/sizeof(char *)) #if !defined(CONFIG_NETCONSOLE) #define DEF_CONS_CHOICE 0 @@ -79,8 +79,8 @@ static char envbuffer[16]; void init_AVR_DUART (void) { - NS16550_t AVR_port = (NS16550_t) CFG_NS16550_COM2; - int clock_divisor = CFG_NS16550_CLK / 16 / 9600; + NS16550_t AVR_port = (NS16550_t) CONFIG_SYS_NS16550_COM2; + int clock_divisor = CONFIG_SYS_NS16550_CLK / 16 / 9600; /* * AVR port init sequence taken from @@ -90,12 +90,12 @@ void init_AVR_DUART (void) */ AVR_port->lcr = 0x00; AVR_port->ier = 0x00; - AVR_port->lcr = LCR_BKSE; + AVR_port->lcr = UART_LCR_BKSE; AVR_port->dll = clock_divisor & 0xff; AVR_port->dlm = (clock_divisor >> 8) & 0xff; - AVR_port->lcr = LCR_WLS_8 | LCR_PEN | LCR_EPS; + AVR_port->lcr = UART_LCR_WLS_8 | UART_LCR_PEN | UART_LCR_EPS; AVR_port->mcr = 0x00; - AVR_port->fcr = FCR_FIFO_EN | FCR_RXSR | FCR_TXSR; + AVR_port->fcr = UART_FCR_FIFO_EN | UART_FCR_RXSR | UART_FCR_TXSR; miconCntl_DisWDT(); @@ -105,12 +105,12 @@ void init_AVR_DUART (void) static inline int avr_tstc(void) { - return (NS16550_tstc((NS16550_t)CFG_NS16550_COM2)); + return (NS16550_tstc((NS16550_t)CONFIG_SYS_NS16550_COM2)); } static inline char avr_getc(void) { - return (NS16550_getc((NS16550_t)CFG_NS16550_COM2)); + return (NS16550_getc((NS16550_t)CONFIG_SYS_NS16550_COM2)); } static int push_timeout(char button_code)