Using DMA
Bruce_Leonard at selinc.com
Bruce_Leonard at selinc.com
Tue Nov 11 09:06:17 EST 2008
linuxppc-embedded-bounces+brucle=selinc.com at ozlabs.org wrote on 11/09/2008
04:09:51 PM:
> >
> > The Elo device driver is an async DMA back-end driver. That is, you
> > don't communicate with that driver directly, you communicate with the
> > async library (which is new - so you won't find it in LDD3).
> >
>
> Okay, has anyone actually _used_ the Elo driver? I can't get the probe
> function to run. I get into of_fsl_dma_init(), but of_fsl_dma_probe()
> never executes. I have CONFIG_DMADEVICES and CONFIG_FSL_DMA set in my
It would help if I was sure _when_the probe function was supposed to be
called. I traced of_fsl_dma_init() all the way down into
bus_for_each_dev(), but the call to the passed in function
(__driver_attach() in this case) never gets called. This may not be a bad
thing in and of itself, the USB core registers two interface drivers
(usbfs and hub) and a device driver (usb) just prior this that also don't
call into the function passed into bus_for_each_dev().
The only thing I'm used to yet, being so new to this level of detail, is
installing device drivers where the probe function is called right way.
For example, in my NAND driver when the init funtion runs and calls
pci_register_driver() I land in my probe function. That doesn't happen
when of_fsl_dma_init() calls of_register_platform_driver(). There are
some obvious differences in the code. For one thing, my NAND driver is
described with a device driver structure (i.e., struct pci_device),
whereas the Elo DMA driver is descibed with a platform driver structure
(i.e., struct of_platform_driver). Also, my NAND driver init function is
wrapped in module_init() whereas the Elo driver init function is wrapped
in subsys_initcall(). I'm not sure what (if any) these differences mean,
but I'm stummped. I have no idea how to attach to the Elo DMA driver.
It seems to me that the probe function should be called as soon as the
kernel calls the init function, but it doesn't happen. Any guidence on
how to make this thing work is really appreciated. Thanks.
Bruce
More information about the Linuxppc-embedded
mailing list