source: rtems/bsps/powerpc/tqm8xx/clock/p_clock.c @ 762fa62

5
Last change on this file since 762fa62 was 7632906, checked in by Sebastian Huber <sebastian.huber@…>, on Apr 19, 2018 at 4:35:52 AM

bsps: Move clock drivers to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  Clock Tick interrupt conexion code.
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-1997.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may in
10 *  the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 *
13 *  Modified to support the MPC750.
14 *  Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
15 */
16
17#include <bsp.h>
18#include <bsp/irq-generic.h>
19#include <rtems/bspIo.h>
20
21extern void clockOn(void*);
22extern void clockOff (void*);
23extern int clockIsOn(void*);
24extern void Clock_isr(void*);
25
26static void BSP_clock_hdl(void * arg)
27{
28  Clock_isr(arg);
29}
30
31int BSP_disconnect_clock_handler (void)
32{
33  rtems_status_code sc;
34
35  clockOff(NULL);
36  /*
37   * remove interrupt handler
38   */
39  sc = rtems_interrupt_handler_remove(BSP_PERIODIC_TIMER,
40                                      BSP_clock_hdl,NULL);
41
42  return sc == RTEMS_SUCCESSFUL;
43}
44
45int BSP_connect_clock_handler (rtems_irq_hdl hdl)
46{
47  rtems_status_code sc;
48  /*
49   * install interrupt handler
50   */
51  sc = rtems_interrupt_handler_install(BSP_PERIODIC_TIMER,
52                                       "PIT clock",0,
53                                       BSP_clock_hdl,NULL);
54  if (sc == RTEMS_SUCCESSFUL) {
55    clockOn(NULL);
56  }
57  return sc == RTEMS_SUCCESSFUL;
58}
Note: See TracBrowser for help on using the repository browser.