source: rtems/c/src/lib/libbsp/powerpc/gen83xx/include/tm27.h @ 9b5fe743

4.115
Last change on this file since 9b5fe743 was e570c313, checked in by Joel Sherrill <joel.sherrill@…>, on 01/24/11 at 15:32:04

2011-01-24 Joel Sherrill <joel.sherrill@…>

  • configure.ac, console/console-config.c, i2c/i2c_init.c, include/bsp.h, include/hwreg_vals.h, include/irq.h, include/tm27.h, include/tsec-config.h, irq/irq.c, network/network.c, spi/spi_init.c, startup/bspstart.c: Address some of the issues spotted by the check_bsp script.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1/**
2 * @file
3 *
4 * @brief Support file for Timer Test 27.
5 */
6
7/*
8 * Copyright (c) 2008
9 * Embedded Brains GmbH
10 * Obere Lagerstr. 30
11 * D-82178 Puchheim
12 * Germany
13 * rtems@embedded-brains.de
14 *
15 * The license and distribution terms for this file may be
16 * found in the file LICENSE in this distribution or at
17 * http://www.rtems.com/license/LICENSE.
18 *
19 * $Id$
20 */
21
22#ifndef _RTEMS_TMTEST27
23  #error "This is an RTEMS internal file you must not include directly."
24#endif /* _RTEMS_TMTEST27 */
25
26#ifndef TMTESTS_TM27_H
27#define TMTESTS_TM27_H
28
29#include <libcpu/powerpc-utility.h>
30#include <bsp/vectors.h>
31
32#define MUST_WAIT_FOR_INTERRUPT 1
33
34static rtems_isr_entry tm27_interrupt_handler = NULL;
35
36static int tm27_exception_handler( BSP_Exception_frame *frame, unsigned number)
37{
38        tm27_interrupt_handler( 0);
39
40        return 0;
41}
42
43void Install_tm27_vector( rtems_isr_entry handler)
44{
45  int rv = 0;
46
47  tm27_interrupt_handler = handler;
48
49  rv = ppc_exc_set_handler( ASM_DEC_VECTOR, tm27_exception_handler);
50  if (rv < 0) {
51    printk( "Error installing clock interrupt handler!\n");
52  }
53}
54
55#define Cause_tm27_intr() \
56  ppc_set_decrementer_register( 8)
57
58#define Clear_tm27_intr() \
59  ppc_set_decrementer_register( UINT32_MAX)
60
61#define Lower_tm27_intr() \
62  (void) ppc_external_exceptions_enable()
63
64#endif /* TMTESTS_TM27_H */
Note: See TracBrowser for help on using the repository browser.