No Clock on SPI
Hi
I´m writing a Driver for SPI. That is not working now. I have a MPC8260 using Linux 2.6.14 (rheap patch).
Did someone else write a driver for SPI on this µC or an other driver? So I can see what i did wrong?
My SPCOM[STR] flag isn´t cleared automatically after one clock cycle. What here going wrong ? ( I know this register is write only) There is also no Clock on my SPICLK.
How I have to allocate the Memory for the BD´s and the buffer for the BD´s?
Is there something special when I allocate Memory for my Parameter Ram?
Is something wrong with the 2.6 Kernel so i have to use the 2.4 Kernel ?
I hope somebody could help. Thx
Regards
Fred
Signature · 2 lines
"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
Re: *** PROBABLY SPAM *** No Clock on SPI
Hi Fred,
Quoted 4 lines
I=C2=B4m writing a Driver for SPI. That is not working now. I have a MPC8260 using Linux 2.6.14 (rheap patch).
Did someone else write a driver for SPI on this =C2=B5C or an other drive=
r? So I
Quoted 1 line
can see what i did wrong?
I'm working on an SPI driver for the MPC8248. I'll try to send a patch in a= =20
few days.
Quoted 3 lines
My SPCOM[STR] flag isn=C2=B4t cleared automatically after one clock cycle. What here going wrong ? ( I know this register is write only) There is also no Clock on my SPICLK.
Make sure you programmed the SPMODE register correctly.
Quoted 1 line
How I have to allocate the Memory for the BD=C2=B4s and the buffer for th=
e BD=C2=B4s?
The buffer descriptors should be allocated from CPM DPRAM using cpm_dpalloc= ().=20
The buffers can be allocated from any DMA-able memory (all system memory).
Quoted 1 line
Is there something special when I allocate Memory for my Parameter Ram?
You don't need to allocate memory for the parameter RAM. I declared PROFF_S= PI=20
equal to 192 (I2C parameter RAM is at 128) in include/asm-ppc/cpm2.h:
#define PROFF_SMC1 (0) #define PROFF_SMC2 (64) #define PROFF_I2C (128) #define PROFF_SPI (192)
Don't forget to set CPM_DATAONLY_BASE to 256 instead of 128 in the same fil= e.
Then, set
*(u16 *)(&immap->im_dprambase[PROFF_SPI_BASE]) =3D PROFF_SPI;
in your driver code, and set the SPI pram resource to
=2Ename =3D "pram", =2Estart =3D 0x00c0, =2Eend =3D 0x00ff, =2Eflags =3D IORESOURCE_MEM,
in arch/ppc/syslib/pq2_devices.c
Quoted 1 line
Is something wrong with the 2.6 Kernel so i have to use the 2.4 Kernel ?
You should not use 2.4. 2.6 is the way to go.
Laurent Pinchart