I am having difficulty accessing FPGA from an application written in C that is executed under Ubuntu Linux. I am using the AM1808 processor and I have an oscilliscope probe on the Chip Select pin. I am working with a custom board that was designed with the same hardware pieces as that was found on the Experimenter Board from ZOOM. (i.e same NAND chip and processor). What I have found is the following - I have followed the instructions on how to activate EMIFA and have setup the PIN MUX, PLL and PSC appropriately. I say appropriately because I have been able to see activity on the oscilloscope when I write to the FPGA memory location of 0x66000000 using u-boot mw command as well as when I forcibly change the memory location using CodeComposer with the Blackhawk USB100v2 emulator. In my Linux setup, however, I am unable to see any activity when I try to write to the memory location. I have even tried setting up the PINMUX registers directly in my C code followed by the attempt to write to the 0x6600000 memory location (FYI - we are using Chip Select 5 on our custom board for FPGA). Here is how I am trying to access the FPGA memory from my C code:
...
unsigned short *la_writeTest;
la_writeTest = ioremap((volatile unsigned long)0x66000000,4);
*(la_writeTest) = 0x3333;
printk(KERN_INFO "66000000" = %x", (unsigned short)*la_writeTest);
...
Now...the printk actually shows the value that was set...but there is no activity on the oscilloscope which indicates to me that nothing is getting to expected location on the hardware. Like I said above...I force the PINMUX registers to the same values that I see when I use the emulator. To do this, I also use the ioremap command with the specific address of each PINMUX register and assign the values in a similar fashion as I showed above with the 0x66000000 memory location. I was using this thread as an example to follow: http://forums.freescale.com/t5/68K-ColdFire-reg-Microprocessors/Memory-mapped-I-O-from-Linux-device-driver/td-p/46977
Anyone have any other ideas? I know there is a PINMUX utility that creates a header file that can be included in an application...but I don't see how this would be any more beneficial than forcing the specific memory locations to specified values.
Thanks for any help.