|
I have recently upgraded kernel on our at91sam9260 custom-built boards. We went to 2.6.38.7 from 2.6.20. Problem is that a device (fpga) that is mapped to a certain memory address is no longer in that same memory location. I have chased many leads on this to no avail. In short, here is what I did: - redid board file to with new MACHINE_START params following board-sam9260ek. - patched various other board specific files (I'll attach my kernel patch file) and successfully get uImage and rootfs that boot and appear operational. - changed driver code to handle new structure of file_operations, device. There is a good amount of discussion regarding that here and elsewhere, in particular the change to unlocked_ioctl. I dont think I am doing the kernel_lock/unlock correctly yet for ioctl but I see problem independent of that (with ioread16, see below)
Problem is my driver is not reading fpga registers correctly as is did with 2.6.20 kernel and associated driver.
In particular fpga_proc_read (that sets /proc/fgpa file) is reading garbage. Here are a couple lines from that function: len += sprintf(buf+len," test read 0x%04x\n",readw(iomap+FPGA_MS)); len += sprintf(buf+len," Mode Select 0x%04x\n",ioread16(iomap+FPGA_MS)); The change from readw/ioread16 is a test. No difference there.
iomap is set via dev->iomap = ioremap(dev->iobase, dev->iosize);
iobase is set via #define FPGA_IOBASE (0x10000000)
That is physical (?) memory address of our connection to fpga via chip select 0, controlled with SMC (?) for sam9260 CPU.
All the mappings/addresses look like they used to with old kernel/driver. We are just not getting access to those fpga registers as we used to.
Any ideas?
It seems that all the SMC config is done in AT91boot and I dont see (following board-sam9260ek) anything I'm missing (there is a setup of NAND, chip select 3, in sam9260 which I dont think is relevant here)
- Does the new kernel require a different way of setting up SMC (making the bootloader setup irelevant?) - Is SMC the relevant controller in this case? Or am I looking in wrong direction?
Thanks
Sorry, couldnt load the patch.
|