mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Re: [PATCH] libdt: fix detection of eeprom devicepath
       [not found] <1434699697-26688-1-git-send-email-j.remmet@phytec.de>
@ 2015-06-19  7:52 ` Marc Kleine-Budde
  2015-06-21 18:36   ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2015-06-19  7:52 UTC (permalink / raw)
  To: Jan Remmet, u.kleine-koenig, s.hauer, Barebox List


[-- 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libdt: fix detection of eeprom devicepath
  2015-06-19  7:52 ` [PATCH] libdt: fix detection of eeprom devicepath Marc Kleine-Budde
@ 2015-06-21 18:36   ` Marc Kleine-Budde
  2015-06-23  6:32     ` Jan Remmet
  0 siblings, 1 reply; 4+ messages in thread
From: Marc Kleine-Budde @ 2015-06-21 18:36 UTC (permalink / raw)
  To: Jan Remmet, u.kleine-koenig, s.hauer, Barebox List


[-- Attachment #1.1: Type: text/plain, Size: 1134 bytes --]

On 06/19/2015 09:52 AM, Marc Kleine-Budde wrote:
>> 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.

applied to master.

Works here with the NAND-partition backend. However udev from
systemd-220 fails to find NAND-partition while systemd-219 works, no
matter if your patch is applied or not. Which systemd/udev version are
you using?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libdt: fix detection of eeprom devicepath
  2015-06-21 18:36   ` Marc Kleine-Budde
@ 2015-06-23  6:32     ` Jan Remmet
  2015-06-23  6:43       ` Marc Kleine-Budde
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Remmet @ 2015-06-23  6:32 UTC (permalink / raw)
  To: barebox

On Sun, Jun 21, 2015 at 08:36:39PM +0200, Marc Kleine-Budde wrote:
> On 06/19/2015 09:52 AM, Marc Kleine-Budde wrote:
> >> 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.
> 
> applied to master.
> 
> Works here with the NAND-partition backend. However udev from
> systemd-220 fails to find NAND-partition while systemd-219 works, no
> matter if your patch is applied or not. Which systemd/udev version are
> you using?
Here I use it in a initramfs with libudev.so.1.6.0, but no running daemon.

Jan

> 
> 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   |
> 



> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libdt: fix detection of eeprom devicepath
  2015-06-23  6:32     ` Jan Remmet
@ 2015-06-23  6:43       ` Marc Kleine-Budde
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2015-06-23  6:43 UTC (permalink / raw)
  To: Jan Remmet, barebox


[-- Attachment #1.1: Type: text/plain, Size: 876 bytes --]

On 06/23/2015 08:32 AM, Jan Remmet wrote:
>> Works here with the NAND-partition backend. However udev from
>> systemd-220 fails to find NAND-partition while systemd-219 works, no
>> matter if your patch is applied or not. Which systemd/udev version are
>> you using?
> Here I use it in a initramfs with libudev.so.1.6.0, but no running daemon.

The .so version cannot be mapped directly tothe tarball version.

For the record: systemd-220 is broken, 219 and 221 are working. If you
need 220, cherry-pick commit 5f529f4c97a141457301477505ae7eb4c28cf610
from the systemd.git repo.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-23  6:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1434699697-26688-1-git-send-email-j.remmet@phytec.de>
2015-06-19  7:52 ` [PATCH] libdt: fix detection of eeprom devicepath Marc Kleine-Budde
2015-06-21 18:36   ` Marc Kleine-Budde
2015-06-23  6:32     ` Jan Remmet
2015-06-23  6:43       ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox