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

* mcf5206/clock/ckinit.c, mcf5272/clock/ckinit.c: Eliminate copies of
	the Configuration Table. Use the RTEMS provided accessor macros to
	obtain configuration fields.
This commit is contained in:
Joel Sherrill
2007-12-11 15:45:54 +00:00
parent 36a8a2d57a
commit 0f9ecc4ecf
3 changed files with 45 additions and 39 deletions

View File

@@ -1,3 +1,9 @@
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* mcf5206/clock/ckinit.c, mcf5272/clock/ckinit.c: Eliminate copies of
the Configuration Table. Use the RTEMS provided accessor macros to
obtain configuration fields.
2007-11-22 Chris Johns <chrisj@rtems.org> 2007-11-22 Chris Johns <chrisj@rtems.org>
* m68k/mcf5235/include/mcf5235.h: Remove '/' from define label. * m68k/mcf5235/include/mcf5235.h: Remove '/' from define label.

View File

@@ -79,7 +79,7 @@ Clock_isr (rtems_vector_number vector)
void void
Clock_exit(void) Clock_exit(void)
{ {
if (BSP_Configuration.ticks_per_timeslice) if (rtems_configuration_get_ticks_per_timeslice())
{ {
/* disable all timer1 interrupts */ /* disable all timer1 interrupts */
*MCF5206E_IMR(MBAR) |= MCF5206E_INTR_BIT(MCF5206E_INTR_TIMER_1); *MCF5206E_IMR(MBAR) |= MCF5206E_INTR_BIT(MCF5206E_INTR_TIMER_1);
@@ -107,7 +107,7 @@ static void
Install_clock(rtems_isr_entry clock_isr) Install_clock(rtems_isr_entry clock_isr)
{ {
Clock_driver_ticks = 0; Clock_driver_ticks = 0;
if (BSP_Configuration.ticks_per_timeslice) if (rtems_configuration_get_ticks_per_timeslice())
{ {
/* Configure timer1 interrupts */ /* Configure timer1 interrupts */
*MCF5206E_ICR(MBAR,MCF5206E_INTR_TIMER_1) = *MCF5206E_ICR(MBAR,MCF5206E_INTR_TIMER_1) =
@@ -133,7 +133,7 @@ Install_clock(rtems_isr_entry clock_isr)
MCF5206E_TMR_RST; MCF5206E_TMR_RST;
/* Set the timer timeout value from the BSP config */ /* Set the timer timeout value from the BSP config */
*MCF5206E_TRR(MBAR, 1) = BSP_Configuration.microseconds_per_tick - 1; *MCF5206E_TRR(MBAR, 1) = rtems_configuration_get_microseconds_per_tick() - 1;
/* Feed system frequency to the timer */ /* Feed system frequency to the timer */
*MCF5206E_TMR(MBAR, 1) |= MCF5206E_TMR_ICLK_MSCLK; *MCF5206E_TMR(MBAR, 1) |= MCF5206E_TMR_ICLK_MSCLK;

View File

@@ -84,7 +84,7 @@ Clock_isr (rtems_vector_number vector)
void void
Clock_exit(void) Clock_exit(void)
{ {
if (BSP_Configuration.ticks_per_timeslice) { if (rtems_configuration_get_ticks_per_timeslice()) {
uint32_t icr; uint32_t icr;
/* disable all timer1 interrupts */ /* disable all timer1 interrupts */
icr = g_intctrl_regs->icr1; icr = g_intctrl_regs->icr1;
@@ -116,7 +116,7 @@ Install_clock(rtems_isr_entry clock_isr)
{ {
uint32_t icr; uint32_t icr;
Clock_driver_ticks = 0; Clock_driver_ticks = 0;
if (BSP_Configuration.ticks_per_timeslice) { if (rtems_configuration_get_ticks_per_timeslice()) {
/* Register the interrupt handler */ /* Register the interrupt handler */
set_vector(clock_isr, BSP_INTVEC_TMR1, 1); set_vector(clock_isr, BSP_INTVEC_TMR1, 1);
@@ -138,7 +138,7 @@ Install_clock(rtems_isr_entry clock_isr)
MCF5272_TMR_RST)); MCF5272_TMR_RST));
/* Set the timer timeout value from the BSP config */ /* Set the timer timeout value from the BSP config */
g_timer_regs->trr1 = BSP_Configuration.microseconds_per_tick - 1; g_timer_regs->trr1 = rtems_configuration_get_microseconds_per_tick() - 1;
/* Feed system frequency to the timer */ /* Feed system frequency to the timer */
g_timer_regs->tmr1 |= MCF5272_TMR_CLK_MSTR; g_timer_regs->tmr1 |= MCF5272_TMR_CLK_MSTR;