Home
last modified time | relevance | path

Searched refs:np (Results 1 – 25 of 62) sorted by relevance

123

/components/drivers/include/drivers/
A Dofw.h150 return np ? np->name : "<no-node>"; in rt_ofw_node_name()
155 return np ? np->full_name : "<no-node>"; in rt_ofw_node_full_name()
362 np = rt_ofw_find_node_by_tag(np, name))
366 np; np = rt_ofw_find_node_by_prop(np, prop_name))
370 np; np = rt_ofw_find_node_by_prop_r(np, prop_name, prop))
374 np = rt_ofw_find_node_by_name(np, name))
378 np = rt_ofw_find_node_by_type(np, type))
386 np; np = rt_ofw_find_node_by_ids_r(np, ids, id))
390 np = rt_ofw_find_node_by_ids(np, ids))
394 np; np = rt_ofw_get_next_node(np))
[all …]
A Dofw_io.h17 int rt_ofw_bus_addr_cells(struct rt_ofw_node *np);
18 int rt_ofw_bus_size_cells(struct rt_ofw_node *np);
19 int rt_ofw_io_addr_cells(struct rt_ofw_node *np);
20 int rt_ofw_io_size_cells(struct rt_ofw_node *np);
22 int rt_ofw_get_address_count(struct rt_ofw_node *np);
35 bus_addr = rt_ofw_reverse_address(np, "dma-ranges", address); in rt_ofw_translate_dma2cpu()
36 cpu_addr = rt_ofw_translate_address(np, "ranges", bus_addr); in rt_ofw_translate_dma2cpu()
45 bus_addr = rt_ofw_reverse_address(np, "ranges", address); in rt_ofw_translate_cpu2dma()
46 dma_addr = rt_ofw_translate_address(np, "dma-ranges", bus_addr); in rt_ofw_translate_cpu2dma()
51 void *rt_ofw_iomap(struct rt_ofw_node *np, int index);
[all …]
A Dofw_irq.h16 int rt_ofw_irq_cells(struct rt_ofw_node *np);
18 rt_err_t rt_ofw_parse_irq_map(struct rt_ofw_node *np, struct rt_ofw_cell_args *irq_args);
19 rt_err_t rt_ofw_parse_irq_cells(struct rt_ofw_node *np, int index, struct rt_ofw_cell_args *out_irq…
21 struct rt_ofw_node *rt_ofw_find_irq_parent(struct rt_ofw_node *np, int *out_interrupt_cells);
24 int rt_ofw_get_irq_count(struct rt_ofw_node *np);
25 int rt_ofw_get_irq(struct rt_ofw_node *np, int index);
26 int rt_ofw_get_irq_by_name(struct rt_ofw_node *np, const char *name);
/components/drivers/ofw/
A Dio.c31 for (rt_uint32_t cells; np; np = np->parent) in ofw_bus_addr_cells()
47 for (rt_uint32_t cells; np; np = np->parent) in ofw_bus_size_cells()
61 return np ? ofw_bus_addr_cells(np) : -RT_EINVAL; in rt_ofw_bus_addr_cells()
66 return np ? ofw_bus_size_cells(np) : -RT_EINVAL; in rt_ofw_bus_size_cells()
71 return np ? ofw_bus_addr_cells(np->parent ? np->parent : np) : -RT_EINVAL; in rt_ofw_io_addr_cells()
76 return np ? ofw_bus_size_cells(np->parent ? np->parent : np) : -RT_EINVAL; in rt_ofw_io_size_cells()
83 if (np) in rt_ofw_get_address_count()
330 ranges->np = np; in ofw_bus_ranges()
370 if (_bus_ranges[i]->np == np) in rt_ofw_translate_address()
439 if (_bus_ranges[i]->np == np) in rt_ofw_reverse_address()
[all …]
A Dbase.c176 while (np->parent && !np->sibling) in ofw_get_next_node()
178 np = np->parent; in ofw_get_next_node()
181 np = np->sibling; in ofw_get_next_node()
221 np = ofw_get_next_node(np); in ofw_node_destroy()
232 if (np) in rt_ofw_node_destroy()
533 np = rt_ofw_node_get(np); in rt_ofw_find_node_by_name()
694 np = rt_ofw_node_get(np->parent); in rt_ofw_get_parent()
1006 for (; np; np = np->sibling) in rt_ofw_get_cpu_id()
1122 np = info->np; in rt_ofw_get_alias_node()
1144 if (info->np == np) in ofw_alias_node_id()
[all …]
A Dirq.c33 int rt_ofw_irq_cells(struct rt_ofw_node *np) in rt_ofw_irq_cells() argument
35 return np ? ofw_interrupt_cells(np) : -RT_EINVAL; in rt_ofw_irq_cells()
353 if (np && irq_args && irq_args->data) in rt_ofw_parse_irq_map()
483 if (np && index >= 0 && out_irq_args) in rt_ofw_parse_irq_cells()
497 for (np = rt_ofw_node_get(np); np; np = rt_ofw_get_next_parent(np)) in rt_ofw_find_irq_parent()
508 np = ic_np; in rt_ofw_find_irq_parent()
522 return np; in rt_ofw_find_irq_parent()
586 if (np) in rt_ofw_get_irq_count()
609 if (np && index >= 0) in rt_ofw_get_irq()
651 if (np && name) in rt_ofw_get_irq_by_name()
[all …]
A Dofw.c141 if (np && (test_obj = rt_ofw_data(np)) && cells_name) in rt_ofw_parse_object()
518 while (np) in ofw_node_dump_dts()
602 np = np->child; in ofw_node_dump_dts()
615 while (np->parent && !np->sibling) in ofw_node_dump_dts()
617 np = np->parent; in ofw_node_dump_dts()
632 np = np->sibling; in ofw_node_dump_dts()
634 if (np) in ofw_node_dump_dts()
644 if (np) in rt_ofw_node_dump_dts()
689 if (np) in ofw_dts()
706 np = np->child; in ofw_dts()
[all …]
A Dfdt.c853 if (np) in system_node_init_flag()
913 prop = np->props; in fdt_unflatten_props()
952 if (!np) in fdt_unflatten_single()
958 np->name = "<NULL>"; in fdt_unflatten_single()
980 np->parent = parent; in fdt_unflatten_single()
982 rt_ref_init(&np->ref); in fdt_unflatten_single()
983 np->flags = 0; in fdt_unflatten_single()
985 if (!np->child) in fdt_unflatten_single()
995 parent = np; in fdt_unflatten_single()
1000 np = np->child; in fdt_unflatten_single()
[all …]
/components/drivers/core/
A Dplatform_ofw.c58 while (np->parent) in ofw_device_rename()
82 np = np->parent; in ofw_device_rename()
93 rt_ofw_node_get(np); in alloc_ofw_platform_device()
111 struct rt_ofw_node *np; in platform_ofw_device_probe_once() local
120 if (np->dev) in platform_ofw_device_probe_once()
146 if (id && np->child) in platform_ofw_device_probe_once()
160 if (np->dev) in platform_ofw_device_probe_once()
170 rt_ofw_node_put(np); in platform_ofw_device_probe_once()
177 np->dev = &pdev->parent; in platform_ofw_device_probe_once()
220 if (np) in rt_platform_ofw_request()
[all …]
A Dnuma.c104 struct rt_ofw_node *np = RT_NULL; in numa_ofw_init() local
122 rt_ofw_foreach_cpu_node(np) in numa_ofw_init()
124 rt_ofw_prop_read_u32(np, "numa-node-id", (rt_uint32_t *)&cpu_numa_map[i]); in numa_ofw_init()
132 rt_ofw_foreach_node_by_type(np, "memory") in numa_ofw_init()
134 if (!rt_ofw_prop_read_u32(np, "numa-node-id", &nid)) in numa_ofw_init()
136 int mem_nr = rt_ofw_get_address_count(np); in numa_ofw_init()
143 if (rt_ofw_get_address(np, i, &addr, &size)) in numa_ofw_init()
160 nm->ofw_node = np; in numa_ofw_init()
/components/drivers/regulator/
A Dregulator_dm.c18 param->name = rt_ofw_prop_read_raw(np, "regulator-name", RT_NULL); in regulator_ofw_parse()
20 if (!rt_ofw_prop_read_u32(np, "regulator-min-microvolt", &pval)) in regulator_ofw_parse()
25 if (!rt_ofw_prop_read_u32(np, "regulator-max-microvolt", &pval)) in regulator_ofw_parse()
30 if (!rt_ofw_prop_read_u32(np, "regulator-min-microamp", &pval)) in regulator_ofw_parse()
35 if (!rt_ofw_prop_read_u32(np, "regulator-max-microamp", &pval)) in regulator_ofw_parse()
40 if (!rt_ofw_prop_read_u32(np, "regulator-ramp-delay", &pval)) in regulator_ofw_parse()
45 if (!rt_ofw_prop_read_u32(np, "regulator-enable-ramp-delay", &pval)) in regulator_ofw_parse()
51 param->boot_on = rt_ofw_prop_read_bool(np, "regulator-boot-on"); in regulator_ofw_parse()
52 param->always_on = rt_ofw_prop_read_bool(np, "regulator-always-on"); in regulator_ofw_parse()
53 param->soft_start = rt_ofw_prop_read_bool(np, "regulator-soft-start"); in regulator_ofw_parse()
[all …]
/components/drivers/spi/
A Ddev_spi_dm.c23 if (!rt_ofw_prop_read_u32(np, prop, &value)) in ofw_parse_delay()
43 struct rt_ofw_node *np = spi_dev->parent.ofw_node; in spi_device_ofw_parse() local
46 if (rt_ofw_prop_read_bool(np, "spi-cpha")) in spi_device_ofw_parse()
50 if (rt_ofw_prop_read_bool(np, "spi-cpol")) in spi_device_ofw_parse()
54 if (rt_ofw_prop_read_bool(np, "spi-3wire")) in spi_device_ofw_parse()
58 if (rt_ofw_prop_read_bool(np, "spi-lsb-first")) in spi_device_ofw_parse()
62 if (rt_ofw_prop_read_bool(np, "spi-cs-high")) in spi_device_ofw_parse()
68 rt_ofw_prop_read_u32(np, "spi-tx-bus-width", &value); in spi_device_ofw_parse()
72 rt_ofw_prop_read_u32(np, "spi-rx-bus-width", &value); in spi_device_ofw_parse()
77 if (!rt_ofw_node_tag_equ(np, "slave")) in spi_device_ofw_parse()
[all …]
/components/drivers/phy/
A Dofw.c73 if (rt_ofw_prop_read_string(np, "phy-mode", &phy_mode)) in rt_ofw_get_interface()
74 rt_ofw_prop_read_string(np, "phy-connection-type", &phy_mode); in rt_ofw_get_interface()
85 p = rt_ofw_prop_read_raw(np, name, &len); in rt_ofw_get_mac_addr_by_name()
95 rt_err_t rt_ofw_get_mac_addr(struct rt_ofw_node *np, rt_uint8_t *addr) in rt_ofw_get_mac_addr() argument
97 if (!rt_ofw_get_mac_addr_by_name(np, "mac-address", addr)) in rt_ofw_get_mac_addr()
100 if (!rt_ofw_get_mac_addr_by_name(np, "local-mac-address", addr)) in rt_ofw_get_mac_addr()
103 if (!rt_ofw_get_mac_addr_by_name(np, "address", addr)) in rt_ofw_get_mac_addr()
109 rt_err_t rt_ofw_get_phyid(struct rt_ofw_node *np,rt_uint32_t *id) in rt_ofw_get_phyid() argument
115 ret = rt_ofw_prop_read_string(np,"compatible",&phy_id); in rt_ofw_get_phyid()
134 phy_node = rt_ofw_parse_phandle(np, "phy-handle", 0); in rt_ofw_create_phy()
[all …]
/components/drivers/mfd/
A Dmfd-syscon.c86 struct rt_syscon *rt_syscon_find_by_ofw_node(struct rt_ofw_node *np) in rt_syscon_find_by_ofw_node() argument
92 if (!np) in rt_syscon_find_by_ofw_node()
102 if (syscon_tmp->np == np) in rt_syscon_find_by_ofw_node()
117 if (!rt_ofw_node_is_compatible(np, "syscon") && in rt_syscon_find_by_ofw_node()
118 !rt_ofw_node_is_compatible(np, "simple-mfd")) in rt_syscon_find_by_ofw_node()
123 syscon_pdev.parent.ofw_node = np; in rt_syscon_find_by_ofw_node()
127 syscon = rt_ofw_data(np); in rt_syscon_find_by_ofw_node()
168 struct rt_ofw_node *np; in syscon_probe() local
177 np = pdev->parent.ofw_node; in syscon_probe()
201 syscon->np = pdev->parent.ofw_node; in syscon_probe()
[all …]
/components/drivers/led/
A Dled-gpio.c88 static rt_err_t ofw_append_gpio_led(struct rt_ofw_node *np) in ofw_append_gpio_led() argument
100 gled->pin = rt_ofw_get_named_pin(np, RT_NULL, 0, RT_NULL, &gled->active_val); in ofw_append_gpio_led()
116 if (!rt_ofw_prop_read_string(np, "default-state", &state)) in ofw_append_gpio_led()
124 if ((propname = rt_ofw_get_prop_fuzzy_name(np, "default-trigger$"))) in ofw_append_gpio_led()
126 if (!rt_ofw_prop_read_string(np, propname, &trigger)) in ofw_append_gpio_led()
138 rt_ofw_data(np) = &gled->parent; in ofw_append_gpio_led()
151 struct rt_ofw_node *led_np, *np = pdev->parent.ofw_node; in gpio_led_probe() local
153 if (rt_ofw_prop_read_bool(np, "pinctrl-0")) in gpio_led_probe()
159 rt_ofw_foreach_available_child_node(np, led_np) in gpio_led_probe()
191 struct rt_ofw_node *led_np, *np = pdev->parent.ofw_node; in gpio_led_remove() local
[all …]
/components/drivers/reset/
A Dreset.c280 rstc_nr = rt_ofw_count_phandle_cells(np, "resets", "#reset-cells"); in ofw_get_reset_control()
292 rt_ofw_node_full_name(np), index); in ofw_get_reset_control()
328 rt_ofw_node_full_name(np), index); in ofw_get_reset_control()
367 if (!name && rt_ofw_prop_read_bool(np, "reset-names")) in ofw_get_reset_control()
369 rt_ofw_prop_read_string_index(np, "reset-names", index, &name); in ofw_get_reset_control()
382 rt_ofw_node_full_name(np), rt_strerror(err)); in ofw_get_reset_control()
411 return ofw_get_reset_control(np, 0, RT_NULL, RT_TRUE); in rt_ofw_get_reset_control_array()
416 return ofw_get_reset_control(np, index, RT_NULL, RT_FALSE); in rt_ofw_get_reset_control_by_index()
421 if (np) in rt_ofw_get_reset_control_by_name()
423 int index = rt_ofw_prop_index_of_string(np, "reset-names", name); in rt_ofw_get_reset_control_by_name()
[all …]
/components/net/lwip/lwip-2.0.3/src/netif/ppp/
A Dvj.c198 if (np->len < hlen) { in vj_compress_tcp()
205 np = pbuf_alloc(PBUF_RAW, np->tot_len, PBUF_POOL); in vj_compress_tcp()
206 if (!np) { in vj_compress_tcp()
211 pbuf_free(np); in vj_compress_tcp()
215 *pb = np; in vj_compress_tcp()
645 if(!np) { in vj_uncompress_tcp()
667 n0 = np; in vj_uncompress_tcp()
671 struct pbuf *np; in vj_uncompress_tcp() local
675 if(!np) { in vj_uncompress_tcp()
679 pbuf_cat(np, n0); in vj_uncompress_tcp()
[all …]
A Dmppe.c195 struct pbuf *n, *np; in mppe_compress() local
205 if (!np) { in mppe_compress()
210 pbuf_header(np, -(s16_t)(MPPE_OVHD + sizeof(protocol))); in mppe_compress()
212 if ((err = pbuf_copy(np, *pb)) != ERR_OK) { in mppe_compress()
213 pbuf_free(np); in mppe_compress()
218 pbuf_header(np, (s16_t)(MPPE_OVHD + sizeof(protocol))); in mppe_compress()
220 *pb = np; in mppe_compress()
221 pl = (u8_t*)np->payload; in mppe_compress()
249 pbuf_header(np, -(s16_t)MPPE_OVHD); in mppe_compress()
252 for (n = np; n != NULL; n = n->next) { in mppe_compress()
[all …]
/components/drivers/clk/
A Dclk-fixed-rate.c20 struct rt_ofw_node *np = pdev->parent.ofw_node; in fixed_clk_ofw_init() local
21 const char *clk_name = np->name; in fixed_clk_ofw_init()
23 if (!rt_ofw_prop_read_u32(np, "clock-frequency", &rate)) in fixed_clk_ofw_init()
25 rt_ofw_prop_read_u32(np, "clock-accuracy", &accuracy); in fixed_clk_ofw_init()
26 rt_ofw_prop_read_string(np, "clock-output-names", &clk_name); in fixed_clk_ofw_init()
35 rt_ofw_data(np) = &clk_fixed->clk; in fixed_clk_ofw_init()
/components/net/lwip/lwip-2.1.2/src/netif/ppp/
A Dvj.c162 struct pbuf *np = *pb; in vj_compress_tcp() local
198 if (np->len < hlen) { in vj_compress_tcp()
206 if (!np) { in vj_compress_tcp()
210 *pb = np; in vj_compress_tcp()
629 struct pbuf *np; in vj_uncompress_tcp() local
640 if(!np) { in vj_uncompress_tcp()
658 n0 = np; in vj_uncompress_tcp()
662 struct pbuf *np; in vj_uncompress_tcp() local
666 if(!np) { in vj_uncompress_tcp()
670 pbuf_cat(np, n0); in vj_uncompress_tcp()
[all …]
A Dmppe.c195 struct pbuf *n, *np; in mppe_compress() local
205 if (!np) { in mppe_compress()
210 pbuf_remove_header(np, MPPE_OVHD + sizeof(protocol)); in mppe_compress()
212 if ((err = pbuf_copy(np, *pb)) != ERR_OK) { in mppe_compress()
213 pbuf_free(np); in mppe_compress()
218 pbuf_add_header(np, MPPE_OVHD + sizeof(protocol)); in mppe_compress()
220 *pb = np; in mppe_compress()
221 pl = (u8_t*)np->payload; in mppe_compress()
249 pbuf_remove_header(np, MPPE_OVHD); in mppe_compress()
252 for (n = np; n != NULL; n = n->next) { in mppe_compress()
[all …]
/components/drivers/pinctrl/
A Dpinctrl.c20 static rt_err_t ofw_pin_ctrl_confs_apply(struct rt_ofw_node *np, int index) in ofw_pin_ctrl_confs_apply() argument
31 rt_ofw_foreach_prop_u32(np, pinctrl_n_name, prop, cell, phandle) in ofw_pin_ctrl_confs_apply()
135 static int ofw_pin_ctrl_confs_lookup(struct rt_ofw_node *np, const char *name) in ofw_pin_ctrl_confs_lookup() argument
137 return rt_ofw_prop_index_of_string(np, "pinctrl-names", name); in ofw_pin_ctrl_confs_lookup()
140 static rt_err_t ofw_pin_ctrl_confs_apply_by_name(struct rt_ofw_node *np, const char *name) in ofw_pin_ctrl_confs_apply_by_name() argument
145 index = ofw_pin_ctrl_confs_lookup(np, name); in ofw_pin_ctrl_confs_apply_by_name()
149 err = ofw_pin_ctrl_confs_apply(np, index); in ofw_pin_ctrl_confs_apply_by_name()
/components/drivers/pin/
A Ddev_pin_ofw.c20 rt_ssize_t rt_ofw_get_named_pin(struct rt_ofw_node *np, const char *propname, int index, in rt_ofw_get_named_pin() argument
32 if (!np && index < 0) in rt_ofw_get_named_pin()
48 pin = rt_ofw_parse_phandle_cells(np, gpios_name, "#gpio-cells", index, &pin_args); in rt_ofw_get_named_pin()
152 rt_ssize_t rt_ofw_get_named_pin_count(struct rt_ofw_node *np, const char *propname) in rt_ofw_get_named_pin_count() argument
157 if (!np) in rt_ofw_get_named_pin_count()
173 count = rt_ofw_count_phandle_cells(np, propname, "#gpio-cells"); in rt_ofw_get_named_pin_count()
/components/drivers/pci/
A Dofw.c465 struct rt_ofw_node *np, *msi_ic_np = RT_NULL; in ofw_msi_pic_init() local
479 np = bridge->parent.ofw_node; in ofw_msi_pic_init()
481 if (!(msi_ic_np = rt_ofw_parse_phandle(np, "msi-parent", 0))) in ofw_msi_pic_init()
483 rt_ofw_map_id(np, rid, "msi-map", "msi-map-mask", &msi_ic_np, RT_NULL); in ofw_msi_pic_init()
528 static rt_int32_t ofw_pci_devfn(struct rt_ofw_node *np) in ofw_pci_devfn() argument
542 rt_ofw_foreach_child_node(np, dev_np) in ofw_find_device()
568 struct rt_ofw_node *np = RT_NULL; in rt_pci_ofw_device_init() local
584 np = host_bridge->parent.ofw_node; in rt_pci_ofw_device_init()
588 np = pdev->bus->self->parent.ofw_node; in rt_pci_ofw_device_init()
591 if (np) in rt_pci_ofw_device_init()
[all …]
/components/legacy/fdt/src/
A Ddtb_access.c243 struct dtb_node *np = NULL; in dtb_node_find_node_opts_by_path() local
276 if (!np) in dtb_node_find_node_opts_by_path()
282 if (!np) in dtb_node_find_node_opts_by_path()
284 while (np && *path == '/') in dtb_node_find_node_opts_by_path()
286 struct dtb_node *tmp = np; in dtb_node_find_node_opts_by_path()
289 np = dtb_node_get_dtb_node_by_path(np, path); in dtb_node_find_node_opts_by_path()
296 return np; in dtb_node_find_node_opts_by_path()
335 struct dtb_node *np; in dtb_node_find_node_by_prop_value() local
345 return np; in dtb_node_find_node_by_prop_value()
583 out_args->np = node; in __dtb_node_parse_phandle_with_args()
[all …]

Completed in 40 milliseconds

123