diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-11-14 18:24:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-11-14 18:24:47 +0000 |
commit | d32930b951c28762ed1315272c54f541cfb045e6 (patch) | |
tree | e0906d1c70528b8f7f315e0c5a35af073ae82526 /nuttx/drivers/mmcsd | |
parent | ae355494c8fead92251af7189409b5d1ccb943b9 (diff) | |
download | px4-nuttx-d32930b951c28762ed1315272c54f541cfb045e6.tar.gz px4-nuttx-d32930b951c28762ed1315272c54f541cfb045e6.tar.bz2 px4-nuttx-d32930b951c28762ed1315272c54f541cfb045e6.zip |
Missing breaks in switch
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2256 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/mmcsd')
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_sdio.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c index 2748b682d..b715ee2d9 100644 --- a/nuttx/drivers/mmcsd/mmcsd_sdio.c +++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c @@ -664,6 +664,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) static inline int mmcsd_mmcinitialize(struct mmcsd_state_s *priv) { +#ifdef CONFIG_MMCSD_MMCSUPPORT uint32 cid[4]; uint32 csd[4]; int ret; @@ -745,7 +746,7 @@ static inline int mmcsd_mmcinitialize(struct mmcsd_state_s *priv) SDIO_CLOCK(priv->dev, CLOCK_MMC_TRANSFER); up_udelay( MMCSD_CLK_DELAY); - +#endif return OK; } @@ -862,7 +863,9 @@ static inline int mmcsd_cardidentify(struct mmcsd_state_s *priv) * skip the SD-specific commands. */ +#ifdef CONFIG_MMCSD_MMCSUPPORT if (priv->type != MMCSD_CARDTYPE_MMC) +#endif { /* Send CMD55 */ @@ -938,7 +941,7 @@ static inline int mmcsd_cardidentify(struct mmcsd_state_s *priv) * MMC card. We can send the CMD1 to find out for sure. CMD1 is supported * by MMC cards, but not by SD cards. */ - +#ifdef CONFIG_MMCSD_MMCSUPPORT if (priv->type == MMCSD_CARDTYPE_UNKNOWN || priv->type == MMCSD_CARDTYPE_MMC) { /* Send the MMC CMD1 to specify the operating voltage. CMD1 causes @@ -985,7 +988,7 @@ static inline int mmcsd_cardidentify(struct mmcsd_state_s *priv) } }
} - +#endif /* Check the elapsed time. We won't keep trying this forever! */ elapsed = g_system_timer - start; @@ -1065,18 +1068,22 @@ static int mmcsd_probe(struct mmcsd_state_s *priv) switch (priv->type) { - case MMCSD_CARDTYPE_MMC: /* MMC card */ - ret = mmcsd_mmcinitialize(priv); - case MMCSD_CARDTYPE_SDV1: /* Bit 1: SD version 1.x */ case MMCSD_CARDTYPE_SDV2: /* SD version 2.x with byte addressing */ case MMCSD_CARDTYPE_SDV2|MMCSD_CARDTYPE_BLOCK: /* SD version 2.x with block addressing */ ret = mmcsd_sdinitialize(priv); + break; + case MMCSD_CARDTYPE_MMC: /* MMC card */ +#ifdef CONFIG_MMCSD_MMCSUPPORT + ret = mmcsd_mmcinitialize(priv); + break; +#endif case MMCSD_CARDTYPE_UNKNOWN: /* Unknown card type */ default: fdbg("ERROR: Internal confusion: %d\n", priv->type); ret = -EPERM; + break; }; /* Was the card configured successfully? */ |