]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - packages/devs/disk/generic/mmc/v2_0/cdl/devs_disk_mmc.cdl
Initial revision
[karo-tx-redboot.git] / packages / devs / disk / generic / mmc / v2_0 / cdl / devs_disk_mmc.cdl
1 # ====================================================================
2 #
3 #      devs_disk_mmc.cdl
4 #
5 #      Support for MMC cards
6 #
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2004, 2005, 2006 eCosCentric Limited
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 #####ECOSGPLCOPYRIGHTEND####
37 # ====================================================================
38 ######DESCRIPTIONBEGIN####
39 #
40 # Author(s):      bartv,jlarmour
41 # Date:           2004-04-25
42 #
43 #####DESCRIPTIONEND####
44 # ====================================================================
45
46 cdl_package CYGPKG_DEVS_DISK_MMC {
47     display     "Disk driver for MMC cards"
48     doc         ecos-ref/devs-disk-mmc-part.html
49
50     include_dir cyg/io
51     
52     parent      CYGPKG_IO_DISK_DEVICES
53     active_if   CYGPKG_IO_DISK
54
55     cdl_interface CYGINT_DEVS_DISK_MMC_SPI_CONNECTORS {
56         active_if       CYGPKG_IO_SPI
57         display         "Number of MMC connectors accessed via SPI"
58     }
59
60     cdl_component CYGPKG_DEVS_DISK_MMC_SPI {
61         display         "Access an MMC card via an SPI bus"
62         default_value   { CYGINT_DEVS_DISK_MMC_SPI_CONNECTORS > 0 }
63         compile         -library=libextras.a mmc_spi.c
64         requires        CYGPKG_ERROR CYGPKG_LIBC_STRING 
65         description "
66             This option enables support for accessing an MMC card via an
67             SPI bus."
68         
69         define_proc {
70             puts $::cdl_system_header "/***** MMC/SPI disk driver output start *****/"
71             puts $::cdl_system_header "#ifndef CYGDAT_DEVS_DISK_CFG"
72             puts $::cdl_system_header "#define CYGDAT_DEVS_DISK_CFG <pkgconf/devs_disk_mmc.h>"
73             puts $::cdl_system_header "#endif"
74             puts $::cdl_system_header "/***** MMC/SPI disk driver output end *****/"
75         }
76
77         cdl_option CYGDAT_DEVS_DISK_MMC_SPI_DISK0_NAME {
78             display             "Device name for the MMC/SPI disk 0 device"
79             flavor              data
80             default_value       { "\"/dev/hd0/\"" }
81             description "
82                 This is the device name used to access the raw disk device
83                 in eCos, for example for mount operations. Note that the
84                 trailing slash must be present."
85
86             # Testing support. For now just hard-code some values for partition 0
87             # on the card.
88             define_proc {
89                 puts $::cdl_header "#define CYGDAT_DEVS_DISK_TEST_DEVICE CYGDAT_DEVS_DISK_MMC_SPI_DISK0_NAME \"1\""
90                 puts $::cdl_header "#define CYGDAT_DEVS_DISK_TEST_MOUNTPOINT \"/dosfs\""
91                 puts $::cdl_header "#define CYGDAT_DEVS_DISK_TEST_DIRECTORY  \"/test\""
92             }
93         }
94         
95         cdl_option CYGIMP_DEVS_DISK_MMC_SPI_POLLED {
96             display             "Run the driver in polled mode rather than interrupt-driven"
97             default_value       !CYGPKG_KERNEL
98             description "
99                 By default the MMC disk driver will operate in interrupt-driven
100                 mode if the kernel is present, i.e. if the application is likely
101                 to be multi-threaded. Otherwise it will operate in polled mode."
102         }
103     cdl_option CYGPKG_DEVS_DISK_MMC_SPI_IDLE_RETRIES_WAIT {
104         display          "Idle to operational retry wait"
105         flavor           booldata
106         default_value    10000
107         description      "
108             This option sets how long to wait between retries of attempts to change the
109             card state from idle to operational. It is measured in microseconds."
110     }
111 }
112
113 # EOF devs_disk_mmc.cdl