mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2006-07-12 Jerry Needell <jerry.needell@unh.edu>
* amba/amba.c, clock/ckinit.c, include/amba.h, timer/timer.c: Search for the Timer Register when initializing the amba rather than before each potential use.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2006-07-12 Jerry Needell <jerry.needell@unh.edu>
|
||||||
|
|
||||||
|
* amba/amba.c, clock/ckinit.c, include/amba.h, timer/timer.c: Search
|
||||||
|
for the Timer Register when initializing the amba rather than before
|
||||||
|
each potential use.
|
||||||
|
|
||||||
2006-07-12 Joel Sherrill <joel@OARcorp.com>
|
2006-07-12 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* Makefile.am, include/leon.h: Try to merge rest of 4.6 BSP changes.
|
* Makefile.am, include/leon.h: Try to merge rest of 4.6 BSP changes.
|
||||||
|
|||||||
@@ -93,6 +93,21 @@ void bsp_leon3_predriver_hook(void)
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
/* find GP Timer */
|
||||||
|
i = 0;
|
||||||
|
while (i < amba_conf.apbslv.devnr)
|
||||||
|
{
|
||||||
|
conf = amba_get_confword(amba_conf.apbslv, i, 0);
|
||||||
|
if ((amba_vendor(conf) == VENDOR_GAISLER) &&
|
||||||
|
(amba_device(conf) == GAISLER_GPTIMER)) {
|
||||||
|
iobar = amba_apb_get_membar(amba_conf.apbslv, i);
|
||||||
|
LEON3_Timer_Regs = (volatile LEON3_Timer_Regs_Map *)
|
||||||
|
amba_iobar_start(amba_conf.apbmst, iobar);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -60,37 +60,6 @@ void Clock_exit( void );
|
|||||||
rtems_device_major_number rtems_clock_major = ~0;
|
rtems_device_major_number rtems_clock_major = ~0;
|
||||||
rtems_device_minor_number rtems_clock_minor;
|
rtems_device_minor_number rtems_clock_minor;
|
||||||
|
|
||||||
/*
|
|
||||||
* LEON3_Find_timer
|
|
||||||
*
|
|
||||||
* This method searches for the timer on the AMBA bus.
|
|
||||||
*
|
|
||||||
* Input parameters: NONE
|
|
||||||
*
|
|
||||||
* Output parameters: NONE
|
|
||||||
*
|
|
||||||
* Return values: NONE
|
|
||||||
*/
|
|
||||||
|
|
||||||
void LEON3_Find_timer(void)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
unsigned int iobar, conf;
|
|
||||||
|
|
||||||
while (i < amba_conf.apbslv.devnr)
|
|
||||||
{
|
|
||||||
conf = amba_get_confword(amba_conf.apbslv, i, 0);
|
|
||||||
if ((amba_vendor(conf) == VENDOR_GAISLER) &&
|
|
||||||
(amba_device(conf) == GAISLER_GPTIMER)) {
|
|
||||||
iobar = amba_apb_get_membar(amba_conf.apbslv, i);
|
|
||||||
LEON3_Timer_Regs = (volatile LEON3_Timer_Regs_Map *)
|
|
||||||
amba_iobar_start(amba_conf.apbmst, iobar);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clock_isr
|
* Clock_isr
|
||||||
@@ -157,7 +126,6 @@ void Install_clock(
|
|||||||
{
|
{
|
||||||
Clock_driver_ticks = 0;
|
Clock_driver_ticks = 0;
|
||||||
|
|
||||||
LEON3_Find_timer();
|
|
||||||
|
|
||||||
clkirq = (LEON3_Timer_Regs->status & 0xfc) >> 3;
|
clkirq = (LEON3_Timer_Regs->status & 0xfc) >> 3;
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,11 @@
|
|||||||
* found in the file LICENSE in this distribution or at
|
* found in the file LICENSE in this distribution or at
|
||||||
* http://www.rtems.com/license/LICENSE.
|
* http://www.rtems.com/license/LICENSE.
|
||||||
*
|
*
|
||||||
|
<<<<<<< amba.h
|
||||||
* $Id$
|
* $Id$
|
||||||
|
=======
|
||||||
|
* $Id$
|
||||||
|
>>>>>>> 1.3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LEON3_IO_AREA 0xfff00000
|
#define LEON3_IO_AREA 0xfff00000
|
||||||
|
|||||||
@@ -27,12 +27,10 @@ rtems_boolean Timer_driver_Find_average_overhead;
|
|||||||
rtems_boolean Timer_driver_Is_initialized = FALSE;
|
rtems_boolean Timer_driver_Is_initialized = FALSE;
|
||||||
|
|
||||||
extern volatile LEON3_Timer_Regs_Map *LEON3_Timer_Regs;
|
extern volatile LEON3_Timer_Regs_Map *LEON3_Timer_Regs;
|
||||||
extern void LEON3_Find_timer(void);
|
|
||||||
|
|
||||||
|
|
||||||
void Timer_initialize()
|
void Timer_initialize()
|
||||||
{
|
{
|
||||||
LEON3_Find_timer();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Timer runs long and accurate enough not to require an interrupt.
|
* Timer runs long and accurate enough not to require an interrupt.
|
||||||
|
|||||||
Reference in New Issue
Block a user