public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: ath11k@lists.infradead.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, Anilkumar Kolli <akolli@codeaurora.org>
Subject: Re: [PATCH v4 2/2] ath11k: Use reserved host DDR addresses from DT for PCI devices
Date: Sun, 21 Nov 2021 15:45:29 +0100	[thread overview]
Message-ID: <1724585.GBsqGgcNsD@sven-l14> (raw)
In-Reply-To: <1637504521-30997-2-git-send-email-akolli@codeaurora.org>

On Sunday, 21 November 2021 15:22:01 CET Anilkumar Kolli wrote:
[...]
> +static int ath11k_mhi_read_addr_from_dt(struct mhi_controller *mhi_ctrl)
> +{
> +	struct device_node *np;
> +	dma_addr_t start;
> +	u32 reg[4];
> +	int ret;
> +
> +	np = of_find_node_by_type(NULL, "memory");
> +	if (!np)
> +		return -ENOENT;
> +
> +	ret = of_property_read_u32_array(np, "reg", reg, 4);
> +	if (ret)
> +		return ret;
> +
> +	start = reg[0] + reg[1];
> +	mhi_ctrl->iova_start = start + 0x1000000;
> +	mhi_ctrl->iova_stop = start + reg[2] + reg[3];
> +
> +	return 0;
> +}
> +
[...]
> +			ret = of_property_read_u32(dev->of_node, "memory-region",
> +						   &hremote_phandle);
> +			if (ret) {
> +				ath11k_dbg(ab, ATH11K_DBG_QMI,
> +					   "qmi fail to get hremote phandle\n");
> +				return ret;
> +			}
> +
> +			hremote_node = of_find_node_by_phandle(hremote_phandle);
> +			if (!hremote_node) {
> +				ath11k_dbg(ab, ATH11K_DBG_QMI,
> +					   "qmi fail to get hremote_node\n");
> +				return ret;
> +			}
> +
> +			ret = of_property_read_u32_array(hremote_node, "reg", reg, 4);
> +			if (ret) {
> +				ath11k_dbg(ab, ATH11K_DBG_QMI,
> +					   "qmi fail to get reg from hremote\n");
> +				return ret;
> +			}
> +
> +			start = reg[0] + reg[1];
> +			size = reg[2] + reg[3];

See my messages for v2 [1] and v3 [2]

Kind regards,
	Sven

[1] https://patchwork.kernel.org/project/linux-wireless/patch/1637082058-6398-2-git-send-email-akolli@codeaurora.org/#24605391
[2] https://patchwork.kernel.org/project/linux-wireless/patch/1637244892-27267-2-git-send-email-akolli@codeaurora.org/#24605417



  reply	other threads:[~2021-11-21 14:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-21 14:22 [PATCH v4 1/2] dt: bindings: add new DT entry for ath11k PCI device support Anilkumar Kolli
2021-11-21 14:22 ` [PATCH v4 2/2] ath11k: Use reserved host DDR addresses from DT for PCI devices Anilkumar Kolli
2021-11-21 14:45   ` Sven Eckelmann [this message]
2021-11-22  6:12     ` Anilkumar Kolli
2021-11-22  7:50       ` Sven Eckelmann
2021-11-23 10:39         ` Anilkumar Kolli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1724585.GBsqGgcNsD@sven-l14 \
    --to=sven@narfation.org \
    --cc=akolli@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox