Porting RapidIO from ppc arch to powerpc arch in support ofMPC8641D
Zhang Wei-r63237
Wei.Zhang at freescale.com
Thu May 24 16:48:16 EST 2007
Hi, Arnd,
> >
> > Then I should pass np into the various setup routines as
> above so that
> > they can find the interrupts, etc.
> >
> > Is this the right kind of flavor or have I misunderstood how the dtb
> > stuff is supposed to integrate with the susbsys_initcall stuff.
>
> the thing you are missing is probably the of_platform_driver. Your
> driver should have something like
>
> static struct of_device_id mpc85xx_rio_ids[] = {
> { .compatible = "fsl,8641d-rapidio", .data = RIO_8641 },
> { .compatible = "fsl,8540-rapidio", .data = RIO_8540 },
> { },
> };
> static struct of_platform_driver mpc85xx_rio_driver = {
> .name = "mpc85xx_rio",
> .match_table = &mpc85xx_rio_ids,
> .probe = mpc85xx_rio_probe,
> };
> static int __init mpc85xx_rio_init(void)
> {
> return of_register_platform_driver(&mpc85xx_rio_driver);
> }
> subsys_initcall(mpc85xx_rio_init);
>
> > I'm assuming we are supposed to do away with all the CONFIG_RAPIDIO,
> > CONFIG_MPCxyz etc so that the kernel is driven by the dtb?
>
I'm not agree with you.
Of_platform_driver is a good framework. But this RapidIO driver is not a
device driver. It's a _bus_ driver very similar to PCI bus. So,
of_platform_driver is not fit here.
Thanks!
Wei.
More information about the Linuxppc-dev
mailing list