MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_ofw_iomap

Function rt_ofw_iomap

components/drivers/ofw/io.c:495–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493#endif
494
495void *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, &regs[0], &regs[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
512void *rt_ofw_iomap_by_name(struct rt_ofw_node *np, const char *name)
513{

Callers 4

gicv2m_ofw_probeFunction · 0.85
gicv3_its_ofw_probeFunction · 0.85
clk_rk3568_probeFunction · 0.85
clk_rk3588_probeFunction · 0.85

Calls 2

ofw_get_addressFunction · 0.85
rt_ioremapFunction · 0.85

Tested by

no test coverage detected