[arch][arm] add ARM SMP support
-Also adds support to the following ARM-related drivers:
dev/cache/pl310
dev/interrupt/arm_gic
dev/timer/arm_cortex_a9
This commit is contained in:
@@ -189,6 +189,19 @@ void arm_cortex_a9_timer_init(addr_t _scu_control_base, uint32_t freq)
|
||||
{
|
||||
scu_control_base = _scu_control_base;
|
||||
|
||||
arm_cortex_a9_timer_init_percpu();
|
||||
|
||||
/* save the timer frequency for later calculations */
|
||||
timer_freq = freq;
|
||||
|
||||
/* precompute the conversion factor for global time to real time */
|
||||
fp_32_64_div_32_32(&timer_freq_msec_conversion, timer_freq, 1000);
|
||||
fp_32_64_div_32_32(&timer_freq_usec_conversion_inverse, 1000000, timer_freq);
|
||||
fp_32_64_div_32_32(&timer_freq_msec_conversion_inverse, 1000, timer_freq);
|
||||
}
|
||||
|
||||
void arm_cortex_a9_timer_init_percpu(void)
|
||||
{
|
||||
/* disable timer */
|
||||
TIMREG(TIMER_CONTROL) = 0;
|
||||
|
||||
@@ -198,14 +211,7 @@ void arm_cortex_a9_timer_init(addr_t _scu_control_base, uint32_t freq)
|
||||
/* ack any irqs that may be pending */
|
||||
TIMREG(TIMER_ISR) = 1;
|
||||
|
||||
/* save the timer frequency for later calculations */
|
||||
timer_freq = freq;
|
||||
|
||||
/* precompute the conversion factor for global time to real time */
|
||||
fp_32_64_div_32_32(&timer_freq_msec_conversion, timer_freq, 1000);
|
||||
fp_32_64_div_32_32(&timer_freq_usec_conversion_inverse, 1000000, timer_freq);
|
||||
fp_32_64_div_32_32(&timer_freq_msec_conversion_inverse, 1000, timer_freq);
|
||||
|
||||
/* register the platform tick on each cpu */
|
||||
register_int_handler(CPU_PRIV_TIMER_INT, &platform_tick, NULL);
|
||||
unmask_interrupt(CPU_PRIV_TIMER_INT);
|
||||
}
|
||||
|
||||
@@ -25,3 +25,4 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
void arm_cortex_a9_timer_init(addr_t scu_control_base, uint32_t freq);
|
||||
void arm_cortex_a9_timer_init_percpu(void);
|
||||
|
||||
Reference in New Issue
Block a user