3 #include <linux/ioport.h>
4 #include <linux/of_address.h>
7 * of_iomap - Maps the memory mapped IO for a given device_node
8 * @device: the device whose io range will be mapped
9 * @index: index of the io range
11 * Returns a pointer to the mapped memory
13 void __iomem *of_iomap(struct device_node *np, int index)
17 if (of_address_to_resource(np, index, &res))
20 return ioremap(res.start, 1 + res.end - res.start);
22 EXPORT_SYMBOL(of_iomap);