1 |
27 |
unneback |
##=============================================================================
|
2 |
|
|
#####ECOSGPLCOPYRIGHTBEGIN####
|
3 |
|
|
## -------------------------------------------
|
4 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
5 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
|
6 |
|
|
##
|
7 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
8 |
|
|
## the terms of the GNU General Public License as published by the Free
|
9 |
|
|
## Software Foundation; either version 2 or (at your option) any later version.
|
10 |
|
|
##
|
11 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
12 |
|
|
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
14 |
|
|
## for more details.
|
15 |
|
|
##
|
16 |
|
|
## You should have received a copy of the GNU General Public License along
|
17 |
|
|
## with eCos; if not, write to the Free Software Foundation, Inc.,
|
18 |
|
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
19 |
|
|
##
|
20 |
|
|
## As a special exception, if other files instantiate templates or use macros
|
21 |
|
|
## or inline functions from this file, or you compile this file and link it
|
22 |
|
|
## with other works to produce a work based on this file, this file does not
|
23 |
|
|
## by itself cause the resulting work to be covered by the GNU General Public
|
24 |
|
|
## License. However the source code for this file must still be made available
|
25 |
|
|
## in accordance with section (3) of the GNU General Public License.
|
26 |
|
|
##
|
27 |
|
|
## This exception does not invalidate any other reasons why a work based on
|
28 |
|
|
## this file might be covered by the GNU General Public License.
|
29 |
|
|
##
|
30 |
|
|
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
31 |
|
|
## at http://sources.redhat.com/ecos/ecos-license/
|
32 |
|
|
## -------------------------------------------
|
33 |
|
|
#####ECOSGPLCOPYRIGHTEND####
|
34 |
|
|
##=============================================================================
|
35 |
|
|
/*****************************************************************************
|
36 |
|
|
var_arch.S -- mcf52xx variant code
|
37 |
|
|
*****************************************************************************/
|
38 |
|
|
|
39 |
|
|
#include
|
40 |
|
|
|
41 |
|
|
/*****************************************************************************
|
42 |
|
|
FUNC_START -- Function declaration macro
|
43 |
|
|
*****************************************************************************/
|
44 |
|
|
#define FUNC_START(name) \
|
45 |
|
|
.text; \
|
46 |
|
|
.even; \
|
47 |
|
|
.globl name; \
|
48 |
|
|
name:
|
49 |
|
|
|
50 |
|
|
/* ************************************************************************ */
|
51 |
|
|
/* These routines write to the special purpose registers in the ColdFire */
|
52 |
|
|
/* core. Since these registers are write-only in the supervisor model, no */
|
53 |
|
|
/* corresponding read routines exist. */
|
54 |
|
|
|
55 |
|
|
FUNC_START(mcf52xx_wr_vbr)
|
56 |
|
|
move.l 4(%sp),%d0
|
57 |
|
|
andi.l #0xFFF00000,%d0 /* align to 1M boundary */
|
58 |
|
|
movec %d0,%vbr
|
59 |
|
|
nop
|
60 |
|
|
rts
|
61 |
|
|
|
62 |
|
|
FUNC_START(mcf52xx_wr_cacr)
|
63 |
|
|
move.l 4(%sp),%d0
|
64 |
|
|
movec %d0,%cacr
|
65 |
|
|
nop
|
66 |
|
|
rts
|
67 |
|
|
|
68 |
|
|
FUNC_START(mcf52xx_wr_acr0)
|
69 |
|
|
move.l 4(%sp),%d0
|
70 |
|
|
movec %d0,%acr0
|
71 |
|
|
nop
|
72 |
|
|
rts
|
73 |
|
|
|
74 |
|
|
FUNC_START(mcf52xx_wr_acr1)
|
75 |
|
|
move.l 4(%sp),%d0
|
76 |
|
|
movec %d0,%acr1
|
77 |
|
|
nop
|
78 |
|
|
rts
|
79 |
|
|
|
80 |
|
|
FUNC_START(mcf52xx_wr_rambar)
|
81 |
|
|
move.l 4(%sp),%d0
|
82 |
|
|
.equ rambar,0xc04 /* Rc for movec */
|
83 |
|
|
movec %d0,#rambar
|
84 |
|
|
nop
|
85 |
|
|
rts
|
86 |
|
|
|
87 |
|
|
|