Porting a driver to powerpc using FDT

Chris Alfred (Internode) chrisalfred at internode.on.net
Wed Jun 16 08:18:04 EST 2010


I am trying to port a DSA (Distributed Switch Architecture) driver for 
the Micrel KS8995M managed switch connected to a MPC5200. There is an 
SPI interface and MII interface managed by the DSA driver.

I can't understand how probe gets called when the flatted device tree 
(FDT) system is used, and how to bind such a driver using the FDT (if 
you have to at all).

The DSA driver is initialised via:

    // net/dsa/dsa.c

    static struct platform_driver dsa_driver = {
     .probe  = dsa_probe,
     .remove  = dsa_remove,
     .shutdown = dsa_shutdown,
     .driver = {
      .name = "dsa",
      .owner = THIS_MODULE,
     },
    };

    static int __init dsa_init_module(void)
    {
     return platform_driver_register(&dsa_driver);
    }

dsa_init_module is being called; but how do I get the system to call 
.probe?

Chris



More information about the Linuxppc-dev mailing list