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

Function rt_ofw_get_address

components/drivers/ofw/io.c:126–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126rt_err_t rt_ofw_get_address(struct rt_ofw_node *np, int index, rt_uint64_t *out_address, rt_uint64_t *out_size)
127{
128 rt_err_t err;
129
130 if (np && index >= 0 && (out_address || out_size))
131 {
132 rt_uint64_t address, size;
133
134 err = ofw_get_address(np, index, &address, &size);
135
136 if (!err)
137 {
138 if (out_address)
139 {
140 *out_address = address;
141 }
142 if (out_size)
143 {
144 *out_size = size;
145 }
146 }
147 }
148 else
149 {
150 err = -RT_EINVAL;
151 }
152
153 return err;
154}
155
156static rt_err_t ofw_get_address_by_name(struct rt_ofw_node *np, const char *name,
157 rt_uint64_t *out_address, rt_uint64_t *out_size)

Callers 6

ofw_device_renameFunction · 0.85
numa_ofw_initFunction · 0.85
ofw_get_address_by_nameFunction · 0.85
rt_ofw_get_cpu_hwidFunction · 0.85
syscon_probeFunction · 0.85
ofw_device_dma_opsFunction · 0.85

Calls 1

ofw_get_addressFunction · 0.85

Tested by

no test coverage detected