LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Closed Thread
  Search this Thread
Old 05-10-2007, 12:03 AM   #1
misbah
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
Misbah
 
Old 05-10-2007, 10:43 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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