Problem testing SPI bus using an EEPROM.

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem testing SPI bus using an EEPROM.

196 Views
wayne_ng
Contributor I

Hi,

 

I'm getting desperate and would appreciate some guidance on a problem that I am having interfacing with the SPI bus on my i.MX53. I am using kernel version 2.6.35.3 and I attempting to interface EEPROM AT25512 with CSPI1. Therefore I will using the at25 driver.

 

All signs are that the SPI bus has initialized based on the kernel messages.

 

The problem is that the kernel panics during boot when I have the following device information added to my board information file.

static struct spi_eeprom at25512 = {
     .name = "at25512",
    .byte_len = 65536,
    .page_size = 128,
    .flags = EE_ADDR2,
};

static struct spi_board_info eft_spi_board_info[] __initdata = {
     {
         .modalias = "at25",
         .max_speed_hz = 1000000,
         .bus_num = 1,
         .chip_select = 0,
         .platform_data = &at25512,
     },
};

 

I also have the following register call added to the init function, 

spi_register_board_info(eft_spi_board_info, ARRAY_SIZE(eft_spi_board_info));

 

The kernel panics, however if I change  the modalias to something other than at25, the kernel will boot fine, but obviously I cannot use the EEPROM becuase the driver has not loaded.

 

Are my structs ok? Can anyone else confirm that they have used the I.MX spi bus successfully and are there any known issues with SPI?

 

Thanks all.

 

W

Tags (1)
0 Kudos
0 Replies