| 493 | #endif |
| 494 | |
| 495 | void *rt_ofw_iomap(struct rt_ofw_node *np, int index) |
| 496 | { |
| 497 | void *iomem = RT_NULL; |
| 498 | |
| 499 | if (np) |
| 500 | { |
| 501 | rt_uint64_t regs[2]; |
| 502 | |
| 503 | if (!ofw_get_address(np, index, ®s[0], ®s[1])) |
| 504 | { |
| 505 | iomem = rt_ioremap(ofw_address_cpu_cast(np, regs[0]), (size_t)regs[1]); |
| 506 | } |
| 507 | } |
| 508 | |
| 509 | return iomem; |
| 510 | } |
| 511 | |
| 512 | void *rt_ofw_iomap_by_name(struct rt_ofw_node *np, const char *name) |
| 513 | { |
no test coverage detected