2011-05-11 18:41:35     spidev stoped working 2010R1 RC5 -> trunk

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-05-11 18:41:35     spidev stoped working 2010R1 RC5 -> trunk

Andre Berggren (SWEDEN)

Message: 100592   

 

Hi, we run 2010R1 RC5 on a custom board base on ezkit bf561.

 

We use a SPI Flash on CS2 with m25p80 driver. We also have two devices using "spidev" driver on CS3 and CS4.

 

This is all working with 2010R1 RC5 but when I decided to try a trunk build the two "spidev" devices stopped communicating. All read return 0x30. SPI Flash is still OK.

 

I have tried to diff 2010R1 RC5 -> trunk but I can't really see what could be the problem? Anyone got a clue?

 

below are my chip info and spi_board_info.

 

//André

 

static struct bfin5xx_spi_chip my_chip_info = {

 

.ctl_reg = 0x24,          /* Blackfin-specific fields in SPI_CTL MMR; default = 0 */

 

.enable_dma = 0,           /* Use DMA to transfer to the device; default = 0 */

 

.bits_per_word = 8,       

 

.cs_chg_udelay = 0,      

 

.idle_tx_val = 0,

 

.pio_interrupt = 1,

 

};

 

 

 

/* temp sensor */

 

static struct bfin5xx_spi_chip adt7301_chip_info = {

 

.ctl_reg = 0x4,           /* Blackfin-specific fields in SPI_CTL MMR; default = 0 */

 

.enable_dma = 0,           /* Use DMA to transfer to the device; default = 0 */

 

.bits_per_word = 8,

 

.cs_chg_udelay = 0, 

 

.idle_tx_val = 0,

 

.pio_interrupt = 1,

 

};

 

 

 

{

 

.modalias = "spidev",

 

.max_speed_hz = 3000000,     /* max spi clock (SCK) speed in HZ */

 

.bus_num = 0,

 

.chip_select = 4,

 

.platform_data = "mychip",  /* only includes chip name for the moment */

 

.controller_data = &  my_chip_info,

 

.mode = SPI_MODE_3,

 

},

 

{

 

.modalias = "spidev",

 

.max_speed_hz = 3000000,     /* max spi clock (SCK) speed in HZ */

 

.bus_num = 0,

 

.chip_select = 3,

 

.platform_data = "adt7301",  /* only includes chip name for the moment */

 

.controller_data = &adt7301_chip_info,

 

.mode = SPI_MODE_1,

 

},

QuoteReplyEditDelete

 

 

2011-05-11 22:56:34     Re: spidev stoped working 2010R1 RC5 -> trunk

Aaron Wu (CHINA)

Message: 100593   

 

You may turn on /add debug info in drivers/spi/spidev.c drivers/spi/spi.c spi_bf5xx.c to find what happend when returns 0x30 for read.

QuoteReplyEditDelete

 

 

2011-05-12 11:45:45     Re: spidev stoped working 2010R1 RC5 -> trunk

Ciaran Watterson (IRELAND)

Message: 100616   

 

Just spent the past couple of days testing spidev on a BF527. On 2010RC5 I used the MTD/SPI Flash driver with spidev. Finding issues with spidev Chip Select I tried the latest SVN trunk version. I had to disable the Flash driver to get spidev to load - so there is definitely an issue there - these drivers don't work with each other anymore.

QuoteReplyEditDelete

 

 

2011-05-13 03:59:14     Re: spidev stoped working 2010R1 RC5 -> trunk

Aaron Wu (CHINA)

Message: 100643   

 

Thanks for you information. As mentioned above, could you trun on the debug info and attach your fail log when getting the fail of all read returns a 0x30?

QuoteReplyEditDelete

Attachments

    Outcomes