For driver problems, ioremap and (* (unsginedchar *) virtual_addr = 0xff are used.
Source: Internet
Author: User
For driver problems, ioremap and (* (unsginedchar *) virtual_addr0xff are used to assign values-general Linux technology-Linux programming and kernel information. For details, refer to the following. The source code looks like this:
The platform is ARM9.
Virtual_addr = ioremap (phy_addr, 1); virtual_addr is a peripheral Register address in two bytes;
* (Unsigned int *) virtual_addr = 0 xffff;
The program encountered a problem and an error occurred.
What are the errors in this operation ?? Is it related to the second parameter 1 in ioremap? I found that this parameter refers to the number of resources, but I don't understand what is going on.
By the way, functions such as outb, outw, inb, and inw can be used. I personally think this type of function is added to linux to support single- ing between I/O port space and memory space. To put it bluntly, it is the in and out commands under x86, therefore, it is unavailable on the ARM platform. I also encountered a problem when using it. I don't know. Is that true?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.