summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/mpc8260ads
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-15 09:31:41 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-16 08:58:48 -0500
commit7ec9bd5917d71f594da5890bc35aaec07352d5c1 (patch)
treee97dec9bc13de80b35cd582ac08266e173be6d0b /c/src/lib/libbsp/powerpc/mpc8260ads
parentlibcpu/arm/at91rm9200/usart/usart.c: Fix warnings (diff)
downloadrtems-7ec9bd5917d71f594da5890bc35aaec07352d5c1.tar.bz2
mpc8260 libcpu and mpc6260ads BSP: Fix warnings
Diffstat (limited to 'c/src/lib/libbsp/powerpc/mpc8260ads')
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/console/console.c28
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h20
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c4
-rw-r--r--c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c59
4 files changed, 46 insertions, 65 deletions
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/console/console.c b/c/src/lib/libbsp/powerpc/mpc8260ads/console/console.c
index a6497aa0f4..9a020c82fe 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/console/console.c
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/console/console.c
@@ -1,6 +1,4 @@
/*
- * console.c
- *
* This file contains the MBX8xx termios serial I/O package.
* Only asynchronous I/O is supported.
*
@@ -14,6 +12,16 @@
* SCC3 /dev/tty3 4
* SCC4 /dev/tty4 5
*
+ * The SCCs and SMCs on the eval board are assigned as follows
+ *
+ * Channel Device Minor Termios
+ * SMC1 /dev/tty3 4 no
+ * SMC2 /dev/tty4 5 no
+ * SCC1 /dev/tty0 0 no
+ * SCC2 /dev/console 1 yes
+ * SCC3 /dev/tty1 2 no * USED FOR NETWORK I/F
+ * SCC4 /dev/tty2 3 no * USED FOR NETWORK I/F
+ *
* All ports support termios. The use of termios is recommended for real-time
* applications. Termios provides buffering and input processing. When not
* using termios, processing is limited to the substitution of LF for CR on
@@ -64,7 +72,9 @@
* the sub-devices using minor device numbers. It is not possible to have
* other protocols running on the other ports when this driver is used as
* currently written.
- *
+ */
+
+/*
* Based on code (alloc860.c in eth_comm port) by
* Jay Monkman (jmonkman@frasca.com),
* Copyright (C) 1998 by Frasca International, Inc.
@@ -75,17 +85,6 @@
*
* Modifications by Andy Dachs <iwe@fsmal.net> for MPC8260
* support.
- *
- * The SCCs and SMCs on the eval board are assigned as follows
- *
- * Channel Device Minor Termios
- * SMC1 /dev/tty3 4 no
- * SMC2 /dev/tty4 5 no
- * SCC1 /dev/tty0 0 no
- * SCC2 /dev/console 1 yes
- * SCC3 /dev/tty1 2 no * USED FOR NETWORK I/F
- * SCC4 /dev/tty2 3 no * USED FOR NETWORK I/F
- *
*/
#include <stdarg.h>
#include <stdio.h>
@@ -451,7 +450,6 @@ rtems_device_driver console_control(
/*
* Support routine for console-generic
*/
-
int mbx8xx_console_get_configuration(void)
{
#if UARTS_IO_MODE == 1
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h b/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h
index 781e5d7df7..a3511fdb5c 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/include/bsp.h
@@ -1,10 +1,9 @@
-/* bsp.h
- *
+/*
* This include file contains all board IO definitions.
- *
- * XXX : put yours in here
- *
- * COPYRIGHT (c) 1989-1999.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -46,12 +45,6 @@ typedef struct bcsr
} BCSR;
-#define UART1_E 0x02000002 /* bit 6 of BCSR1 */
-#define UART2_E 0x01000001 /* bit 7 of BCSR1 */
-
-#define GP0_LED 0x02000002 /* bit 6 of BCSR0 */
-#define GP1_LED 0x01000001 /* bit 7 of BCSR0 */
-
/*
* Network driver configuration
*/
@@ -84,6 +77,9 @@ extern char M8260DefaultWatchdogFeeder;
* Prototypes for items shared across file boundaries in the BSP
*/
extern uint32_t bsp_serial_per_sec;
+void *bsp_idle_thread( uintptr_t ignored );
+void cpu_init(void);
+int mbx8xx_console_get_configuration(void);
#ifdef __cplusplus
}
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c b/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c
index 0d8fb26deb..52465ec2a7 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/irq/irq.c
@@ -211,7 +211,7 @@ volatile unsigned int maxLoop = 0;
/*
* High level IRQ handler called from shared_raw_irq_code_entry
*/
-int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned excNum)
+static int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned excNum)
{
register unsigned int irq;
#if 0
@@ -310,7 +310,7 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned excNum)
/*
* Initialize CPM interrupt management
*/
-void
+static void
BSP_CPM_irq_init(void)
{
m8260.simr_l = 0;
diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
index 3f0ccca645..3aa165961e 100644
--- a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
+++ b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c
@@ -49,6 +49,12 @@
#include <string.h>
+#define UART1_E 0x02000002 /* bit 6 of BCSR1 */
+#define UART2_E 0x01000001 /* bit 7 of BCSR1 */
+
+#define GP0_LED 0x02000002 /* bit 6 of BCSR0 */
+#define GP1_LED 0x01000001 /* bit 7 of BCSR0 */
+
SPR_RW(SPRG1)
/*
@@ -66,83 +72,64 @@ uint32_t bsp_timer_average_overhead; /* Average overhead of timer in ticks */
uint32_t bsp_timer_least_valid; /* Least valid number from timer */
bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
-void _BSP_GPLED1_on(void);
-void _BSP_GPLED0_on(void);
-void cpu_init(void);
-
extern char IntrStack_start [];
extern char intrStack [];
-void BSP_panic(char *s)
-{
- _BSP_GPLED1_on();
- printk("%s PANIC %s\n",_RTEMS_version, s);
- __asm__ __volatile ("sc");
-}
-
-void _BSP_Fatal_error(unsigned int v)
-{
- _BSP_GPLED0_on();
- _BSP_GPLED1_on();
- printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
- __asm__ __volatile ("sc");
-}
-
-void _BSP_GPLED0_on(void)
+static void _BSP_GPLED0_on(void)
{
BCSR *csr;
csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
csr->bcsr0 &= ~GP0_LED; /* Turn on GP0 LED */
}
-void _BSP_GPLED0_off(void)
+static void _BSP_GPLED0_off(void)
{
BCSR *csr;
csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
csr->bcsr0 |= GP0_LED; /* Turn off GP0 LED */
}
-void _BSP_GPLED1_on(void)
+static void _BSP_GPLED1_on(void)
{
BCSR *csr;
csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
csr->bcsr0 &= ~GP1_LED; /* Turn on GP1 LED */
}
-void _BSP_GPLED1_off(void)
+static void _BSP_GPLED1_off(void)
{
BCSR *csr;
csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
csr->bcsr0 |= GP1_LED; /* Turn off GP1 LED */
}
-void _BSP_Uart1_enable(void)
+void BSP_panic(char *s)
{
- BCSR *csr;
- csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
- csr->bcsr1 &= ~UART1_E; /* Enable Uart1 */
+ _BSP_GPLED1_on();
+ printk("%s PANIC %s\n",_RTEMS_version, s);
+ __asm__ __volatile ("sc");
}
-void _BSP_Uart1_disable(void)
+void _BSP_Fatal_error(unsigned int v)
{
- BCSR *csr;
- csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
- csr->bcsr1 |= UART1_E; /* Disable Uart1 */
+ _BSP_GPLED0_on();
+ _BSP_GPLED1_on();
+ printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
+ __asm__ __volatile ("sc");
}
-void _BSP_Uart2_enable(void)
+static void _BSP_Uart1_enable(void)
{
BCSR *csr;
csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
- csr->bcsr1 &= ~UART2_E; /* Enable Uart2 */
+ csr->bcsr1 &= ~UART1_E; /* Enable Uart1 */
}
-void _BSP_Uart2_disable(void)
+static void _BSP_Uart2_enable(void)
{
BCSR *csr;
csr = (BCSR *)(m8260.memc[1].br & 0xFFFF8000);
- csr->bcsr1 |= UART2_E; /* Disable Uart2 */
-
+ csr->bcsr1 &= ~UART2_E; /* Enable Uart2 */
}
void bsp_start(void)