Hello,
me again.
I made a new Design with PCIe + PIO. This time i configured the PIO as Bidirectional (tristate) ports. I tried to write the direction register in the PIO regiser map but when i read back i always read zeros and the IO are still Inputs. It seems i can't access the registers, only the data register works. I'm clueless.
Here my codesnippets from the driver: arg = 0xf;
unsigned long adr;
adr = (unsigned long) device->baseAdress; // Base adress of PCI MEMRegion
adr += (unsigned long)device->startAdress; // Start Adress PIO
adr += (unsigned long)4; // second 32Bit Register
printk(KERN_DEBUG "Schreibe %8lx an %8lx \n", arg, adr);
iowrite32(arg,(void*)(adr));
wmb();
ret = ioread32((void*)(adr));
printk(KERN_DEBUG "PIO_DIR AFTER : %8lx \n", ret);
and here the output:
--- Quote Start ---
[ 4062.810750] Schreibe 7 an f88c4044
[ 4062.810757] PIO_DIR AFTER : 0
--- Quote End ---
any idea?
Thanks for reading.