From 3c4de184c732d9cf04e232e75d29a39fe60a961a Mon Sep 17 00:00:00 2001 From: pvvx Date: Tue, 6 Dec 2016 22:09:02 +0300 Subject: [PATCH] update --- .../drivers/sdio/realtek/sdio_host/src/sdio_host.c | 11 +++++++---- .../soc/realtek/8195a/fwlib/src/hal_sdio_host.c | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/RTL00_SDKV35a/component/common/drivers/sdio/realtek/sdio_host/src/sdio_host.c b/RTL00_SDKV35a/component/common/drivers/sdio/realtek/sdio_host/src/sdio_host.c index 71c7009..d6c243c 100644 --- a/RTL00_SDKV35a/component/common/drivers/sdio/realtek/sdio_host/src/sdio_host.c +++ b/RTL00_SDKV35a/component/common/drivers/sdio/realtek/sdio_host/src/sdio_host.c @@ -246,7 +246,7 @@ void sdio_sd_deinit() { //----- s8 sdio_sd_setClock(SD_CLK_FREQUENCY SDCLK) { HAL_Status sta; - if ((signed int) sdio_status <= SDIO_SD_NONE) { + if (sdio_status <= SDIO_SD_NONE) { return -1; } ADMA2_DESC_FMT * padma = rtw_zmalloc(sizeof(ADMA2_DESC_FMT)); @@ -254,6 +254,7 @@ s8 sdio_sd_setClock(SD_CLK_FREQUENCY SDCLK) { DBG_SDIO_ERR("Malloc ADMA2 table fail.\n"); return -1; } + DBG_SDIO_INFO("SD card set CLK %d Hz\n", PLATFORM_CLOCK/(4<<(8-SDCLK))); sta = HalSdioHostOp.HalSdioHostChangeSdClock(&SdioHostAdapter, SDCLK); rtw_mfree(padma, sizeof(ADMA2_DESC_FMT)); if (sta) @@ -287,11 +288,13 @@ s8 sdio_sd_setProtection(bool protection) { result = -1; goto LABEL_17; } - LABEL_8: sd_protected = protection; - LABEL_7: +LABEL_8: + sd_protected = protection; +LABEL_7: DBG_SDIO_INFO("Set SD card Protection done.\n"); result = 0; - LABEL_17: rtw_mfree(padma, sizeof(ADMA2_DESC_FMT)); +LABEL_17: + rtw_mfree(padma, sizeof(ADMA2_DESC_FMT)); return result; } return -1; diff --git a/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/src/hal_sdio_host.c b/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/src/hal_sdio_host.c index 11a4c9e..e911904 100644 --- a/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/src/hal_sdio_host.c +++ b/RTL00_SDKV35a/component/soc/realtek/8195a/fwlib/src/hal_sdio_host.c @@ -93,7 +93,7 @@ HAL_Status HalSdioHostDisable(IN VOID *Data) { //----- HalSdioHostOpInit(PHAL_SDIO_HOST_ADAPTER) void HalSdioHostOpInit(void *Data) { - PHAL_SDIO_HOST_OP phsha = Data; + PHAL_SDIO_HOST_OP phsha = (PHAL_SDIO_HOST_ADAPTER)Data; phsha->HalSdioHostInitHost = &HalSdioHostInitHostRtl8195a; phsha->HalSdioHostInitCard = &HalSdioHostInitCardRtl8195a; phsha->HalSdioHostDeInit = &HalSdioHostDeInitRtl8195a;