• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » OMAP™ Applications Processors » OMAP 4 Forum » OMAP4 GPMC DMA Transfer
Share
OMAP™ Applications Processors
  • Forums
Options
  • Subscribe via RSS

OMAP4 GPMC DMA Transfer

OMAP4 GPMC DMA Transfer

This question is answered
vijay deep
Posted by vijay deep
on Jan 31 2012 22:24 PM
Prodigy200 points

Hi

I am able to do DMA write and read data transfers over GPMC between OMAP353x (running Android)  and FPGA.

Using the same driver running on OMAP4( Panda board ) with changes to address space, chip select configuration and setting PADCONF registers,  read and write gpmc data transfer (without DMA) are working and also the Logic Analyzer observed GPMC (Data, Add, CLK, CS, OE, WE)  signals are as per my settings.

But I am finding DMA transfers issues on OMAP4(Pandaboard) like after the DMA is configured and started,  data transfer is not happening and no GPMC_CLK and CS signals on the Logic Analyzer.

1 .Is there any difference in setting up of OMAP3 and OMAP4 DMA ?

2. I am testing GPMC on OMAP3 and OMAP4 platform without FPGA connected, but since no device is connected I am using:

    a.  DMA_NO_DEVICE trigger, which used to work on OMAP3, crashes showing error message "unable to do kernel paging"  on OMAP4. Is anything I am missing here ?

    b. So on OMAP4,  OMAP24XX_DMA_GPMC is used as DMA trigger in omap_request_dma()  for requesting the channel ( channel 0 or 1 assigned for the transfer) and  in omap_set_dma_transfer_params()  for  setting DMA transfer. Then I don't see the DMA callback getting called and and its  unable to finish the DMA transfer ? As said above, no GPMC signals observed on Logic Analyzer.

Let me know, If I am missing anything on OMAP4 DMA setup.


Thanks

Vijay

android omap4 GPMC Pandabaord DMA
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Israel Cepeda
    Posted by Israel Cepeda
    on Apr 12 2012 16:59 PM
    Expert5515 points

    Hi Vijay,

    There are some differences in the OMAP3 and OMAP4 DMA module, mainly DMA module has 3 ports in OMAP4 (read, write and configuration), when there are only 2 on OMAP3, so if you are trying to use the same driver it won't work almost for sure. For more reference you can see the TRM ie for 4430 (http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2.x_Public_TRM_vK.zip)

    If you need more help, can you describe little more what you are trying to do in the driver and the steps are you doing to configure it?

    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vijay deep
    Posted by vijay deep
    on Apr 15 2012 21:13 PM
    Prodigy200 points

    Hi

    Yes I missing something on the DMA configuration part. I have gone through the TRM and I see there is WUGEN module added for 4430.

    I am using Software DMA transfer, by setting DMA parameters for Write and Read (same like Nand Driver using DMA) and starting the DMA.  The portion of code I am using is here:

    Firstly I am requesting DMA channel using dma_request() method. Then while transfer I m using the below transfer func().

    ----------------------------------------------------------------------------------------------------------------------------------------------------------

    transfer_func( )

    {

    dma_addr = dma_map_single(&info->pdev->dev, addr, len, dir);
            if (dma_mapping_error(&info->pdev->dev, dma_addr)) {
                    dev_err(&info->pdev->dev,
                            "Couldn't DMA map a %d byte buffer\n", len);
                    goto out_copy;
            }

            if (is_write) {
                omap_set_dma_dest_params(info->dma_ch, 0, OMAP_DMA_AMODE_CONSTANT,
                                                    info->phys_base, 0, 0);
                omap_set_dma_src_params(info->dma_ch, 0, OMAP_DMA_AMODE_POST_INC,
                                                            dma_addr, 0, 0);
                omap_set_dma_transfer_params(info->dma_ch, OMAP_DMA_DATA_TYPE_S32,
                                            0x10, buf_len, OMAP_DMA_SYNC_FRAME,
                                            OMAP24XX_DMA_GPMC, OMAP_DMA_DST_SYNC);
            } else {
                omap_set_dma_src_params(info->dma_ch, 0, OMAP_DMA_AMODE_CONSTANT,
                                                    info->phys_base, 0, 0);
                omap_set_dma_dest_params(info->dma_ch, 0, OMAP_DMA_AMODE_POST_INC,
                                                            dma_addr, 0, 0);
                omap_set_dma_transfer_params(info->dma_ch, OMAP_DMA_DATA_TYPE_S32,
                                            0x10, buf_len, OMAP_DMA_SYNC_FRAME,
                                            OMAP24XX_DMA_GPMC, OMAP_DMA_SRC_SYNC);
            }

             init_completion(&info->comp);

            omap_start_dma(info->dma_ch);

            /* setup and start DMA using dma_addr */
            wait_for_completion(&info->comp);

    } //tranfer_func

    This works for OMAP3.  Suggest me as what I am missing for 4430 ?

    Thanks

    Vijay




    android omap4 GPMC Pandabaord DMA
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Israel Cepeda
    Posted by Israel Cepeda
    on Apr 18 2012 17:20 PM
    Expert5515 points

    Hi Vijay,

    Are you seeing the transfer_func to be call?, or at what point is the issue?, as you know is hard to help without debugging the issue.

    It could help if you can provide little more details, as the scenario you are trying, points are working and maybe dump some register whit omapconf tool.

    Also you can take a look to the driver is working: drivers/mtd/nand/omap2.c

    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vijay deep
    Posted by vijay deep
    on Apr 18 2012 21:33 PM
    Prodigy200 points

    Hi Israel

    The transfer function is called. The issue is after the DMA is configured and started,  data transfer is not happening and no GPMC_CLK and CS signals  on the Logic Analyzer.

    For all the dma transfer parameters set for write & read transfer, I printed the DMA registers and checked, they are proper. In this scenario, I have not connected the physical FPGA on GPMC pins, instead I am writing using DMA and checking the GPMC signals (Data, Add, CLK, CS, OE, WE) using Logic Analyzer. Also I referred to drivers/mtd/nand/omap2.c  and the same driver works for OMAP3 platform. The issue is on OMAP4 (Pandaboard)

    Steps I followed:

    1. Configured CS1 chip select in Mux Mode

    2. In U-boot for CS1 Chip select configuration:

    a. CS1 is configured with the gpmc timing values into CONFIG1...CONFIG7 registers.

    b.  Setting CONTROL_CORE_PAD0_GPMC_NWP_PAD1_GPMC_CLK 24th bit to 1 to synchronize the sampling of the memeory signals

    c. By default the GPMC data, adress and control lines are not enabled for gpmc on J3 and J6 connectors for panda board. So enabled muxing for all GPMC data, adress and control pins in U-boot

    3. In Non-DMA mode, i,e without using DMA I do raw write & read and can see the signals observed on LA. So I am assuming Step 1 & 2 configuration is working.

    4 . In DMA mode, DMA channel is requested and DMA configured and started. No Signals observed. ( As I said earlier the same works on OMAP3, but Chip select configured in Non-Mux mode )

    Please let me know as what I am missing here ?

    Thanks

    Vijaydeep

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vijay deep
    Posted by vijay deep
    on May 11 2012 20:32 PM
    Prodigy200 points

    Hi Israel

    Any inputs from your end on the DMA configuration, as what I am missing here ?

    Thanks

    Vijaydeep.G

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Israel Cepeda
    Posted by Israel Cepeda
    on May 14 2012 09:48 AM
    Expert5515 points

    Hi Vijay,

    There is a tool named omapconf, can you dump the gpmc and dma configuration registers with that tool and attach them?

    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Israel Cepeda
    Posted by Israel Cepeda
    on May 15 2012 11:53 AM
    Expert5515 points

    I have been looking at this and seems to be ok at least the transfer function, but I have doubts about the channel (info->dma_ch), can you print it's value?

    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vijay deep
    Posted by vijay deep
    on May 15 2012 21:34 PM
    Prodigy200 points

    Hi

    On OMAP4,  OMAP24XX_DMA_GPMC is used as DMA trigger in omap_request_dma()  for requesting the channel ( channel 0 or 1 assigned for the transfer) and  in omap_set_dma_transfer_params()  for  setting DMA transfer. Then I don't see the DMA callback getting called and and its  unable to finish the DMA transfer ? As said above, no GPMC signals observed on Logic Analyzer.

    I have print the value of  variable (info->dma_ch) channel and the value is 0 or 1. Most of the time Channel 1 is assigned.

    For OMAP4, Is there anything extra configuration has to be done for DMA transfer over GPMC Interface ?

    Can anyone highlight difference in GPMC DMA Configuration & Transfer functionality over OMAP3 (DM3730) and OMAP4(Pandaboard) ?

    Regards,

    Vijaydeep

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Israel Cepeda
    Posted by Israel Cepeda
    on May 16 2012 09:55 AM
    Expert5515 points

    What I see is that some register has change, look at:

    GPMC_PREFETCH_CONTROL
    GPMC_PREFETCH_CONFIG1
    GPMC_PREFETCH_CONFIG2

    ie: GPMC_PREFETCH_CONFIG1[2] DMAMODE Select either DMA synchronized mode or software manual mode.

    That bit is not in omap3

    Did you update your driver to have that kind of changes?



    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vijay deep
    Posted by vijay deep
    on Jun 11 2012 23:07 PM
    Prodigy200 points

    Hi  Israel

    I have configured GPMC chip select CS1 as NOR flash interface in Synchronous mode.

    I think prefetch register will be used when GPMC Chip select CS1 is configured as Nand interface.

    Anyways, I have got the address of register GPMC_PREFETCH_CONFIG2 as 0x500001E0 from OMAP4 TRM. I have read the register value and set the GPMC_PREFETCH_CONFIG1[2] DMAMODE ( bit 2) as 0x1: DMA request synchronization is enabled. A DMA request protocol is used.
    ---------------------------------------------------------

    a.Initial Value

    ./devmem 0x500001E0
    Value at address 0x500001E0 (0x401141e0): 0x4000

    b. Set GPMC_PREFETCH_CONFIG1[2] DMAMODE ( bit 2) as 0x1

    ./devmem 0x500001E0 w 0x4004

    Value at address 0x500001E0 (0x401141e0): 0x4004

    ----------------------------------------------------------------------------------------------

    But still after setting the GPMC_PREFETCH_CONFIG1[2] DMAMODE as DMA synchronized mode, DMA transfer is not happening. Is there anything else I am missing ?

    Thanks

    Vijay

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Israel Cepeda
    Posted by Israel Cepeda
    on Jun 19 2012 15:07 PM
    Expert5515 points

    Hi Vijay,

    In your transfer_func you are missing some configuration for the gpmc like threshold, look at drivers/mtd/nand/omap2.c@omap_nand_dma_transfer:

        /*  configure and start prefetch transfer */
        ret = gpmc_prefetch_enable(info->gpmc_cs,
                PREFETCH_FIFOTHRESHOLD_MAX, 0x1, len, is_write);

    My guess is that you are configuring DMA and GPMC separately, but you never configure the relation between the two like that function is doing. So I went back to you transfer_func and saw you are not doing the same that in the omap-nand driver.

    Please let me know if that fix your issue.

    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vijay deep
    Posted by vijay deep
    on Jun 19 2012 21:42 PM
    Prodigy200 points

    Hi Israel

    I am configuring GPMC as NOR interface. So I think I do not need to configure Prefetch engine, since I have done the same on OMAP3 GPMC using DMA and it works.

    Its clear from TRM that PREFETCH engine needs to configured for NAND interface.

    Is my thinking right ?

    Regards,

    Vijay

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Israel Cepeda
    Posted by Israel Cepeda
    on Jun 20 2012 10:17 AM
    Expert5515 points

    Hi Vijay,

    Yes, if you are using NOR interface you don't need prefetch.

    I think for this issue it would be better if you review if your driver meets the steps at chapter 15.4.5 GPMC Basic Programming Model from TRM

    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vijay deep
    Posted by vijay deep
    on Jun 20 2012 21:38 PM
    Prodigy200 points

    Hi Israel

    Yes I have referred TRM Nor programming model. Are there any  GPMC DMA (NOR )driver references for OMAP4 platform  in Android ?

    Regards,

    Vijay

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Israel Cepeda
    Posted by Israel Cepeda
    on Jul 05 2012 16:34 PM
    Verified Answer
    Verified by Magdalena Iovescu
    Expert5515 points

    Hi Vijay,

    I have look for a NOR driver, but I couldn't find any. Probably you will need to look in other kernels and port the driver.

    Regards!

    ICe

    Please click the Verify Answer button on this post if it answers your question
    _______________________________________________________
    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use