source: rtems/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c @ a9a27b5

4.104.114.84.95
Last change on this file since a9a27b5 was 553aa5f, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/01/04 at 10:10:01

2004-04-01 Ralf Corsepius <ralf_corsepius@…>

  • include/bsp.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
  • startup/bspclean.c: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
  • include/bsp.h: Include <rtems/console.h> instead of <console.h>.
  • include/bsp.h: Include <rtems/iosupp.h> instead of <iosupp.h>.
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  This routine returns control to 147Bug.
3 *
4 *  COPYRIGHT (c) 1989-1999.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  MVME147 port for TNI - Telecom Bretagne
12 *  by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
13 *  May 1996
14 *
15 *  $Id$
16 */
17
18#include <rtems.h>
19#include <bsp.h>
20#include <rtems/clockdrv.h>
21
22void bsp_return_to_monitor_trap()
23{
24  extern void start( void  );
25
26  register volatile void *start_addr;
27
28  m68k_set_vbr( 0 );                /* restore 147Bug vectors */
29  asm volatile( "trap   #15"  );    /* trap to 147Bug */
30  asm volatile( ".short 0x63" );    /* return to 147Bug (.RETURN) */
31                                    /* restart program */
32  start_addr = start;
33
34  asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
35}
36
37void bsp_cleanup( void )
38{
39   pcc->timer1_int_control = 0; /* Disable Timer 1 */
40   pcc->timer2_int_control = 0; /* Disable Timer 2 */
41
42   M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
43   asm volatile( "trap #13" );  /* insures SUPV mode */
44}
Note: See TracBrowser for help on using the repository browser.