Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1368543
| From | Andy Gross <andy.gross@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/5] soc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components |
| Date | 2016-03-31 20:50 +0200 |
| Message-ID | <riPPk-IR-13@gated-at.bofh.it> (permalink) |
| References | <rhTBD-Vc-3@gated-at.bofh.it> <rhTBD-Vc-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Mar 28, 2016 at 09:35:25PM -0700, Bjorn Andersson wrote:
> We need the signal from wcnss_ctrl indicating that the firmware is up
> and running before we can communicate with the other components of the
> chip. So make these other components children of the wcnss_ctrl device,
> so they can be probed in order.
>
> The process seems to take between 1/2-5 seconds, so this is done in a
> worker, instead of holding up the probe.
>
> Also adding the wait for a cbc completion if the firmware indicates this is
> needed - like on 8016.
Can you define what a CBC is?
<snip>
> /**
> * wcnss_download_nv() - send nv binary to WCNSS
> - * @work: work struct to acquire wcnss context
> + * @wcnss: wcnss_ctrl state handle
> + *
> + * Returns 1 on success or 2 to indicate upcoming cbc completion. Negative
maybe a nit, but define the return values
> + * errno on failure.
> */
> -static void wcnss_download_nv(struct work_struct *work)
> +static int wcnss_download_nv(struct wcnss_ctrl *wcnss)
> {
> - struct wcnss_ctrl *wcnss = container_of(work, struct wcnss_ctrl, download_nv_work);
> struct wcnss_download_nv_req *req;
> const struct firmware *fw;
> const void *data;
> @@ -178,7 +207,7 @@ static void wcnss_download_nv(struct work_struct *work)
>
> req = kzalloc(sizeof(*req) + NV_FRAGMENT_SIZE, GFP_KERNEL);
> if (!req)
> - return;
> + return -ENOMEM;
>
> ret = request_firmware(&fw, NVBIN_FILE, wcnss->dev);
> if (ret) {
<snip>
> +static void wcnss_async_probe(struct work_struct *work)
> +{
> + struct wcnss_ctrl *wcnss = container_of(work, struct wcnss_ctrl, probe_work);
> + int ret;
> +
> + ret = wcnss_request_version(wcnss);
> + if (ret < 0)
> + return;
> +
> + ret = wcnss_download_nv(wcnss);
> + if (ret < 0)
> + return;
> +
> + /* Wait for pending CBC completion if download nv returns 2 */
> + if (ret == 2) {
Perhaps have a #define for the value is warranted
> + ret = wait_for_completion_timeout(&wcnss->cbc, WCNSS_REQUEST_TIMEOUT);
> + if (!ret)
> + dev_err(wcnss->dev, "expected cbc completion\n");
> + }
> +
> + of_platform_populate(wcnss->dev->of_node, NULL, NULL, wcnss->dev);
> }
<snip>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/5] soc: qcom: smd: Make callback pass channel reference Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-29 06:40 +0200
[PATCH 4/5] soc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-29 06:40 +0200
Re: [PATCH 4/5] soc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components Andy Gross <andy.gross@linaro.org> - 2016-03-31 20:50 +0200
Re: [PATCH 4/5] soc: qcom: wcnss_ctrl: Make wcnss_ctrl parent the other components Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-31 21:40 +0200
[PATCH 3/5] dt-binding: Add Qualcomm WCNSS control binding Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-29 06:40 +0200
Re: [PATCH 3/5] dt-binding: Add Qualcomm WCNSS control binding Rob Herring <robh@kernel.org> - 2016-03-31 16:30 +0200
Re: [PATCH 3/5] dt-binding: Add Qualcomm WCNSS control binding Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-31 19:20 +0200
Re: [PATCH 3/5] dt-binding: Add Qualcomm WCNSS control binding Rob Herring <robh@kernel.org> - 2016-03-31 19:40 +0200
Re: [PATCH 3/5] dt-binding: Add Qualcomm WCNSS control binding Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-31 20:30 +0200
Re: [PATCH 3/5] dt-binding: Add Qualcomm WCNSS control binding Rob Herring <robh@kernel.org> - 2016-03-31 22:50 +0200
Re: [PATCH 3/5] dt-binding: Add Qualcomm WCNSS control binding Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-31 23:30 +0200
[PATCH 2/5] soc: qcom: smem: Use write-combine remap for SMEM Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-29 06:40 +0200
Re: [PATCH 2/5] soc: qcom: smem: Use write-combine remap for SMEM Andy Gross <andy.gross@linaro.org> - 2016-03-31 20:30 +0200
[PATCH 5/5] ARM: dts: qcom: msm8974: Introduce pronto node Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-03-29 06:40 +0200
csiph-web