summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/arm/mc9328mxl
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libcpu/arm/mc9328mxl')
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c10
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h10
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S6
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c6
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c10
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h114
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c14
7 files changed, 85 insertions, 85 deletions
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c b/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
index d54cf74543..1f18e1ce76 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
+++ b/c/src/lib/libcpu/arm/mc9328mxl/clock/clockdrv.c
@@ -37,12 +37,12 @@ rtems_irq_connect_data clock_isr_data = {
.isOn = clock_isr_is_on,
};
-/* 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
-
+
/**
* When we get the clock interrupt
* - clear the interrupt bit?
@@ -72,9 +72,9 @@ rtems_irq_connect_data clock_isr_data = {
* - 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.
*/
#define Clock_driver_support_initialize_hardware() \
@@ -95,7 +95,7 @@ rtems_irq_connect_data clock_isr_data = {
} 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.
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h b/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h
index 6aebf0928c..4a3dc03544 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h
+++ b/c/src/lib/libcpu/arm/mc9328mxl/include/mc9328mxl.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2003 by Cogent Computer Systems
* Written 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
*
@@ -75,12 +75,12 @@
#define MC9328MXL_TMR_TCTL_CAP_FALL (2 << 6)
#define MC9328MXL_TMR_TCTL_CAP_ANY (3 << 6)
#define MC9328MXL_TMR_TCTL_OM (bit(5))
-#define MC9328MXL_TMR_TCTL_IRQEN (bit(4))
+#define MC9328MXL_TMR_TCTL_IRQEN (bit(4))
#define MC9328MXL_TMR_TCTL_CLKSRC_STOP (0 << 1)
#define MC9328MXL_TMR_TCTL_CLKSRC_PCLK1 (1 << 1)
#define MC9328MXL_TMR_TCTL_CLKSRC_PCLK_DIV16 (2 << 1)
#define MC9328MXL_TMR_TCTL_CLKSRC_TIN (3 << 1)
-#define MC9328MXL_TMR_TCTL_CLKSRC_32KHX (4 << 1)
+#define MC9328MXL_TMR_TCTL_CLKSRC_32KHX (4 << 1)
#define MC9328MXL_TMR_TCTL_TEN (bit(0))
#define MC9328MXL_UART1_RXD (*((volatile uint32_t *)((MC9328MXL_UART1_BASE) + 0x00)))
@@ -221,7 +221,7 @@ typedef struct {
#define MC9328MXL_UART_CR3_INVT (bit(1))
#define MC9328MXL_UART_CR3_BPEN (bit(0))
-#define MC9328MXL_UART_CR4_CTSTL(_x_) (((_x_) & 0x3f) << 10)
+#define MC9328MXL_UART_CR4_CTSTL(_x_) (((_x_) & 0x3f) << 10)
#define MC9328MXL_UART_CR4_INVR (bit(9))
#define MC9328MXL_UART_CR4_ENIRI (bit(8))
#define MC9328MXL_UART_CR4_WKEN (bit(7))
@@ -313,7 +313,7 @@ typedef struct {
#define MC9328MXL_PLL_SPCTL_MFI_SHIFT (10)
#define MC9328MXL_PLL_SPCTL_MFN_MASK (0x000003ff)
#define MC9328MXL_PLL_SPCTL_MFN_SHIFT (0)
-
+
#define MC9328MXL_GPIOA_DDIR (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x00)))
#define MC9328MXL_GPIOA_OCR1 (*((volatile uint32_t *)((MC9328MXL_GPIOA_BASE) + 0x04)))
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S b/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S
index bcb3ba0e19..c2a33c4b22 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_asm.S
+++ b/c/src/lib/libcpu/arm/mc9328mxl/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.
@@ -29,7 +29,7 @@ bsp_interrupt_dispatch :
ldr r1, [r0]
mov r1, r1, LSR #16 /* get the NIVECTOR into 16 LSbits */
- /* find the ISR's address based on the vector */
+ /* find the ISR's address based on the vector */
ldr r0, =bsp_vector_table
mov r1, r1, LSL #3 /* Shift vector to get offset into table */
add r1, r0, r1 /* r1 has address of vector entry */
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c b/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c
index fd96778851..90e854440e 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c
+++ b/c/src/lib/libcpu/arm/mc9328mxl/irq/bsp_irq_init.c
@@ -2,7 +2,7 @@
* Motorola MC9328MXL Interrupt handler
*
* 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
*
@@ -17,8 +17,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)
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c b/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c
index 81a9c8ee72..36d23dc1d9 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c
+++ b/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.c
@@ -2,7 +2,7 @@
* Motorola MC9328MXL Interrupt handler
*
* 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
*
@@ -38,7 +38,7 @@ 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;
}
@@ -65,13 +65,13 @@ int BSP_install_rtems_irq_handler (const rtems_irq_connect_data* irq)
{
irq->on(irq);
}
-
+
rtems_interrupt_enable(level);
-
+
return 1;
}
-/*
+/*
* Remove and interrupt handler
*
* You should only have to add the code to mask the interrupt.
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h b/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h
index 04a5f2a00b..6cc5c22f07 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h
+++ b/c/src/lib/libcpu/arm/mc9328mxl/irq/irq.h
@@ -2,7 +2,7 @@
* Interrupt handler Header file
*
* 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
*
@@ -27,7 +27,7 @@ extern "C" {
/*
* Include some preprocessor value also used by assember code
*/
-
+
#include <rtems.h>
#include <mc9328mxl.h>
@@ -37,72 +37,72 @@ extern void default_int_handler();
**********************************************************************/
/* possible interrupt sources on the MC9328MXL */
-#define BSP_INT_UART3_PFERR 0
-#define BSP_INT_UART3_RTS 1
-#define BSP_INT_UART3_DTR 2
-#define BSP_INT_UART3_UARTC 3
-#define BSP_INT_UART3_TX 4
-#define BSP_INT_PEN_UP 5
+#define BSP_INT_UART3_PFERR 0
+#define BSP_INT_UART3_RTS 1
+#define BSP_INT_UART3_DTR 2
+#define BSP_INT_UART3_UARTC 3
+#define BSP_INT_UART3_TX 4
+#define BSP_INT_PEN_UP 5
#define BSP_INT_CSI 6
-#define BSP_INT_MMA_MAC 7
+#define BSP_INT_MMA_MAC 7
#define BSP_INT_MMA 8
#define BSP_INT_COMP 9
-#define BSP_INT_MSIRQ 10
-#define BSP_INT_GPIO_PORTA 11
-#define BSP_INT_GPIO_PORTB 12
-#define BSP_INT_GPIO_PORTC 13
-#define BSP_INT_LCDC 14
-#define BSP_INT_SIM_IRQ 15
-#define BSP_INT_SIM_DATA 16
+#define BSP_INT_MSIRQ 10
+#define BSP_INT_GPIO_PORTA 11
+#define BSP_INT_GPIO_PORTB 12
+#define BSP_INT_GPIO_PORTC 13
+#define BSP_INT_LCDC 14
+#define BSP_INT_SIM_IRQ 15
+#define BSP_INT_SIM_DATA 16
#define BSP_INT_RTC 17
-#define BSP_INT_RTC_SAM 18
-#define BSP_INT_UART2_PFERR 19
-#define BSP_INT_UART2_RTS 20
-#define BSP_INT_UART2_DTR 21
-#define BSP_INT_UART2_UARTC 22
-#define BSP_INT_UART2_TX 23
-#define BSP_INT_UART2_RX 24
-#define BSP_INT_UART1_PFERR 25
-#define BSP_INT_UART1_RTS 26
-#define BSP_INT_UART1_DTR 27
-#define BSP_INT_UART1_UARTC 28
-#define BSP_INT_UART1_TX 29
-#define BSP_INT_UART1_RX 30
-#define BSP_INT_RES31 31
-#define BSP_INT_RES32 32
-#define BSP_INT_PEN_DATA 33
+#define BSP_INT_RTC_SAM 18
+#define BSP_INT_UART2_PFERR 19
+#define BSP_INT_UART2_RTS 20
+#define BSP_INT_UART2_DTR 21
+#define BSP_INT_UART2_UARTC 22
+#define BSP_INT_UART2_TX 23
+#define BSP_INT_UART2_RX 24
+#define BSP_INT_UART1_PFERR 25
+#define BSP_INT_UART1_RTS 26
+#define BSP_INT_UART1_DTR 27
+#define BSP_INT_UART1_UARTC 28
+#define BSP_INT_UART1_TX 29
+#define BSP_INT_UART1_RX 30
+#define BSP_INT_RES31 31
+#define BSP_INT_RES32 32
+#define BSP_INT_PEN_DATA 33
#define BSP_INT_PWM 34
-#define BSP_INT_MMC_IRQ 35
-#define BSP_INT_SSI2_TX 36
-#define BSP_INT_SSI2_RX 37
-#define BSP_INT_SSI2_ERR 38
+#define BSP_INT_MMC_IRQ 35
+#define BSP_INT_SSI2_TX 36
+#define BSP_INT_SSI2_RX 37
+#define BSP_INT_SSI2_ERR 38
#define BSP_INT_I2C 39
#define BSP_INT_SPI2 40
#define BSP_INT_SPI1 41
-#define BSP_INT_SSI_TX 42
-#define BSP_INT_SSI_TX_ERR 43
-#define BSP_INT_SSI_RX 44
-#define BSP_INT_SSI_RX_ERR 45
-#define BSP_INT_TOUCH 46
-#define BSP_INT_USBD0 47
-#define BSP_INT_USBD1 48
-#define BSP_INT_USBD2 49
-#define BSP_INT_USBD3 50
-#define BSP_INT_USBD4 51
-#define BSP_INT_USBD5 52
-#define BSP_INT_USBD6 53
-#define BSP_INT_UART3_RX 54
-#define BSP_INT_BTSYS 55
-#define BSP_INT_BTTIM 56
-#define BSP_INT_BTWUI 57
-#define BSP_INT_TIMER2 58
-#define BSP_INT_TIMER1 59
-#define BSP_INT_DMA_ERR 60
+#define BSP_INT_SSI_TX 42
+#define BSP_INT_SSI_TX_ERR 43
+#define BSP_INT_SSI_RX 44
+#define BSP_INT_SSI_RX_ERR 45
+#define BSP_INT_TOUCH 46
+#define BSP_INT_USBD0 47
+#define BSP_INT_USBD1 48
+#define BSP_INT_USBD2 49
+#define BSP_INT_USBD3 50
+#define BSP_INT_USBD4 51
+#define BSP_INT_USBD5 52
+#define BSP_INT_USBD6 53
+#define BSP_INT_UART3_RX 54
+#define BSP_INT_BTSYS 55
+#define BSP_INT_BTTIM 56
+#define BSP_INT_BTWUI 57
+#define BSP_INT_TIMER2 58
+#define BSP_INT_TIMER1 59
+#define BSP_INT_DMA_ERR 60
#define BSP_INT_DMA 61
-#define BSP_INT_GPIO_PORTD 62
+#define BSP_INT_GPIO_PORTD 62
#define BSP_INT_WDT 63
#define BSP_MAX_INT 64
-
+
typedef struct {
rtems_irq_hdl vector;
rtems_irq_hdl_param data;
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
index f97ba13751..46565669e6 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
+++ b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 2004 Cogent Computer Systems
* Written 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
*
@@ -17,7 +17,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$
@@ -32,13 +32,13 @@ uint32_t g_freq;
bool benchmark_timer_find_average_overhead;
-
+
/*
* Set up Timer 1
*/
void benchmark_timer_initialize( void )
{
- MC9328MXL_TMR2_TCTL = (MC9328MXL_TMR_TCTL_CLKSRC_PCLK1 |
+ MC9328MXL_TMR2_TCTL = (MC9328MXL_TMR_TCTL_CLKSRC_PCLK1 |
MC9328MXL_TMR_TCTL_FRR |
MC9328MXL_TMR_TCTL_TEN);
/* set prescaler to 1 (register value + 1) */ \
@@ -80,12 +80,12 @@ int benchmark_timer_read( void )
total = (t - g_start);
/* convert to nanoseconds */
- total = (total * 1000)/ g_freq;
+ total = (total * 1000)/ g_freq;
if ( benchmark_timer_find_average_overhead == 1 ) {
- return (int) total;
+ return (int) total;
} else if ( total < LEAST_VALID ) {
- return 0;
+ return 0;
}
/*
* Somehow convert total into microseconds