Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60bdfffa authored by Erik Stromdahl's avatar Erik Stromdahl Committed by Kalle Valo
Browse files

ath10k: add sdio extra initializations



Extra initializations needed by all sdio boards.
Derived from qcacld.

Signed-off-by: default avatarErik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 01d6fd69
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -389,6 +389,21 @@ static void ath10k_send_suspend_complete(struct ath10k *ar)
	complete(&ar->target_suspend);
}

static void ath10k_init_sdio(struct ath10k *ar)
{
	u32 param = 0;

	ath10k_bmi_write32(ar, hi_mbox_io_block_sz, 256);
	ath10k_bmi_write32(ar, hi_mbox_isr_yield_limit, 99);
	ath10k_bmi_read32(ar, hi_acs_flags, &param);

	param |= (HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET |
		  HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET |
		  HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE);

	ath10k_bmi_write32(ar, hi_acs_flags, param);
}

static int ath10k_init_configure_target(struct ath10k *ar)
{
	u32 param_host;
@@ -1953,6 +1968,9 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
	if (status)
		goto err;

	if (ar->hif.bus == ATH10K_BUS_SDIO)
		ath10k_init_sdio(ar);

	ar->htc.htc_ops.target_send_suspend_complete =
		ath10k_send_suspend_complete;