All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Tom Rini <trini@konsulko.com>,  Lukasz Majewski <lukma@denx.de>,
	 Sean Anderson <seanga2@gmail.com>,
	 Simon Glass <sjg@chromium.org>,
	 Jaehoon Chung <jh80.chung@samsung.com>,
	 Anatolij Gustschin <agust@denx.de>,
	u-boot@lists.denx.de,
	 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Ian Ray <ian.ray@gehealthcare.com>,
	 Marek Vasut <marek.vasut@gmail.com>
Subject: Re: [PATCH 5/8] imx: power-domain: Add support for the MEDIAMIX control block
Date: Fri, 22 Nov 2024 17:35:39 +0100	[thread overview]
Message-ID: <87serjns4k.fsf@bootlin.com> (raw)
In-Reply-To: <CAOMZO5DSjFw3skT=My_R64gAVcRdb5JQ+LHo3vgiOkdCYXXtpw@mail.gmail.com> (Fabio Estevam's message of "Thu, 12 Sep 2024 09:40:32 -0300")

Hi Fabio,

First, sorry for the delay and thanks a lot for the review.

On 12/09/2024 at 09:40:32 -03, Fabio Estevam <festevam@gmail.com> wrote:

> On Tue, Sep 10, 2024 at 7:21 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
>> +       /* Make sure bus domain is awake */
>> +       ret = power_domain_on(&priv->pd_bus);
>> +       if (ret)
>> +               return ret;
>> +
>> +       /* Put devices into reset */
>> +       clrbits_le32(priv->base + BLK_SFT_RSTN, reset);
>> +
>> +       /* Enable upstream clocks */
>> +       ret = clk_enable(&priv->clk_apb);
>> +       if (ret)
>> +               goto dis_bus_pd;
>> +
>> +       ret = clk_enable(&priv->clk_axi);
>> +       if (ret)
>> +               goto dis_bus_pd;
>> +
>> +       /* Enable blk-ctrl clock to allow reset to propagate */
>> +       ret = clk_enable(clk);
>> +       if (ret)
>> +               goto dis_bus_pd;
>> +       setbits_le32(priv->base + BLK_CLK_EN, reset);
>> +
>> +       /* Power up upstream GPC domain */
>> +       ret = power_domain_on(domain);
>> +       if (ret)
>> +               goto dis_bus_pd;
>
> The previously enabled clocks should be disabled on the error paths.

That's right, I will.

> Could you use clk_enable_bulk()?

This not very convenient and not future-proof, because, while we just
want to grab and enable the apb and axi clocks, the media_disp1_pix and
media_disp2_pix will be used depending on the configuration. For not
I've not included support for media_disp1_pix because I do not use it
and cannot test it, but it is a legitimate addition that someone will
soon or later want to bring. Hence I believe using the _bulk() helper is
not really appropriate in this case.

Thanks!
Miquèl

  reply	other threads:[~2024-11-22 16:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10 10:13 [PATCH 0/8] Add imx8mp video support Miquel Raynal
2024-09-10 10:13 ` [PATCH 1/8] dm: core: Add a helper to retrieve devices through graph endpoints Miquel Raynal
2024-09-12  1:01   ` Simon Glass
2024-09-10 10:13 ` [PATCH 2/8] clk: Ensure the parent clocks are enabled while reparenting Miquel Raynal
2024-09-10 10:13 ` [PATCH 3/8] clk: imx8mp: Add media related clocks Miquel Raynal
2024-09-11 19:48   ` Fabio Estevam
2024-09-12 12:30     ` Fabio Estevam
2024-09-12 16:00       ` Michael Nazzareno Trimarchi
2024-09-14 17:33   ` Adam Ford
2024-09-10 10:13 ` [PATCH 4/8] imx: power-domain: Describe the i.MX8 MEDIAMIX domain Miquel Raynal
2024-09-12 12:34   ` Fabio Estevam
2024-09-10 10:13 ` [PATCH 5/8] imx: power-domain: Add support for the MEDIAMIX control block Miquel Raynal
2024-09-12 12:40   ` Fabio Estevam
2024-11-22 16:35     ` Miquel Raynal [this message]
2024-09-10 10:13 ` [PATCH 6/8] video: imx: Fix Makefile in order to be able to add other imx drivers Miquel Raynal
2024-09-10 10:13 ` [PATCH 7/8] video: imx: Add LDB driver Miquel Raynal
2024-09-11 19:55   ` Fabio Estevam
2024-09-10 10:13 ` [PATCH 8/8] video: imx: Add LCDIF driver Miquel Raynal
2024-09-11 19:58   ` Fabio Estevam
2024-09-10 10:30 ` [PATCH 0/8] Add imx8mp video support Michael Nazzareno Trimarchi
2024-09-10 12:56   ` Miquel Raynal
2024-09-11 16:45     ` Michael Nazzareno Trimarchi
2024-09-13  7:55       ` Miquel Raynal
2024-09-11 19:50 ` Fabio Estevam

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=87serjns4k.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=agust@denx.de \
    --cc=festevam@gmail.com \
    --cc=ian.ray@gehealthcare.com \
    --cc=jh80.chung@samsung.com \
    --cc=lukma@denx.de \
    --cc=marek.vasut@gmail.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=trini@konsulko.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.