diff options
Diffstat (limited to 'c/src/lib/libcpu/arm/pxa255')
-rwxr-xr-x | c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c | 50 | ||||
-rwxr-xr-x | c/src/lib/libcpu/arm/pxa255/include/ffuart.h | 2 | ||||
-rwxr-xr-x | c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_asm.S | 4 | ||||
-rwxr-xr-x | c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c | 6 | ||||
-rwxr-xr-x | c/src/lib/libcpu/arm/pxa255/irq/irq.c | 34 | ||||
-rwxr-xr-x | c/src/lib/libcpu/arm/pxa255/irq/irq.h | 6 | ||||
-rwxr-xr-x | c/src/lib/libcpu/arm/pxa255/timer/timer.c | 6 |
7 files changed, 54 insertions, 54 deletions
diff --git a/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c b/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c index cbcd44ed2a..cf01feea7f 100755 --- a/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c +++ b/c/src/lib/libcpu/arm/pxa255/ffuart/ffuart.c @@ -31,8 +31,8 @@ static void ffuart_write_polled(int minor, char c); static int ffuart_set_attributes(int minor, const struct termios *t); /* Pointers to functions for handling the UART. */ -console_fns ffuart_fns = -{ +console_fns ffuart_fns = +{ libchip_serial_default_probe, ffuart_first_open, ffuart_last_close, @@ -45,23 +45,23 @@ console_fns ffuart_fns = }; -/* +/* * This is called the first time each device is opened. Since - * the driver is polled, we don't have to do anything. If the driver - * were interrupt driven, we'd enable interrupts here. + * the driver is polled, we don't have to do anything. If the driver + * were interrupt driven, we'd enable interrupts here. */ -static int ffuart_first_open(int major, int minor, void *arg) +static int ffuart_first_open(int major, int minor, void *arg) { return 0; } -/* +/* * This is called the last time each device is closed. Since - * the driver is polled, we don't have to do anything. If the driver - * were interrupt driven, we'd disable interrupts here. + * the driver is polled, we don't have to do anything. If the driver + * were interrupt driven, we'd disable interrupts here. */ -static int ffuart_last_close(int major, int minor, void *arg) +static int ffuart_last_close(int major, int minor, void *arg) { return 0; } @@ -73,7 +73,7 @@ static int ffuart_last_close(int major, int minor, void *arg) * return -1 if there's no data, otherwise return * the character in lowest 8 bits of returned int. */ -static int ffuart_read(int minor) +static int ffuart_read(int minor) { char c; console_tbl *console_entry; @@ -90,15 +90,15 @@ static int ffuart_read(int minor) if (!(ffuart->lsr & FULL_RECEIVE)) { return -1; } - - c = ffuart->rbr & 0xff; - + + c = ffuart->rbr & 0xff; + return c; } -/* - * Write buffer to UART +/* + * Write buffer to UART * * return 1 on success, -1 on error */ @@ -124,7 +124,7 @@ static int ffuart_write(int minor, const char *buf, int len) break; } } - + c = (char) buf[i]; #if ON_SKYEYE != 1 if(c=='\n'){ @@ -140,14 +140,14 @@ static int ffuart_write(int minor, const char *buf, int len) } #endif ffuart->rbr = c; - + /* the TXRDY flag does not seem to update right away (is this true?) */ /* so we wait a bit before continuing */ for (x = 0; x < 100; x++) { dbg_dly++; /* using a global so this doesn't get optimized out */ } } - + return 1; } @@ -155,7 +155,7 @@ static int ffuart_write(int minor, const char *buf, int len) static void ffuart_init(int minor) { - + console_tbl *console_entry; ffuart_reg_t *ffuart; unsigned int divisor; @@ -163,11 +163,11 @@ static void ffuart_init(int minor) console_entry = BSP_get_uart_from_minor(minor); - + if (console_entry == NULL) { return; } - + ffuart = (ffuart_reg_t *)console_entry->ulCtrlPort1; ffuart->lcr |= DLAB; /*Set the Bound*/ @@ -191,7 +191,7 @@ static void ffuart_write_polled(int minor, char c) } /* This is for setting baud rate, bits, etc. */ -static int ffuart_set_attributes(int minor, const struct termios *t) +static int ffuart_set_attributes(int minor, const struct termios *t) { return 0; } @@ -202,7 +202,7 @@ static int ffuart_set_attributes(int minor, const struct termios *t) * functions use them instead. */ /***********************************************************************/ -/* +/* * Read from UART. This is used in the exit code, and can't * rely on interrupts. */ @@ -213,7 +213,7 @@ int ffuart_poll_read(int minor) /* - * Write a character to the console. This is used by printk() and + * Write a character to the console. This is used by printk() and * maybe other low level functions. It should not use interrupts or any * RTEMS system calls. It needs to be very simple */ diff --git a/c/src/lib/libcpu/arm/pxa255/include/ffuart.h b/c/src/lib/libcpu/arm/pxa255/include/ffuart.h index db01efc296..6ca5879987 100755 --- a/c/src/lib/libcpu/arm/pxa255/include/ffuart.h +++ b/c/src/lib/libcpu/arm/pxa255/include/ffuart.h @@ -47,4 +47,4 @@ typedef struct { #define FULL_RECEIVE 0x01 #endif - + diff --git a/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_asm.S b/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_asm.S index ada3b67821..17d5e47f1d 100755 --- a/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_asm.S +++ b/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_asm.S @@ -1,7 +1,7 @@ /* * PXA255 Interrupt handler by Yang Xi <hiyangxi@gmail.com> * Copyright (c) 2004 by Jay Monkman <jtm@lopgindog.com> - * + * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. @@ -10,7 +10,7 @@ */ #define __asm__ - + .globl bsp_interrupt_dispatch bsp_interrupt_dispatch : /* diff --git a/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c b/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c index ebdaf5bd18..0470c88ce9 100755 --- a/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c +++ b/c/src/lib/libcpu/arm/pxa255/irq/bsp_irq_init.c @@ -1,7 +1,7 @@ /* * PXA255 interrupt controller by Yang Xi <hiyangxi@gmail.com> * Copyright (c) 2004 by Jay Monkman <jtm@lopgindog.com> - * + * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. @@ -20,8 +20,8 @@ void dummy_handler(uint32_t vector) void (*IRQ_table[PRIMARY_IRQS])(uint32_t vector); -/* - * Interrupt system initialization. Disable interrupts, clear +/* + * Interrupt system initialization. Disable interrupts, clear * any that are pending. */ void BSP_rtems_irq_mngt_init(void) diff --git a/c/src/lib/libcpu/arm/pxa255/irq/irq.c b/c/src/lib/libcpu/arm/pxa255/irq/irq.c index 859b6834c0..2bfcadc98f 100755 --- a/c/src/lib/libcpu/arm/pxa255/irq/irq.c +++ b/c/src/lib/libcpu/arm/pxa255/irq/irq.c @@ -1,7 +1,7 @@ /* * PXA255 Interrupt handler by Yang Xi <hiyangxi@gmail.com> * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com> - * + * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. @@ -32,54 +32,54 @@ static int isValidInterrupt(int irq) int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq) { rtems_interrupt_level level; - + if (!isValidInterrupt(irq->name)) { return 0; } - + /* - * Check if default handler is actually connected. If not, issue - * an error. Note: irq->name is a number corresponding to the - * interrupt number . We - * convert it to a long word offset to get source's vector register + * Check if default handler is actually connected. If not, issue + * an error. Note: irq->name is a number corresponding to the + * interrupt number . We + * convert it to a long word offset to get source's vector register */ if (IRQ_table[irq->name] != dummy_handler) { return 0; } - + _CPU_ISR_Disable(level); - + /* * store the new handler */ IRQ_table[irq->name] = irq->hdl; - + /* * unmask interrupt */ XSCALE_INT_ICMR = XSCALE_INT_ICMR | 1 << irq->name; - + /* * Enable interrupt on device */ if(irq->on) { irq->on(irq); } - + _CPU_ISR_Enable(level); - + return 1; } -/* +/* * Remove and interrupt handler */ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq) { rtems_interrupt_level level; - + if (!isValidInterrupt(irq->name)) { return 0; } @@ -96,7 +96,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq) * mask interrupt */ XSCALE_INT_ICMR = XSCALE_INT_ICMR & (~(1 << irq->name)); - + /* * Disable interrupt on device */ @@ -108,7 +108,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq) * restore the default irq value */ IRQ_table[irq->name] = dummy_handler; - + _CPU_ISR_Enable(level); return 1; diff --git a/c/src/lib/libcpu/arm/pxa255/irq/irq.h b/c/src/lib/libcpu/arm/pxa255/irq/irq.h index d685269ee6..dcc86384c7 100755 --- a/c/src/lib/libcpu/arm/pxa255/irq/irq.h +++ b/c/src/lib/libcpu/arm/pxa255/irq/irq.h @@ -1,7 +1,7 @@ /* * Interrupt handler Header file for PXA By Yang Xi <hiyangxi@gmail.com> * Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com> - * + * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. @@ -21,7 +21,7 @@ extern "C" { /* * Include some preprocessor value also used by assember code */ - + #include <rtems.h> #include <pxa255.h> @@ -77,7 +77,7 @@ void BSP_rtems_irq_mngt_init(); int BSP_install_rtems_irq_handler (const rtems_irq_connect_data*); /* - * function to get the current RTEMS irq handler for ptr->name. + * function to get the current RTEMS irq handler for ptr->name. */ int BSP_get_current_rtems_irq_handler (rtems_irq_connect_data* ptr); diff --git a/c/src/lib/libcpu/arm/pxa255/timer/timer.c b/c/src/lib/libcpu/arm/pxa255/timer/timer.c index d4162818fa..d174d4756f 100755 --- a/c/src/lib/libcpu/arm/pxa255/timer/timer.c +++ b/c/src/lib/libcpu/arm/pxa255/timer/timer.c @@ -8,7 +8,7 @@ * Timer_initialize() and Read_timer(). Read_timer() usually returns * the number of microseconds since Timer_initialize() exitted. * - * It is important that the timer start/stop overhead be determined + * It is important that the timer start/stop overhead be determined * when porting or modifying this code. * * The license and distribution terms for this file may be @@ -29,7 +29,7 @@ bool benchmark_timer_find_average_overhead; bool benchmark_timer_is_initialized = false; /* - * Use the timer count register to measure. + * Use the timer count register to measure. * The frequency of it is 3.4864MHZ * The longest period we are able to capture is 4G/3.4864MHZ */ @@ -62,7 +62,7 @@ int benchmark_timer_read(void) total -= tick_time; else total += 0xffffffff - tick_time; /*Round up but not overflow*/ - + if ( benchmark_timer_find_average_overhead == true ) return total; /*Counter cycles*/ |