LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem in using ioread32() and iowrite32() func for devive driver in linux (https://www.linuxquestions.org/questions/linux-software-2/problem-in-using-ioread32-and-iowrite32-func-for-devive-driver-in-linux-552787/)

misbah 05-10-2007 12:03 AM

Problem in using ioread32() and iowrite32() func for devive driver in linux
 
dear all
I have written a device driver for fpga and all the registers are memory mapped . I am using ioremap() functiom to map the physical memeory amd iounmap() to unmap it to access any register i am using ioread32() and iowrite32() functions to read and write to 32 bit location but the function when reading and writing is doing the swaping of the bits as :-

if data is written as 0xddbb dddd
the read as 0xdddd bbdd

can any body suggert why this problen is ...In UDD book by Rubini it is suggested that we should use these wrapper function then why is this problem these functions are similar to readl and writel etc of 2.4 version ....

By dereferencing the pointer i am able to get the correct value insted of ioread32()

Please suggest me if you get any idea
thanks in advance
Misbah

reddazz 05-10-2007 10:43 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 05:54 PM.