This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

vpfe-capture won't initialize at boot

I'm trying to capture images using an MT9M112 image sensor. The first step is to get vpfe-capture up and running, but I can't seem to get the recipe right.

Here is the message I get when booting.

[    3.000000] vpfe_init
[    3.010000] vpfe-capture: Unable to get vpfe config
[    3.020000] vpfe-capture: probe of vpfe-capture failed with error -2
[    3.020000] vpfe_register_ccdc_device: DM355 CCDC
[    3.030000] vpfe capture not initialized

Looking at vpfe_capture.c, "Unable to get vpfe config" occurs when the following code is executed.

    vpfe_dev->pdev = &pdev->dev;

    if (NULL == pdev->dev.platform_data) {
        v4l2_err(pdev->dev.driver, "Unable to get vpfe config\n");
        ret = -ENOENT;
        goto probe_free_dev_mem;
    }

So dev.platform_data is NULL, but I can't figure out how or where it is supposed to get set to real data.

What do I need to do for platform_data to be non-NULL?

Thanks,

David

  • Hi David,

     

    Platform data is initialized in board specific file, driver gets the platform data when it registers to kernel using platform_driver_register. Please check your board specific file, it should be available in /Linux\arch/arm/mach-davinci/board-dm644x-evm.c.

     

    Thanks,

    Brijesh Jadav

  • I should have mentioned that I am using the DM355 LeopardBoard, but the concepts will be the same as the DM644x-EVM. Instead of board-dm644x-evm.c, my system uses board-dm355-leopard.c.

    What should I be looking for in the board specific file?

    I guess the first question is, what device is missing platform_data? Is it the vpfe-capture device or the MT9M112? The code producing the error makes me think it's the vpfe-capture device platform_data that is the problem.

    In board-dm644x-evm.c, I see code for setting up the vpfe, but in I don't see anything about the vpfe in board-dm355-leopard.c. Maybe that's the problem. Should I patch the vpfe code in from board-dm355-evm.c?

    Thanks,

    David

  • Hi David,

     

    To enable vpfe_capture driver you have to set the module parameter interface ie in bootargs you also got to add vpfe_capture.interface=1

     

     

    Best Regards

    Prabhakar Lad

  • For which kernel version should your suggestion work. I am using 2.6.32-rc2-davinci1.

    I added vpfe_capture.interface=1 and it had no effect.

    Here are my bootargs

    console=ttyS0,115200n8 mem=96M root=/dev/nfs nfsroot=192.168.0.14:/srv/fs ip=dhcp vpfe_capture.interface=1 mtdparts=davinci_nand.0:512k(bootloader)ro,4m(kernel),-(filesystem)

    Thanks,

    David