From 6128a4aa5e791ed4e0a655bfd346a52d92da7883 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 21 Apr 2004 10:43:04 +0000 Subject: Remove stray white spaces. --- c/src/lib/libbsp/powerpc/shared/console/console.c | 68 +++++----- c/src/lib/libbsp/powerpc/shared/console/inch.c | 16 +-- .../lib/libbsp/powerpc/shared/console/polled_io.c | 142 ++++++++++----------- c/src/lib/libbsp/powerpc/shared/console/uart.c | 100 +++++++-------- c/src/lib/libbsp/powerpc/shared/console/uart.h | 2 +- 5 files changed, 164 insertions(+), 164 deletions(-) (limited to 'c/src/lib/libbsp/powerpc/shared/console') diff --git a/c/src/lib/libbsp/powerpc/shared/console/console.c b/c/src/lib/libbsp/powerpc/shared/console/console.c index c16084562c..2a3a1d6c60 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/console.c +++ b/c/src/lib/libbsp/powerpc/shared/console/console.c @@ -21,7 +21,7 @@ * * $Id$ */ - + #include #include #include @@ -97,7 +97,7 @@ console_initialize(rtems_device_major_number major, * Set up TERMIOS */ rtems_termios_initialize (); - + /* * Do device-specific initialization */ @@ -105,7 +105,7 @@ console_initialize(rtems_device_major_number major, /* RTEMS calls this routine once with 'minor'==0; loop through * all known instances... */ - + for (minor=0; minor < sizeof(ttyS)/sizeof(ttyS[0]); minor++) { char *nm; /* @@ -173,7 +173,7 @@ console_open(rtems_device_major_number major, void *arg) { rtems_status_code status; - static rtems_termios_callbacks cb = + static rtems_termios_callbacks cb = { console_first_open, /* firstOpen */ console_last_close, /* lastClose */ @@ -196,7 +196,7 @@ console_open(rtems_device_major_number major, /* * Pass data area info down to driver */ - BSP_uart_termios_set(minor, + BSP_uart_termios_set(minor, ((rtems_libio_open_close_args_t *)arg)->iop->data1); /* Enable interrupts on channel */ BSP_uart_intr_ctrl(minor, BSP_UART_INTR_CTRL_TERMIOS); @@ -215,11 +215,11 @@ console_close(rtems_device_major_number major, rtems_device_driver res = RTEMS_SUCCESSFUL; res = rtems_termios_close (arg); - + return res; } /* console_close */ - + /*-------------------------------------------------------------------------+ | Console device driver READ entry point. +--------------------------------------------------------------------------+ @@ -233,7 +233,7 @@ console_read(rtems_device_major_number major, return rtems_termios_read (arg); } /* console_read */ - + /*-------------------------------------------------------------------------+ | Console device driver WRITE entry point. @@ -247,20 +247,20 @@ console_write(rtems_device_major_number major, { return rtems_termios_write (arg); - + } /* console_write */ - + /* * Handle ioctl request. */ -rtems_device_driver +rtems_device_driver console_control(rtems_device_major_number major, rtems_device_minor_number minor, void *arg ) -{ +{ /* does the BSP support break callbacks ? */ #if defined(BIOCSETBREAKCB) && defined(BIOCGETBREAKCB) rtems_libio_ioctl_args_t *ioa=arg; @@ -269,7 +269,7 @@ rtems_libio_ioctl_args_t *ioa=arg; return BSP_uart_set_break_cb(minor, ioa); case BIOCGETBREAKCB: return BSP_uart_get_break_cb(minor, ioa); - + default: break; } @@ -282,45 +282,45 @@ conSetAttr(int minor, const struct termios *t) { int baud; - switch (t->c_cflag & CBAUD) + switch (t->c_cflag & CBAUD) { - case B50: + case B50: baud = 50; break; - case B75: - baud = 75; + case B75: + baud = 75; break; - case B110: - baud = 110; + case B110: + baud = 110; break; - case B134: - baud = 134; + case B134: + baud = 134; break; - case B150: - baud = 150; + case B150: + baud = 150; break; case B200: - baud = 200; + baud = 200; break; - case B300: + case B300: baud = 300; break; - case B600: - baud = 600; + case B600: + baud = 600; break; - case B1200: + case B1200: baud = 1200; break; - case B1800: - baud = 1800; + case B1800: + baud = 1800; break; - case B2400: + case B2400: baud = 2400; break; - case B4800: + case B4800: baud = 4800; break; - case B9600: + case B9600: baud = 9600; break; case B19200: @@ -329,7 +329,7 @@ conSetAttr(int minor, const struct termios *t) case B38400: baud = 38400; break; - case B57600: + case B57600: baud = 57600; break; case B115200: diff --git a/c/src/lib/libbsp/powerpc/shared/console/inch.c b/c/src/lib/libbsp/powerpc/shared/console/inch.c index f92ed2e21e..4b30a22978 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/inch.c +++ b/c/src/lib/libbsp/powerpc/shared/console/inch.c @@ -56,7 +56,7 @@ static char shift_map[] = '*',0x80,' ',0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x80,'7','8','9',0x80,'4','5','6',0x80, '1','2','3','0',177 -}; /* Keyboard scancode -> character map with SHIFT key modifier. */ +}; /* Keyboard scancode -> character map with SHIFT key modifier. */ static char kbd_buffer[KBD_BUF_SIZE]; static uint16_t kbd_first = 0; @@ -152,7 +152,7 @@ _IBMPC_scankey(char *outChar) break; case 0x53: - if (ctrl_pressed && alt_pressed) + if (ctrl_pressed && alt_pressed) rtemsReboot(); /* ctrl+alt+del -> reboot */ break; @@ -251,11 +251,11 @@ _IBMPC_inch(void) return c; } /* _IBMPC_inch */ - + /* * Routine that can be used before interrupt management is initialized. */ - + char BSP_wait_polled_input(void) { @@ -268,7 +268,7 @@ BSP_wait_polled_input(void) /*-------------------------------------------------------------------------+ | Function: _IBMPC_inch_sleep -| Description: If charcter is ready return it, otherwise sleep until +| Description: If charcter is ready return it, otherwise sleep until | it is ready | Global Variables: None. | Arguments: None. @@ -288,14 +288,14 @@ _IBMPC_inch_sleep(void) { return c; } - + if(ticks_per_second == 0) { - rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, + rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second); } rtems_task_wake_after((ticks_per_second+24)/25); } - + return c; } /* _IBMPC_inch */ diff --git a/c/src/lib/libbsp/powerpc/shared/console/polled_io.c b/c/src/lib/libbsp/powerpc/shared/console/polled_io.c index b2958098b7..7172e8d222 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/polled_io.c +++ b/c/src/lib/libbsp/powerpc/shared/console/polled_io.c @@ -205,34 +205,34 @@ unsigned int keymap_count = 7; */ char func_buf[] = { - '\033', '[', '[', 'A', 0, - '\033', '[', '[', 'B', 0, - '\033', '[', '[', 'C', 0, - '\033', '[', '[', 'D', 0, - '\033', '[', '[', 'E', 0, - '\033', '[', '1', '7', '~', 0, - '\033', '[', '1', '8', '~', 0, - '\033', '[', '1', '9', '~', 0, - '\033', '[', '2', '0', '~', 0, - '\033', '[', '2', '1', '~', 0, - '\033', '[', '2', '3', '~', 0, - '\033', '[', '2', '4', '~', 0, - '\033', '[', '2', '5', '~', 0, - '\033', '[', '2', '6', '~', 0, - '\033', '[', '2', '8', '~', 0, - '\033', '[', '2', '9', '~', 0, - '\033', '[', '3', '1', '~', 0, - '\033', '[', '3', '2', '~', 0, - '\033', '[', '3', '3', '~', 0, - '\033', '[', '3', '4', '~', 0, - '\033', '[', '1', '~', 0, - '\033', '[', '2', '~', 0, - '\033', '[', '3', '~', 0, - '\033', '[', '4', '~', 0, - '\033', '[', '5', '~', 0, - '\033', '[', '6', '~', 0, - '\033', '[', 'M', 0, - '\033', '[', 'P', 0, + '\033', '[', '[', 'A', 0, + '\033', '[', '[', 'B', 0, + '\033', '[', '[', 'C', 0, + '\033', '[', '[', 'D', 0, + '\033', '[', '[', 'E', 0, + '\033', '[', '1', '7', '~', 0, + '\033', '[', '1', '8', '~', 0, + '\033', '[', '1', '9', '~', 0, + '\033', '[', '2', '0', '~', 0, + '\033', '[', '2', '1', '~', 0, + '\033', '[', '2', '3', '~', 0, + '\033', '[', '2', '4', '~', 0, + '\033', '[', '2', '5', '~', 0, + '\033', '[', '2', '6', '~', 0, + '\033', '[', '2', '8', '~', 0, + '\033', '[', '2', '9', '~', 0, + '\033', '[', '3', '1', '~', 0, + '\033', '[', '3', '2', '~', 0, + '\033', '[', '3', '3', '~', 0, + '\033', '[', '3', '4', '~', 0, + '\033', '[', '1', '~', 0, + '\033', '[', '2', '~', 0, + '\033', '[', '3', '~', 0, + '\033', '[', '4', '~', 0, + '\033', '[', '5', '~', 0, + '\033', '[', '6', '~', 0, + '\033', '[', 'M', 0, + '\033', '[', 'P', 0, }; char *funcbufptr = func_buf; @@ -320,7 +320,7 @@ unsigned int accent_table_size = 68; /* These #defines have been copied from drivers/char/pc_keyb.h, by - * Martin Mares (mj@ucw.cz). + * Martin Mares (mj@ucw.cz). * converted to offsets by Till Straumann */ #define KBD_STATUS_REG 0x4 /* Status register (R) */ @@ -385,7 +385,7 @@ SPR_RO(PVR) #endif /* USE_KBD_SUPPORT */ -/* Early messages after mm init but before console init are kept in log +/* Early messages after mm init but before console init are kept in log * buffers. */ #define PAGE_LOG_CHARS (PAGE_SIZE-sizeof(int)-sizeof(u_long)-1) @@ -509,7 +509,7 @@ static void pfree(void* p) --global_index; } #endif - + void log_putc(const u_char c) { console_log *l; @@ -519,11 +519,11 @@ void log_putc(const u_char c) { if (!l) { l=__palloc(sizeof(console_log)); memset(l, 0, sizeof(console_log)); - if (!console_global_data.log) + if (!console_global_data.log) console_global_data.log = l; else { console_log *p; - for (p=console_global_data.log; + for (p=console_global_data.log; p->next; p=p->next); p->next = l; } @@ -534,7 +534,7 @@ void log_putc(const u_char c) { /* This puts is non standard since it does not automatically add a newline * at the end. So it is made private to avoid confusion in other files. */ -static +static void puts(const u_char *s) { char c; @@ -549,10 +549,10 @@ static void flush_log(void) { console_log *p, *next; if (console_global_data.vacuum_sent) { -#ifdef TRACE_FLUSH_LOG - printk("%d characters sent into oblivion before MM init!\n", +#ifdef TRACE_FLUSH_LOG + printk("%d characters sent into oblivion before MM init!\n", console_global_data.vacuum_sent); -#endif +#endif } for(p=console_global_data.log; p; p=next) { puts(p->data); @@ -570,7 +570,7 @@ void serial_putc(const u_char c) while ((INL_CONSOLE_INB(lsr) & LSR_THRE) == 0) ; INL_CONSOLE_OUTB(thr, c); } - + int serial_getc(void) { while ((INL_CONSOLE_INB(lsr) & LSR_DR) == 0) ; @@ -587,16 +587,16 @@ static void scroll(void) { int i; - memcpy ( (u_char *)vidmem, (u_char *)vidmem + console_global_data.cols * 2, + memcpy ( (u_char *)vidmem, (u_char *)vidmem + console_global_data.cols * 2, ( console_global_data.lines - 1 ) * console_global_data.cols * 2 ); - for ( i = ( console_global_data.lines - 1 ) * console_global_data.cols * 2; - i < console_global_data.lines * console_global_data.cols * 2; + for ( i = ( console_global_data.lines - 1 ) * console_global_data.cols * 2; + i < console_global_data.lines * console_global_data.cols * 2; i += 2 ) vidmem[i] = ' '; } /* - * cursor() sets an offset (0-1999) into the 80x25 text area + * cursor() sets an offset (0-1999) into the 80x25 text area */ static void cursor(int x, int y) @@ -608,7 +608,7 @@ cursor(int x, int y) vga_outb(0x15, pos); } -void +void vga_putc(const u_char c) { int x,y; @@ -628,7 +628,7 @@ vga_putc(const u_char c) } else if (c == '\r') { x = 0; } else { - vidmem [ ( x + console_global_data.cols * y ) * 2 ] = c; + vidmem [ ( x + console_global_data.cols * y ) * 2 ] = c; if ( ++x >= console_global_data.cols ) { x = 0; if ( ++y >= console_global_data.lines ) { @@ -765,7 +765,7 @@ static int kbd_get(int ms) { else return data; } - if (--ms < 0) return -1; + if (--ms < 0) return -1; #ifdef __BOOT__ boot_udelay(1000); #else @@ -776,7 +776,7 @@ static int kbd_get(int ms) { static void kbd_put(u_char c, int ms, int port) { while (kbd_inb(KBD_STATUS_REG) & KBD_STAT_IBF) { - if (--ms < 0) return; + if (--ms < 0) return; #ifdef __BOOT__ boot_udelay(1000); #else @@ -800,14 +800,14 @@ int kbdreset(void) /* Enable then reset the KB */ kbd_put(KBD_CCMD_KBD_ENABLE, 10, KBD_CNTL_REG); - + while (1) { kbd_put(KBD_CMD_RESET, 10, KBD_DATA_REG); c = kbd_get(1000); if (c == KBD_REPLY_ACK) break; if (c != KBD_REPLY_RESEND) return 2; } - + if (kbd_get(1000) != KBD_REPLY_POR) return 3; /* Disable the keyboard while setting up the controller */ @@ -816,7 +816,7 @@ int kbdreset(void) /* Enable interrupts and keyboard controller */ kbd_put(KBD_CCMD_WRITE_MODE, 10, KBD_CNTL_REG); - kbd_put(KBD_MODE_KBD_INT | KBD_MODE_SYS | + kbd_put(KBD_MODE_KBD_INT | KBD_MODE_SYS | KBD_MODE_DISABLE_MOUSE | KBD_MODE_KCC, 10, KBD_DATA_REG); @@ -833,30 +833,30 @@ int kbd_tstc(void) } #endif /* USE_KBD_SUPPORT */ -const struct console_io +const struct console_io vacuum_console_functions = { - vacuum_putc, - vacuum_getc, + vacuum_putc, + vacuum_getc, vacuum_tstc }; static const struct console_io log_console_functions = { - log_putc, - vacuum_getc, + log_putc, + vacuum_getc, vacuum_tstc } , serial_console_functions = { - serial_putc, - serial_getc, + serial_putc, + serial_getc, serial_tstc } #if defined(USE_KBD_SUPPORT) && defined(USE_VGA_SUPPORT) , vga_console_functions = { - vga_putc, - kbd_getc, + vga_putc, + kbd_getc, kbd_tstc } #endif @@ -866,7 +866,7 @@ console_io* curIo = (console_io*) &vacuum_console_functions; int select_console(ioType t) { static ioType curType = CONSOLE_VACUUM; - + switch (t) { case CONSOLE_VACUUM : curIo = (console_io*)&vacuum_console_functions; break; case CONSOLE_LOG : curIo = (console_io*)&log_console_functions; break; @@ -909,7 +909,7 @@ int printk(const char *fmt, ...) { int i; /* Should not be a problem with 8kB of stack */ char buf[1024]; - + va_start(args, fmt); i = k_vsprintf(buf, fmt, args); va_end(args); @@ -947,7 +947,7 @@ do { u32 t1, t2, t3; \ "=r" (num), "=&r" (t1), "=&r" (t2), "=&r"(t3), "=&b" (rmd) : \ "0" (num)); \ \ -} while(0); +} while(0); #define SIGN 1 /* unsigned/signed long */ #define LARGE 2 /* use 'ABCDEF' instead of 'abcdef' */ @@ -974,7 +974,7 @@ static char * number(char * str, int size, int type, u64 num) sign = '-'; num = -num; size--; - } + } } i = 0; @@ -988,7 +988,7 @@ static char * number(char * str, int size, int type, u64 num) } tmp[i++] = digits[rem]; } while (num != 0); - + size -= i; if (!(type&(ZEROPAD))) while(size-->0) @@ -1022,14 +1022,14 @@ int k_vsprintf(char *buf, const char *fmt, va_list args) *str++ = *fmt; continue; } - + /* process flags, only 0 padding needed */ flags = 0; if (*++fmt == '0' ) { flags |= ZEROPAD; fmt++; } - + /* get field width */ field_width = -1; if (is_digit(*fmt)) @@ -1092,14 +1092,14 @@ int k_vsprintf(char *buf, const char *fmt, va_list args) --fmt; continue; } - /* This ugly code tries to minimize the number of va_arg() - * since they expand to a lot of code on PPC under the SYSV - * calling conventions (but not with -mcall-aix which has + /* This ugly code tries to minimize the number of va_arg() + * since they expand to a lot of code on PPC under the SYSV + * calling conventions (but not with -mcall-aix which has * other problems). Arguments have at least the size of a * long allocated, and we use this fact to minimize bloat. * (and pointers are assimilated to unsigned long too). */ - if (sizeof(long long) > sizeof(long) && flags & LLONG) + if (sizeof(long long) > sizeof(long) && flags & LLONG) num = va_arg(args, unsigned long long); else { u_long n = va_arg(args, unsigned long); @@ -1109,10 +1109,10 @@ int k_vsprintf(char *buf, const char *fmt, va_list args) else n = (unsigned short) n; } else if (! flags & LONG) { - /* Here the compiler correctly removes this + /* Here the compiler correctly removes this * do nothing code on 32 bit PPC. */ - if (flags & SIGN) + if (flags & SIGN) n = (int) n; else n = (unsigned) n; diff --git a/c/src/lib/libbsp/powerpc/shared/console/uart.c b/c/src/lib/libbsp/powerpc/shared/console/uart.c index 5bdf8e110b..7fb5597873 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/uart.c +++ b/c/src/lib/libbsp/powerpc/shared/console/uart.c @@ -57,10 +57,10 @@ static struct uart_data uart_data[2] = { #define MAX_UARTS (sizeof(uart_data)/sizeof(uart_data[0])) #define SANITY_CHECK(uart) \ assert( MAX_UARTS > (unsigned)(uart) && uart_data[(uart)].ioBase != UART_UNSUPP ) -/* +/* * Macros to read/wirte register of uart, if configuration is * different just rewrite these macros - */ + */ static inline unsigned char uread(int uart, unsigned int reg) @@ -70,7 +70,7 @@ uread(int uart, unsigned int reg) } -static inline void +static inline void uwrite(int uart, int reg, unsigned int val) { out_8((unsigned char*)(uart_data[uart].ioBase + reg), val); @@ -111,7 +111,7 @@ inline void uartError(int uart, void *termiosPrivate) { unsigned char uartStatus,dummy; BSP_UartBreakCbProc h; - + uartStatus = uread(uart, LSR); dummy = uread(uart, RBR); if ((uartStatus & BI) && (h=uart_data[uart].breakCallback.handler)) @@ -122,7 +122,7 @@ inline void uartError(int uart, void *termiosPrivate) } #endif -/* +/* * Uart initialization, it is hardcoded to 8 bit, no parity, * one stop bit, FIFO, things to be changed * are baud rate and nad hw flow control, @@ -132,10 +132,10 @@ void BSP_uart_init(int uart, int baud, int hwFlow) { unsigned char tmp; - + /* Sanity check */ SANITY_CHECK(uart); - + switch(baud) { case 50: @@ -156,23 +156,23 @@ BSP_uart_init(int uart, int baud, int hwFlow) assert(0); return; } - + /* Set DLAB bit to 1 */ uwrite(uart, LCR, DLAB); - + /* Set baud rate */ - uwrite(uart, DLL, (BSPBaseBaud/baud) & 0xff); - uwrite(uart, DLM, ((BSPBaseBaud/baud) >> 8) & 0xff); + uwrite(uart, DLL, (BSPBaseBaud/baud) & 0xff); + uwrite(uart, DLM, ((BSPBaseBaud/baud) >> 8) & 0xff); /* 8-bit, no parity , 1 stop */ uwrite(uart, LCR, CHR_8_BITS); - + /* Set DTR, RTS and OUT2 high */ uwrite(uart, MCR, DTR | RTS | OUT_2); /* Enable FIFO */ - uwrite(uart, FCR, FIFO_EN | XMIT_RESET | RCV_RESET | RECEIVE_FIFO_TRIGGER12); + uwrite(uart, FCR, FIFO_EN | XMIT_RESET | RCV_RESET | RECEIVE_FIFO_TRIGGER12); /* Disable Interrupts */ uwrite(uart, IER, 0); @@ -188,7 +188,7 @@ BSP_uart_init(int uart, int baud, int hwFlow) return; } -/* +/* * Set baud */ void @@ -198,10 +198,10 @@ BSP_uart_set_baud(int uart, int baud) /* Sanity check */ SANITY_CHECK(uart); - - /* + + /* * This function may be called whenever TERMIOS parameters - * are changed, so we have to make sire that baud change is + * are changed, so we have to make sire that baud change is * indeed required */ @@ -217,14 +217,14 @@ BSP_uart_set_baud(int uart, int baud) uwrite(uart, MCR, mcr); uwrite(uart, IER, ier); - + return; } /* - * Enable/disable interrupts + * Enable/disable interrupts */ -void +void BSP_uart_intr_ctrl(int uart, int cmd) { @@ -282,7 +282,7 @@ BSP_uart_intr_ctrl(int uart, int cmd) assert(0); break; } - + return; } @@ -290,7 +290,7 @@ void BSP_uart_throttle(int uart) { unsigned int mcr; - + SANITY_CHECK(uart); if(!uart_data[uart].hwFlow) @@ -332,12 +332,12 @@ BSP_uart_unthrottle(int uart) * Status function, -1 if error * detected, 0 if no received chars available, * 1 if received char available, 2 if break - * is detected, it will eat break and error - * chars. It ignores overruns - we cannot do + * is detected, it will eat break and error + * chars. It ignores overruns - we cannot do * anything about - it execpt count statistics * and we are not counting it. */ -int +int BSP_uart_polled_status(int uart) { unsigned char val; @@ -355,7 +355,7 @@ BSP_uart_polled_status(int uart) if((val & (DR | OE | FE)) == 1) { - /* No error, character present */ + /* No error, character present */ return BSP_UART_STATUS_CHAR; } @@ -365,12 +365,12 @@ BSP_uart_polled_status(int uart) return BSP_UART_STATUS_NOCHAR; } - /* + /* * Framing or parity error * eat character */ uread(uart, RBR); - + return BSP_UART_STATUS_ERROR; } @@ -378,14 +378,14 @@ BSP_uart_polled_status(int uart) /* * Polled mode write function */ -void +void BSP_uart_polled_write(int uart, int val) { unsigned char val1; - + /* Sanity check */ SANITY_CHECK(uart); - + for(;;) { if((val1=uread(uart, LSR)) & THRE) @@ -406,7 +406,7 @@ BSP_uart_polled_write(int uart, int val) } uwrite(uart, THR, val & 0xff); - + return; } @@ -417,16 +417,16 @@ BSP_output_char_via_serial(const char val) if (val == '\n') BSP_uart_polled_write(BSPConsolePort,'\r'); } -/* +/* * Polled mode read function */ -int +int BSP_uart_polled_read(int uart) { unsigned char val; SANITY_CHECK(uart); - + for(;;) { if(uread(uart, LSR) & DR) @@ -434,13 +434,13 @@ BSP_uart_polled_read(int uart) break; } } - + val = uread(uart, RBR); return (int)(val & 0xff); } -unsigned +unsigned BSP_poll_char_via_serial() { return BSP_uart_polled_read(BSPConsolePort); @@ -453,7 +453,7 @@ uart_noop(const rtems_irq_connect_data *unused) } /* note that the IRQ names contain _ISA_ for legacy - * reasons. They can be any interrupt, depending + * reasons. They can be any interrupt, depending * on the particular BSP... */ @@ -469,7 +469,7 @@ static int doit(int uart, rtems_irq_hdl handler, int (*p)(const rtems_irq_connect_data*)) { rtems_irq_connect_data d={0}; - d.name = (uart == BSP_UART_COM1) ? + d.name = (uart == BSP_UART_COM1) ? BSP_ISA_UART_COM1_IRQ : BSP_ISA_UART_COM2_IRQ; d.off = d.on = uart_noop; d.isOn = uart_isr_is_on; @@ -482,7 +482,7 @@ BSP_uart_install_isr(int uart, rtems_irq_hdl handler) { return doit(uart, handler, BSP_install_rtems_irq_handler); } - + int BSP_uart_remove_isr(int uart, rtems_irq_hdl handler) { @@ -499,14 +499,14 @@ static char termios_tx_hold_com[2] = {0,0}; static volatile char termios_tx_hold_valid_com[2] = {0,0}; /* - * Set channel parameters + * Set channel parameters */ void BSP_uart_termios_set(int uart, void *ttyp) { unsigned char val; SANITY_CHECK(uart); - + if(uart_data[uart].hwFlow) { val = uread(uart, MSR); @@ -519,7 +519,7 @@ BSP_uart_termios_set(int uart, void *ttyp) } termios_tx_active_com[uart] = 0; termios_ttyp_com[uart] = ttyp; - termios_tx_hold_com[uart] = 0; + termios_tx_hold_com[uart] = 0; termios_tx_hold_valid_com[uart] = 0; return; @@ -538,7 +538,7 @@ BSP_uart_termios_write_com(int minor, const char *buf, int len) /* If there TX buffer is busy - something is royally screwed up */ /* assert((uread(BSP_UART_COM1, LSR) & THRE) != 0); */ - + if(termios_stopped_com[uart]) { @@ -566,7 +566,7 @@ BSP_uart_termios_write_com(int minor, const char *buf, int len) else if(!termios_tx_active_com[uart]) { termios_tx_active_com[uart] = 1; - uwrite(uart, IER, + uwrite(uart, IER, (RECEIVE_ENABLE | TRANSMIT_ENABLE | RECEIVER_LINE_ST_ENABLE @@ -589,7 +589,7 @@ BSP_uart_termios_isr_com(int uart) for(;;) { vect = uread(uart, IIR) & 0xf; - + switch(vect) { case MODEM_STATUS : @@ -625,9 +625,9 @@ BSP_uart_termios_isr_com(int uart) } return; case TRANSMITTER_HODING_REGISTER_EMPTY : - /* - * TX holding empty: we have to disable these interrupts - * if there is nothing more to send. + /* + * TX holding empty: we have to disable these interrupts + * if there is nothing more to send. */ ret = rtems_termios_dequeue_characters(termios_ttyp_com[uart], 1); @@ -670,7 +670,7 @@ BSP_uart_termios_isr_com(int uart) } } } - + void BSP_uart_termios_isr_com1(void) { diff --git a/c/src/lib/libbsp/powerpc/shared/console/uart.h b/c/src/lib/libbsp/powerpc/shared/console/uart.h index 087d151462..8396603d47 100644 --- a/c/src/lib/libbsp/powerpc/shared/console/uart.h +++ b/c/src/lib/libbsp/powerpc/shared/console/uart.h @@ -59,7 +59,7 @@ typedef struct BSP_UartBreakCbRec_ { /* * Command values for BSP_uart_intr_ctrl(), - * values are strange in order to catch errors + * values are strange in order to catch errors * with assert */ #define BSP_UART_INTR_CTRL_DISABLE (0) -- cgit v1.2.3