From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Jan Remmet <j.remmet@phytec.de>,
u.kleine-koenig@pengutronix.de, s.hauer@pengutronix.de,
Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] libdt: fix detection of eeprom devicepath
Date: Fri, 19 Jun 2015 09:52:07 +0200 [thread overview]
Message-ID: <5583CA27.5000403@pengutronix.de> (raw)
In-Reply-To: <1434699697-26688-1-git-send-email-j.remmet@phytec.de>
[-- Attachment #1.1: Type: text/plain, Size: 1568 bytes --]
Hey Jan,
I think it's okay to use the barebox list for dt-utils related stuff. :)
On 06/19/2015 09:41 AM, Jan Remmet wrote:
> If nodepath can directly be translated to a device, the device can also
> be a eeprom. Set default size to 0. The real size can be got from the
> path.
>
> Signed-off-by: Jan Remmet <j.remmet@phytec.de>
> ---
> I my setup I have an eeprom as backend:
> backend = "/soc/aips-bus@02100000/i2c@021a0000/eeprom@50";
> barebox-state runs in a initramfs without udev daemon, but wih libudev and
> devtmpfs
>
> of_find_device_by_node_path directly found a devices and it was handled as mtd
> device. I added a check for eeprom. Setting the size to 0 let barebox-state
> check the size by itself.
>
> At the end of of_get_devicepath there is a check for eeproms, but then
> of_parse_partition looks for a reg property which is in a casse of a i2c
> eeprom is the i2c address. This results in a wrong offset.
doh!
> With this patch a i2c eeprom backend works. It's not tested with a mtd device
> or a eeprom with a partition layout.
AFAIK on Linux partition layouts are not supported on eeprom devices, as
they are not handled by the mtd layer. I'll apply this patch and test on
my standard device, which uses a mtd device.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next parent reply other threads:[~2015-06-19 7:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1434699697-26688-1-git-send-email-j.remmet@phytec.de>
2015-06-19 7:52 ` Marc Kleine-Budde [this message]
2015-06-21 18:36 ` Marc Kleine-Budde
2015-06-23 6:32 ` Jan Remmet
2015-06-23 6:43 ` Marc Kleine-Budde
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=5583CA27.5000403@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=j.remmet@phytec.de \
--cc=s.hauer@pengutronix.de \
--cc=u.kleine-koenig@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox