Dear Friends,
I have AT91SAM9M10G45-EKES Kit and using kernel version 2.6.30. I am trying to build polling based SPI driver that communicates with the Dataflash provided with the kit.
Please find the attached code with the post
http://pastebin.com/qK4yXGYm . I am not able to get the Clock signal on the oscilloscope when I load the own build driver. I also tried putting the debug statments on the atmel_spi.c driver with the source and found the values of CSR0 and MR registers. I used those values on my driver based on polling.
Can anyone pointout the missing link into the driver? Any suggestions are warmly welcome?
Have a Good Day,
Thank you,
Ankur.
OUTPUT:
---------------------------------------------------------------------------------------------------------------------
root@at91sam9m10g45ek:~# insmod inter_spi.ko
PMC_PCSR 43f0003c
The SPI is running at Clk_get_rate = 133333333!
SPI Clock Enabled !!..
PMC_PCSR 43f0403c
Value of SPI_MR 0x0 SPI_SR 0xf0 SPI_CSR0 0x0
Value of SPI_MR 0xe0011 SPI_SR 0xf0 SPI_CSR0 0x0
Chip Select goes Low !!
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902
SPI Enabled
Entering While
Read value1: e0000
Read value2: e0000
Read value3: e0000
Read value4: e0000
Read value5: e0000
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902
Read value1: e0000
Read value2: e0000
Read value3: e0000
Read value4: e0000
Read value5: e0000
Value of SPI_MR 0xe0011 SPI_SR 0x102f2 SPI_CSR0 0x902