[U-Boot-Users] [Patch 0/9] U-boot-V2: Introduce I2C support for SDP3430
Robert Schwebel
r.schwebel at pengutronix.de
Wed Jun 18 20:38:06 CEST 2008
On Wed, Jun 18, 2008 at 11:04:21AM -0500, Menon, Nishanth wrote:
> Hmm... flexibility Vs size.. the age old argument ;).
Well, the code we have in u2 today has shown that you can get both, if
done carefully :)
> When I started considering i2c I pulled code from U-Boot v1 and
> started putting in u-boot v2, then realized I was barking up the wrong
> tree. I then realized that probably it is better to pull in the linux
> i2c arch in to u-boot v2 and add flags to enable/disable features to
> control the size. Having a Kconfig does help a ton. The "new style"
> drivers were perfect to fit into u-boot-v2 architecture + I get to
> enable folks who already have linux drivers to pull it down to u-boot
> v2 with very little effort. The learning curve is smaller, infact,
> almost non-existant.
Right; nevertheless, don't forget that this is a bootloader, and our aim
is to have a codebase which is as clear as possible right from the
beginning.
> I think the best choice is selective addition as the need arises. We
> may not need V4L2 and similar things.. Where we can make compatibility
> happen, that would be good IMHO. We can then proceed with customizing
> and improving it to our needs. Why reinvent the wheel?
We might need a wheel with slightly different requirements :-)
So I suppose the right way to proceed is:
- let's first define use cases for what you want to achieve with the i2c
support in u-boot-v2
- let's have a look at how it would integrate into the device/driver
model and how the user-visible API would look like
- write a small framework for i2c, with host+algo+device parts, heavily
inspired by the best of Linux and the best of u-boot/u-boot-v2.
That worked out very well for the features we currently have in u2.
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
More information about the U-Boot
mailing list