Conditions for mydriver_probe to be called

DI BACCO ANTONIO - technolabs Antonio.DiBacco at technolabs.it
Wed Feb 7 03:32:17 EST 2007


>Note that for 8xx, spi normally resides on scc, so you'll have to use
...set_func and >...device_enable() stuff (see in ppc_sys.c for exact
prototypes) to have foo-bar-scc:spi or 
> alike registered on bus.

In my MPC880 the SPI is a standalone device not an SCC. 

I found my problem, and I'm sorry that I disturbed the community for a
stupid mistake. Anyway I'm answering because someone could meet the same
problem.

In mpc8xx_devices.c I addedd the following:

        [MPC8xx_CPM_SPI] = {
                .name = "fsl-cpm-spi",
                .id     = 1,
                .num_resources  = 3,
                .resource = (struct resource[]) {
                        {
                                .name   = "regs",
                                .start  = 0xaa0,
                                .end    = 0xab1,
                                .flags  = IORESOURCE_MEM,
                        },
                        {
                                .name   = "pram",
                                .start  = 0x3d80,
                                .end    = 0x3daf,
                                .flags  = IORESOURCE_MEM,

                        },
                        {
                                .name   = "interrupt",
                                .start  = MPC8xx_INT_SPI,
                                .end    = MPC8xx_INT_SPI,
                                .flags  = IORESOURCE_IRQ,
                        },
                },
        },

But by mistake I registered mydriver with fsl_cpm_spi (with underscores
instead of -). The driver name should match the name in platform_device
structure or at least the default match function should be overriden.

I'm a newbie don't trust me completely (wait for an expert
confirmation). 

Bye and thank you,
Antonio.




More information about the Linuxppc-embedded mailing list