Separate SDIO interface from MMCSD

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2241 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-11-10 18:32:51 +00:00
parent 19fb20b3ef
commit eed2313667
3 changed files with 551 additions and 483 deletions
+5 -4
View File
@@ -49,6 +49,7 @@
#include <nuttx/fs.h> #include <nuttx/fs.h>
#include <nuttx/rwbuffer.h> #include <nuttx/rwbuffer.h>
#include <nuttx/sdio.h>
#include <nuttx/mmcsd.h> #include <nuttx/mmcsd.h>
/**************************************************************************** /****************************************************************************
@@ -66,14 +67,14 @@
struct mmcsd_state_s struct mmcsd_state_s
{ {
struct mmcsd_dev_s *dev; /* The MMCSD device bound to this instance */ struct sdio_dev_s *dev; /* The MMCSD device bound to this instance */
ubyte crefs; /* Open references on the driver */ ubyte crefs; /* Open references on the driver */
/* Status flags */ /* Status flags */
ubyte widebus:1; /* TRUE: Wide 4-bit bus selected */ ubyte widebus:1; /* TRUE: Wide 4-bit bus selected */
ubyte mediachange:1; /* TRUE: Media changed since last check */ ubyte mediachange:1; /* TRUE: Media changed since last check */
#ifdef CONFIG_MMCSD_DMA #ifdef CONFIG_SDIO_DMA
ubyte dma:1; /* TRUE: hardware supports DMA */ ubyte dma:1; /* TRUE: hardware supports DMA */
#endif #endif
@@ -349,7 +350,7 @@ static int mmcsd_hwinitialize(struct mmcsd_state_s *priv)
static inline void mmcsd_hwuninitialize(struct mmcsd_state_s *priv) static inline void mmcsd_hwuninitialize(struct mmcsd_state_s *priv)
{ {
MMCSD_RESET(priv->dev); SDIO_RESET(priv->dev);
} }
/**************************************************************************** /****************************************************************************
@@ -373,7 +374,7 @@ static inline void mmcsd_hwuninitialize(struct mmcsd_state_s *priv)
* *
****************************************************************************/ ****************************************************************************/
int mmcsd_slotinitialize(int minor, int slotno, FAR struct mmcsd_dev_s *dev) int mmcsd_slotinitialize(int minor, int slotno, FAR struct sdio_dev_s *dev)
{ {
struct mmcsd_state_s *priv; struct mmcsd_state_s *priv;
char devname[16]; char devname[16];
+3 -479
View File
File diff suppressed because it is too large Load Diff
+543
View File
File diff suppressed because it is too large Load Diff