summaryrefslogtreecommitdiff
path: root/nuttx/drivers/mmcsd
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-06 15:39:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-06 15:39:02 +0000
commit9fa76b36d2eb8b4c329e763e499675dee143d527 (patch)
tree189cfec40a0599ca60497ac94d137f9f1231dae2 /nuttx/drivers/mmcsd
parent517ae43b4f1c1eaf64137a5a6d0d79f3e26608af (diff)
downloadpx4-nuttx-9fa76b36d2eb8b4c329e763e499675dee143d527.tar.gz
px4-nuttx-9fa76b36d2eb8b4c329e763e499675dee143d527.tar.bz2
px4-nuttx-9fa76b36d2eb8b4c329e763e499675dee143d527.zip
Add support for RAMTRON NVRAM devices
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3347 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/mmcsd')
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_sdio.c10
-rw-r--r--nuttx/drivers/mmcsd/mmcsd_sdio.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c
index b02a8f7a3..61bbb417a 100644
--- a/nuttx/drivers/mmcsd/mmcsd_sdio.c
+++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c
@@ -2077,6 +2077,7 @@ static void mmcsd_mediachange(FAR void *arg)
static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
{
+#ifndef CONFIG_SDIO_WIDTH_D1_ONLY
int ret;
/* Check if the SD card supports this feature (as reported in the SCR) */
@@ -2145,6 +2146,13 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
fdbg("WARNING: Card does not support wide-bus operation\n");
return -ENOSYS;
+
+#else /* CONFIG_SDIO_WIDTH_D1_ONLY */
+
+ fvdbg("Wide-bus operation is disabled\n");
+ return -ENOSYS;
+
+#endif /* CONFIG_SDIO_WIDTH_D1_ONLY */
}
/****************************************************************************
@@ -2613,7 +2621,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
elapsed = g_system_timer - start;
}
- while (elapsed < TICK_PER_SEC && ret != OK);
+ while( elapsed < TICK_PER_SEC ); /* On successful reception while 'breaks', see above. */
/* We get here when the above loop completes, either (1) we could not
* communicate properly with the card due to errors (and the loop times
diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.h b/nuttx/drivers/mmcsd/mmcsd_sdio.h
index 75f09aae0..75c97bd65 100644
--- a/nuttx/drivers/mmcsd/mmcsd_sdio.h
+++ b/nuttx/drivers/mmcsd/mmcsd_sdio.h
@@ -1,7 +1,7 @@
/********************************************************************************************
* drivers/mmcsd/mmcsd_sdio.h
*
- * Copyright (C) 2009 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without