"Paulraj, Sandeep" <[email protected]> writes:

> SPI does not build by default in the present config.
> SPI needs to be enabled first.
> Once this is done through menuconfig, the SPI EEPROM driver( miscellaneous
> Driver) needs to be enabled.

How about a including defconfig updates to build the above as modules
in this patch.

Kevin

> Once the board boots up 
> Cd /sys/devices/platform/spi_davinci.0/spi0.0
>
> There should be an entry for the EEPROM.
>
> Operation such as echo, strings, hexdump can be performed
>
> Thanks,
> Sandeep
>
>> -----Original Message-----
>> From: Paulraj, Sandeep
>> Sent: Tuesday, June 02, 2009 1:55 PM
>> To: [email protected]
>> Cc: Paulraj, Sandeep
>> Subject: [PATCH] Adding Support for DM355 SPI
>> 
>> Patch makes a minor modification to SPI clocks on DM355.
>> Patch also adds platform data for DM355 SPI
>> 
>> Signed-off-by: Sandeep Paulraj <[email protected]>
>> ---
>>  arch/arm/mach-davinci/dm355.c |   15 +++++++++++----
>>  1 files changed, 11 insertions(+), 4 deletions(-)
>> 
>> diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
>> index beda643..6f1007b 100644
>> --- a/arch/arm/mach-davinci/dm355.c
>> +++ b/arch/arm/mach-davinci/dm355.c
>> @@ -17,7 +17,7 @@
>>  #include <linux/gpio.h>
>> 
>>  #include <linux/spi/spi.h>
>> -
>> +#include <linux/spi/davinci_spi.h>
>>  #include <asm/mach/map.h>
>> 
>>  #include <mach/dm355.h>
>> @@ -364,9 +364,9 @@ static struct davinci_clk dm355_clks[] = {
>>      CLK("soc-audio.1", NULL, &asp1_clk),
>>      CLK("davinci_mmc.0", NULL, &mmcsd0_clk),
>>      CLK("davinci_mmc.1", NULL, &mmcsd1_clk),
>> -    CLK(NULL, "spi0", &spi0_clk),
>> -    CLK(NULL, "spi1", &spi1_clk),
>> -    CLK(NULL, "spi2", &spi2_clk),
>> +    CLK("spi_davinci.0", NULL, &spi0_clk),
>> +    CLK("spi_davinci.1", NULL, &spi1_clk),
>> +    CLK("spi_davinci.2", NULL, &spi2_clk),
>>      CLK(NULL, "gpio", &gpio_clk),
>>      CLK(NULL, "aemif", &aemif_clk),
>>      CLK(NULL, "pwm0", &pwm0_clk),
>> @@ -386,6 +386,12 @@ static struct davinci_clk dm355_clks[] = {
>> 
>>  static u64 dm355_spi0_dma_mask = DMA_BIT_MASK(32);
>> 
>> +static struct davinci_spi_platform_data dm355_spi0_pdata = {
>> +    .version = DAVINCI_SPI_VERSION_1,
>> +    .num_chipselect = 2,
>> +    .instance = 0,
>> +};
>> +
>>  static struct resource dm355_spi0_resources[] = {
>>      {
>>              .start = 0x01c66000,
>> @@ -411,6 +417,7 @@ static struct platform_device dm355_spi0_device = {
>>      .dev = {
>>              .dma_mask = &dm355_spi0_dma_mask,
>>              .coherent_dma_mask = DMA_BIT_MASK(32),
>> +            .platform_data = &dm355_spi0_pdata,
>>      },
>>      .num_resources = ARRAY_SIZE(dm355_spi0_resources),
>>      .resource = dm355_spi0_resources,
>> --
>> 1.6.0.4
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to