U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Caleb Connolly <caleb.connolly@linaro.org>,
	Heiko Schocher <hs@denx.de>, Tom Rini <trini@konsulko.com>,
	Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
	Sumit Garg <sumit.garg@kernel.org>
Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io
Subject: Re: [PATCH 3/3] i2c: geni: load firmware if required
Date: Mon, 17 Mar 2025 15:13:38 +0100	[thread overview]
Message-ID: <71f37ccb-8831-4e59-bf2c-16840c469db2@linaro.org> (raw)
In-Reply-To: <20250314-geni-load-fw-v1-3-587f25f2812f@linaro.org>

On 14/03/2025 17:09, Caleb Connolly wrote:
> Load firmware for the peripheral if necessary.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>   drivers/i2c/geni_i2c.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/i2c/geni_i2c.c b/drivers/i2c/geni_i2c.c
> index 4eb41ba852f7790ca646c8ba38f29fdb727fa804..fca0fab7201a2f86ff4a8c12d053297e660c4621 100644
> --- a/drivers/i2c/geni_i2c.c
> +++ b/drivers/i2c/geni_i2c.c
> @@ -21,8 +21,9 @@
>   #include <clk.h>
>   #include <reset.h>
>   #include <time.h>
>   #include <soc/qcom/geni-se.h>
> +#include <soc/qcom/qup-fw-load.h>
>   
>   #define SE_I2C_TX_TRANS_LEN		0x26c
>   #define SE_I2C_RX_TRANS_LEN		0x270
>   #define SE_I2C_SCL_COUNTERS		0x278
> @@ -498,8 +499,15 @@ static int geni_i2c_probe(struct udevice *dev)
>   	proto = readl(geni->base + GENI_FW_REVISION_RO);
>   	proto &= FW_REV_PROTOCOL_MSK;
>   	proto >>= FW_REV_PROTOCOL_SHFT;
>   
> +	if (proto == 0xff) {

-------------------- GENI_SE_INVALID_PROTO

> +		qcom_geni_load_firmware(geni->base, dev);
> +		proto = readl(geni->base + GENI_FW_REVISION_RO);
> +		proto &= FW_REV_PROTOCOL_MSK;
> +		proto >>= FW_REV_PROTOCOL_SHFT;
> +	}
> +
>   	if (proto != GENI_SE_I2C) {
>   		dev_err(dev, "Invalid proto %d\n", proto);
>   		geni_i2c_disable_clocks(dev, geni);
>   		return -ENXIO;
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

      reply	other threads:[~2025-03-17 14:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-14 16:09 [PATCH 0/3] Qualcomm: implement support for GENI firmware loading Caleb Connolly
2025-03-14 16:09 ` [PATCH 1/3] i2c: geni: fix error message wording in clk_disable Caleb Connolly
2025-03-17 14:04   ` Neil Armstrong
2025-03-14 16:09 ` [PATCH 2/3] misc: introduce Qcom GENI wrapper Caleb Connolly
2025-03-17 14:12   ` Neil Armstrong
2025-03-17 14:33     ` Caleb Connolly
2025-03-17 14:35       ` neil.armstrong
2025-03-14 16:09 ` [PATCH 3/3] i2c: geni: load firmware if required Caleb Connolly
2025-03-17 14:13   ` Neil Armstrong [this message]

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=71f37ccb-8831-4e59-bf2c-16840c469db2@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=caleb.connolly@linaro.org \
    --cc=hs@denx.de \
    --cc=rayagonda.kokatanur@broadcom.com \
    --cc=sumit.garg@kernel.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.de \
    /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