Find the answer to your Linux question:
Results 1 to 2 of 2
linux-2.6.29 i have a s3c2440 board .i "make menuconfig" to enable the spi core and spi user mode driver i get a error "no platform data supllied" so i "google" ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    2

    linux 2.6.29 port spi driver to s3c2440??????


    linux-2.6.29
    i have a s3c2440 board .i "make menuconfig" to enable the spi core and spi user mode driver
    i get a error "no platform data supllied" so i "google" and find the code
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    in the kernel 2.6.22

    "static struct spi_board_info s3c2410_spi_board[] = {
    [0] = {
    .modalias = "s3c2410_spi",
    .platform_data = NULL,
    .irq = IRQ_EINT1,
    .chip_select = 0,
    .max_speed_hz = 4000*1000,
    },
    };

    static struct s3c2410_spi_info s3c2410_spi_platdata = {
    .pin_cs = S3C2410_GPG2,
    .board_info = s3c2410_spi_board,
    .board_size = ARRAY_SIZE(s3c2410_spi_board),
    };
    /* end add */

    static struct resource s3c_spi0_resource[] = {
    [0] = {
    .start = S3C24XX_PA_SPI,
    .end = S3C24XX_PA_SPI + 0x1f,
    .flags = IORESOURCE_MEM,
    },
    [1] = {
    .start = IRQ_SPI0,
    .end = IRQ_SPI0,
    .flags = IORESOURCE_IRQ,
    }

    };

    static u64 s3c_device_spi0_dmamask = 0xffffffffUL;

    struct platform_device s3c_device_spi0 = {
    .name = "s3c2410-spi",
    .id = 0,
    .num_resources = ARRAY_SIZE(s3c_spi0_resource),
    .resource = s3c_spi0_resource,
    .dev = {
    .dma_mask = &s3c_device_spi0_dmamask,
    .coherent_dma_mask = 0xffffffffUL,
    /* add by lfc */
    .platform_data = &s3c2410_spi_platdata,
    /* end add */
    }
    };

    EXPORT_SYMBOL(s3c_device_spi0);"
    ////////////////////////////////////////////////////////////////////////////////////////////////////

    but i found that in the kernel 2.6.29 the struct s3c2410_spi_info is different from the kernel 2.6.22

    so i cant add the above codes to linux-2.6.29


    and how can do it !!!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,173
    So? Go to The Linux Kernel Archives and get the code / headers for the 2.6.29 kernel.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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