From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
linux-kernel@vger.kernel.org,
Sascha Hauer <s.hauer@pengutronix.de>,
Trent Piepho <tpiepho@kymetacorp.com>
Subject: Re: [RESEND RFC 2/3] nvmem: Add 'nvmem-blob' driver
Date: Wed, 9 Mar 2016 10:58:56 +0100 [thread overview]
Message-ID: <20160309095856.GM8418@lukather> (raw)
In-Reply-To: <CAHQ1cqEjCA-SC3sp3X6jYCMAHkCdvzE378yqL3fbdaUKbtRASg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1946 bytes --]
On Tue, Mar 08, 2016 at 02:46:52PM -0800, Andrey Smirnov wrote:
> >>
> >> I don't think I understand what you mean, could you give me an example
> >> of how I'd use local-mac-address property for that use case? AFAIK,
> >> local-mac-address is just an array of bytes embedded into device tree,
> >
> > Well, yeah, but the nvmem-blob is also just an array of bytes embedded
> > into the DT, right?
>
> One is accessible via "nvmem" API and the other one isn't.
But there's no point in accessing it with nvmem in the first
place. You want to provide some information to the ethernet driver to
give it his mac address, that's what you want to do. And we already
have a property that does just that, and is supported by all the
ethernet drivers. Why would you want to add a special case to
something that is doing exactly the same thing?
> >> how would it get populated with data from OTP memory of SoC?
> >
> > In the bootloader, or Linux, read the OTP, patch the DT to add that
> > node, done.
>
> No, it's not really "done", because if you read my previous messages,
> "read the OTP, patch the DT" is exactly the problem I am trying to
> solve. The overall goal is to be able to read a certain "nvmem" cell
> and patch DT with that data as MAC address,
But *why* do you need to store that using nvmem in the first place?
You really have two solutions here: make your ethernet driver read the
EEPROM using nvmem directly or do it in the bootloader and set
local-mac-address (note that you can do both).
> however in it's current incarnation "nvmem" doesn't have provisions
> to make cells that are just combination of other cells (patch #3)
This use case is valid.
> and to embed certain data in DT and then access it as "nvmem" cell
> (patch #2)
And this one is redundant.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-09 9:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 16:59 [RESEND RFC 0/3] Proposed extensions for NVMEM Andrey Smirnov
2016-03-01 16:59 ` [RESEND RFC 1/3] nvmem: Add 'of_nvmem_cell_from_device_node()' Andrey Smirnov
2016-03-02 13:58 ` Srinivas Kandagatla
2016-03-02 18:11 ` Andrey Smirnov
2016-03-01 16:59 ` [RESEND RFC 2/3] nvmem: Add 'nvmem-blob' driver Andrey Smirnov
2016-03-02 13:58 ` Srinivas Kandagatla
2016-03-02 17:21 ` Andrey Smirnov
2016-03-07 8:18 ` Maxime Ripard
2016-03-08 4:07 ` Andrey Smirnov
2016-03-08 22:28 ` Maxime Ripard
2016-03-08 22:46 ` Andrey Smirnov
2016-03-08 23:24 ` Trent Piepho
2016-03-09 10:13 ` Maxime Ripard
2016-03-09 19:50 ` Trent Piepho
2016-03-09 9:58 ` Maxime Ripard [this message]
2016-03-09 17:04 ` Andrey Smirnov
2016-03-09 7:59 ` Sascha Hauer
2016-03-01 16:59 ` [RESEND RFC 3/3] nvmem: Add 'nvmem-composite' driver Andrey Smirnov
2016-03-02 13:59 ` Srinivas Kandagatla
2016-03-02 18:33 ` Andrey Smirnov
2016-03-17 11:26 ` Srinivas Kandagatla
2016-03-21 16:12 ` Andrey Smirnov
2016-03-21 16:56 ` Srinivas Kandagatla
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=20160309095856.GM8418@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=andrew.smirnov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=srinivas.kandagatla@linaro.org \
--cc=tpiepho@kymetacorp.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.