Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12368 Discussions

Linux Module (driver) - How to communicate with hardware

Altera_Forum
Honored Contributor I
785 Views

Hey guys, right now I am trying to make a linux module to communicate with hardware on my CycloneV SOC running Linux 3.7. So far I have register_chrdev() followed by request_mem_region() and then ioremap(). This all appears to work and returns a virtual kernel pointer (-1064394752) but when I try to talk to my IPcore in hardware using ioread32, readl, ect I get all 0's. Am I missing a step or is there a better way to address hardware from the kernel space? 

 

FYI a simple memory map from user space works perfectly so I am certain the driver code is the issue. 

 

Thanks, 

Zack
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
79 Views

You'll need to post some actual code so we can try to find what's wrong with it.

Reply