| 135 | } |
| 136 | |
| 137 | struct rt_object *rt_ofw_parse_object(struct rt_ofw_node *np, const char *obj_name, const char *cells_name) |
| 138 | { |
| 139 | struct rt_object *obj = RT_NULL, *test_obj; |
| 140 | |
| 141 | if (np && (test_obj = rt_ofw_data(np)) && cells_name) |
| 142 | { |
| 143 | /* The composite object is rare, so we try to find this object as much as possible at once. */ |
| 144 | if (obj_name && !rt_strcmp(test_obj->name, obj_name)) |
| 145 | { |
| 146 | obj = test_obj; |
| 147 | } |
| 148 | else |
| 149 | { |
| 150 | obj = ofw_parse_object(np, cells_name); |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | return obj; |
| 155 | } |
| 156 | |
| 157 | static const char *ofw_console_serial_find(char *dst_con, struct rt_ofw_node *np) |
| 158 | { |
no test coverage detected