forked from Imagelibrary/rtems
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
* include/bsp.h: Split out tmtest27 support. * include/tm27.h: New.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 613/bsps
|
||||
|
||||
@@ -64,41 +64,6 @@ int rtems_dmv177_sonic_driver_attach(struct rtems_bsdnet_ifconfig *config);
|
||||
#define Z8530_Baud( _frequency, _clock_by, _baud_rate ) \
|
||||
( (_frequency /( _clock_by * 2 * _baud_rate)) - 2)
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 1
|
||||
|
||||
#define Install_tm27_vector( _handler ) \
|
||||
set_vector( (_handler), PPC_IRQ_DECREMENTER, 1 )
|
||||
|
||||
#define Cause_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 1; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Clear_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 0xffffffff; \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr &= ~0x8000; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Lower_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr |= 0x8002; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
} while (0)
|
||||
|
||||
/* Constants */
|
||||
|
||||
/*
|
||||
|
||||
53
c/src/lib/libbsp/powerpc/dmv177/include/tm27.h
Normal file
53
c/src/lib/libbsp/powerpc/dmv177/include/tm27.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 1
|
||||
|
||||
#define Install_tm27_vector( _handler ) \
|
||||
set_vector( (_handler), PPC_IRQ_DECREMENTER, 1 )
|
||||
|
||||
#define Cause_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 1; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Clear_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 0xffffffff; \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr &= ~0x8000; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Lower_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr |= 0x8002; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,8 @@
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 613/bsps
|
||||
|
||||
@@ -56,20 +56,6 @@ extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config);
|
||||
*/
|
||||
#define NOCACHE_MEM_SIZE 512*1024
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) /* set_vector( (handler), PPC_IRQ_SCALL, 1 ) */
|
||||
|
||||
#define Cause_tm27_intr() asm volatile ("sc")
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
/* Constants */
|
||||
|
||||
#define RAM_START 0
|
||||
|
||||
32
c/src/lib/libbsp/powerpc/eth_comm/include/tm27.h
Normal file
32
c/src/lib/libbsp/powerpc/eth_comm/include/tm27.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) /* set_vector( (handler), PPC_IRQ_SCALL, 1 ) */
|
||||
|
||||
#define Cause_tm27_intr() asm volatile ("sc")
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,8 @@
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 613/bsps
|
||||
|
||||
@@ -69,20 +69,6 @@ extern "C" {
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/iosupp.h>
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) set_vector( (handler), PPC_IRQ_SCALL, 1 )
|
||||
|
||||
#define Cause_tm27_intr() asm volatile ("sc")
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
/* Constants */
|
||||
|
||||
#define RAM_START 0
|
||||
|
||||
32
c/src/lib/libbsp/powerpc/gen405/include/tm27.h
Normal file
32
c/src/lib/libbsp/powerpc/gen405/include/tm27.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) set_vector( (handler), PPC_IRQ_SCALL, 1 )
|
||||
|
||||
#define Cause_tm27_intr() asm volatile ("sc")
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,8 @@
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 613/bsps
|
||||
|
||||
@@ -66,20 +66,6 @@ extern "C" {
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/iosupp.h>
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) set_vector( (handler), PPC_IRQ_SCALL, 1 )
|
||||
|
||||
#define Cause_tm27_intr() asm volatile ("sc")
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
/* Constants */
|
||||
|
||||
#define RAM_START 0
|
||||
|
||||
32
c/src/lib/libbsp/powerpc/helas403/include/tm27.h
Normal file
32
c/src/lib/libbsp/powerpc/helas403/include/tm27.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) set_vector( (handler), PPC_IRQ_SCALL, 1 )
|
||||
|
||||
#define Cause_tm27_intr() asm volatile ("sc")
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,8 @@
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 613/bsps
|
||||
|
||||
@@ -69,20 +69,6 @@ extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config, int a
|
||||
*/
|
||||
#define NOCACHE_MEM_SIZE 512*1024
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) /* set_vector( (handler), 0, 1 ) */
|
||||
|
||||
#define Cause_tm27_intr()
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
/* miscellaneous stuff assumed to exist */
|
||||
|
||||
extern rtems_configuration_table BSP_Configuration;
|
||||
|
||||
32
c/src/lib/libbsp/powerpc/mbx8xx/include/tm27.h
Normal file
32
c/src/lib/libbsp/powerpc/mbx8xx/include/tm27.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) /* set_vector( (handler), 0, 1 ) */
|
||||
|
||||
#define Cause_tm27_intr()
|
||||
|
||||
#define Clear_tm27_intr()
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
#endif
|
||||
@@ -1,3 +1,8 @@
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
|
||||
|
||||
@@ -104,53 +104,6 @@ extern int BSP_connect_clock_handler (void);
|
||||
*/
|
||||
extern unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet);
|
||||
|
||||
/*
|
||||
* TM27 stuff
|
||||
*/
|
||||
|
||||
#if defined(USE_ENHANCED_INTR_API) && defined(RTEMS_TM27)
|
||||
|
||||
#include <bsp/irq.h>
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 1
|
||||
|
||||
void nullFunc() {}
|
||||
static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
|
||||
0,
|
||||
(rtems_irq_enable)nullFunc,
|
||||
(rtems_irq_disable)nullFunc,
|
||||
(rtems_irq_is_enabled) nullFunc};
|
||||
void Install_tm27_vector(void (*_handler)())
|
||||
{
|
||||
clockIrqData.hdl = _handler;
|
||||
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
|
||||
printk("Error installing clock interrupt handler!\n");
|
||||
rtems_fatal_error_occurred(1);
|
||||
}
|
||||
}
|
||||
|
||||
#define Cause_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 8; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Clear_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 0xffffffff; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Lower_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr |= 0x8002; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
65
c/src/lib/libbsp/powerpc/motorola_powerpc/include/tm27.h
Normal file
65
c/src/lib/libbsp/powerpc/motorola_powerpc/include/tm27.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/*
|
||||
* Stuff for Time Test 27
|
||||
*/
|
||||
|
||||
#if defined(USE_ENHANCED_INTR_API)
|
||||
|
||||
#include <bsp/irq.h>
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 1
|
||||
|
||||
void nullFunc() {}
|
||||
static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
|
||||
0,
|
||||
(rtems_irq_enable)nullFunc,
|
||||
(rtems_irq_disable)nullFunc,
|
||||
(rtems_irq_is_enabled) nullFunc};
|
||||
void Install_tm27_vector(void (*_handler)())
|
||||
{
|
||||
clockIrqData.hdl = _handler;
|
||||
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
|
||||
printk("Error installing clock interrupt handler!\n");
|
||||
rtems_fatal_error_occurred(1);
|
||||
}
|
||||
}
|
||||
|
||||
#define Cause_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 8; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Clear_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _clicks = 0xffffffff; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Lower_tm27_intr() \
|
||||
do { \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr |= 0x8002; \
|
||||
asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user