2010-04-28 Joel Sherrill <joel.sherrilL@OARcorp.com>

* mpc5xx/clock/clock.c, mpc5xx/console-generic/console-generic.c,
	mpc5xx/irq/irq_init.c, mpc5xx/timer/timer.c: Remove warnings.
This commit is contained in:
Joel Sherrill
2010-04-28 17:17:59 +00:00
parent af2af2b4b7
commit 14a78df2be
5 changed files with 60 additions and 60 deletions

View File

@@ -1,3 +1,8 @@
2010-04-28 Joel Sherrill <joel.sherrilL@OARcorp.com>
* mpc5xx/clock/clock.c, mpc5xx/console-generic/console-generic.c,
mpc5xx/irq/irq_init.c, mpc5xx/timer/timer.c: Remove warnings.
2010-04-25 Joel Sherrill <joel.sherrilL@OARcorp.com>
* ppc403/clock/clock.c, ppc403/console/console405.c,

View File

@@ -52,6 +52,7 @@
volatile uint32_t Clock_driver_ticks;
extern int BSP_connect_clock_handler(rtems_isr_entry);
extern int BSP_disconnect_clock_handler();
extern uint32_t bsp_clicks_per_usec;
void Clock_exit( void );
@@ -79,7 +80,6 @@ void clockOn(void* unused)
{
unsigned desiredLevel;
uint32_t pit_value;
extern uint32_t bsp_clicks_per_usec;
/* calculate and set modulus */
pit_value = (rtems_configuration_get_microseconds_per_tick() *

View File

@@ -49,7 +49,7 @@
#include <rtems/bspIo.h> /* for printk */
#include <mpc5xx.h>
#include <mpc5xx/console.h>
#include <libcpu/irq.h>
#include <bsp/irq.h>
/*
@@ -85,6 +85,8 @@ static struct termios default_termios = {
};
extern uint32_t bsp_clock_speed;
/*
* Termios callback functions
*/
@@ -187,33 +189,10 @@ m5xx_uart_setAttributes(
return RTEMS_INVALID_NUMBER;
/* Baud rate */
switch (t->c_cflag & CBAUD) {
default: baud = -1; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
}
baud = rtems_termios_baud_to_number( t->c_cflag & CBAUD );
if (baud > 0) {
extern uint32_t bsp_clock_speed;
sccr0 &= ~QSMCM_SCI_BAUD(-1);
sccr0 |=
QSMCM_SCI_BAUD((bsp_clock_speed + (16 * baud)) / (32 * baud));
sccr0 |= QSMCM_SCI_BAUD((bsp_clock_speed + (16 * baud)) / (32 * baud));
}
/* Number of data bits -- not available with MPC5xx SCI */

View File

@@ -23,33 +23,48 @@
#include <mpc5xx.h>
#include <libcpu/vectors.h>
#include <libcpu/raw_exception.h>
#include <libcpu/irq.h>
#include <bsp/irq.h>
extern rtems_exception_handler_t dispatch_irq_handler;
volatile unsigned int ppc_cached_irq_mask;
/*
* default on/off function
* default methods
*/
static void nop_func(){}
static void nop_hdl(rtems_irq_hdl_param ignored)
{
}
/*
* default isOn function
*/
static int not_connected(void) {return 0;}
static void nop_irq_enable(const struct __rtems_irq_connect_data__*ignored)
{
}
/*
* default possible isOn function
*/
static int connected(void) {return 1;}
static void nop_raw_enable(
const struct __rtems_raw_except_connect_data__*ignored
)
{
}
static int irq_is_connected(const struct __rtems_irq_connect_data__*ignored)
{
return 0;
}
static int raw_is_connected(const struct __rtems_raw_except_connect_data__*ignored)
{
return 0;
}
static rtems_irq_connect_data rtemsIrq[CPU_IRQ_COUNT];
static rtems_irq_global_settings initial_config;
static rtems_irq_connect_data defaultIrq = {
/* vector, hdl ,handle , on , off , isOn */
0, nop_func ,NULL , nop_func , nop_func , not_connected
0, /* vector */
nop_hdl, /* hdl */
NULL, /* handle */
nop_irq_enable, /* on */
nop_irq_enable, /* off */
irq_is_connected /* isOn */
};
static rtems_irq_prio irqPrioTable[CPU_IRQ_COUNT]={
@@ -138,9 +153,9 @@ void CPU_rtems_irq_mng_init(unsigned cpuId)
vectorDesc.exceptIndex = ASM_DEC_VECTOR;
vectorDesc.hdl.vector = ASM_DEC_VECTOR;
vectorDesc.hdl.raw_hdl = dispatch_irq_handler;
vectorDesc.on = nop_func;
vectorDesc.off = nop_func;
vectorDesc.isOn = connected;
vectorDesc.on = nop_raw_enable;
vectorDesc.off = nop_raw_enable;
vectorDesc.isOn = raw_is_connected;
if (!mpc5xx_set_exception (&vectorDesc)) {
BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
}

View File

@@ -54,6 +54,9 @@
static volatile uint32_t Timer_starting;
static bool benchmark_timer_find_average_overhead;
extern uint32_t bsp_timer_least_valid;
extern uint32_t bsp_timer_average_overhead;
/*
* This is so small that this code will be reproduced where needed.
*/
@@ -83,8 +86,6 @@ int benchmark_timer_read(void)
{
uint32_t clicks;
uint32_t total;
extern uint32_t bsp_timer_least_valid;
extern uint32_t bsp_timer_average_overhead;
clicks = get_itimer();