Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Tomer Maimon <tmaimon77@gmail.com>,
	ulf.hansson@linaro.org, avifishman70@gmail.com,
	tali.perry1@gmail.com, joel@jms.id.au, venture@google.com,
	yuenn@google.com, benjaminfair@google.com,
	adrian.hunter@intel.com, skhan@linuxfoundation.org,
	davidgow@google.com, pbrobinson@gmail.com, gsomlo@gmail.com,
	briannorris@chromium.org, arnd@arndb.de, krakoczy@antmicro.com,
	openbmc@lists.ozlabs.org, linux-mmc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] mmc: sdhci-npcm: Add NPCM SDHCI driver
Date: Fri, 17 Mar 2023 11:37:54 -0700	[thread overview]
Message-ID: <4b2d6f4a-4868-9ffe-e1e1-9feafe41ccdd@roeck-us.net> (raw)
In-Reply-To: <CAHp75Vegm=jmuJ6q5qofuLKm_LggKmtQZWcVgQN=MG3kMMCTRA@mail.gmail.com>

On 3/17/23 10:36, Andy Shevchenko wrote:
> On Fri, Mar 17, 2023 at 4:16 PM Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> On Mon, Dec 05, 2022 at 10:53:51AM +0200, Tomer Maimon wrote:
>>> Add Nuvoton NPCM BMC sdhci-pltfm controller driver.
>>>
>>> Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
>>
>> I still don't see this driver in the upstream kernel, or in linux-next.
>>
>> Couple of comments:
>>
>> - devm ordering does not really matter here. The devm resource
>>    is the clock, it does not depend on local data, and it will be
>>    released last, so that is ok.
> 
> Not sure. Strictly speaking this is the problem. If you leave a clock
> going on in a wrong period of time it (theoretically) might break your
> hardware once and forever. Similar discussion about power, clock and
> reset signals has been held for camera sensors.
> 

In general I agree, but not here. The remove function (sdhci_pltfm_unregister)
does call clk_disable_unprepare(), so the clock isn't left running.

Also, I think it is worthwhile to point out that exactly the same sequence
(sdhci_pltfm_init followed by devm_clk_get and cleanup/removal with
sdhci_pltfm_unregister) is shared among several sdhci drivers (including
the memory leak I pointed out, but only in the aspeed driver).

On a higher level I do agree that the sdhci platform code is in need of cleanup,
but I don't think it is appropriate to tie such a cleanup to this driver
submission.

Note that I don't really care much, I just realized that this patch is stuck
when I tried to test booting from SD drive with qemu.

Guenter


  reply	other threads:[~2023-03-17 18:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05  8:53 [PATCH v2 0/2] MMC: add NPCM SDHCI driver support Tomer Maimon
2022-12-05  8:53 ` [PATCH v2 1/2] dt-bindings: mmc: npcm,sdhci: Document NPCM SDHCI controller Tomer Maimon
2022-12-05 22:24   ` Rob Herring
2022-12-05  8:53 ` [PATCH v2 2/2] mmc: sdhci-npcm: Add NPCM SDHCI driver Tomer Maimon
2022-12-05 10:54   ` Andy Shevchenko
2022-12-05 11:20     ` Tomer Maimon
2022-12-05 13:25       ` Andy Shevchenko
2022-12-05 13:41         ` Adrian Hunter
2022-12-05 14:14           ` Andy Shevchenko
2022-12-05 14:17             ` Andy Shevchenko
2022-12-05 14:33               ` Adrian Hunter
2022-12-07 13:01                 ` Tomer Maimon
2022-12-07 13:25                   ` Andy Shevchenko
2022-12-07 13:49                     ` Adrian Hunter
2022-12-07 16:48                       ` Andy Shevchenko
2022-12-08 12:58                         ` Tomer Maimon
2022-12-07 13:47   ` Adrian Hunter
2023-03-17 14:16   ` Guenter Roeck
2023-03-17 17:36     ` Andy Shevchenko
2023-03-17 18:37       ` Guenter Roeck [this message]
2023-03-23 12:19     ` Ulf Hansson

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=4b2d6f4a-4868-9ffe-e1e1-9feafe41ccdd@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=adrian.hunter@intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=arnd@arndb.de \
    --cc=avifishman70@gmail.com \
    --cc=benjaminfair@google.com \
    --cc=briannorris@chromium.org \
    --cc=davidgow@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gsomlo@gmail.com \
    --cc=joel@jms.id.au \
    --cc=krakoczy@antmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=pbrobinson@gmail.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=venture@google.com \
    --cc=yuenn@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox