| 124 | } |
| 125 | |
| 126 | rt_bool_t rt_fdt_device_is_available(void *fdt, int nodeoffset) |
| 127 | { |
| 128 | rt_bool_t ret; |
| 129 | |
| 130 | const char *status = fdt_getprop(fdt, nodeoffset, "status", RT_NULL); |
| 131 | |
| 132 | if (!status) |
| 133 | { |
| 134 | ret = RT_TRUE; |
| 135 | } |
| 136 | else if (!rt_strcmp(status, "ok") || !rt_strcmp(status, "okay")) |
| 137 | { |
| 138 | ret = RT_TRUE; |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | ret = RT_FALSE; |
| 143 | } |
| 144 | |
| 145 | return ret; |
| 146 | } |
| 147 | |
| 148 | rt_err_t rt_fdt_prefetch(void *fdt) |
| 149 | { |
no test coverage detected