Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES

This commit is contained in:
Gregory Nutt
2016-06-11 14:14:08 -06:00
parent c211ce8be1
commit 1cdc746726
1185 changed files with 2056 additions and 2019 deletions
+12 -12
View File
@@ -171,7 +171,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2]);
static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv,
uint32_t csd[4]);
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv,
uint32_t cid[4]);
#else
@@ -558,7 +558,7 @@ static int mmcsd_getSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2])
static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
{
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
struct mmcsd_csd_s decoded;
#endif
unsigned int readbllen;
@@ -578,7 +578,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
* TRANSFER_RATE_UNIT 2:0 Rate mantissa
*/
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
memset(&decoded, 0, sizeof(struct mmcsd_csd_s));
decoded.csdstructure = csd[0] >> 30;
decoded.mmcspecvers = (csd[0] >> 26) & 0x0f;
@@ -606,7 +606,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
priv->dsrimp = (csd[1] >> 12) & 1;
readbllen = (csd[1] >> 16) & 0x0f;
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
decoded.ccc = (csd[1] >> 20) & 0x0fff;
decoded.readbllen = (csd[1] >> 16) & 0x0f;
decoded.readblpartial = (csd[1] >> 15) & 1;
@@ -667,7 +667,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
priv->blocksize = 1 << 9;
priv->nblocks = priv->capacity >> 9;
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
decoded.u.sdblock.csize = csize;
decoded.u.sdblock.sderblen = (csd[2] >> 14) & 1;
decoded.u.sdblock.sdsectorsize = (csd[2] >> 7) & 0x7f;
@@ -703,7 +703,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
priv->blockshift = 9;
}
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
if (IS_SD(priv->type))
{
decoded.u.sdbyte.csize = csize;
@@ -753,7 +753,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
tmpwriteprotect = (csd[3] >> 12) & 1;
priv->wrprotect = (permwriteprotect || tmpwriteprotect);
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
decoded.wpgrpen = csd[3] >> 31;
decoded.mmcdfltecc = (csd[3] >> 29) & 3;
decoded.r2wfactor = (csd[3] >> 26) & 7;
@@ -844,7 +844,7 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
*
****************************************************************************/
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4])
{
struct mmcsd_cid_s decoded;
@@ -910,7 +910,7 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4])
static void mmcsd_decodeSCR(FAR struct mmcsd_state_s *priv, uint32_t scr[2])
{
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
struct mmcsd_scr_s decoded;
#endif
@@ -929,7 +929,7 @@ struct mmcsd_scr_s decoded;
priv->buswidth = (scr[0] >> 8) & 15;
#endif
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#ifdef CONFIG_ENDIAN_BIG /* Card SCR is big-endian order / CPU also big-endian
* 60 56 52 48 44 40 36 32
* VVVV SSSS ESSS BBBB RRRR RRRR RRRR RRRR */
@@ -952,7 +952,7 @@ struct mmcsd_scr_s decoded;
* Reserved 31:0 32-bits reserved for manufacturing usage.
*/
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
#if defined(CONFIG_DEBUG_FEATURES) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
decoded.mfgdata = scr[1]; /* Might be byte reversed! */
finfo("SCR:\n");
@@ -3251,7 +3251,7 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev)
/* Sanity check */
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (minor < 0 || minor > 255 || !dev)
{
return -EINVAL;
+11 -11
View File
@@ -1031,7 +1031,7 @@ static int mmcsd_open(FAR struct inode *inode)
finfo("Entry\n");
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!inode || !inode->i_private)
{
fdbg("Internal confusion\n");
@@ -1044,7 +1044,7 @@ static int mmcsd_open(FAR struct inode *inode)
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
spi = slot->spi;
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
fdbg("Internal confusion\n");
@@ -1116,7 +1116,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
finfo("start_sector=%d nsectors=%d\n", start_sector, nsectors);
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!buffer)
{
fdbg("Invalid parameters\n");
@@ -1135,7 +1135,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
spi = slot->spi;
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
fdbg("Internal confusion\n");
@@ -1270,7 +1270,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
finfo("start_sector=%d nsectors=%d\n", start_sector, nsectors);
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!buffer)
{
fdbg("Invalid parameters\n");
@@ -1289,7 +1289,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
spi = slot->spi;
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
fdbg("Internal confusion\n");
@@ -1452,7 +1452,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
uint8_t csd[16];
int ret;
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!geometry)
{
fdbg("Invalid parameters\n");
@@ -1471,7 +1471,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
spi = slot->spi;
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!spi)
{
fdbg("Internal confusion\n");
@@ -1833,7 +1833,7 @@ static void mmcsd_mediachanged(void *arg)
uint8_t oldstate;
int ret;
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (!slot || !slot->spi)
{
fdbg("Internal confusion\n");
@@ -1915,7 +1915,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
char devname[16];
int ret;
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if ((unsigned)slotno >= CONFIG_MMCSD_NSLOTS || (unsigned)minor > 255 || !spi)
{
fdbg("Invalid arguments\n");
@@ -1929,7 +1929,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
memset(slot, 0, sizeof(struct mmcsd_slot_s));
sem_init(&slot->sem, 0, 1);
#ifdef CONFIG_DEBUG
#ifdef CONFIG_DEBUG_FEATURES
if (slot->spi)
{
fdbg("Already registered\n");