[U-Boot] Multiple device support - none at all?

Jerry Van Baren gerald.vanbaren at ge.com
Tue Mar 10 22:15:38 CET 2009


ksi at koi8.net wrote:
> Hi, everyone.
> 
> I wonder if I'm dreaming or the U-Boot is fundamentally broken...

Well... broken can be a relative term.  I like to think of it as an 
opportunity to stand on the shoulders of giants.  ;-)

> It looks like there is no support for multiple devices of a same kind at
> all.
> 
> I'm porting U-Boot to my new MPC8548-based board and it pops up
> everywhere...
> 
> The first case was I2C subsystem that does not provide for several I2C
> adapters except rudimentary hacks for fsl_i2c.
> 
> Now it is USB. I have 2 OHCI USB controllers on the board, OHCI module in
> NXP ISP1563 and OHCI controller in Silicon Motion SM502 MFD. The former is
> supported in drivers/usb/usb_ohci.c, the latter is kinda trivial to add,
> BUT...
> 
> It looks like nobody even considered the case when a board can have several
> controllers... Looking at usb_lowlevel_init() I can see it only works for
> the first device found, there is absolutely no provision for several
> devices. And things are getting even nastier if there are devices of the
> same type with different interfaces (e.g. on-SoC USB controller and a PCI
> one.)
> 
> And this seems to be the case for each and every device type. Am I missing
> something or U-Boot is actually flawed in FUNDAMENTAL way and it is time to
> start a new one from scratch?

U-Boot started life as a boot loader.  You know, simple.  It has gotten 
more complex over time, but the modus operandi of u-boot is and shall 
remain that.  Simple. (quoting our benevolent dictator, WD)

The counter-question for your application is to challenge what you are 
trying to use u-boot for: do you actually need to use both USB 
controllers (simultaneously or even sequentially) to boot linux?  Do you 
really need to use multiple I2C controllers to boot linux?  Can you 
simplify your system to get linux running without supporting multiple 
USB or I2C adapters?

If you really need multiple adapter support, you are going to have to 
blaze new ground (or build out some hacks into more acceptable levels of 
support).  That is the cost of being the leader.  :-/

The fundamental concept of u-boot isn't to handle all your devices, it 
is to boot linux (or other OS) and use the OS to handle the multiple 
devices.

Best regards,
gvb



More information about the U-Boot mailing list