1 |
786 |
skrzyp |
##=============================================================================
|
2 |
|
|
##
|
3 |
|
|
## plf.inc
|
4 |
|
|
##
|
5 |
|
|
## m5272c3 assembler header file
|
6 |
|
|
##
|
7 |
|
|
##=============================================================================
|
8 |
|
|
## ####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
## -------------------------------------------
|
10 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
## Copyright (C) 2003, 2006, 2008 Free Software Foundation, Inc.
|
12 |
|
|
##
|
13 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
## the terms of the GNU General Public License as published by the Free
|
15 |
|
|
## Software Foundation; either version 2 or (at your option) any later
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
## for more details.
|
22 |
|
|
##
|
23 |
|
|
## You should have received a copy of the GNU General Public License
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
##=============================================================================
|
40 |
|
|
#######DESCRIPTIONBEGIN####
|
41 |
|
|
##
|
42 |
|
|
## Author(s): bartv
|
43 |
|
|
## Date: 2003-06-04
|
44 |
|
|
######DESCRIPTIONEND####
|
45 |
|
|
##=============================================================================
|
46 |
|
|
|
47 |
|
|
#include
|
48 |
|
|
#include
|
49 |
|
|
#include
|
50 |
|
|
|
51 |
|
|
// ----------------------------------------------------------------------------
|
52 |
|
|
// Various constants to poke into coprocessor or SIM registers
|
53 |
|
|
//
|
54 |
|
|
// MBAR controls the location of the System Integration Module,
|
55 |
|
|
// i.e. all the on-chip hardware. Conventionally this is at
|
56 |
|
|
// location 0x10000000. Obviously it cannot contain code.
|
57 |
|
|
.equ _HAL_MCF5272_MBAR_VALUE_, (HAL_MCFxxxx_MBAR + HAL_MCF5272_MBAR_SC + HAL_MCF5272_MBAR_UC + HAL_MCF5272_MBAR_V)
|
58 |
|
|
|
59 |
|
|
// Chip select 0 is connected to 2MB of flash @ 0xFFE00000.
|
60 |
|
|
// This chip is 16 bits wide and requires 6 wait states according
|
61 |
|
|
// to the docs. (dBUG uses 8 wait states initially, 5 later on).
|
62 |
|
|
// 5 seems to work fine.
|
63 |
|
|
.equ _HAL_MCF5272_CSBR0_VALUE_, (0xFFE00000 + HAL_MCF5272_CSBR_EBI_16_32 + HAL_MCF5272_CSBR_BW_16 + HAL_MCF5272_CSBR_ENABLE)
|
64 |
|
|
.equ _HAL_MCF5272_CSOR0_VALUE_, (0xFFE00000 + (0x05 << HAL_MCF5272_CSOR_WS_SHIFT))
|
65 |
|
|
|
66 |
|
|
// The board can be populated with sram on cs2, but for now assume a bare board.
|
67 |
|
|
|
68 |
|
|
// Chip select 7 is connected to 4MB of SDRAM, which should be @ 0x0
|
69 |
|
|
.equ _HAL_MCF5272_CSBR7_VALUE_, (0x00000000 + HAL_MCF5272_CSBR_EBI_SDRAM + HAL_MCF5272_CSBR_BW_CACHELINE + HAL_MCF5272_CSBR_ENABLE)
|
70 |
|
|
.equ _HAL_MCF5272_CSOR7_VALUE_, (0xFFC00000 + (0x1F << HAL_MCF5272_CSOR_WS_SHIFT))
|
71 |
|
|
|
72 |
|
|
// SDRAM control registers
|
73 |
|
|
.equ _HAL_MCF5272_SDCR_VALUE_, (HAL_MCF5272_SDCR_MCAS_A9 + HAL_MCF5272_SDCR_BALOC_A22_A21 + HAL_MCF5272_SDCR_REG + HAL_MCF5272_SDCR_INIT)
|
74 |
|
|
#if defined(CYGHWR_HAL_SYSTEM_CLOCK_HZ_66000000)
|
75 |
|
|
.equ _HAL_MCF5272_SDTR_VALUE_, (HAL_MCF5272_SDTR_RTP_66+HAL_MCF5272_SDTR_RC_6+HAL_MCF5272_SDTR_RP_4+HAL_MCF5272_SDTR_RCD_3+HAL_MCF5272_SDTR_CLT_2)
|
76 |
|
|
#elif defined(CYGHWR_HAL_SYSTEM_CLOCK_HZ_48000000)
|
77 |
|
|
.equ _HAL_MCF5272_SDTR_VALUE_, (HAL_MCF5272_SDTR_RTP_48+HAL_MCF5272_SDTR_RC_6+HAL_MCF5272_SDTR_RP_4+HAL_MCF5272_SDTR_RCD_3+HAL_MCF5272_SDTR_CLT_2)
|
78 |
|
|
#else
|
79 |
|
|
# error Unsupported system clock speed.
|
80 |
|
|
#endif
|
81 |
|
|
|
82 |
|
|
// ----------------------------------------------------------------------------
|
83 |
|
|
// Startup code. Use the processor defaults.
|
84 |
|
|
#if defined(CYG_HAL_STARTUP_ROM) || defined(CYG_HAL_STARTUP_ROMFFE)
|
85 |
|
|
# define _HAL_MCF5272_STANDARD_INIT_ROM_ 1
|
86 |
|
|
#else
|
87 |
|
|
# define _HAL_MCF5272_STANDARD_INIT_RAM_ 1
|
88 |
|
|
#endif
|
89 |
|
|
|
90 |
|
|
//------------------------------------------------------------------------------
|
91 |
|
|
// end of plf.inc
|