Merge "ath10k: Get WCN3990 mem base from dt node"
This commit is contained in:
commit
2fbbf07b80
3 changed files with 38 additions and 14 deletions
|
@ -9,8 +9,26 @@ receive(RX)/transmit(TX) control.
|
|||
|
||||
Required properties:
|
||||
- compatible: "qcom,wcn3990-wifi";
|
||||
- reg: Memory regions defined as starting address and size
|
||||
- reg-names: Names of the memory regions defined in reg entry
|
||||
- interrupts: Copy engine interrupt table
|
||||
|
||||
Example:
|
||||
qcom,msm_ath10k@18000000 {
|
||||
msm_ath10k_wlan: qcom,msm_ath10k_wlan@18800000 {
|
||||
compatible = "qcom,wcn3990-wifi";
|
||||
reg = <0x18800000 0x800000>;
|
||||
reg-names = "membase";
|
||||
interrupts =
|
||||
<0 130 0 /* CE0 */ >,
|
||||
<0 131 0 /* CE1 */ >,
|
||||
<0 132 0 /* CE2 */ >,
|
||||
<0 133 0 /* CE3 */ >,
|
||||
<0 134 0 /* CE4 */ >,
|
||||
<0 135 0 /* CE5 */ >,
|
||||
<0 136 0 /* CE6 */ >,
|
||||
<0 137 0 /* CE7 */ >,
|
||||
<0 138 0 /* CE8 */ >,
|
||||
<0 139 0 /* CE9 */ >,
|
||||
<0 140 0 /* CE10 */ >,
|
||||
<0 141 0 /* CE11 */ >;
|
||||
};
|
||||
|
|
|
@ -3068,6 +3068,8 @@
|
|||
msm_ath10k_wlan: qcom,msm_ath10k_wlan {
|
||||
status = "disabled";
|
||||
compatible = "qcom,wcn3990-wifi";
|
||||
reg = <0x18800000 0x800000>;
|
||||
reg-names = "membase";
|
||||
interrupts =
|
||||
<0 413 0 /* CE0 */ >,
|
||||
<0 414 0 /* CE1 */ >,
|
||||
|
|
|
@ -1002,24 +1002,28 @@ static void ath10k_snoc_free_irq(struct ath10k *ar)
|
|||
|
||||
static int ath10k_snoc_get_soc_info(struct ath10k *ar)
|
||||
{
|
||||
int ret;
|
||||
struct icnss_soc_info soc_info;
|
||||
struct resource *res;
|
||||
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
|
||||
struct platform_device *pdev;
|
||||
|
||||
memset(&soc_info, 0, sizeof(soc_info));
|
||||
|
||||
ret = icnss_get_soc_info(&soc_info);
|
||||
if (ret < 0) {
|
||||
ath10k_err(ar, "%s: icnss_get_soc_info error = %d",
|
||||
__func__, ret);
|
||||
return ret;
|
||||
pdev = ar_snoc->dev;
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "membase");
|
||||
if (!res) {
|
||||
ath10k_err(ar, "Memory base not found in DT\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ar_snoc->mem = soc_info.v_addr;
|
||||
ar_snoc->mem_pa = soc_info.p_addr;
|
||||
ar_snoc->mem_pa = res->start;
|
||||
ar_snoc->mem = devm_ioremap(&pdev->dev, ar_snoc->mem_pa,
|
||||
resource_size(res));
|
||||
if (!ar_snoc->mem) {
|
||||
ath10k_err(ar, "Memory base ioremap failed: phy addr: %pa\n",
|
||||
&ar_snoc->mem_pa);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ar_snoc->target_info.soc_version = soc_info.soc_id;
|
||||
ar_snoc->target_info.target_version = soc_info.soc_id;
|
||||
ar_snoc->target_info.soc_version = ATH10K_HW_WCN3990;
|
||||
ar_snoc->target_info.target_version = ATH10K_HW_WCN3990;
|
||||
ar_snoc->target_info.target_revision = 0;
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_SNOC,
|
||||
|
|
Loading…
Add table
Reference in a new issue