OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [io/] [flash/] [current/] [cdl/] [io_flash.cdl] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      io_flash.cdl
4
#
5
#      eCos IO 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, 2003, 2004, 2006, 2009, 2010 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):      gthomas
43
# Original data:  gthomas
44
# Contributors:   woehler, bartv
45
# Date:           2000-07-06
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_IO_FLASH {
52
    display         "FLASH device drivers"
53
    include_dir     cyg/io
54
    doc             ref/io-flash.html
55
    description     "
56
        This package provides support for the flash devices on the
57
        current platform."
58
    requires    CYGPKG_ISOINFRA
59
    requires    CYGINT_ISO_STRING_STRFUNCS
60
 
61
    compile     flash.c
62
 
63
    cdl_interface CYGHWR_IO_FLASH_DEVICE {
64
        display     "Hardware FLASH device drivers"
65
        requires    { CYGHWR_IO_FLASH_DEVICE >= 1 }
66
        description "
67
            This calculated option gives the number of flash devices
68
            on the current platform. The generic flash support requires
69
            at least one device."
70
    }
71
 
72
    cdl_interface CYGHWR_IO_FLASH_BLOCK_LOCKING {
73
        display     "Hardware can support block locking"
74
        flavor      booldata
75
        description "
76
            This option will be enabled by devices which can support
77
            locking (write-protection) of individual flash blocks. If
78
            none of the devices support locking then the relevant code
79
            in the generic flash package can be eliminated."
80
    }
81
 
82
    cdl_interface CYGHWR_IO_FLASH_INDIRECT_READS {
83
        display     "Hardware requires indirect reads"
84
        flavor      booldata
85
        description "
86
            Some flash devices can be read directly like any other
87
            memory. Others can only be accessed indirectly, which
88
            involves extra code. If none of the flash devices on the
89
            target hardware use indirect reads then the extra code
90
            can be eliminated."
91
    }
92
 
93
    cdl_interface CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED {
94
        display     "Device driver needs cache handled centrally"
95
        flavor      booldata
96
        description "
97
            Managing flash often requires interacting with the cache.
98
            Some device drivers do not require the generic flash code to
99
            manipulate the cache, either because they do it themselves or
100
            because the hardware does the right thing. Other drivers
101
            require the generic code to disable/enable the cache before
102
            calling into the driver."
103
    }
104
 
105
    cdl_interface CYGHWR_IO_FLASH_DEVICE_LEGACY {
106
        display     "Hardware driver uses the legacy interface"
107
        flavor      booldata
108
        compile     -library=libextras.a legacy_dev.c
109
        description "
110
            The generic flash code can work with either a legacy device
111
            driver or with V2 drivers. If a legacy driver is used on the
112
            current platform then this option will be implemented."
113
        requires    { CYGHWR_IO_FLASH_DEVICE_LEGACY <= 1 }
114
 
115
        # For now assume all legacy devices need the cache handled by
116
        # the central code
117
        implements CYGHWR_IO_FLASH_DEVICE_NEEDS_CACHE_HANDLED
118
    }
119
 
120
    cdl_option CYGSEM_IO_FLASH_READ_INDIRECT {
121
        display         "Legacy device driver uses indirect reads."
122
        active_if       CYGHWR_IO_FLASH_DEVICE_LEGACY
123
        flavor          bool
124
        default_value   0
125
        requires        { !CYGSEM_IO_FLASH_VERIFY_PROGRAM }
126
        description     "
127
            This option will be asserted by devices which cannot support
128
            direct access to the FLASH memory contents (e.g. EEPROM or NAND
129
            devices).  In these cases, the driver must provide an appropriate
130
            hardware access function."
131
    }
132
 
133
    cdl_option CYGSEM_IO_FLASH_CHATTER {
134
        display         "Display status messages during flash operations"
135
        flavor          bool
136
        default_value   1
137
        description     "
138
           Selecting this option will cause the flash code to print status
139
           messages as various flash operations are undertaken."
140
    }
141
 
142
    cdl_option CYGSEM_IO_FLASH_VERIFY_PROGRAM {
143
        display         "Verify data programmed to flash"
144
        flavor          bool
145
        default_value   1
146
        active_if       { CYGHWR_IO_FLASH_INDIRECT_READS < CYGHWR_IO_FLASH_DEVICE }
147
        description     "
148
           Selecting this option will cause verification of data
149
           programmed to flash."
150
    }
151
 
152
    cdl_option CYGSEM_IO_FLASH_SOFT_WRITE_PROTECT {
153
        display          "Platform has flash soft DIP switch write-protect"
154
        flavor           bool
155
        default_value    0
156
        description      "
157
           Selecting this option will cause the state of a hardware jumper or
158
           dipswitch to be read by software to determine whether the flash is
159
           write-protected or not."
160
    }
161
 
162
    cdl_component CYGPKG_IO_FLASH_BLOCK_DEVICE {
163
        display         "Provide /dev block devices"
164
        flavor          bool
165
        active_if       CYGPKG_IO
166
        default_value   0
167
        compile         -library=libextras.a flashiodev.c
168
        requires        { CYGINT_IO_FLASH_BLOCK_DEVICE_METHODS > 0}
169
        description     "
170
            Provide one or more block devices below /dev which can be
171
            accessed using standard I/O functions such as eCos cyg_io_read()
172
            and POSIX open()."
173
 
174
        cdl_interface CYGINT_IO_FLASH_BLOCK_DEVICE_METHODS {
175
            display         "Number of methods to reference Flash"
176
            flavor          bool
177
            no_define
178
            description     "This interface counts the number of ways Flash can
179
                             be referenced in order to be opened. This is so that
180
                             the configuration can ensure that at least one method
181
                             is available."
182
        }
183
 
184
        cdl_option CYGNUM_IO_FLASH_BLOCK_DEVICES {
185
            display         "Number of /dev/flash/ device slots"
186
            flavor          data
187
            default_value   2
188
            description     "The number of simultaneously open flash devices
189
                             permitted. This is statically configured, rather than
190
                             dynamically allocated at run-time as it is likely the
191
                             number required will be small."
192
        }
193
 
194
        cdl_option CYGFUN_IO_FLASH_BLOCK_FROM_FIS {
195
            display         "Access using named FIS areas"
196
            requires        CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
197
            default_value   CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT
198
            implements      CYGINT_IO_FLASH_BLOCK_DEVICE_METHODS
199
            description     "This method of access to Flash regions uses the names
200
                             of FIS regions to identify the Flash device, or portion
201
                             of the device. For example /dev/flash/fis/jffs2."
202
        }
203
        cdl_option CYGFUN_IO_FLASH_BLOCK_FROM_DEVOFFSET {
204
            display         "Access using device numbers,offsets"
205
            default_value   1
206
            implements      CYGINT_IO_FLASH_BLOCK_DEVICE_METHODS
207
            description     "This method of access to Flash regions uses the Flash
208
                             device number, along with an offset (which may be
209
 
210
                             which will otherwise be assumed to be the whole device.
211
                             For example /dev/flash/0/0x1000 or
212
                             /dev/flash/1/0,65536."
213
        }
214
    }
215
 
216
    cdl_option CYGSEM_IO_FLASH_LEGACY_API {
217
        display          "Provide the legacy user API"
218
        flavor           bool
219
        default_value    1
220
        compile          legacy_api.c
221
        description      "
222
            Provide an implementation of the legacy user API. This is mapped
223
            onto the new API via a small layer of code"
224
    }
225
 
226
    cdl_component CYGPKG_IO_FLASH_BLOCK_DEVICE_LEGACY {
227
        display         "Provide /dev block devices (legacy format)"
228
        flavor          bool
229
        active_if       CYGPKG_IO
230
        default_value   0
231
        compile         -library=libextras.a flashiodevlegacy.c
232
        description     "
233
            Provide one or more block devices below /dev which can be
234
            accessed using standard I/O functions such as eCos cyg_io_read()
235
            and POSIX open(). This format of configuration is deprecated,
236
            but is included for compatibility with older configurations."
237
 
238
        for { set ::dev 1 } { $::dev <= 2 } { incr ::dev } {
239
 
240
            cdl_component CYGPKG_IO_FLASH_BLOCK_DEVICE_$::dev {
241
                display       "Provide block device $::dev"
242
                if { 1 == $::dev } {
243
                    default_value 1
244
                } else {
245
                    default_value 0
246
                }
247
                description "Provide block device $::dev for use with standard I/O"
248
 
249
                cdl_option CYGDAT_IO_FLASH_BLOCK_DEVICE_NAME_$::dev {
250
                    display       "Name of flash block device $::dev"
251
                    flavor        data
252
                    default_value "\"\\\"/dev/flash$::dev\\\"\""
253
                    description "
254
                        This option determines the name by which the block
255
                        device can be accessed."
256
                }
257
 
258
                cdl_interface CYGINT_IO_FLASH_BLOCK_CFG_$::dev {
259
                    requires 1 == CYGINT_IO_FLASH_BLOCK_CFG_$::dev
260
                    no_define
261
                }
262
 
263
                cdl_component CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_$::dev {
264
                    display         "Static configuration via offset"
265
                    default_value   1
266
                    implements      CYGINT_IO_FLASH_BLOCK_CFG_$::dev
267
                    description     "
268
                        This configures the flash block device $::dev
269
                        with static offset from the base of the first
270
                        flash device and length"
271
 
272
                    cdl_option CYGNUM_IO_FLASH_BLOCK_OFFSET_$::dev {
273
                        display         "Start offset from flash base"
274
                        flavor          data
275
                        default_value   0xFFFFFFFF
276
                        requires        0xFFFFFFFF != CYGNUM_IO_FLASH_BLOCK_OFFSET_$::dev
277
                        description     "
278
                            This gives the offset from the base of flash
279
                            of the first flash device which this block device
280
                            corresponds to."
281
                    }
282
                    cdl_option CYGNUM_IO_FLASH_BLOCK_LENGTH_$::dev {
283
                        display         "Length"
284
                        flavor          data
285
                        default_value   0
286
                        requires        0 != CYGNUM_IO_FLASH_BLOCK_LENGTH_$::dev
287
                        description     "
288
                            This gives the length of the region of flash given over
289
                            to this block device."
290
                    }
291
                }
292
 
293
                cdl_component CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_ABSOLUTE_$::dev {
294
                    display         "Static configuration via absolute address"
295
                    default_value   0
296
                    implements      CYGINT_IO_FLASH_BLOCK_CFG_$::dev
297
                    description     "
298
                        This configures the flash block device $::dev
299
                        with absolute base address and a length"
300
 
301
                    cdl_option CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_$::dev {
302
                        display         "Start absolute address"
303
                        flavor          data
304
                        default_value   0xFFFFFFFF
305
                        requires        0xFFFFFFFF != CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_$::dev
306
                        description     "
307
                            This gives the absolute address in flash which this
308
                            block device corresponds to."
309
                    }
310
                    cdl_option CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_$::dev {
311
                        display         "Length"
312
                        flavor          data
313
                        default_value   0
314
                        requires        0 != CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_$::dev
315
                        description     "
316
                            This gives the length of the region of flash given over
317
                            to this block device."
318
                    }
319
                }
320
 
321
                cdl_component CYGNUM_IO_FLASH_BLOCK_CFG_FIS_$::dev {
322
                    display         "Configuration from FIS"
323
                    default_value   0
324
                    implements      CYGINT_IO_FLASH_BLOCK_CFG_$::dev
325
                    description     "
326
                          This configures the flash block device $::dev
327
                          from Redboot FIS"
328
 
329
                    cdl_component CYGDAT_IO_FLASH_BLOCK_FIS_NAME_$::dev {
330
                        display     "Name of FIS entry"
331
                        flavor      data
332
                        requires    "\"\"" != CYGDAT_IO_FLASH_BLOCK_FIS_NAME_$::dev
333
                        if { 1 == $::dev } {
334
                            default_value { "\"jffs2\"" }
335
                        } elseif { 2 == $::dev } {
336
                            default_value { "\"jffs2-2\"" }
337
                        } else {
338
                            default_value { "\"\"" }
339
                        }
340
                    }
341
                }
342
            }
343
        }
344
    }
345
 
346
    cdl_component CYGPKG_IO_FLASH_OPTIONS {
347
        display "Flash device driver build options"
348
        flavor  none
349
        description   "
350
            Package specific build options including control over
351
            compiler flags used only in building this package,
352
            and details of which tests are built."
353
 
354
 
355
        cdl_option CYGPKG_IO_FLASH_CFLAGS_ADD {
356
            display "Additional compiler flags"
357
            flavor  data
358
            no_define
359
            default_value { "" }
360
            description   "
361
                This option modifies the set of compiler flags for
362
                building the flash device drivers. These flags are used in addition
363
                to the set of global flags."
364
        }
365
 
366
        cdl_option CYGPKG_IO_FLASH_CFLAGS_REMOVE {
367
            display "Suppressed compiler flags"
368
            flavor  data
369
            no_define
370
            default_value { "" }
371
            description   "
372
                This option modifies the set of compiler flags for
373
                building the flash device drivers. These flags are removed from
374
                the set of global flags if present."
375
        }
376
 
377
        cdl_component CYGPKG_IO_FLASH_TESTS {
378
            display "Flash device driver tests"
379
            flavor  data
380
            no_define
381
#            requires   { CYGINT_IO_FLASH_TESTS_ADDR_METHOD == 1 }
382
            calculated { (CYGSEM_IO_FLASH_LEGACY_API ? "tests/flash1" : "") .
383
                         (CYGPKG_IO_FLASH_BLOCK_DEVICE ? " tests/flashdev" : "") }
384
            description   "
385
                This option specifies the set of tests for the flash device drivers."
386
 
387
#            cdl_interface CYGINT_IO_FLASH_TESTS_ADDR_METHOD {
388
#                display       "Set single Flash access method"
389
#            }
390
#
391
#
392
#            cdl_option CYGTST_IO_FLASH_TESTS_ADDR_FIS {
393
#                display       "Use \"flashtest\" FIS entry"
394
#                default_value CYGFUN_IO_FLASH_BLOCK_FROM_FIS
395
#                implements    CYGINT_IO_FLASH_TESTS_ADDR_METHOD
396
#                requires      CYGFUN_IO_FLASH_BLOCK_FROM_FIS
397
#                requires      !CYGTST_IO_FLASH_TESTS_ADDR_HARDCODE
398
#                description   "
399
#                        This option means that tests will use the Flash region
400
#                        identified by the \"flashtest\" FIS entry if it is found."
401
#            }
402
#
403
#            cdl_component CYGTST_IO_FLASH_TESTS_ADDR_HARDCODE {
404
#                display       "Use hardcoded offset from Flash base"
405
#                default_value !CYGTST_IO_FLASH_TESTS_ADDR_FIS
406
#                implements    CYGINT_IO_FLASH_TESTS_ADDR_METHOD
407
#                requires      !CYGTST_IO_FLASH_TESTS_ADDR_FIS
408
#                description   "
409
#                        This option means that tests will use the flash region
410
#                        identified by the \"flashtest\" FIS entry if it is found."
411
#
412
                cdl_option CYGNUM_IO_FLASH_TEST_OFFSET {
413
                    display         "Start offset from flash base"
414
                    flavor          data
415
                    default_value   0x100000
416
                    description     "
417
                        This gives the offset from the base of flash where tests
418
                        can be run.  It is important to set this correctly, as an
419
                        incorrect value could allow the tests to write over critical
420
                        portions of the FLASH device and possibly render the target
421
                        board totally non-functional."
422
                }
423
                cdl_option CYGNUM_IO_FLASH_TEST_LENGTH {
424
                    display         "Length"
425
                    flavor          data
426
                    default_value   0x100000
427
                    description     "
428
                        This gives the length of the region of flash used for testing."
429
                }
430
#            }
431
        }
432
    }
433
}
434
 
435
# EOF io_flash.cdl

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.