Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


Closed Thread
  Search this Thread
Old 05-10-2007, 12:03 AM   #1
LQ Newbie
Registered: Nov 2006
Location: india
Distribution: red hat
Posts: 5

Rep: Reputation: 0
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
Old 05-10-2007, 10:43 AM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
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.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in using ioread32() and iowrite32() functions for device driver for 2.6 kerne misbah Linux - Software 1 05-09-2007 05:24 AM
problem in using ioread32() function in device driver for version 2.6 misbah Linux - Networking 1 05-09-2007 05:23 AM
Problem using ioread32() and iowrite32() functions in 2.6 kernel for linux device dr misbah Linux - General 0 05-09-2007 04:56 AM
difference between function declaration: func() and func(void) koyi Programming 4 11-19-2005 10:19 AM

All times are GMT -5. The time now is 02:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration