void DisableInterrupt8723BSdio(struct adapter *adapter) { __le32 himr; himr = cpu_to_le32(SDIO_HIMR_DISABLED); sdio_local_write(adapter, SDIO_REG_HIMR, 4, (u8 *)&himr); }
// // Description: // Enalbe SDIO Host Interrupt Mask configuration on SDIO local domain. // // Assumption: // 1. Using SDIO Local register ONLY for configuration. // 2. PASSIVE LEVEL // // Created by Roger, 2011.02.11. // void EnableInterrupt8723BSdio(PADAPTER padapter) { PHAL_DATA_TYPE pHalData; u32 himr; #ifdef CONFIG_CONCURRENT_MODE if ((padapter->isprimary == _FALSE) && padapter->pbuddy_adapter){ padapter = padapter->pbuddy_adapter; } #endif pHalData = GET_HAL_DATA(padapter); himr = cpu_to_le32(pHalData->sdio_himr); sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8*)&himr); RT_TRACE(_module_hci_ops_c_, _drv_notice_, ("%s: enable SDIO HIMR=0x%08X\n", __FUNCTION__, pHalData->sdio_himr)); // Update current system IMR settings himr = rtw_read32(padapter, REG_HSIMR); rtw_write32(padapter, REG_HSIMR, himr|pHalData->SysIntrMask); RT_TRACE(_module_hci_ops_c_, _drv_notice_, ("%s: enable HSIMR=0x%08X\n", __FUNCTION__, pHalData->SysIntrMask)); // // <Roger_Notes> There are some C2H CMDs have been sent before system interrupt is enabled, e.g., C2H, CPWM. // So we need to clear all C2H events that FW has notified, otherwise FW won't schedule any commands anymore. // 2011.10.19. // rtw_write8(padapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE); }
// // Description: // Disable SDIO Host IMR configuration to mask unnecessary interrupt service. // // Assumption: // Using SDIO Local register ONLY for configuration. // // Created by Roger, 2011.02.11. // void DisableInterrupt8723BSdio(PADAPTER padapter) { u32 himr; #ifdef CONFIG_CONCURRENT_MODE if ((padapter->isprimary == _FALSE) && padapter->pbuddy_adapter){ padapter = padapter->pbuddy_adapter; } #endif himr = cpu_to_le32(SDIO_HIMR_DISABLED); sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8*)&himr); }
void ClearInterrupt8189ESdio(PADAPTER padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); u32 v32; pHalData->sdio_hisr &= pHalData->sdio_himr; // clear HISR v32 = pHalData->sdio_hisr & MASK_SDIO_HISR_CLEAR; if (v32) { v32 = cpu_to_le32(v32); sdio_local_write(padapter, SDIO_REG_HISR, 4, (u8*)&v32); } }
// // Description: // Disable SDIO Host IMR configuration to mask unnecessary interrupt service. // // Assumption: // Using SDIO Local register ONLY for configuration. // // Created by Roger, 2011.02.11. // void DisableInterrupt8188ESdio(PADAPTER padapter) { // Clear all ISRs //PlatformEFSdioLocalCmd52Write4Byte(Adapter, SDIO_REG_HISR, pHalData->IntrMaskToClear[0]); //PlatformEFIOWrite4Byte(Adapter, REG_HSISR, pHalData->SysIntrMaskToClear[0]); // Clear all IMRs #if 0 SdioLocalCmd52Write4Byte(padapter, SDIO_REG_HIMR, SDIO_HIMR_DISABLED); #else u32 himr; himr = cpu_to_le32(SDIO_HIMR_DISABLED); sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8*)&himr); #endif }
void DisableInterruptButCpwm28723BSdio(PADAPTER padapter) { u32 himr, tmp; #ifdef CONFIG_CONCURRENT_MODE if ((padapter->isprimary == _FALSE) && padapter->pbuddy_adapter){ padapter = padapter->pbuddy_adapter; } #endif sdio_local_read(padapter, SDIO_REG_HIMR, 4, (u8*)&tmp); DBG_871X("DisableInterruptButCpwm28723BSdio(): Read SDIO_REG_HIMR: 0x%08x\n", tmp); himr = cpu_to_le32(SDIO_HIMR_DISABLED)|SDIO_HIMR_CPWM2_MSK; sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8*)&himr); sdio_local_read(padapter, SDIO_REG_HIMR, 4, (u8*)&tmp); DBG_871X("DisableInterruptButCpwm28723BSdio(): Read again SDIO_REG_HIMR: 0x%08x\n", tmp); }
void EnableInterrupt8723BSdio(struct adapter *adapter) { struct hal_com_data *haldata; __le32 himr; u32 tmp; haldata = GET_HAL_DATA(adapter); himr = cpu_to_le32(haldata->sdio_himr); sdio_local_write(adapter, SDIO_REG_HIMR, 4, (u8 *)&himr); RT_TRACE( _module_hci_ops_c_, _drv_notice_, ( "%s: enable SDIO HIMR = 0x%08X\n", __func__, haldata->sdio_himr ) ); /* Update current system IMR settings */ tmp = rtw_read32(adapter, REG_HSIMR); rtw_write32(adapter, REG_HSIMR, tmp | haldata->SysIntrMask); RT_TRACE( _module_hci_ops_c_, _drv_notice_, ( "%s: enable HSIMR = 0x%08X\n", __func__, haldata->SysIntrMask ) ); /* */ /* <Roger_Notes> There are some C2H CMDs have been sent before system interrupt is enabled, e.g., C2H, CPWM. */ /* So we need to clear all C2H events that FW has notified, otherwise FW won't schedule any commands anymore. */ /* 2011.10.19. */ /* */ rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE); }
void clearinterrupt8723bsdio(struct adapter *adapter) { struct hal_com_data *haldata; u8 *clear; if (adapter->bSurpriseRemoved) return; haldata = GET_HAL_DATA(adapter); clear = rtw_zmalloc(4); /* Clear corresponding HISR Content if needed */ *(__le32 *)clear = cpu_to_le32(haldata->sdio_hisr & MASK_SDIO_HISR_CLEAR); if (*(__le32 *)clear) { /* Perform write one clear operation */ sdio_local_write(padapter, SDIO_REG_HISR, 4, clear); } kfree(clear); }
void ClearInterrupt8188ESdio(PADAPTER padapter) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); u32 v32 = 0; DBG_8192C("+%s+\n", __func__); v32 = pHalData->sdio_himr | SDIO_HISR_CPWM2; pHalData->sdio_hisr &= v32; // clear HISR v32 = pHalData->sdio_hisr & MASK_SDIO_HISR_CLEAR; if (v32) { v32 = cpu_to_le32(v32); sdio_local_write(padapter, SDIO_REG_HISR, 4, (u8*)&v32); } DBG_8192C("-%s-\n", __func__); }
// // Description: // Clear corresponding SDIO Host ISR interrupt service. // // Assumption: // Using SDIO Local register ONLY for configuration. // // Created by Roger, 2011.02.11. // void ClearInterrupt8723BSdio(PADAPTER padapter) { PHAL_DATA_TYPE pHalData; u8 *clear; if (_TRUE == padapter->bSurpriseRemoved) return; pHalData = GET_HAL_DATA(padapter); clear = rtw_zmalloc(4); // Clear corresponding HISR Content if needed *(u32*)clear = cpu_to_le32(pHalData->sdio_hisr & MASK_SDIO_HISR_CLEAR); if (*(u32*)clear) { // Perform write one clear operation sdio_local_write(padapter, SDIO_REG_HISR, 4, clear); } rtw_mfree(clear, 4); }
// // Description: // Enalbe SDIO Host Interrupt Mask configuration on SDIO local domain. // // Assumption: // 1. Using SDIO Local register ONLY for configuration. // 2. PASSIVE LEVEL // // Created by Roger, 2011.02.11. // void EnableInterrupt8188ESdio(PADAPTER padapter) { PHAL_DATA_TYPE pHalData; u32 himr; #ifdef CONFIG_CONCURRENT_MODE if ((padapter->isprimary == _FALSE) && padapter->pbuddy_adapter){ padapter = padapter->pbuddy_adapter; } #endif pHalData = GET_HAL_DATA(padapter); himr = cpu_to_le32(pHalData->sdio_himr); sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8*)&himr); // // <Roger_Notes> There are some C2H CMDs have been sent before system interrupt is enabled, e.g., C2H, CPWM. // So we need to clear all C2H events that FW has notified, otherwise FW won't schedule any commands anymore. // 2011.10.19. // rtw_write8(padapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE); }
// // Description: // Enalbe SDIO Host Interrupt Mask configuration on SDIO local domain. // // Assumption: // 1. Using SDIO Local register ONLY for configuration. // 2. PASSIVE LEVEL // // Created by Roger, 2011.02.11. // void EnableInterrupt8188ESdio(PADAPTER padapter) { PHAL_DATA_TYPE pHalData; pHalData = GET_HAL_DATA(padapter); #if 0 SdioLocalCmd52Write4Byte(padapter, SDIO_REG_HIMR, pHalData->sdio_himr); #else { u32 himr; himr = cpu_to_le32(pHalData->sdio_himr); sdio_local_write(padapter, SDIO_REG_HIMR, 4, (u8*)&himr); } #endif // // <Roger_Notes> There are some C2H CMDs have been sent before system interrupt is enabled, e.g., C2H, CPWM. // So we need to clear all C2H events that FW has notified, otherwise FW won't schedule any commands anymore. // 2011.10.19. // rtw_write8(padapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE); }