Browse Source

qcacld-3.0: override default uart tx pin to aviod conflict with sdio pin

In sdio interface chip, both sdio_data2 and uart_tx pin will use GPIO6.
It is set by fw rom code, which will cause sdio CRC error  when there is
sdio transaction. Override uart tx pin to avoid side effect to sdio pin.

Change-Id: Icd268e607c51238dcea7e8e3a55dceb96d5b1c1a
CRs-Fixed: 2019742
Kai Liu 8 years ago
parent
commit
a27ce62df5
1 changed files with 31 additions and 24 deletions
  1. 31 24
      core/bmi/src/ol_fw.c

+ 31 - 24
core/bmi/src/ol_fw.c

@@ -1327,32 +1327,39 @@ QDF_STATUS ol_download_firmware(struct ol_context *ol_ctx)
 			(uint8_t *) &address, 4, ol_ctx);
 	}
 
-	if (ini_cfg->enable_uart_print) {
-		switch (target_version) {
-		case AR6004_VERSION_REV1_3:
-			param = 11;
-			break;
-		case AR6320_REV1_VERSION:
-		case AR6320_REV2_VERSION:
-		case AR6320_REV3_VERSION:
-		case AR6320_REV3_2_VERSION:
-		case QCA9379_REV1_VERSION:
-		case AR6320_REV4_VERSION:
-		case AR6320_DEV_VERSION:
-		if (hif_get_bus_type(scn) == QDF_BUS_TYPE_SDIO)
-			param = 19;
-		else
-			param = 6;
+	switch (target_version) {
+	case AR6004_VERSION_REV1_3:
+		param = 11;
+		break;
+	case AR6320_REV1_VERSION:
+	case AR6320_REV2_VERSION:
+	case AR6320_REV3_VERSION:
+	case AR6320_REV3_2_VERSION:
+	case QCA9377_REV1_1_VERSION:
+	case QCA9379_REV1_VERSION:
+	case AR6320_REV4_VERSION:
+	case AR6320_DEV_VERSION:
+	/*
+	 * In sdio interface chip, both sdio_data2 and uart_tx pin
+	 * will use GPIO6. It is set by fw rom code, which will cause
+	 * sdio CRC error when there is sdio transaction.
+	 * Override uart tx pin to avoid side effect to sdio pin.
+	 */
+	if (hif_get_bus_type(scn) == QDF_BUS_TYPE_SDIO)
+		param = 19;
+	else
+		param = 6;
+		break;
+	default:
+	/* Configure GPIO AR9888 UART */
+		param = 7;
+	}
 
-			break;
-		default:
-			/* Configure GPIO AR9888 UART */
-			param = 7;
-		}
+	bmi_write_memory(hif_hia_item_address(target_type,
+		offsetof(struct host_interest_s, hi_dbg_uart_txpin)),
+		(uint8_t *)&param, 4, ol_ctx);
 
-		bmi_write_memory(hif_hia_item_address(target_type,
-			offsetof(struct host_interest_s, hi_dbg_uart_txpin)),
-			(uint8_t *)&param, 4, ol_ctx);
+	if (ini_cfg->enable_uart_print) {
 		param = 1;
 		bmi_write_memory(hif_hia_item_address(target_type,
 			offsetof(struct host_interest_s, hi_serial_enable)),