sorry, beacause my poor english, you have't get my point
1. you must confirm that the device connect to which spi bus. ecspi1, ecspi2 or cspi
then, you set the correct bus num to the struct as below:
static struct spi_board_info mxc_dataflash_device[] __initdata = {
{
.modalias = "mxc_dataflash",
.max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
.bus_num = 1, // set the correct bus num here
.chip_select = 1, //set the correct chip select here
.platform_data = &mxc_spi_flash_data[0],
},
};
2. register the spi bus
mxc_register_device(&mxcspi1_device, &mxcspi1_data); //if the device connect to the ecspi1
3.register the spi slave device
spi_register_board_info(mxc_dataflash_device,
ARRAY_SIZE(mxc_dataflash_device));
my last reply means you exchange the sequence.
4. if you device can't work , you must confirm whether the spi pin(miso, mosi, clk) have signal or not.
the easiest way is write a test driver for the spi controller, then test the spi pin by the Oscilloscope. if the spi pin
doesn't have signal, you must check whether you have config the spi pin correctlly!!