LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-21-2008, 07:58 AM   #1
rwpa
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Rep: Reputation: 0
Doubts about PCIe device driver


Nowadays I have this line in my source code:

iowrite32(dout,BASE_ADDR_0_START);

so, I only can write 32 bits data at time. I would like to know if there are ways to send more than 32 bits data, to improve the performance. As I read the PCIe has the TLP packet which can contain a maximum of 1024 bytes, how can I introduce 1024 at the same time in my device driver?

Thanks =)
 
Old 11-21-2008, 08:26 PM   #2
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
The kernel's iowrite32() call writes data to an I/O address that has been mapped to kernel memory space. Most of your device's registers are almost certainly only 32 bits wide, and an iowrite32 is appropriate in those cases where a 32-bit register is the target.

The PCIe bus will collect I/O writes from the OS and write them to your device in bursts, rather than one at a time (unless a PCI posting read is executed, which forces all cached data to be written).

You can't improve performance by changing iowrite32 to anything else.

Last edited by jcliburn; 11-21-2008 at 08:40 PM.
 
Old 11-24-2008, 07:12 AM   #3
rwpa
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your answer.

So, the only way to improve the performance is implementing a DMA. Am I right?

Regards.
 
Old 11-25-2008, 07:50 PM   #4
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Quote:
Originally Posted by rwpa View Post
So, the only way to improve the performance is implementing a DMA. Am I right?
Well, there may be other improvements that can be made in the driver, but DMA would help.
 
Old 12-10-2008, 08:25 AM   #5
rwpa
LQ Newbie
 
Registered: Oct 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I've already read the Linux device drivers, but I couldn't get started in implementing my DMA. Is there others sources that can help me?

Regards.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Designing a PCIe driver... slkjas Linux - Embedded & Single-board computer 1 11-05-2008 09:38 PM
PCIe Driver - need high performance wkorbe Linux - Newbie 4 08-12-2008 03:03 AM
What is the Linux difference between PCIE and PCI device driver? jbreaka4lyfe Linux - General 0 06-04-2008 02:54 PM
ATI-Driver problems w/X1600 Pro PCIE Varean Linux - Hardware 15 05-24-2007 07:21 AM
Looking for ABIT Radeon XT600 PCIe Driver for Linux 9.3 or 10.0 haeusermannanna Linux - Newbie 4 01-01-2006 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:06 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