This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Where to find the *.h file for function "ioremap"?

Hello everyone

I am using the Processor SDK Linux for K2H EVM. Can you tell me where can I find the definition file for ioremap?

Also, is that a correct way to use the ioremap function. For example, if I want to read and write EDMA CC register, so I may use the ioremap showing below. 

CSL_TpccRegs*  gpEDMA_CC0_regs  = ioremap((CSL_TpccRegs*)CSL_EDMACC_0_REGS, 32);

And also, can I use the ioremap function in the globe pointer definition? 

Thanks

XIning Yu

  • Hi XIning Yu,

    The ioremap macro is defined in the ../linux-..../arch/arm/include/asm/io.h as:

    #define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE)

    You can find more details about I/O memory allocation and mapping in the linked below tutorial:

    BR

    Tsvetolin Shulev