cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
4,163 Views
Registered: ‎01-29-2009

fsl driver for powerpc linux2.6

Hello,

I am trying to develop a linux driver for FSL link for powerpc405. I developed one first version (with the referce of the microblaze fsl driver developped by Mr. John Williams for uClinux) as a loadable module, and loaded it after Linux is booted. But when I run some testing function like "cat /dev/fslfifo", it crashes the kernel.

I suppose that it is because FSL operations (like nget, nput, etc. ) are not part of the ppc instruction set and are realized by APU instruction extension. The MSR register should be set accordingly to enable APU. (XREG_MSR_APU_AVAILABLE + XREG_MSR_APU_ENABLE). However, when I set the MSR at the initialization function, and test afterwards, the MSR value is set back to some default value. I don't know where it happened neighter do I know if I am using the correct measure to change the MSR value.

Does anybody have any suggestions?

Thank you,

Guangye
0 Kudos
1 Reply
Highlighted
Visitor
Visitor
3,883 Views
Registered: ‎12-14-2008

Hi Guangye,

 

 

 I developed a kernel driver for FSL on Linux 2.6 for PPC 405 (Virtex 4).  I had to set the MSR Register inside the function which called the put/get instruction. 

 

Also, I wanted to warn you that you should not expect to get fast communication speeds using FSL without setting an interrupt and a buffer to hold the data. Additionally, copying the data from kernel space to user space slows things down. You can set a zero-copy buffer between the kernel and the user space (use mmap)to prevent the copying of data.

 


Nadav Rotem | http://www.c-to-verilog.com

0 Kudos