mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
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:
@@ -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>
|
2007-10-31 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* include/mpc5200.h: Fix typo.
|
* include/mpc5200.h: Fix typo.
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
/* for these modifications: */
|
/* for these modifications: */
|
||||||
/* COPYRIGHT (c) 1997 by IMD, Puchheim, Germany. */
|
/* COPYRIGHT (c) 1997 by IMD, Puchheim, Germany. */
|
||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT (c) 1989-1999. */
|
/* COPYRIGHT (c) 1989-2007.
|
||||||
/* On-Line Applications Research Corporation (OAR). */
|
/* On-Line Applications Research Corporation (OAR). */
|
||||||
/* */
|
/* */
|
||||||
/* The license and distribution terms for this file may be */
|
/* 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)
|
void clockOn(const rtems_irq_connect_data* irq)
|
||||||
{
|
{
|
||||||
uint32_t gpt_no;
|
uint32_t gpt_no;
|
||||||
|
extern uint32_t bsp_clicks_per_usec;
|
||||||
|
|
||||||
gpt_no = BSP_SIU_IRQ_TMR0 - (irq->name);
|
gpt_no = BSP_SIU_IRQ_TMR0 - (irq->name);
|
||||||
|
|
||||||
counter_value = rtems_configuration_get_microseconds_per_tick() *
|
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_set_gpt_count(counter_value, (uint32_t)gpt_no);
|
||||||
mpc5200_enable_gpt_int((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 */
|
/* This driver does this in clockOn called at connection time */
|
||||||
#define Clock_driver_support_initialize_hardware() \
|
#define Clock_driver_support_initialize_hardware() \
|
||||||
do { \
|
do { \
|
||||||
|
extern uint32_t bsp_clicks_per_usec; \
|
||||||
counter_value = rtems_configuration_get_microseconds_per_tick() * \
|
counter_value = rtems_configuration_get_microseconds_per_tick() * \
|
||||||
rtems_cpu_configuration_get_clicks_per_usec(); \
|
bsp_clicks_per_usec; \
|
||||||
mpc5200_init_gpt(GPT); \
|
mpc5200_init_gpt(GPT); \
|
||||||
mpc5200_set_gpt_count(counter_value, GPT); \
|
mpc5200_set_gpt_count(counter_value, GPT); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
/* conditions. */
|
/* conditions. */
|
||||||
/* The mmu is unused at this time. */
|
/* The mmu is unused at this time. */
|
||||||
/* */
|
/* */
|
||||||
/* COPYRIGHT (c) 1989-1999. */
|
/* COPYRIGHT (c) 1989-2007.
|
||||||
/* On-Line Applications Research Corporation (OAR). */
|
/* On-Line Applications Research Corporation (OAR). */
|
||||||
/* */
|
/* */
|
||||||
/* The license and distribution terms for this file may be */
|
/* The license and distribution terms for this file may be */
|
||||||
@@ -132,6 +132,10 @@ rtems_configuration_table BSP_Configuration;
|
|||||||
rtems_cpu_table Cpu_table;
|
rtems_cpu_table Cpu_table;
|
||||||
char *rtems_progname;
|
char *rtems_progname;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Driver configuration parameters
|
||||||
|
*/
|
||||||
|
uint32_t bsp_clicks_per_usec;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use the shared implementations of the following routines.
|
* 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.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
|
||||||
Cpu_table.predriver_hook = bsp_predriver_hook; /* init PCI / RTC ... */
|
Cpu_table.predriver_hook = bsp_predriver_hook; /* init PCI / RTC ... */
|
||||||
Cpu_table.postdriver_hook = bsp_postdriver_hook;
|
Cpu_table.postdriver_hook = bsp_postdriver_hook;
|
||||||
Cpu_table.clicks_per_usec = (IPB_CLOCK/1000000);
|
|
||||||
Cpu_table.exceptions_in_RAM = TRUE;
|
Cpu_table.exceptions_in_RAM = TRUE;
|
||||||
|
|
||||||
if( Cpu_table.interrupt_stack_size < 4*1024 )
|
if( Cpu_table.interrupt_stack_size < 4*1024 )
|
||||||
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
|
* Install our own set of exception vectors
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user