LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-09-2007, 04:56 AM   #1
misbah
LQ Newbie
 
Registered: Nov 2006
Location: india
Distribution: red hat
Posts: 5

Rep: Reputation: 0
Problem using ioread32() and iowrite32() functions in 2.6 kernel for linux device dr


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
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Character Device kernel(2.4.18) - module problem shibdas Programming 2 11-11-2004 03:52 AM
Problem with a USB device under 2.6.5 kernel EwanG Linux - Hardware 4 08-13-2004 08:46 PM
how to use c functions in linux kernel mode pwangee Linux - General 5 07-12-2004 10:21 PM
how to use c functions in linux kernel mode pwangee Linux - Software 2 07-11-2004 11:23 PM
Kernel Problem -- Cannot open root device jchutcheson Red Hat 3 09-24-2003 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:37 PM.

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