1 # ====================================================================
5 # Support for MMC cards
7 # ====================================================================
8 #####ECOSGPLCOPYRIGHTBEGIN####
9 ## -------------------------------------------
10 ## This file is part of eCos, the Embedded Configurable Operating System.
11 ## Copyright (C) 2004, 2005, 2006 eCosCentric Limited
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.
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
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.
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.
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####
40 # Author(s): bartv,jlarmour
43 #####DESCRIPTIONEND####
44 # ====================================================================
46 cdl_package CYGPKG_DEVS_DISK_MMC {
47 display "Disk driver for MMC cards"
48 doc ecos-ref/devs-disk-mmc-part.html
52 parent CYGPKG_IO_DISK_DEVICES
53 active_if CYGPKG_IO_DISK
55 cdl_interface CYGINT_DEVS_DISK_MMC_SPI_CONNECTORS {
56 active_if CYGPKG_IO_SPI
57 display "Number of MMC connectors accessed via SPI"
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
66 This option enables support for accessing an MMC card via an
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 *****/"
77 cdl_option CYGDAT_DEVS_DISK_MMC_SPI_DISK0_NAME {
78 display "Device name for the MMC/SPI disk 0 device"
80 default_value { "\"/dev/hd0/\"" }
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."
86 # Testing support. For now just hard-code some values for partition 0
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\""
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
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."
103 cdl_option CYGPKG_DEVS_DISK_MMC_SPI_IDLE_RETRIES_WAIT {
104 display "Idle to operational retry wait"
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."
113 # EOF devs_disk_mmc.cdl