From: "Rafał Miłecki" <zajec5@gmail.com>
To: Michael Walle <michael@walle.cc>
Cc: devicetree@vger.kernel.org, hayashi.kunihiko@socionext.com,
krzysztof.kozlowski+dt@linaro.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
matthias.bgg@gmail.com, mhiramat@kernel.org, rafal@milecki.pl,
robh+dt@kernel.org, srinivas.kandagatla@linaro.org
Subject: Re: [PATCH 3/4] nvmem: mtk-efuse: replace driver with a generic MMIO one
Date: Wed, 1 Feb 2023 10:30:48 +0100 [thread overview]
Message-ID: <8452b341-8695-05d8-9d03-47c9aeca0ec7@gmail.com> (raw)
In-Reply-To: <20230201084821.1719839-1-michael@walle.cc>
On 1.02.2023 09:48, Michael Walle wrote:
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> Mediatek EFUSE uses a simple MMIO that can be handled with a generic
>> driver. Replace this driver to avoid code duplication.
>
> I don't think this is the correct approach. You'll restrict that driver
> to being read-only. I admit that right now, it's read only, but it can
> be extended to also support efuse writing. With this changes, it's not
> possible.
>
>> static const struct of_device_id mmio_nvmem_of_match_table[] = {
>> { .compatible = "mmio-nvmem", },
>> + /* Custom bindings that were introduced before the mmio one */
>> + { .compatible = "mediatek,mt8173-efuse", },
>> + { .compatible = "mediatek,efuse", },
>
> Why do you assume that all mediatek efuses will be the same? This should
> rather be something like (in the dts/binding):
>
> compatible = "mediatek,mt8173-efuse", "mmio-nvmem";
>
> So if there is no driver for the particular efuse, it will fall back to the
> generic one.
Oh great, I'm making circles now.
Rob suggested I should convert existing drivers, see:
[PATCH 2/2] nvmem: add generic driver for devices with I/O based access
and I thought efuse ones should be good.
Please tell me how I should handle brcm,nvram without wasting more time.
I thought I had it sorted out but I just wasted 2 days.
I believe I need to make brcm,nvram NVMEM layout. Without converting it
I'm afraid you'll refuse my changes adding cell post processing (that
happened to my U-Boot attempts).
Before I convert brcm,nvram to NVMEM layout I need some binding & driver
providing MMIO device access. How to handle that?
next prev parent reply other threads:[~2023-02-01 9:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 6:47 [PATCH 0/4] nvmem: add and use generic MMIO NVMEM Rafał Miłecki
2023-02-01 6:47 ` [PATCH 1/4] dt-bindings: nvmem: mmio: new binding for MMIO accessible NVMEM devices Rafał Miłecki
2023-02-03 21:06 ` Rob Herring
2023-02-01 6:47 ` [PATCH 2/4] nvmem: add generic driver for devices with MMIO access Rafał Miłecki
2023-02-01 9:41 ` Kunihiko Hayashi
2023-02-01 11:52 ` Srinivas Kandagatla
2023-02-02 9:24 ` AngeloGioacchino Del Regno
2023-02-01 6:47 ` [PATCH 3/4] nvmem: mtk-efuse: replace driver with a generic MMIO one Rafał Miłecki
2023-02-01 8:48 ` Michael Walle
2023-02-01 9:30 ` Rafał Miłecki [this message]
2023-02-01 10:46 ` Michael Walle
2023-02-01 11:01 ` Rafał Miłecki
2023-02-01 11:11 ` Michael Walle
2023-02-01 18:54 ` Rob Herring
2023-02-01 20:15 ` Michael Walle
2023-02-02 23:44 ` Rob Herring
2023-02-01 6:47 ` [PATCH 4/4] nvmem: uniphier-efuse: " Rafał Miłecki
2023-02-01 7:50 ` [PATCH 0/4] nvmem: add and use generic MMIO NVMEM Rafał Miłecki
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=8452b341-8695-05d8-9d03-47c9aeca0ec7@gmail.com \
--to=zajec5@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=hayashi.kunihiko@socionext.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mhiramat@kernel.org \
--cc=michael@walle.cc \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).