ocpbus(4)

Olivier Gautherot olivier at gautherot.net
Fri Dec 28 12:56:31 PST 2007


Hi there!

On 12/28/07, M. Warner Losh <imp at bsdimp.com> wrote:
> In message: <C95AFF48-2C06-40FA-BDB4-C46011EECCF3 at juniper.net>
>             Marcel Moolenaar <marcelm at juniper.net> writes:
> : On Dec 28, 2007, at 11:12 AM, M. Warner Losh wrote:
> :
> : > If the ocpbus has a table of bus types, what's wrong with having it
> : > directly assign the driver when it ads its children?
> :
> : It violates newbus in that drivers compete for a device.
> : If the bus assigns the driver, then there's no competition
> : possible. The fact that the bus is abstract should not
> : mean that we should change its paradigm.
>
> No it doesn't.  There's two kinds of busses in newbus.  Those that
> self enumerate based on the hardware present (ie pccard, pci, usb,
> firewire) and then those that are told what's there (oldcard-style
> pccard, pure ISA, I2C, etc).  The busses on the SoC more strongly
> resemble the latter than the former.  The former busses already are
> enumerated with hints, but the actual mechanism is just a few calls
> that could be replaced with something better.

Excuse my ignorance about obio, ocpbus and the like...
If we envisage to use a PCI-like approach to initialise the on-chip
drivers, couldn't we generate a table on a per CPUID basis?
In PCI land, the device enumerates all the functions it supports
and the kernel installs the approriate modules. In this case, we would
have a table of devices indexed by the CPUID - for instance, the
MPC5200 has 2 UARTs at addresses x and y, the MPC5512 has 3 UARTs
at addresses x, y and z, etc. These tables would be used only during
boot time and would only use up ROM space... When compiling the
kernel, we would then enable only the tables that apply (ideally, just
one - and make sure at run time that it is the correct one).

It does not sound like rocket science to me so I guess it has been
evaluated at some point?

My cent worth...
Cheers
Olivier
-- 
Olivier Gautherot
olivier at gautherot.net
Cel:+56 98 730 9361
www.gautherot.net
http://www.linkedin.com/in/ogautherot


More information about the freebsd-embedded mailing list