2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>

* clock/clock.c, startup/bspstart.c: Eliminate PowerPC specific
	elements from the CPU Table. They have been replaced with variables
	named bsp_XXX as needed.
This commit is contained in:
Joel Sherrill
2007-11-28 21:44:29 +00:00
parent e34ac1f3b8
commit 62577f9317
3 changed files with 18 additions and 5 deletions

View File

@@ -1,3 +1,9 @@
2007-11-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* clock/clock.c, startup/bspstart.c: Eliminate PowerPC specific
elements from the CPU Table. They have been replaced with variables
named bsp_XXX as needed.
2007-10-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/mpc5200.h: Fix typo.

View File

@@ -71,7 +71,7 @@
/* for these modifications: */
/* COPYRIGHT (c) 1997 by IMD, Puchheim, Germany. */
/* */
/* COPYRIGHT (c) 1989-1999. */
/* COPYRIGHT (c) 1989-2007.
/* On-Line Applications Research Corporation (OAR). */
/* */
/* The license and distribution terms for this file may be */
@@ -221,11 +221,12 @@ uint32_t mpc5200_check_gpt_status(uint32_t gpt_no)
void clockOn(const rtems_irq_connect_data* irq)
{
uint32_t gpt_no;
extern uint32_t bsp_clicks_per_usec;
gpt_no = BSP_SIU_IRQ_TMR0 - (irq->name);
counter_value = rtems_configuration_get_microseconds_per_tick() *
rtems_cpu_configuration_get_clicks_per_usec();
bsp_clicks_per_usec;
mpc5200_set_gpt_count(counter_value, (uint32_t)gpt_no);
mpc5200_enable_gpt_int((uint32_t)gpt_no);
@@ -341,8 +342,9 @@ int BSP_connect_clock_handler (uint32_t gpt_no)
/* This driver does this in clockOn called at connection time */
#define Clock_driver_support_initialize_hardware() \
do { \
extern uint32_t bsp_clicks_per_usec; \
counter_value = rtems_configuration_get_microseconds_per_tick() * \
rtems_cpu_configuration_get_clicks_per_usec(); \
bsp_clicks_per_usec; \
mpc5200_init_gpt(GPT); \
mpc5200_set_gpt_count(counter_value, GPT); \
} while (0)

View File

@@ -65,7 +65,7 @@
/* conditions. */
/* The mmu is unused at this time. */
/* */
/* COPYRIGHT (c) 1989-1999. */
/* COPYRIGHT (c) 1989-2007.
/* On-Line Applications Research Corporation (OAR). */
/* */
/* The license and distribution terms for this file may be */
@@ -132,6 +132,10 @@ rtems_configuration_table BSP_Configuration;
rtems_cpu_table Cpu_table;
char *rtems_progname;
/*
* Driver configuration parameters
*/
uint32_t bsp_clicks_per_usec;
/*
* Use the shared implementations of the following routines.
@@ -290,12 +294,13 @@ void bsp_start(void)
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.predriver_hook = bsp_predriver_hook; /* init PCI / RTC ... */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.clicks_per_usec = (IPB_CLOCK/1000000);
Cpu_table.exceptions_in_RAM = TRUE;
if( Cpu_table.interrupt_stack_size < 4*1024 )
Cpu_table.interrupt_stack_size = 4 * 1024;
bsp_clicks_per_usec = (IPB_CLOCK/1000000);
/*
* Install our own set of exception vectors
*/