All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Mulders <justinkb@gmail.com>
To: frank-w@public-files.de
Cc: broonie@kernel.org, gregkh@linuxfoundation.org,
	jiasheng@iscas.ac.cn, lgirdwood@gmail.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	matthias.bgg@gmail.com
Subject: Re: BUG: [PATCH v2] isoc: mediatek: Check for error clk pointer
Date: Fri, 28 Jan 2022 15:26:51 +0100	[thread overview]
Message-ID: <CAOn50SJrdS+uRnJ=e1vrb6n5e1TSWLBiLDdZe=7tSCXRVwtTjQ@mail.gmail.com> (raw)

I guess this breaks all MT7622 SoCs since it'll prematurely exit
init_clks (and subsequently init_scp) completely once devm_clk_get
fails to get a reference to the mm clock producer (which happens to be
the first one tried). This is because MT7623 has a GPU (so no mm
clock) and MT7622 doesn't, and as a result the other clock producer
pointers never get initialized (and other stuff in init_scp after
returning from the error never happens).

The patch seems fundamentally flawed, I guess it was either not tested
at all, or only tested on a MT7623. The initialization functions seem
designed with the idea that it's ok if some clocks aren't present, so
stopping the initialization when one of them isn't present seems
wrong. (For example, there is also a MT7622B variant of the MT7622
which probably also lacks some clocks MT7622(A) does have).

WARNING: multiple messages have this Message-ID (diff)
From: Paul Mulders <justinkb@gmail.com>
To: frank-w@public-files.de
Cc: broonie@kernel.org, gregkh@linuxfoundation.org,
	jiasheng@iscas.ac.cn,  lgirdwood@gmail.com,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,  matthias.bgg@gmail.com
Subject: Re: BUG: [PATCH v2] isoc: mediatek: Check for error clk pointer
Date: Fri, 28 Jan 2022 15:26:51 +0100	[thread overview]
Message-ID: <CAOn50SJrdS+uRnJ=e1vrb6n5e1TSWLBiLDdZe=7tSCXRVwtTjQ@mail.gmail.com> (raw)

I guess this breaks all MT7622 SoCs since it'll prematurely exit
init_clks (and subsequently init_scp) completely once devm_clk_get
fails to get a reference to the mm clock producer (which happens to be
the first one tried). This is because MT7623 has a GPU (so no mm
clock) and MT7622 doesn't, and as a result the other clock producer
pointers never get initialized (and other stuff in init_scp after
returning from the error never happens).

The patch seems fundamentally flawed, I guess it was either not tested
at all, or only tested on a MT7623. The initialization functions seem
designed with the idea that it's ok if some clocks aren't present, so
stopping the initialization when one of them isn't present seems
wrong. (For example, there is also a MT7622B variant of the MT7622
which probably also lacks some clocks MT7622(A) does have).

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

             reply	other threads:[~2022-01-28 14:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 14:26 Paul Mulders [this message]
2022-01-28 14:26 ` BUG: [PATCH v2] isoc: mediatek: Check for error clk pointer Paul Mulders
  -- strict thread matches above, loose matches on Subject: below --
2022-01-30  2:43 Jiasheng Jiang
2022-01-30  2:43 ` Jiasheng Jiang
2022-02-01 22:19 ` Daniel Golle
2022-02-01 22:19   ` Daniel Golle
2022-02-01 22:19   ` Daniel Golle
2022-01-28 14:31 Paul Mulders
2022-01-28 14:31 ` Paul Mulders
2021-12-22  1:51 Jiasheng Jiang
2022-01-28  9:51 ` BUG: " Frank Wunderlich
2022-01-28  9:51   ` Frank Wunderlich
2022-01-28  9:51   ` Frank Wunderlich
2022-02-06 17:37   ` Guenter Roeck
2022-02-06 17:37     ` Guenter Roeck
2022-02-06 17:37     ` Guenter Roeck

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='CAOn50SJrdS+uRnJ=e1vrb6n5e1TSWLBiLDdZe=7tSCXRVwtTjQ@mail.gmail.com' \
    --to=justinkb@gmail.com \
    --cc=broonie@kernel.org \
    --cc=frank-w@public-files.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiasheng@iscas.ac.cn \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    /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.