File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -695,7 +695,7 @@ static int wilc_sdio_init(struct wilc *wilc, bool resume)
695695 cmd .read_write = 1 ;
696696 cmd .function = 0 ;
697697 cmd .raw = 1 ;
698- cmd .address = SDIO_FBR_BASE (func -> num ) + SDIO_FBR_STD_IF ;
698+ cmd .address = SDIO_FBR_BASE (1 ) ;
699699 cmd .data = SDIO_FBR_ENABLE_CSA ;
700700 ret = wilc_sdio_cmd52 (wilc , & cmd );
701701 if (ret ) {
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ static u8 wilc_get_crc7(u8 *buffer, u32 len)
4747
4848#define SPI_RESP_RETRY_COUNT (10)
4949#define SPI_RETRY_COUNT (10)
50+ #define SPI_ENABLE_VMM_RETRY_LIMIT 2
5051#define DATA_PKT_SZ_256 256
5152#define DATA_PKT_SZ_512 512
5253#define DATA_PKT_SZ_1K 1024
@@ -1172,8 +1173,26 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status)
11721173
11731174static int wilc_spi_clear_int_ext (struct wilc * wilc , u32 val )
11741175{
1175- return spi_internal_write (wilc ,
1176- WILC_SPI_INT_CLEAR - WILC_SPI_REG_BASE , val );
1176+ int ret ;
1177+ int retry = SPI_ENABLE_VMM_RETRY_LIMIT ;
1178+ u32 check ;
1179+
1180+ while (retry ) {
1181+ ret = spi_internal_write (wilc ,
1182+ WILC_SPI_INT_CLEAR - WILC_SPI_REG_BASE ,
1183+ val );
1184+ if (ret )
1185+ break ;
1186+
1187+ ret = spi_internal_read (wilc ,
1188+ WILC_SPI_INT_CLEAR - WILC_SPI_REG_BASE ,
1189+ & check );
1190+ if (ret || ((check & EN_VMM ) == (val & EN_VMM )))
1191+ break ;
1192+
1193+ retry -- ;
1194+ }
1195+ return ret ;
11771196}
11781197
11791198static int wilc_spi_sync_ext (struct wilc * wilc , int nint )
You can’t perform that action at this time.
0 commit comments