Re: [PATCH] libdt: fix detection of eeprom devicepath

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
> 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: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux