LinuxQuestions.org
Visit Jeremy's Blog.
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, 08: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, 09: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 09:40 PM.
 
Old 11-24-2008, 08: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, 08: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, 09: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


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


All times are GMT -5. The time now is 05:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration