]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/hal/fr30/mb91301/v2_0/cdl/hal_fr30_mb91301.cdl
Initial revision
[karo-tx-redboot.git] / packages / hal / fr30 / mb91301 / v2_0 / cdl / hal_fr30_mb91301.cdl
1 # ====================================================================
2 #
3 #      hal_fr30_mb91301.cdl
4 #
5 #      FR30/mb91301 variant architectural HAL package configuration data
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, 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 version.
16 ##
17 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
18 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 ## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
20 ## for more details.
21 ##
22 ## You should have received a copy of the GNU General Public License along
23 ## with eCos; if not, write to the Free Software Foundation, Inc.,
24 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
25 ##
26 ## As a special exception, if other files instantiate templates or use macros
27 ## or inline functions from this file, or you compile this file and link it
28 ## with other works to produce a work based on this file, this file does not
29 ## by itself cause the resulting work to be covered by the GNU General Public
30 ## License. However the source code for this file must still be made available
31 ## in accordance with section (3) of the GNU General Public License.
32 ##
33 ## This exception does not invalidate any other reasons why a work based on
34 ## this file might be covered by the GNU General Public License.
35 ##
36 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 ## at http://sources.redhat.com/ecos/ecos-license/
38 ## -------------------------------------------
39 #####ECOSGPLCOPYRIGHTEND####
40 # ====================================================================
41 ######DESCRIPTIONBEGIN####
42 #
43 # Author(s):      larsi
44 # Original data:  bartv, nickg
45 # Contributors:
46 # Date:           2006-07-09
47 #
48 #####DESCRIPTIONEND####
49 #
50 # ====================================================================
51
52 cdl_package CYGPKG_HAL_FR30_MB91301 {
53     display       "MB91301 variant"
54     parent        CYGPKG_HAL_FR30
55     implements    CYGINT_HAL_FR30_VARIANT
56     hardware
57     include_dir   cyg/hal
58     define_header hal_fr30_mb91301.h
59     description   "
60            The MB91301 architecture HAL package provides generic support
61            for this processor architecture. It is also necessary to
62            select a specific target platform HAL package."
63
64
65     define_proc {
66         puts $::cdl_header "#include <pkgconf/hal_fr30.h>"
67     }
68
69     cdl_component CYGHWR_HAL_FR30_MB91301_SYSTEM_CLOCK_MHZ {
70         display "System clock speed in MHz"
71         flavor data
72         calculated { (CYGHWR_HAL_FR30_MB91301_CRYSTAL_SPEED * \
73                     CYGHWR_HAL_FR30_MB91301_CLKR) }
74         description    "This is the resulting base clock speed for the board.
75                 It is calculated
76                 CLKR * CRYSTAL_SPEED.
77                 This is NOT the CPU Frequency."
78
79         cdl_option CYGHWR_HAL_FR30_MB91301_CRYSTAL_SPEED {
80             display "Crystal speed in Mhz"
81             flavor data
82             description  "You have to enter the speed of the mounted crystal here.
83                     The resulting base clock is calculated:
84                     CLKR * CRYSTAL_SPEED / CLKB_DIVIDER"
85             legal_values    1 to 17
86             default_value   15
87         }
88
89         cdl_option CYGHWR_HAL_FR30_MB91301_CLKR {
90             display "Main PLL multiply-by rate"
91             flavor data
92             description  "Using this value you can set the resulting base clock
93                     speed. It is calculated:
94                     CLKR * CRYSTAL_SPEED.
95                     DO NOT DO A SETTING HIGHER THAN 4 UNLESS YOU EXACTLY
96                     KNOW WHAT YOU A DOING! "
97             legal_values    1 to 8
98             default_value   4
99         }
100
101         cdl_option CYGHWR_HAL_FR30_MB91301_CLKB_DIVIDER {
102             display "Base clock divider"
103             flavor data
104             description  "Using this value you can limit the base clock speed.
105                     You set the divider. The resulting base clock speed
106                     is calculated:
107                     CLKB = system clock / divider
108                     CPU, internal memory and internal buses use this base clock!
109                     A value other than 1 can cause problems when using the stop
110                     mode of the CPU.
111                     See Fujitsu MB91301 hardware manual Chapter 5 for
112                     constraints on setting this value!"
113             legal_values    1 to 16
114             default_value   1
115         }
116
117         cdl_option CYGHWR_HAL_FR30_MB91301_CLKP_DIVIDER {
118             display "Peripheral clock divider"
119             flavor data
120             description  "Using this value you can set the peripheral clock
121                     speed. You set the divider. The resulting peripheral clock
122                     speed is calculated:
123                     CLKP = system clock / divider
124                     See Fujitsu MB91301 hardware manual Chapter 5 for constraints on setting
125                     this value!"
126             legal_values    1 to 16
127             default_value   4
128         }
129
130         cdl_option CYGHWR_HAL_FR30_MB91301_CLKT_DIVIDER {
131             display "External buses clock divider"
132             flavor data
133             description  "Using this value you can set the external buses clock
134                     speed. You set the divider. The resulting external buses
135                     clock speed is calculated:
136                     CLKT = system clock / divider
137                     See Fujitsu MB91301 hardware manual Chapter 5 for constraints on setting
138                     this value!"
139             legal_values    1 to 16
140             default_value   1
141         }
142
143     }
144
145
146     # Real-time clock/counter specifics
147     cdl_component CYGNUM_HAL_RTC_CONSTANTS {
148         display       "Real-time clock constants."
149         flavor        none
150
151         cdl_option CYGNUM_HAL_RTC_NUMERATOR {
152             display       "Real-time clock numerator"
153             flavor        data
154             default_value 1000000000
155         }
156         cdl_option CYGNUM_HAL_RTC_DENOMINATOR {
157             display       "Real-time clock denominator"
158             flavor        data
159             default_value 100
160         }
161         cdl_option CYGNUM_HAL_RTC_PERIOD {
162             display       "Real-time clock period"
163             flavor        data
164             default_value {(CYGHWR_HAL_FR30_MB91301_CRYSTAL_SPEED * CYGHWR_HAL_FR30_MB91301_CLKR * 1000000) / (CYGHWR_HAL_FR30_MB91301_CLKP_DIVIDER * CYGNUM_HAL_RTC_DENOMINATOR * 32)}
165             description   "
166                 The tick timer facility is used
167                 to drive the eCos kernel RTC. Reload Timer 1 is used. The count
168                 register decrements at the CLKP clock speed. We use prescaler 32.
169                 By default we want 100 Hz."
170         }
171     }
172
173
174     compile       hal_diag.c var_misc.c variant.S
175
176     make {
177         <PREFIX>/lib/target.ld: <PACKAGE>/src/fr30_mb91301.ld
178         $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
179         @echo $@ ": \\" > $(notdir $@).deps
180         @tail -n +2 target.tmp >> $(notdir $@).deps
181         @echo >> $(notdir $@).deps
182         @rm target.tmp
183     }
184
185    cdl_option CYGBLD_LINKER_SCRIPT {
186        display "Linker script"
187        flavor data
188        no_define
189        calculated  { "src/fr30_mb91301.ld" }
190    }
191
192 }