call identify, probe and attach on run time?
Matías Perret Cantoni
perretcantonim at gmail.com
Fri Mar 6 19:03:50 UTC 2015
Thank you Warner, It worked the way you said.
2015-03-04 12:49 GMT-03:00 Warner Losh <imp at bsdimp.com>:
>
> > On Mar 4, 2015, at 7:39 AM, Matías Perret Cantoni <
> perretcantonim at gmail.com> wrote:
> >
> > Hello! I'm a newbie at freeBSD and at the development of newbus drivers,
> so
> > excuse me if this is too silly:
> >
> > I'm running FreeBSD on the Zedboard, an arm based board, and I wrote a
> > simple newbus driver for reading and writing a specific I/O port (It is
> > basically a simplified copy of the Warner Losh example driver for the
> > iOpener Led)
> >
> > I successfully load my driver:
> >
> > # kldload ./simple_d.ko
> > #
> >
> > But after doing this I can't find the new node neither under /dev nor
> with
> > devinfo(8). I assume that the identify, probe and attach functions hasn't
> > been called. Is this correct?
> >
> > So is there any way of doing this at run time? I mean NOT during
> > auto-configuration.
> >
> > If I can only do it on boot time ...
> > ... should I add a node at the Flattened Device Tree?
> > ... should I place the driver in some specific directory?
> > ... should I re-compile the kernel with the new driver included?
>
> I think you need to add the node to the FDT that you boot with.
> Once you do that, you’ll be able to load and unload the driver. With
> the FDT node, it will probe on boot, find no driver and get on with life.
> Later, when you load the driver it will probe all the nodes that don’t
> have drivers, you’re code will get called and life will be good.
>
> Warner
>
More information about the freebsd-drivers
mailing list