call identify, probe and attach on run time?
Warner Losh
imp at bsdimp.com
Wed Mar 4 15:49:56 UTC 2015
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-drivers/attachments/20150304/b0b77dae/attachment.sig>
More information about the freebsd-drivers
mailing list