Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    imx51 - babbage - spidev driver problem - SCLK not generated

    Hi folks,

    For my project requirement, we are trying to use the spi in user space.
    In imx51, it is connected to the NOR device.

    I enabled the Device Driver->SPI Support-> User Mode SPI device driver support.

    in arch/arm/mach-mx51/mx51_babbage.c, I disabled the registering of NOR spi board info. and added the following piece of code.

    static struct spi_board_info spi_devices[] = {
    .modalias = "spidev",
    .chip_select = 1,
    .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */

    inside the init_machine function
    spi_register_board_info(spi_devices, ARRAY_SIZE(spi_devices));

    Now, after compilation, the device /dev/spidev1.1 is getting created automatically.

    I compiled the source spidev_test.c (which is present in the Documentation/spi/spidev_test.c), & put it in the target.

    It executed without any error but when i probe for the SCLK using a scope, I did not get any output.

    Program output
    Opening device: /dev/spidev1.1
    spi mode: 0
    bits per word: 8
    max speed: 500000 Hz (500 KHz)
    00 00 00 00 00 00
    00 00 00 00 00 00
    00 00 00 00 00 00
    00 00 00 00 00 00
    00 00 00 00 00 00
    00 00 00 00 00 00
    00 00

    When i enable, the nor driver & trying to access the device, at the same pont SCLK is generated. But when i enable the spidev driver, it is not generating.

    Any kind of suggestion / help is appreciated.

  2. #2
    I searched the topic in Google.
    But in one of the forum said, "Rebuilding the Build root solved the problem".

    I am using freescale's ltib. So, recompilation didn't solve.

    Another forum said, "patching was the problem. The patch was not applied properly". This is also not applicable for me. Becoz, I didn't apply any patch. spidev.c was already there in the drivers/spi/ directory.

    Further to debug, I added prinks inside the spidev driver & the mxc_spi.c (low level spi driver).

    When we are transferring the spi message spi_async(spi, msg) is called by the spidev driver. But the corresponding low level function is not getting called.

    Any body faced these kind of issue...!
    Please help...!

    Thanks in advance ...!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts