LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   problem in using ioread32() function in device driver for version 2.6 (https://www.linuxquestions.org/questions/linux-networking-3/problem-in-using-ioread32-function-in-device-driver-for-version-2-6-a-552529/)

misbah 05-09-2007 05:02 AM

problem in using ioread32() function in device driver for version 2.6
 
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

acid_kewpie 05-09-2007 05:23 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 09:43 PM.