1 |
786 |
skrzyp |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# mcfxxxx_eth.cdl
|
4 |
|
|
#
|
5 |
|
|
# Ethernet driver for Freescale MCFxxxx ColdFires
|
6 |
|
|
#
|
7 |
|
|
# ====================================================================
|
8 |
|
|
# ####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
# -------------------------------------------
|
10 |
|
|
# This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
# Copyright (C) 2003, 2004, 2006, 2007, 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 |
|
|
#
|
45 |
|
|
#####DESCRIPTIONEND####
|
46 |
|
|
# ====================================================================
|
47 |
|
|
|
48 |
|
|
cdl_package CYGPKG_DEVS_ETH_MCFxxxx {
|
49 |
|
|
display "MCFxxxx ethernet driver"
|
50 |
|
|
doc ref/devs-eth-m68k-mcfxxxx-part.html
|
51 |
|
|
parent CYGPKG_IO_ETH_DRIVERS
|
52 |
|
|
active_if CYGPKG_IO_ETH_DRIVERS
|
53 |
|
|
active_if CYGPKG_HAL_M68K_MCFxxxx
|
54 |
|
|
include_dir cyg/io/eth
|
55 |
|
|
|
56 |
|
|
implements CYGHWR_NET_DRIVERS
|
57 |
|
|
implements CYGHWR_NET_DRIVER_ETH0
|
58 |
|
|
implements CYGINT_IO_ETH_MULTICAST
|
59 |
|
|
requires CYGPKG_INFRA CYGPKG_HAL CYGPKG_ISOINFRA
|
60 |
|
|
compile -library=libextras.a if_mcf5272.c
|
61 |
|
|
|
62 |
|
|
description "
|
63 |
|
|
This driver supports the on-chip ethernet provided by some
|
64 |
|
|
Freescale MCFxxxx coldfire processors."
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
cdl_option CYGDAT_DEVS_ETH_MCFxxxx_NAME {
|
68 |
|
|
display "Device name for this ethernet device"
|
69 |
|
|
flavor data
|
70 |
|
|
default_value {"\"eth0\""}
|
71 |
|
|
description "
|
72 |
|
|
This option controls the name of the on-chip ethernet device.
|
73 |
|
|
By default the on-chip device is labelled eth0, and any
|
74 |
|
|
additional devices can be named eth1 onwards."
|
75 |
|
|
}
|
76 |
|
|
|
77 |
|
|
cdl_option CYGNUM_DEVS_ETH_MCFxxxx_RXBUFFERS {
|
78 |
|
|
display "Number of receive buffers"
|
79 |
|
|
flavor data
|
80 |
|
|
default_value 4
|
81 |
|
|
legal_values 2 to 16
|
82 |
|
|
description "
|
83 |
|
|
This ethernet driver statically allocates a number of buffers
|
84 |
|
|
for incoming packets. Usually each buffer requires 1528 bytes.
|
85 |
|
|
Increasing the number of buffers reduces the probability of packets getting
|
86 |
|
|
lost under heavy processor or network load. Reducing the number
|
87 |
|
|
of buffers makes lost packets more likely, potentially causing
|
88 |
|
|
significant TCP/IP delays."
|
89 |
|
|
}
|
90 |
|
|
|
91 |
|
|
cdl_option CYGNUM_DEVS_ETH_MCFxxxx_ISR_RX_PRIORITY {
|
92 |
|
|
display "Interrupt priority for incoming packets"
|
93 |
|
|
flavor data
|
94 |
|
|
default_value { is_loaded(CYGNUM_HAL_M68K_MCFxxxx_ISR_DEFAULT_PRIORITY_ETH_RX) ?
|
95 |
|
|
CYGNUM_HAL_M68K_MCFxxxx_ISR_DEFAULT_PRIORITY_ETH_RX :
|
96 |
|
|
CYGNUM_HAL_M68K_MCFxxxx_ISR_PRIORITY_MIN }
|
97 |
|
|
legal_values CYGNUM_HAL_M68K_MCFxxxx_ISR_PRIORITY_MIN to CYGNUM_HAL_M68K_MCFxxxx_ISR_PRIORITY_MAX
|
98 |
|
|
description "
|
99 |
|
|
By default the ethernet is given an interrupt priority of 1,
|
100 |
|
|
in other words it will interrupt at IPL level 1. The device can
|
101 |
|
|
be made to interrupt at a higher priority but this is rarely
|
102 |
|
|
useful since nearly all processing happens at thread level
|
103 |
|
|
or DSR level rather than ISR level."
|
104 |
|
|
}
|
105 |
|
|
|
106 |
|
|
cdl_option CYGNUM_DEVS_ETH_MCFxxxx_ISR_TX_PRIORITY {
|
107 |
|
|
display "Interrupt priority for packet transmits"
|
108 |
|
|
flavor data
|
109 |
|
|
default_value { is_loaded(CYGNUM_HAL_M68K_MCFxxxx_ISR_DEFAULT_PRIORITY_ETH_TX) ?
|
110 |
|
|
CYGNUM_HAL_M68K_MCFxxxx_ISR_DEFAULT_PRIORITY_ETH_TX :
|
111 |
|
|
CYGNUM_HAL_M68K_MCFxxxx_ISR_PRIORITY_MIN }
|
112 |
|
|
legal_values CYGNUM_HAL_M68K_MCFxxxx_ISR_PRIORITY_MIN to CYGNUM_HAL_M68K_MCFxxxx_ISR_PRIORITY_MAX
|
113 |
|
|
description "
|
114 |
|
|
By default the ethernet is given an interrupt priority of 1,
|
115 |
|
|
in other words it will interrupt at IPL level 1. The device can
|
116 |
|
|
be made to interrupt at a higher priority but this is rarely
|
117 |
|
|
useful since nearly all processing happens at thread level
|
118 |
|
|
or DSR level rather than ISR level."
|
119 |
|
|
}
|
120 |
|
|
|
121 |
|
|
cdl_interface CYGINT_DEVS_ETH_MCFxxxx_PLATFORM_MAC {
|
122 |
|
|
display "Platform provides network MAC address"
|
123 |
|
|
flavor bool
|
124 |
|
|
}
|
125 |
|
|
|
126 |
|
|
cdl_option CYGDAT_DEVS_ETH_MCFxxxx_PLATFORM_MAC {
|
127 |
|
|
display "Default MAC address"
|
128 |
|
|
active_if !CYGINT_DEVS_ETH_MCFxxxx_PLATFORM_MAC
|
129 |
|
|
flavor data
|
130 |
|
|
default_value { "0x00, 0xFF, 0x12, 0x34, 0x56, 0x78" }
|
131 |
|
|
description "
|
132 |
|
|
If the target board does not provide a fixed unique ethernet
|
133 |
|
|
MAC address assigned by the IEEE then it is necessary to invent one.
|
134 |
|
|
If RedBoot is in use and provides configuration data held in
|
135 |
|
|
flash then that will be used. If RedBoot is not in use or if the
|
136 |
|
|
fconfig flash block does not contain an entry for the MAC address
|
137 |
|
|
then the code will use a default value, determined by this option.
|
138 |
|
|
If the local network has multiple boards attached then it is
|
139 |
|
|
essential that each one has a unique MAC address."
|
140 |
|
|
}
|
141 |
|
|
|
142 |
|
|
cdl_option CYGFUN_DEVS_ETH_MCFxxxx_STATISTICS {
|
143 |
|
|
display "Maintain traffic statistics"
|
144 |
|
|
flavor bool
|
145 |
|
|
default_value CYGPKG_SNMPAGENT
|
146 |
|
|
description "
|
147 |
|
|
The MCFxxxx ethernet driver can maintain some statistics
|
148 |
|
|
about traffic, for example the number of incoming and
|
149 |
|
|
outgoing packets. These statistics are intended mainly
|
150 |
|
|
for SNMP agent software."
|
151 |
|
|
}
|
152 |
|
|
|
153 |
|
|
cdl_component CYGPKG_DEVS_ETH_MCFxxxx_OPTIONS {
|
154 |
|
|
display "Build options"
|
155 |
|
|
flavor none
|
156 |
|
|
description "
|
157 |
|
|
Package-specific build options including control over compiler
|
158 |
|
|
flags used only in building this package."
|
159 |
|
|
|
160 |
|
|
cdl_option CYGPKG_DEVS_ETH_MCFxxxx_CFLAGS_ADD {
|
161 |
|
|
display "Additional compiler flags"
|
162 |
|
|
flavor data
|
163 |
|
|
no_define
|
164 |
|
|
requires {
|
165 |
|
|
is_substr(CYGBLD_GLOBAL_CFLAGS, "-O1") || is_substr(CYGBLD_GLOBAL_CFLAGS, "-O2") ||
|
166 |
|
|
is_substr(CYGBLD_GLOBAL_CFLAGS, "-O3") || is_substr(CYGBLD_GLOBAL_CFLAGS, "-Os") ||
|
167 |
|
|
is_substr(CYGPKG_DEVS_ETH_MCFxxxx_CFLAGS_ADD, "-O1") ||
|
168 |
|
|
is_substr(CYGPKG_DEVS_ETH_MCFxxxx_CFLAGS_ADD, "-O2") ||
|
169 |
|
|
is_substr(CYGPKG_DEVS_ETH_MCFxxxx_CFLAGS_ADD, "-O3") ||
|
170 |
|
|
is_substr(CYGPKG_DEVS_ETH_MCFxxxx_CFLAGS_ADD, "-Os")
|
171 |
|
|
}
|
172 |
|
|
default_value { ((is_substr(CYGBLD_GLOBAL_CFLAGS, "-O1") || is_substr(CYGBLD_GLOBAL_CFLAGS, "-O2") ||
|
173 |
|
|
is_substr(CYGBLD_GLOBAL_CFLAGS, "-O3") || is_substr(CYGBLD_GLOBAL_CFLAGS, "-Os")) ? "" : "-O2 ") .
|
174 |
|
|
"-D_KERNEL -D__ECOS" }
|
175 |
|
|
description "
|
176 |
|
|
This option modifies the set of compiler flags for
|
177 |
|
|
building this package. These flags are used in addition
|
178 |
|
|
to the set of global flags. Note that the package cannot
|
179 |
|
|
be built with -O0: some of the cache-related code depends
|
180 |
|
|
on certain values being held in registers instead of
|
181 |
|
|
memory."
|
182 |
|
|
}
|
183 |
|
|
cdl_option CYGPKG_DEVS_ETH_MCFxxxx_CFLAGS_REMOVE {
|
184 |
|
|
display "Suppressed compiler flags"
|
185 |
|
|
flavor data
|
186 |
|
|
no_define
|
187 |
|
|
default_value { "" }
|
188 |
|
|
description "
|
189 |
|
|
This option modifies the set of compiler flags for
|
190 |
|
|
building this package. These flags are removed from
|
191 |
|
|
the set of global flags if present."
|
192 |
|
|
}
|
193 |
|
|
}
|
194 |
|
|
}
|