02-05-2011 03:54 PM
Has any one written FSL driver for Linux 2.6 for Microblaze processor ?
It would be helpful if anyone could upload it...
Thanks for you valuable help
04-10-2013 10:11 PM
I'm looking for the same. If anyone has the driver, it would be greatly appreciated.
05-17-2013 12:54 PM
please find the code attached, thanks to "amoralesv" who provided the code and the guidlines to use it:
Copy and unrar the file in the following folder: /your_linux_installed_directory/linux-2.6-xlnx/drivers/misc/
Also in this folder, you need to edit the Kconfig file and add the following lines:
tristate 'FSL FIFO driver'
after the text "if MISC_DEVICES"
Also, add the following text almost at the end of Kconfig file:
before the text "endif # MISC_DEVICES"
Additionaly, add the following line at the end of the Makefile in folder I mentioned before:
obj-$(CONFIG_MICROBLAZE_FSLFIFO) += fslfifo/
And I think that's it. Please note that in fslfifo.c you must adjust the following:
static unsigned fslchannels = 8; // change it to the actual number of fsl fifos in your design
Just one think for the fsl driver: one fslfifo is read/write, so actually is the same as 2 FSLs fifos (one pair, i.e. one link, one fifo towards MicroBlaze, and the other coming from MicroBlaze) in EDK.
Also, adjust in fslfifo.c the following:
#define FSLFIFO_BUF_SIZE 2048 // it is the default, enables 512 words of 32 bits, or 2048 bytes
to a value according to the depth of your fifo and the width of each word.
Last, but not least, you need to modify the xilinx_mmu_defconfig to enable the generation of as many fslfifos you need.
Here is an example:
# FSLFIFO channel selection
where I have only 2 fslfifos enable and should match the FSL fifos in EDK (4 in this case, taken in pairs, so 2 pairs), then at boot you will see that there are 2 fslfifos enabled. Also note that your xilinx_mmu_defconfig should match your hardware design in EDK, for MicroBlaze, ICAP, Ehernet, etc.