comparison packages/hal/mn10300/am33/current/src/var_misc.c @ 76:435cced73e2f ecos-v1_3_1-release

eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
author jlarmour
date Tue, 28 Mar 2000 14:10:45 +0000
parents
children 6ed91473a1cd
comparison
equal deleted inserted replaced
75:41bf073c0c32 76:435cced73e2f
1 //==========================================================================
2 //
3 // var_misc.c
4 //
5 // HAL CPU variant miscellaneous functions
6 //
7 //==========================================================================
8 //####COPYRIGHTBEGIN####
9 //
10 // -------------------------------------------
11 // The contents of this file are subject to the Red Hat eCos Public License
12 // Version 1.1 (the "License"); you may not use this file except in
13 // compliance with the License. You may obtain a copy of the License at
14 // http://www.redhat.com/
15 //
16 // Software distributed under the License is distributed on an "AS IS"
17 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
18 // License for the specific language governing rights and limitations under
19 // the License.
20 //
21 // The Original Code is eCos - Embedded Configurable Operating System,
22 // released September 30, 1998.
23 //
24 // The Initial Developer of the Original Code is Red Hat.
25 // Portions created by Red Hat are
26 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
27 // All Rights Reserved.
28 // -------------------------------------------
29 //
30 //####COPYRIGHTEND####
31 //==========================================================================
32 //#####DESCRIPTIONBEGIN####
33 //
34 // Author(s): nickg
35 // Contributors: nickg, jlarmour
36 // Date: 1999-01-21
37 // Purpose: HAL miscellaneous functions
38 // Description: This file contains miscellaneous functions provided by the
39 // HAL.
40 //
41 //####DESCRIPTIONEND####
42 //
43 //========================================================================*/
44
45 #include <pkgconf/hal.h>
46
47 #include <cyg/infra/cyg_type.h> // Base types
48 #include <cyg/infra/cyg_trac.h> // tracing macros
49 #include <cyg/infra/cyg_ass.h> // assertion macros
50
51 #include <cyg/hal/hal_cache.h>
52
53 /*------------------------------------------------------------------------*/
54 /* Variant specific initialization routine. */
55
56 void hal_variant_init(void)
57 {
58 }
59
60 /*------------------------------------------------------------------------*/
61 /* Cache functions. */
62
63 #if 0 //!defined(CYG_HAL_MN10300_SIM)
64 void cyg_hal_dcache_store(CYG_ADDRWORD base, int size)
65 {
66 volatile register CYG_BYTE *way0 = HAL_DCACHE_PURGE_WAY0;
67 volatile register CYG_BYTE *way1 = HAL_DCACHE_PURGE_WAY1;
68 volatile register CYG_BYTE *way2 = HAL_DCACHE_PURGE_WAY2;
69 volatile register CYG_BYTE *way3 = HAL_DCACHE_PURGE_WAY3;
70 register int i;
71 register CYG_ADDRWORD state;
72
73 HAL_DCACHE_IS_ENABLED(state);
74 if (state)
75 HAL_DCACHE_DISABLE();
76
77 way0 += base & 0x000003f0;
78 way1 += base & 0x000003f0;
79 way2 += base & 0x000003f0;
80 way3 += base & 0x000003f0;
81 for( i = 0; i < size; i += HAL_DCACHE_LINE_SIZE )
82 {
83 *(CYG_ADDRWORD *)way0 = 0;
84 *(CYG_ADDRWORD *)way1 = 0;
85 *(CYG_ADDRWORD *)way2 = 0;
86 *(CYG_ADDRWORD *)way3 = 0;
87 way0 += HAL_DCACHE_LINE_SIZE;
88 way1 += HAL_DCACHE_LINE_SIZE;
89 way2 += HAL_DCACHE_LINE_SIZE;
90 way3 += HAL_DCACHE_LINE_SIZE;
91 }
92 if (state)
93 HAL_DCACHE_ENABLE();
94 }
95 #endif
96
97
98 /*------------------------------------------------------------------------*/
99 /* End of var_misc.c */