summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/arm/lpc22xx
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 05:09:41 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-11-30 05:09:41 +0000
commit359e5374164ccb2a66833354b412a859c144ea2f (patch)
tree6f065d7d6247bc255f43ddb0152fc26c50bd4f87 /c/src/lib/libcpu/arm/lpc22xx
parentWhitespace removal. (diff)
downloadrtems-359e5374164ccb2a66833354b412a859c144ea2f.tar.bz2
Whitespace removal.
Diffstat (limited to 'c/src/lib/libcpu/arm/lpc22xx')
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c20
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/include/lpc22xx.h6
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_asm.S6
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c12
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/irq/irq.c20
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/irq/irq.h14
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/timer/lpc_timer.h8
-rw-r--r--c/src/lib/libcpu/arm/lpc22xx/timer/timer.c6
8 files changed, 46 insertions, 46 deletions
diff --git a/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c b/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c
index b8859f7bfa..c277c8ee2f 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c
+++ b/c/src/lib/libcpu/arm/lpc22xx/clock/clockdrv.c
@@ -35,7 +35,7 @@ rtems_irq_connect_data clock_isr_data = {LPC22xx_INTERRUPT_TIMER0,
3, /* unused for ARM cpus */
0 }; /* unused for ARM cpus */
-/* If you follow the code, this is never used, so any value
+/* If you follow the code, this is never used, so any value
* should work
*/
#define CLOCK_VECTOR 0
@@ -72,16 +72,16 @@ rtems_irq_connect_data clock_isr_data = {LPC22xx_INTERRUPT_TIMER0,
* - enable it
* - clear any pending interrupts
*
- * Since you may want the clock always running, you can
+ * Since you may want the clock always running, you can
* enable interrupts here. If you do so, the clock_isr_on(),
- * clock_isr_off(), and clock_isr_is_on() functions can be
+ * clock_isr_off(), and clock_isr_is_on() functions can be
* NOPs.
*/
-
+
/* set timer to generate interrupt every rtems_configuration_get_microseconds_per_tick()
* MR0/(LPC22xx_Fpclk/(PR0+1)) = 10/1000 = 0.01s
- */
-
+ */
+
#define Clock_driver_support_initialize_hardware() \
do { \
T0TCR &= 0; /* disable and clear timer 0, set to */ \
@@ -95,7 +95,7 @@ rtems_irq_connect_data clock_isr_data = {LPC22xx_INTERRUPT_TIMER0,
} while (0)
/**
- * Do whatever you need to shut the clock down and remove the
+ * Do whatever you need to shut the clock down and remove the
* interrupt handler. Since this normally only gets called on
* RTEMS shutdown, you may not need to do anything other than
* remove the ISR.
@@ -110,12 +110,12 @@ rtems_irq_connect_data clock_isr_data = {LPC22xx_INTERRUPT_TIMER0,
uint32_t bsp_clock_nanoseconds_since_last_tick(void)
{
uint32_t clicks;
-
+
clicks = T0TC; /*T0TC is the 32bit time counter 0*/
-
+
return (uint32_t) (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000;
}
-
+
#define Clock_driver_nanoseconds_since_last_tick bsp_clock_nanoseconds_since_last_tick
diff --git a/c/src/lib/libcpu/arm/lpc22xx/include/lpc22xx.h b/c/src/lib/libcpu/arm/lpc22xx/include/lpc22xx.h
index d5a021a34a..da99635d00 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/include/lpc22xx.h
+++ b/c/src/lib/libcpu/arm/lpc22xx/include/lpc22xx.h
@@ -2,7 +2,7 @@
* Philips LPC22XX/LPC21xx Register definitions
*
* Copyright (c) 2006 by Ray <rayx.cn@gmail.com>
- *
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
@@ -318,7 +318,7 @@
#define CAN5TDA3 (*((volatile unsigned long *) 0xE0054058)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
#define CAN5TDB3 (*((volatile unsigned long *) 0xE005405C)) /* lpc2119\lpc2129\lpc2292\lpc2294 only */
-#ifdef CONFIG_ARCH_LPC22xx
+#ifdef CONFIG_ARCH_LPC22xx
#define CAN6MOD (*((volatile unsigned long *) 0xE0058000)) /* lpc2292\lpc2294 only */
#define CAN6CMR (*((volatile unsigned long *) 0xE0058004)) /* lpc2292\lpc2294 only */
#define CAN6GSR (*((volatile unsigned long *) 0xE0058008)) /* lpc2292\lpc2294 only */
@@ -455,7 +455,7 @@
/*
Register define for constant
-*/
+*/
#define REG_U0RBR 0xE000C000
#define REG_U1RBR 0xE0010000
diff --git a/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_asm.S b/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_asm.S
index d8181055c3..cec8a00b79 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_asm.S
+++ b/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_asm.S
@@ -12,8 +12,8 @@
* $Id$
*/
#define __asm__
-
-/*
+
+/*
* BSP specific interrupt handler for INT or FIQ. In here
* you do determine which interrupt happened and call its
* handler.
@@ -30,7 +30,7 @@ bsp_interrupt_dispatch :
* From source, determine offset into expanded vector table
* and load handler address into r0.
*/
-
+
ldr r0, =0xFFFFF030 /* Read the vector number */
ldr r0, [r0]
#ifdef __thumb__
diff --git a/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c b/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c
index db16373eac..4c5b7850ad 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c
+++ b/c/src/lib/libcpu/arm/lpc22xx/irq/bsp_irq_init.c
@@ -1,6 +1,6 @@
/*
* NXP/Philips LPC22XX/LPC21xx Interrupt handler
- * Ray 2007 <rayx.cn@gmail.com> to support LPC ARM
+ * Ray 2007 <rayx.cn@gmail.com> to support LPC ARM
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
@@ -16,8 +16,8 @@
extern void default_int_handler(void);
-/*
- * Interrupt system initialization. Disable interrupts, clear
+/*
+ * Interrupt system initialization. Disable interrupts, clear
* any that are pending.
*/
void BSP_rtems_irq_mngt_init(void)
@@ -33,7 +33,7 @@ void BSP_rtems_irq_mngt_init(void)
for (i=0; i<BSP_MAX_INT; i++) {
*(vectorTable + i) = (long)(default_int_handler);
}
-
+
/*
* Set IRQHandler
*/
@@ -56,10 +56,10 @@ void BSP_rtems_irq_mngt_init(void)
* In case we must find an ABORT error,
* enable the next lines and set a breakpoint
* in ABORTHandler.
- */
+ */
#if 1
DATA_ABORT_VECTOR_ADDR = 0xE59FF018;
-#endif
+#endif
/*
* Init the Vectored Interrupt Controller (VIC)
diff --git a/c/src/lib/libcpu/arm/lpc22xx/irq/irq.c b/c/src/lib/libcpu/arm/lpc22xx/irq/irq.c
index cf2287d070..dfc97f9135 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/irq/irq.c
+++ b/c/src/lib/libcpu/arm/lpc22xx/irq/irq.c
@@ -1,7 +1,7 @@
/*
* Philps LPC22XX Interrupt handler
- *
- * Copyright (c) 2006 by Ray<rayx.cn@gmail.com> to support LPC ARM
+ *
+ * Copyright (c) 2006 by Ray<rayx.cn@gmail.com> to support LPC ARM
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
@@ -37,11 +37,11 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
rtems_interrupt_level level;
rtems_irq_hdl *bsp_tbl;
int *vic_cntl;
-
+
bsp_tbl = (rtems_irq_hdl *)VICVectAddrBase;
vic_cntl=(int *)VICVectCntlBase;
-
+
if (!isValidInterrupt(irq->name)) {
return 0;
}
@@ -66,8 +66,8 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
*/
vic_cntl[irq->name] = 0x20 | irq->name;
- VICIntEnable |= 1 << irq->name;
-
+ VICIntEnable |= 1 << irq->name;
+
if(irq->on)
{
irq->on(irq);
@@ -75,11 +75,11 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
rtems_interrupt_enable(level);
-
+
return 1;
}
-/*
+/*
* Remove and interrupt handler
*
* You should only have to add the code to mask the interrupt.
@@ -91,7 +91,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
rtems_irq_hdl *bsp_tbl;
bsp_tbl = (rtems_irq_hdl *)&VICVectAddr0;
-
+
if (!isValidInterrupt(irq->name)) {
return 0;
}
@@ -116,7 +116,7 @@ int BSP_remove_rtems_irq_handler (const rtems_irq_connect_data* irq)
* restore the default irq value
*/
bsp_tbl[irq->name] = default_int_handler;
-
+
rtems_interrupt_enable(level);
return 1;
diff --git a/c/src/lib/libcpu/arm/lpc22xx/irq/irq.h b/c/src/lib/libcpu/arm/lpc22xx/irq/irq.h
index 428530958a..11f8de1bba 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/irq/irq.h
+++ b/c/src/lib/libcpu/arm/lpc22xx/irq/irq.h
@@ -1,8 +1,8 @@
/*
* Interrupt handler Header file
*
- * Copyright (c) 2006 by Ray <rayx.cn@gmail.com> to support LPC ARM
- *
+ * Copyright (c) 2006 by Ray <rayx.cn@gmail.com> to support LPC ARM
+ *
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
@@ -25,7 +25,7 @@ extern "C" {
/*
* Include some preprocessor value also used by assember code
*/
-
+
#include <rtems.h>
#include <lpc22xx.h>
@@ -66,7 +66,7 @@ extern void default_int_handler();
#define LPC22xx_INTERRUPT_CAN4RX 27 /* CAN2 Rx interrupt */
#define BSP_MAX_INT 28
-#define UNDEFINED_INSTRUCTION_VECTOR_ADDR (*(u_long *)0x00000004L)
+#define UNDEFINED_INSTRUCTION_VECTOR_ADDR (*(u_long *)0x00000004L)
#define SOFTWARE_INTERRUPT_VECTOR_ADDR (*(u_long *)0x00000008L)
#define PREFETCH_ABORT_VECTOR_ADDR (*(u_long *)0x0000000CL)
#define DATA_ABORT_VECTOR_ADDR (*(u_long *)0x00000010L)
@@ -77,7 +77,7 @@ extern void default_int_handler();
#define IRQ_ISR_ADDR (*(u_long *)0x00000038L)
#define FIQ_ISR_ADDR (*(u_long *)0x0000003CL)
-
+
typedef unsigned char rtems_irq_level;
typedef unsigned char rtems_irq_trigger;
@@ -91,7 +91,7 @@ typedef int (*rtems_irq_is_enabled)(const struct __rtems_irq_connect_data__*);
//extern rtems_irq_hdl bsp_vector_table[BSP_MAX_INT];
#define VECTOR_TABLE VICVectAddrBase
-
+
typedef struct __rtems_irq_connect_data__ {
/* IRQ line */
rtems_irq_number name;
@@ -127,7 +127,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/lpc22xx/timer/lpc_timer.h b/c/src/lib/libcpu/arm/lpc22xx/timer/lpc_timer.h
index 2e58da4e6b..364812ddb8 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/timer/lpc_timer.h
+++ b/c/src/lib/libcpu/arm/lpc22xx/timer/lpc_timer.h
@@ -11,16 +11,16 @@
#define TCR_ENABLE_BIT 0
#define TCR_RESET_BIT 1
-// The channel name which is used in matching, in fact they represent
-// corresponding Match Register
+// The channel name which is used in matching, in fact they represent
+// corresponding Match Register
#define CH_MAXNUM 4
#define CH0 0
#define CH1 1
#define CH2 2
#define CH3 3
-// The channel name which is used in capturing, in fact they represent
-// corresponding Capture Register
+// The channel name which is used in capturing, in fact they represent
+// corresponding Capture Register
#define CPCH_MAXNUM 4
#define CPCH0 0
#define CPCH1 1
diff --git a/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c b/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c
index 91f6df408b..0ac8ab32c1 100644
--- a/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c
+++ b/c/src/lib/libcpu/arm/lpc22xx/timer/timer.c
@@ -2,7 +2,7 @@
* RTL22xx board Timer driver
*
* This uses Timer1 for timing measurments.
- *
+ *
* By Ray xu<rayx.cn@gmail.com>, modify form Mc9328mxl RTEMS DSP
*
* The license and distribution terms for this file may be
@@ -16,7 +16,7 @@
* benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
* the number of microseconds since benchmark_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.
*
* $Id$
@@ -31,7 +31,7 @@ uint32_t g_freq;
bool benchmark_timer_find_average_overhead;
-
+
/*
* Set up Timer 1
*/