Changeset e07b6868 in rtems


Ignore:
Timestamp:
Jan 3, 2000, 2:14:37 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
32f19fb3
Parents:
db94167
Message:

Added tm27 stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/shared/include/bsp.h

    rdb94167 re07b6868  
    5656extern int BSP_disconnect_clock_handler (void);
    5757extern int BSP_connect_clock_handler (void);
     58
     59/*
     60 *  TM27 stuff
     61 */
     62
     63#if defined(MCP750) && defined(RTEMS_TM27)
     64
     65#define MUST_WAIT_FOR_INTERRUPT 1
     66
     67void nullFunc() {}
     68static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
     69                                              0,
     70                                              (rtems_irq_enable)nullFunc,
     71                                              (rtems_irq_disable)nullFunc,
     72                                              (rtems_irq_is_enabled) nullFunc};
     73void Install_tm27_vector(void (*_handler)())
     74{
     75  clockIrqData.hdl = _handler;
     76  if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
     77        printk("Error installing clock interrupt handler!\n");
     78        rtems_fatal_error_occurred(1);
     79  }
     80}
     81
     82#define Cause_tm27_intr()  \
     83  do { \
     84    unsigned32 _clicks = 8; \
     85    asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
     86  } while (0)
     87
     88
     89#define Clear_tm27_intr() \
     90  do { \
     91    unsigned32 _clicks = 0xffffffff; \
     92    asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
     93  } while (0)
     94
     95#define Lower_tm27_intr() \
     96  do { \
     97    unsigned32 _msr = 0; \
     98    _ISR_Set_level( 0 ); \
     99    asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
     100    _msr |=  0x8002; \
     101    asm volatile( "mtmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
     102  } while (0)
     103#endif
     104
     105
    58106#endif
    59107
Note: See TracChangeset for help on using the changeset viewer.