Re: how to best ioremap() the ranges part of a "simple-bus" device?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thus wrote rpjday@xxxxxxxxxxxxxx (rpjday@xxxxxxxxxxxxxx):


> i'll need to access that device tree entry and effectively ioremap()
> slave0's physical address to a usable virtual address.

>   is there a canonical way to do this? short of manually extracting
> the appropriate device tree node and reading that property and calling
> ioremap()? is there a wrapper for that sort of operation, which i
> imagine must be fairly common?

I guess that of_iomap() does what you need here.

>   oh, and a pointer to a good example in the current kernel source
> would, of course, be useful.

cm_init() in arch/arm/mach-integrator/core.c searches a dt node and does
maps its address space. If you search for of_iomap() in the sources,
you'll find plenty of other examples.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux