On Tue, 26 Aug 2008, David Brownell wrote:
> On Tuesday 26 August 2008, Jon Smirl wrote:
> > Another solution is call_userspace_helper. GregKH convinced me to
> > change some things like this to small user space apps in the graphics
> > code. Is is easy to do the read/write from sysfs.
>
> Some of us don't like the implication that the relevant hardware
> can't properly boot without initramfs/initrd tools.  Even if it
> doesn't need anything the least bit fancy like a RAID for rootfs.

Having the kernel use a userspace helper to read an eeprom via the kernel
eeprom driver does seem ridiculously round-about and overly complicated.

Lots of tv cards have eeproms with configuration information.  They use an
I2C driver called tveeprom that exports this:
int tveeprom_read(struct i2c_client *c, unsigned char *eedata, int len)

> Last I heard, the U-Boot policy was not to touch controllers that are
> not required during boot.  Despite relatively common cases like needing
> to set up MAC addresses ... maybe this patch of Kevin's can make it a
> bunch easier to cope with that U-Boot policy.  :)

U-boot can put the MAC address into a property of the MAC's device node in
the OF device tree (which u-boot passes to the kernel).  The Linux mac
driver can then use that to set the address.  U-boot doesn't actually need
to touch the mac.  It does need to read the eeprom then (which could store
u-boot environment).

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

Reply via email to