mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 16:05:03 +08:00
(CPU_Get_timebase_low, rtems_bsp_delay, rtems_bsp_delay_in_bus_cycles): Remove.
This commit is contained in:
@@ -795,38 +795,6 @@ void _CPU_ISR_install_raw_handler(
|
||||
|
||||
/* end of ISR handler macros */
|
||||
|
||||
/*
|
||||
* Simple spin delay in microsecond units for device drivers.
|
||||
* This is very dependent on the clock speed of the target.
|
||||
*/
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
#define CPU_Get_timebase_low( _value ) \
|
||||
asm volatile( "mftb %0" : "=r" (_value) )
|
||||
|
||||
#define rtems_bsp_delay( _microseconds ) \
|
||||
do { \
|
||||
uint32_t start, ticks, now; \
|
||||
CPU_Get_timebase_low( start ) ; \
|
||||
ticks = (_microseconds) * _CPU_Table.clicks_per_usec; \
|
||||
do \
|
||||
CPU_Get_timebase_low( now ) ; \
|
||||
while (now - start < ticks); \
|
||||
} while (0)
|
||||
|
||||
#define rtems_bsp_delay_in_bus_cycles( _cycles ) \
|
||||
do { \
|
||||
uint32_t start, now; \
|
||||
CPU_Get_timebase_low( start ); \
|
||||
do \
|
||||
CPU_Get_timebase_low( now ); \
|
||||
while (now - start < (_cycles)); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Context handler macros */
|
||||
|
||||
/*
|
||||
|
||||
@@ -343,33 +343,6 @@ static inline void PPC_Set_timebase_register (uint64_t tbr)
|
||||
|
||||
/* end of ISR handler macros */
|
||||
|
||||
/*
|
||||
* Simple spin delay in microsecond units for device drivers.
|
||||
* This is very dependent on the clock speed of the target.
|
||||
*/
|
||||
|
||||
#define CPU_Get_timebase_low( _value ) \
|
||||
asm volatile( "mftb %0" : "=r" (_value) )
|
||||
|
||||
#define rtems_bsp_delay( _microseconds ) \
|
||||
do { \
|
||||
uint32_t start, ticks, now; \
|
||||
CPU_Get_timebase_low( start ) ; \
|
||||
ticks = (_microseconds) * rtems_cpu_configuration_get_clicks_per_usec(); \
|
||||
do \
|
||||
CPU_Get_timebase_low( now ) ; \
|
||||
while (now - start < ticks); \
|
||||
} while (0)
|
||||
|
||||
#define rtems_bsp_delay_in_bus_cycles( _cycles ) \
|
||||
do { \
|
||||
uint32_t start, now; \
|
||||
CPU_Get_timebase_low( start ); \
|
||||
do \
|
||||
CPU_Get_timebase_low( now ); \
|
||||
while (now - start < (_cycles)); \
|
||||
} while (0)
|
||||
|
||||
#define PPC_Set_decrementer( _clicks ) \
|
||||
do { \
|
||||
asm volatile( "mtdec %0" : : "r" ((_clicks)) ); \
|
||||
|
||||
Reference in New Issue
Block a user