• 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 » Embedded Software » Linux » Linux forum » OMAP35XX GPMC device driver read/write callbacks
Share
Linux
  • Forum
Options
  • Subscribe via RSS

OMAP35XX GPMC device driver read/write callbacks

OMAP35XX GPMC device driver read/write callbacks

This question is not answered
Staphae
Posted by Staphae
on Feb 07 2011 12:06 PM
Prodigy90 points

I am writing a device driver for an FPGA connected to the GPMC bus. I have adapted the smsc911x device driver for my FPGA device driver. However, the smsc911x is a network device driver and the FPGA is a character driver i believe. I have implemented the read/write callbacks using the readw/writew providing the virtual addresses map to the GPMC CS7 connected to the FPGA. However, i cannot find a way of specifying the read/write callbacks that will be called back when the user-space program calls the read/write function to the driver. In the smsc911x this is done using an instance of the net device driver framework. Can anyone provide a bit of an insight that could help me. Thanks

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Vaibhav Hiremath
    Posted by Vaibhav Hiremath
    on May 04 2011 15:07 PM
    Expert8160 points

    Hi,

    While registering driver you must pass "file_operations" structure with read, write and other operations. There are tons of pages available on internet on "How to write Char driver in Linux", google is the best tool here.

     

    Thanks,

    Vaibhav

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Norman Wong
    Posted by Norman Wong
    on May 04 2011 19:19 PM
    Guru14970 points

    You are brave to write a network driver. Never done it myself. The complexity is much higher than a char driver. The defacto reference is here:

    http://lwn.net/Kernel/LDD3/
    Linux Device Drivers, Third Edition
    CHAPTER 17 Network Drivers

    Since your driver would look like a network driver, you would probably have to use sockets to access it from user space.

    If you want to switch to a char driver, Helmut Forren has some bare minimal code down that could be adapted to your purposes:
    http://e2e.ti.com/support/embedded/f/354/t/104258.aspx

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Staphae
    Posted by Staphae
    on May 05 2011 14:23 PM
    Prodigy90 points

    Thanks for your response. It  is not so much the issue of writing a Char Device driver but a GPMC Device Driver. Like you recommended there are examples on writing a char driver on the internet.  Writing the GPMC driver using the platform device driver framework is what's causing me some headache.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vaibhav Hiremath
    Posted by Vaibhav Hiremath
    on May 06 2011 15:00 PM
    Expert8160 points

    Why do you think writing driver for GPMC is so different than writing for other char drivers? I may not understand your concern here unless I understand what are you trying to achieve here. Once you configure the GPMC with required timing parameters and base address, thats it, you should be able to access external FPGA as normal memory mapped peripheral.

     

    Thanks,

    Vaibav

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James.Ang
    Posted by James.Ang
    on Feb 06 2012 21:59 PM
    Prodigy165 points

    Hi,

    Can you share with us some boiler template file for creating a GPMC driver that communicates with a FPGA?

    I'm learning about the use of GPMC bus and hope to see some real example to better understand the underlaying from GPMC setting to platform device driver to simple test application to validate the system.

    Many thanks in adv.

    James.

    driver Linux Drivers omap3530 beagleboard Linux driver gpmc
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • terpaccount
    Posted by terpaccount
    on Apr 27 2012 00:12 AM
    Prodigy60 points

    Hi There,

    I too am confused on this issue.

    I think I am able to configure the GPMC to the way I would think it should work, something like this: https://groups.google.com/forum/?fromgroups#!topic/beagleboard/cFgfEEYp19k

    But then, how do you actually do a read or write?  I had thought that setting the CSVALID bit of GPMC_CONFIG7_i might do it, but I don't see any activity on the bus with my scope.  

    Any suggestions?

    The problem I was having here was that I had to set the correct base address and memory size in CONFIG reg 7.  Once done, reading and writing is as simple as reading and writing to pointer at the correct memory location (in my case, address 0x00100000).

    Thank You

    driver Linux Drivers omap3530 beagleboard Linux driver gpmc
    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