element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development Using USB DMA in Linux
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 2 replies
  • Subscribers 329 subscribers
  • Views 800 views
  • Users 0 members are here
Related

Using USB DMA in Linux

Former Member
Former Member over 11 years ago

I see in the Zynq 7000 diagrams that there is hardware DMA attached to the 2x SDIO, 2x USB, and 2x GigE ports. How do I use these in Linux? The first step is to get DMA working with the USB port. I'm struggling to find anywhere that gives examples or explains how to use this DMA from within Linux. Most articles talk about AXI DMA which interacts with the programmable logic. (Is PL330 the hardware DMA that I'm referring to? Or is that wrong?)

I have built up the Linux 3.9 kernel from my own config file. I've set the config as below:
grep -r DMA .config
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_DMA_ENGINE=y
# CONFIG_XILINX_NWL_PCIE_DMA is not set
CONFIG_XILINX_NWL_PCIE_DMA_BASE=y
CONFIG_ARM_DMA_MEM_BUFFERABLE=y
CONFIG_ZONE_DMA_FLAG=0
# CONFIG_DMA_SHARED_BUFFER is not set
CONFIG_SCSI_DMA=y
# SFF controllers with custom DMA interface
# CONFIG_PDC_ADMA is not set
CONFIG_ATA_BMDMA=y
# SATA SFF controllers with BMDMA
# PATA SFF controllers with BMDMA
# CONFIG_PATA_OPTIDMA is not set
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
# DMA Devices
CONFIG_XILINX_DMA_ENGINES=y
CONFIG_XILINX_AXIDMA=y
# CONFIG_XILINX_DMATEST is not set
CONFIG_XILINX_AXIVDMA=y
# CONFIG_XILINX_VDMATEST is not set
CONFIG_XILINX_AXICDMA=y
# CONFIG_XILINX_CDMATEST is not set
# CONFIG_DW_DMAC is not set
# CONFIG_TIMB_DMA is not set
CONFIG_PL330_DMA=y
CONFIG_DMA_OF=y
# DMA Clients
CONFIG_NET_DMA=y
# CONFIG_ASYNC_TX_DMA is not set
# CONFIG_DMATEST is not set
# CONFIG_DMA_API_DEBUG is not set
CONFIG_HAS_DMA=y

I'm using libusb 1.0.19 in asynchronous mode with my program to interact with the USB port. (http://libusb.sourceforge.net/api-1.0/io.html)

Is DMA enabled by default for free? Do I have to specifically use a different method to use DMA? Similarly, how do I get DMA working with SDIO and ethernet? I would have thought these are common enough cases for people to have (wanting to use DMA for IO ports + Linux), but I can hardly find any info on it.

  • Sign in to reply
  • Cancel
  • batukuru
    0 batukuru over 8 years ago

    Hello,

    I know this post was from a long time ago, but I was wondering, have you ever found a solution for this? I'm also trying to use the DMA engine attached to the USB controller (in host mode) under Petalinux and the lack of examples is really frustrating. Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jafoste4
    0 jafoste4 over 8 years ago

    Hello Batukuru,

    The only example we have available using the DMA engine is in our Developing Zynq Hardware Speedway.

    http://zedboard.org/course/developing-zynq%C2%AE-7000-all-programmable-soc-hardware-vivado-20152-and-20162

    Please refer to chapter 7, lab 6

    --Josh

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube