Skip to content

Commit

Permalink
Merge pull request #1 from mathias-arm/NXPmicro
Browse files Browse the repository at this point in the history
Remove some warnings
  • Loading branch information
mmahadevan108 authored Sep 12, 2019
2 parents 370c51a + d5b72eb commit 34d6644
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 14 additions & 8 deletions target/TARGET_NXP/fsl_sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static status_t SD_SendWriteSuccessBlocks(sd_card_t *card, uint32_t *blocks);
* @retval kStatus_SDMMC_CardNotSupport Card doesn't support.
* @retval kStatus_Success Operate successfully.
*/
static status_t inline SD_SendApplicationCmd(sd_card_t *card, uint32_t relativeAddress);
static inline status_t SD_SendApplicationCmd(sd_card_t *card, uint32_t relativeAddress);

/*!
* @brief Send GO_IDLE command to set the card to be idle state.
Expand All @@ -47,7 +47,7 @@ static status_t inline SD_SendApplicationCmd(sd_card_t *card, uint32_t relativeA
* @retval kStatus_SDMMC_TransferFailed Transfer failed.
* @retval kStatus_Success Operate successfully.
*/
static status_t inline SD_GoIdle(sd_card_t *card);
static inline status_t SD_GoIdle(sd_card_t *card);

/*!
* @brief Send STOP_TRANSMISSION command after multiple blocks read/write.
Expand All @@ -66,7 +66,7 @@ static status_t SD_StopTransmission(sd_card_t *card);
* @retval kStatus_SDMMC_TransferFailed Transfer failed.
* @retval kStatus_Success Operate successfully.
*/
static status_t inline SD_SetBlockSize(sd_card_t *card, uint32_t blockSize);
static inline status_t SD_SetBlockSize(sd_card_t *card, uint32_t blockSize);

/*!
* @brief Send GET_RCA command to get card relative address.
Expand Down Expand Up @@ -288,7 +288,7 @@ static status_t SD_Transfer(sd_card_t *card, SDMMCHOST_TRANSFER *content, uint32
* @retval kStatus_SDMMC_TuningFail tuning fail.
* @retval kStatus_SDMMC_TransferFailed transfer fail
*/
static status_t inline SD_ExecuteTuning(sd_card_t *card);
static inline status_t SD_ExecuteTuning(sd_card_t *card);

/*******************************************************************************
* Variables
Expand All @@ -314,28 +314,28 @@ static uint32_t s_sdAuSizeMap[] = {0,
/*******************************************************************************
* Code
******************************************************************************/
static status_t inline SD_SendApplicationCmd(sd_card_t *card, uint32_t relativeAddress)
static inline status_t SD_SendApplicationCmd(sd_card_t *card, uint32_t relativeAddress)
{
assert(card);

return SDMMC_SendApplicationCommand(card->host.base, card->host.transfer, relativeAddress);
}

static status_t inline SD_GoIdle(sd_card_t *card)
static inline status_t SD_GoIdle(sd_card_t *card)
{
assert(card);

return SDMMC_GoIdle(card->host.base, card->host.transfer);
}

static status_t inline SD_SetBlockSize(sd_card_t *card, uint32_t blockSize)
static inline status_t SD_SetBlockSize(sd_card_t *card, uint32_t blockSize)
{
assert(card);

return SDMMC_SetBlockSize(card->host.base, card->host.transfer, blockSize);
}

static status_t inline SD_ExecuteTuning(sd_card_t *card)
static inline status_t SD_ExecuteTuning(sd_card_t *card)
{
assert(card);

Expand Down Expand Up @@ -1162,6 +1162,8 @@ static status_t SD_SelectBusTiming(sd_card_t *card)
}
SDMMC_LOG("\r\nNote: SDR104 mode is not supported by card");

/* FALLTHROUGH */

case kSD_TimingDDR50Mode:
error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionDDR50);
if (error == kStatus_Success)
Expand All @@ -1174,6 +1176,8 @@ static status_t SD_SelectBusTiming(sd_card_t *card)
}
SDMMC_LOG("\r\nNote: DDR50 mode is not supported by card");

/* FALLTHROUGH */

case kSD_TimingSDR50Mode:
error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionSDR50);
if (error == kStatus_Success)
Expand All @@ -1185,6 +1189,8 @@ static status_t SD_SelectBusTiming(sd_card_t *card)
}
SDMMC_LOG("\r\nNote: SDR50 mode is not supported by card");

/* FALLTHROUGH */

case kSD_TimingSDR25HighSpeedMode:
error = SD_SelectFunction(card, kSD_GroupTimingMode, kSD_FunctionSDR25HighSpeed);
if (error == kStatus_Success)
Expand Down
2 changes: 0 additions & 2 deletions target/TARGET_NXP/sdio_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include "pinmap.h"
#include "sdio_device.h"

/* Array of SD peripheral base address. */
static SDIF_Type *const sd_addrs[] = SDIF_BASE_PTRS;
static sd_card_t g_sd;

extern void sdio_clock_setup(void);
Expand Down

0 comments on commit 34d6644

Please sign in to comment.