forked from Imagelibrary/rtems
bsps/powerpc: Remove bsp_timer_internal_clock
The only consumer of this variable was the ppc403 clock driver used by the * haleakala, * virtex, and * virtex4 BSPs which set bsp_timer_internal_clock unconditionally to true. Update #3285.
This commit is contained in:
@@ -61,9 +61,6 @@ extern "C" {
|
||||
|
||||
#define BSP_INTERRUPT_STACK_AT_WORK_AREA_BEGIN
|
||||
|
||||
/* miscellaneous stuff assumed to exist */
|
||||
extern bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
|
||||
|
||||
/* Network Defines */
|
||||
#if 1 /* EB/doe changes */
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0"
|
||||
|
||||
@@ -63,11 +63,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* miscellaneous stuff assumed to exist */
|
||||
extern bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
|
||||
|
||||
#endif /* ASM */
|
||||
|
||||
void BSP_ask_for_reset(void);
|
||||
|
||||
/*
|
||||
@@ -79,4 +74,6 @@ void zero_bss(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ASM */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -63,9 +63,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* miscellaneous stuff assumed to exist */
|
||||
extern bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
|
||||
|
||||
/*
|
||||
* Bus Frequency
|
||||
*/
|
||||
|
||||
@@ -75,7 +75,6 @@ LINKER_SYMBOL(intrStack_size);
|
||||
|
||||
/* Expected by clock.c */
|
||||
uint32_t bsp_clicks_per_usec;
|
||||
bool bsp_timer_internal_clock; /* true, when timer runs with CPU clk */
|
||||
uint32_t bsp_timer_least_valid;
|
||||
uint32_t bsp_timer_average_overhead;
|
||||
|
||||
@@ -183,7 +182,6 @@ void bsp_start( void )
|
||||
bsp_clicks_per_usec = 400;
|
||||
rtems_counter_initialize_converter(bsp_clicks_per_usec * 1000000);
|
||||
|
||||
bsp_timer_internal_clock = TRUE;
|
||||
bsp_timer_average_overhead = 2;
|
||||
bsp_timer_least_valid = 3;
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ bool bsp_serial_cts_rts;
|
||||
uint32_t bsp_serial_rate;
|
||||
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 */
|
||||
|
||||
extern char IntrStack_start [];
|
||||
extern char intrStack [];
|
||||
|
||||
@@ -49,7 +49,6 @@ uint32_t bsp_clicks_per_usec; /* for PIT driver: OSCCLK */
|
||||
/* for timer: */
|
||||
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 */
|
||||
|
||||
static const char *bsp_tqm_get_cib_string( const char *cib_id)
|
||||
{
|
||||
|
||||
@@ -56,6 +56,3 @@ uint32_t bsp_timer_average_overhead = 2;
|
||||
|
||||
/* Least valid number from timer */
|
||||
uint32_t bsp_timer_least_valid = 3;
|
||||
|
||||
/* TRUE, when timer runs with CPU clk */
|
||||
bool bsp_timer_internal_clock = true;
|
||||
|
||||
@@ -96,7 +96,6 @@ LINKER_SYMBOL(bsp_exc_vector_base);
|
||||
|
||||
/* Expected by clock.c */
|
||||
uint32_t bsp_clicks_per_usec;
|
||||
bool bsp_timer_internal_clock; /* true, when timer runs with CPU clk */
|
||||
uint32_t bsp_timer_least_valid;
|
||||
uint32_t bsp_timer_average_overhead;
|
||||
|
||||
@@ -168,7 +167,6 @@ void bsp_start(void)
|
||||
|
||||
/* Timebase register ticks/microsecond; The application may override these */
|
||||
bsp_clicks_per_usec = 350;
|
||||
bsp_timer_internal_clock = true;
|
||||
bsp_timer_average_overhead = 2;
|
||||
bsp_timer_least_valid = 3;
|
||||
rtems_counter_initialize_converter(bsp_clicks_per_usec * 1000000);
|
||||
|
||||
@@ -97,7 +97,6 @@ LINKER_SYMBOL(bsp_exc_vector_base);
|
||||
|
||||
/* Expected by clock.c */
|
||||
uint32_t bsp_clicks_per_usec;
|
||||
bool bsp_timer_internal_clock; /* true, when timer runs with CPU clk */
|
||||
uint32_t bsp_timer_least_valid;
|
||||
uint32_t bsp_timer_average_overhead;
|
||||
|
||||
@@ -190,7 +189,6 @@ void bsp_start(void)
|
||||
rtems_counter_initialize_converter(
|
||||
BSP_bus_frequency / (BSP_time_base_divisor / 1000)
|
||||
);
|
||||
bsp_timer_internal_clock = true;
|
||||
bsp_timer_average_overhead = 2;
|
||||
bsp_timer_least_valid = 3;
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
#include <bsp/irq.h>
|
||||
|
||||
extern uint32_t bsp_clicks_per_usec;
|
||||
extern bool bsp_timer_internal_clock;
|
||||
|
||||
volatile uint32_t Clock_driver_ticks;
|
||||
static uint32_t pit_value, tick_time;
|
||||
@@ -171,11 +170,7 @@ static void ClockOn(const rtems_irq_connect_data* unused)
|
||||
|
||||
#ifndef ppc405 /* this is a ppc403 */
|
||||
__asm__ volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */
|
||||
if (bsp_timer_internal_clock) {
|
||||
iocr &= ~4; /* timer clocked from system clock */
|
||||
} else {
|
||||
iocr |= 4; /* select external timer clock */
|
||||
}
|
||||
iocr &= ~4; /* timer clocked from system clock */
|
||||
__asm__ volatile ("mtdcr 0xa0, %0" : "=r" (iocr) : "0" (iocr)); /* IOCR */
|
||||
|
||||
__asm__ volatile ("mfspr %0, 0x11f" : "=r" ((pvr))); /* PVR */
|
||||
@@ -194,11 +189,7 @@ static void ClockOn(const rtems_irq_connect_data* unused)
|
||||
|
||||
#else /* ppc405 */
|
||||
__asm__ volatile ("mfdcr %0, 0x0b2" : "=r" (iocr)); /*405GP CPC0_CR1 */
|
||||
if (bsp_timer_internal_clock) {
|
||||
iocr &=~0x800000; /* timer clocked from system clock CETE*/
|
||||
} else {
|
||||
iocr |= 0x800000; /* select external timer clock CETE*/
|
||||
}
|
||||
iocr &=~0x800000; /* timer clocked from system clock CETE*/
|
||||
__asm__ volatile ("mtdcr 0x0b2, %0" : "=r" (iocr) : "0" (iocr)); /* 405GP CPC0_CR1 */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user