4.115
Last change
on this file since 736abcf was
736abcf,
checked in by Joel Sherrill <joel.sherrill@…>, on 10/07/14 at 22:28:52
|
m68k/mcf5235/startup/bspstart.c: Add include of <bsp/bootcard.h> to fix warning and clean up
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * This routine does the bulk of the system initialization. |
---|
3 | */ |
---|
4 | |
---|
5 | /* |
---|
6 | * COPYRIGHT (c) 1989-2008. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * |
---|
9 | * The license and distribution terms for this file may be |
---|
10 | * found in the file LICENSE in this distribution or at |
---|
11 | * http://www.rtems.org/license/LICENSE. |
---|
12 | */ |
---|
13 | |
---|
14 | #include <bsp.h> |
---|
15 | #include <bsp/bootcard.h> |
---|
16 | |
---|
17 | /* |
---|
18 | * Read/write copy of common cache |
---|
19 | * Split I/D cache |
---|
20 | * Allow CPUSHL to invalidate a cache line |
---|
21 | * Enable buffered writes |
---|
22 | * No burst transfers on non-cacheable accesses |
---|
23 | * Default cache mode is *disabled* (cache only ACRx areas) |
---|
24 | */ |
---|
25 | uint32_t cacr_mode = MCF5XXX_CACR_CENB | MCF5XXX_CACR_DBWE | MCF5XXX_CACR_DCM; |
---|
26 | |
---|
27 | /* |
---|
28 | * Cacheable areas |
---|
29 | */ |
---|
30 | extern char RamBase[]; |
---|
31 | extern char RamSize[]; |
---|
32 | |
---|
33 | /* |
---|
34 | * bsp_start |
---|
35 | * |
---|
36 | * This routine does the bulk of the system initialisation. |
---|
37 | */ |
---|
38 | void bsp_start( void ) |
---|
39 | { |
---|
40 | /* |
---|
41 | * Invalidate the cache and disable it |
---|
42 | */ |
---|
43 | m68k_set_acr0(0); |
---|
44 | m68k_set_acr1(0); |
---|
45 | m68k_set_cacr(MCF5XXX_CACR_CINV); |
---|
46 | |
---|
47 | /* |
---|
48 | * Cache SDRAM |
---|
49 | */ |
---|
50 | m68k_set_acr0(MCF5XXX_ACR_AB((uintptr_t)RamBase) | |
---|
51 | MCF5XXX_ACR_AM((uintptr_t)RamSize-1) | |
---|
52 | MCF5XXX_ACR_EN | |
---|
53 | MCF5XXX_ACR_BWE | |
---|
54 | MCF5XXX_ACR_SM_IGNORE); |
---|
55 | |
---|
56 | /* |
---|
57 | * Enable the cache |
---|
58 | */ |
---|
59 | m68k_set_cacr(cacr_mode); |
---|
60 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.