Home
last modified time | relevance | path

Searched full:np (Results 1 – 25 of 1569) sorted by relevance

12345678910>>...63

/linux/drivers/net/ethernet/sun/
H A Dniu.c91 #define nr64(reg) readq(np->regs + (reg))
92 #define nw64(reg, val) writeq((val), np->regs + (reg))
94 #define nr64_mac(reg) readq(np->mac_regs + (reg))
95 #define nw64_mac(reg, val) writeq((val), np->mac_regs + (reg))
97 #define nr64_ipp(reg) readq(np->regs + np->ipp_off + (reg))
98 #define nw64_ipp(reg, val) writeq((val), np->regs + np->ipp_off + (reg))
100 #define nr64_pcs(reg) readq(np->regs + np->pcs_off + (reg))
101 #define nw64_pcs(reg, val) writeq((val), np->regs + np->pcs_off + (reg))
103 #define nr64_xpcs(reg) readq(np->regs + np->xpcs_off + (reg))
104 #define nw64_xpcs(reg, val) writeq((val), np->regs + np->xpcs_off + (reg))
[all …]
/linux/drivers/scsi/sym53c8xx_2/
H A Dsym_hipd.c41 static void sym_int_ma (struct sym_hcb *np);
43 static struct sym_ccb *sym_alloc_ccb(struct sym_hcb *np);
44 static struct sym_ccb *sym_ccb_from_dsa(struct sym_hcb *np, u32 dsa);
45 static void sym_alloc_lcb_tags (struct sym_hcb *np, u_char tn, u_char ln);
46 static void sym_complete_error (struct sym_hcb *np, struct sym_ccb *cp);
47 static void sym_complete_ok (struct sym_hcb *np, struct sym_ccb *cp);
48 static int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp);
68 static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_char *msg) in sym_print_nego_msg() argument
70 struct sym_tcb *tp = &np->target[target]; in sym_print_nego_msg()
120 static void sym_chip_reset (struct sym_hcb *np) in sym_chip_reset() argument
[all …]
H A Dsym_nvram.c37 void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) in sym_nvram_setup_host() argument
46 np->rv_scntl0 &= ~0x0a; in sym_nvram_setup_host()
47 np->myaddr = nvram->data.Symbios.host_id & 0x0f; in sym_nvram_setup_host()
49 np->verbose += 1; in sym_nvram_setup_host()
53 np->usrflags |= SYM_AVOID_BUS_RESET; in sym_nvram_setup_host()
56 np->myaddr = nvram->data.Tekram.host_id & 0x0f; in sym_nvram_setup_host()
61 np->myaddr = nvram->data.parisc.host_id; in sym_nvram_setup_host()
63 np->minsync = nvram->data.parisc.factor; in sym_nvram_setup_host()
65 np->maxwide = nvram->data.parisc.width; in sym_nvram_setup_host()
67 case 0: np->scsi_mode = SMODE_SE; break; in sym_nvram_setup_host()
[all …]
H A Dsym_fw.c96 struct sym_hcb *np = sym_get_hcb(shost); in sym_fw1_patch() local
100 scripta0 = (struct sym_fw1a_scr *) np->scripta0; in sym_fw1_patch()
101 scriptb0 = (struct sym_fw1b_scr *) np->scriptb0; in sym_fw1_patch()
106 if (!(np->features & FE_LED0)) { in sym_fw1_patch()
126 scriptb0->startpos[0] = cpu_to_scr(np->squeue_ba); in sym_fw1_patch()
127 scriptb0->done_pos[0] = cpu_to_scr(np->dqueue_ba); in sym_fw1_patch()
128 scriptb0->targtbl[0] = cpu_to_scr(np->targtbl_ba); in sym_fw1_patch()
140 struct sym_hcb *np = sym_data->ncb; in sym_fw2_patch() local
144 scripta0 = (struct sym_fw2a_scr *) np->scripta0; in sym_fw2_patch()
145 scriptb0 = (struct sym_fw2b_scr *) np->scriptb0; in sym_fw2_patch()
[all …]
H A Dsym_hipd.h75 #define sym_verbose (np->verbose)
184 #define INB_OFF(np, o) ioread8(np->s.ioaddr + (o)) argument
185 #define INW_OFF(np, o) ioread16(np->s.ioaddr + (o)) argument
186 #define INL_OFF(np, o) ioread32(np->s.ioaddr + (o)) argument
188 #define OUTB_OFF(np, o, val) iowrite8((val), np->s.ioaddr + (o)) argument
189 #define OUTW_OFF(np, o, val) iowrite16((val), np->s.ioaddr + (o)) argument
190 #define OUTL_OFF(np, o, val) iowrite32((val), np->s.ioaddr + (o)) argument
192 #define INB(np, r) INB_OFF(np, offsetof(struct sym_reg, r)) argument
193 #define INW(np, r) INW_OFF(np, offsetof(struct sym_reg, r)) argument
194 #define INL(np, r) INL_OFF(np, offsetof(struct sym_reg, r)) argument
[all …]
/linux/drivers/clk/at91/
H A Ddt-compat.c31 static void __init of_sama5d2_clk_audio_pll_frac_setup(struct device_node *np) in of_sama5d2_clk_audio_pll_frac_setup() argument
34 const char *name = np->name; in of_sama5d2_clk_audio_pll_frac_setup()
39 parent_np = of_get_parent(np); in of_sama5d2_clk_audio_pll_frac_setup()
45 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d2_clk_audio_pll_frac_setup()
51 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d2_clk_audio_pll_frac_setup()
57 static void __init of_sama5d2_clk_audio_pll_pad_setup(struct device_node *np) in of_sama5d2_clk_audio_pll_pad_setup() argument
60 const char *name = np->name; in of_sama5d2_clk_audio_pll_pad_setup()
65 parent_np = of_get_parent(np); in of_sama5d2_clk_audio_pll_pad_setup()
71 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d2_clk_audio_pll_pad_setup()
77 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d2_clk_audio_pll_pad_setup()
[all …]
/linux/drivers/memory/
H A Dof_memory.c20 * @np: pointer to ddr device tree node
28 const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np, in of_get_min_tck() argument
38 ret |= of_property_read_u32(np, "tRPab-min-tck", &min->tRPab); in of_get_min_tck()
39 ret |= of_property_read_u32(np, "tRCD-min-tck", &min->tRCD); in of_get_min_tck()
40 ret |= of_property_read_u32(np, "tWR-min-tck", &min->tWR); in of_get_min_tck()
41 ret |= of_property_read_u32(np, "tRASmin-min-tck", &min->tRASmin); in of_get_min_tck()
42 ret |= of_property_read_u32(np, "tRRD-min-tck", &min->tRRD); in of_get_min_tck()
43 ret |= of_property_read_u32(np, "tWTR-min-tck", &min->tWTR); in of_get_min_tck()
44 ret |= of_property_read_u32(np, "tXP-min-tck", &min->tXP); in of_get_min_tck()
45 ret |= of_property_read_u32(np, "tRTP-min-tck", &min->tRTP); in of_get_min_tck()
[all …]
/linux/drivers/video/
H A Dof_display_timing.c17 * @np: device_node with the property
25 static int parse_timing_property(const struct device_node *np, const char *name, in parse_timing_property() argument
31 prop = of_find_property(np, name, &length); in parse_timing_property()
33 pr_err("%pOF: could not find property %s\n", np, name); in parse_timing_property()
39 ret = of_property_read_u32(np, name, &result->typ); in parse_timing_property()
43 ret = of_property_read_u32_array(np, name, &result->min, cells); in parse_timing_property()
45 pr_err("%pOF: illegal timing specification in %s\n", np, name); in parse_timing_property()
54 * @np: device_node with the properties
57 static int of_parse_display_timing(const struct device_node *np, in of_parse_display_timing() argument
65 ret |= parse_timing_property(np, "hback-porch", &dt->hback_porch); in of_parse_display_timing()
[all …]
/linux/include/linux/
H A Dof.h72 struct device_node *np; member
258 extern bool of_node_name_eq(const struct device_node *np, const char *name);
259 extern bool of_node_name_prefix(const struct device_node *np, const char *prefix);
261 static inline const char *of_node_full_name(const struct device_node *np) in of_node_full_name() argument
263 return np ? np->full_name : "<no-node>"; in of_node_full_name()
313 extern struct property *of_find_property(const struct device_node *np,
316 extern bool of_property_read_bool(const struct device_node *np, const char *propname);
317 extern int of_property_count_elems_of_size(const struct device_node *np,
319 extern int of_property_read_u8_index(const struct device_node *np,
322 extern int of_property_read_u16_index(const struct device_node *np,
[all …]
H A Dof_mdio.h17 int __of_mdiobus_register(struct mii_bus *mdio, struct device_node *np,
21 struct device_node *np) in of_mdiobus_register() argument
23 return __of_mdiobus_register(mdio, np, THIS_MODULE); in of_mdiobus_register()
27 struct device_node *np, struct module *owner);
31 struct device_node *np) in devm_of_mdiobus_register() argument
33 return __devm_of_mdiobus_register(dev, mdio, np, THIS_MODULE); in devm_of_mdiobus_register()
36 struct mdio_device *of_mdio_find_device(struct device_node *np);
43 of_phy_get_and_connect(struct net_device *dev, struct device_node *np,
47 int of_phy_register_fixed_link(struct device_node *np);
48 void of_phy_deregister_fixed_link(struct device_node *np);
[all …]
/linux/drivers/mfd/
H A Dsyscon.c28 struct device_node *np; member
40 static struct syscon *of_syscon_register(struct device_node *np, bool check_res) in of_syscon_register() argument
58 if (of_address_to_resource(np, 0, &res)) in of_syscon_register()
61 base = of_iomap(np, 0); in of_syscon_register()
66 if (of_property_read_bool(np, "big-endian")) in of_syscon_register()
68 else if (of_property_read_bool(np, "little-endian")) in of_syscon_register()
70 else if (of_property_read_bool(np, "native-endian")) in of_syscon_register()
78 ret = of_property_read_u32(np, "reg-io-width", &reg_io_width); in of_syscon_register()
82 ret = of_hwspin_lock_get_id(np, 0); in of_syscon_register()
106 syscon_config.name = kasprintf(GFP_KERNEL, "%pOFn@%pa", np, &res.start); in of_syscon_register()
[all …]
/linux/arch/powerpc/kernel/
H A Dlegacy_serial.c33 struct device_node *np; member
76 static int __init add_legacy_port(struct device_node *np, int want_index, in add_legacy_port() argument
89 clk = of_get_property(np, "clock-frequency", NULL); in add_legacy_port()
94 spd = of_get_property(np, "current-speed", NULL); in add_legacy_port()
97 rs = of_get_property(np, "reg-shift", NULL); in add_legacy_port()
120 if (legacy_info->np != NULL) { in add_legacy_port()
146 legacy_info->np = of_node_get(np); in add_legacy_port()
156 printk(KERN_DEBUG "Found legacy serial port %d for %pOF\n", index, np); in add_legacy_port()
164 static int __init add_legacy_soc_port(struct device_node *np, in add_legacy_soc_port() argument
169 struct device_node *tsi = of_get_parent(np); in add_legacy_soc_port()
[all …]
/linux/drivers/net/wireless/mediatek/mt76/
H A Deeprom.c22 struct device_node *np = dev->dev->of_node; in mt76_get_of_eeprom_data() local
26 data = of_get_property(np, "mediatek,eeprom-data", &size); in mt76_get_of_eeprom_data()
41 struct device_node *np = dev->dev->of_node; in mt76_get_of_data_from_mtd() local
50 list = of_get_property(np, "mediatek,mtd-eeprom", &size); in mt76_get_of_data_from_mtd()
58 np = of_find_node_by_phandle(phandle); in mt76_get_of_data_from_mtd()
59 if (!np) in mt76_get_of_data_from_mtd()
62 part = of_get_property(np, "label", NULL); in mt76_get_of_data_from_mtd()
64 part = np->name; in mt76_get_of_data_from_mtd()
113 of_node_put(np); in mt76_get_of_data_from_mtd()
124 struct device_node *np = dev->dev->of_node; in mt76_get_of_data_from_nvmem() local
[all …]
/linux/drivers/pinctrl/
H A Dpinctrl-generic.c21 struct device_node *np, struct pinctrl_map **maps, in pinctrl_generic_to_map() argument
32 group_name = devm_kasprintf(dev, GFP_KERNEL, "%pOFn.%pOFn", parent, np); in pinctrl_generic_to_map()
54 ret = pinconf_generic_parse_dt_config(np, pctldev, &configs, &num_configs); in pinctrl_generic_to_map()
88 struct device_node *np, in pinctrl_generic_pins_function_dt_subnode_to_map() argument
100 npins = of_property_count_u32_elems(np, "pins"); in pinctrl_generic_pins_function_dt_subnode_to_map()
104 parent, np, npins); in pinctrl_generic_pins_function_dt_subnode_to_map()
117 ret = of_property_read_u32_index(np, "pins", i, &pin); in pinctrl_generic_pins_function_dt_subnode_to_map()
123 ret = of_property_read_string(np, "function", &functions[i]); in pinctrl_generic_pins_function_dt_subnode_to_map()
128 return pinctrl_generic_to_map(pctldev, parent, np, maps, num_maps, in pinctrl_generic_pins_function_dt_subnode_to_map()
135 struct device_node *np, in pinctrl_generic_pinmux_dt_subnode_to_map() argument
[all …]
/linux/drivers/thermal/
H A Dthermal_of.c36 * @np: Pointer to the given device_node
44 static int thermal_of_get_trip_type(struct device_node *np, in thermal_of_get_trip_type() argument
50 err = of_property_read_string(np, "type", &t); in thermal_of_get_trip_type()
63 static int thermal_of_populate_trip(struct device_node *np, in thermal_of_populate_trip() argument
69 ret = of_property_read_u32(np, "temperature", &prop); in thermal_of_populate_trip()
76 ret = of_property_read_u32(np, "hysteresis", &prop); in thermal_of_populate_trip()
83 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
91 trip->priv = np; in thermal_of_populate_trip()
96 static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *ntrips) in thermal_of_trips_init() argument
102 struct device_node *trips __free(device_node) = of_get_child_by_name(np, "trips"); in thermal_of_trips_init()
[all …]
/linux/drivers/net/fddi/skfp/
H A Dpcmplc.c196 static void sm_ph_lem_start(struct s_smc *smc, int np, int threshold);
197 static void sm_ph_lem_stop(struct s_smc *smc, int np);
210 EV_TOKEN(EVENT_PCM+phy->np,event)) ; in start_pcm_timer0()
229 int np ; in pcm_init() local
233 for (np = 0,phy = smc->y ; np < NUMPHYS ; np++,phy++) { in pcm_init()
237 phy->np = np ; in pcm_init()
241 mib->fddiPORTMy_Type = (np == PS) ? TS : TM ; in pcm_init()
244 mib->fddiPORTMy_Type = (np == PA) ? TA : in pcm_init()
245 (np == PB) ? TB : TM ; in pcm_init()
252 mib->fddiPORTMy_Type = (np == PS) ? TS : TNONE ; in pcm_init()
[all …]
/linux/drivers/pci/
H A Dof_property.c96 struct device_node *np) in of_pci_prop_bus_range() argument
101 return of_changeset_add_prop_u32_array(ocs, np, "bus-range", bus_range, in of_pci_prop_bus_range()
106 struct device_node *np) in of_pci_prop_ranges() argument
154 ret = of_changeset_add_prop_u32_array(ocs, np, "ranges", (u32 *)rp, in of_pci_prop_ranges()
162 struct device_node *np) in of_pci_prop_reg() argument
169 return of_changeset_add_prop_u32_array(ocs, np, "reg", (u32 *)&reg, in of_pci_prop_reg()
175 struct device_node *np) in of_pci_prop_interrupts() argument
187 return of_changeset_add_prop_u32(ocs, np, "interrupts", (u32)pin); in of_pci_prop_interrupts()
191 struct device_node *np) in of_pci_prop_intr_ctrl() argument
203 ret = of_changeset_add_prop_u32(ocs, np, "#interrupt-cells", 1); in of_pci_prop_intr_ctrl()
[all …]
/linux/drivers/clk/renesas/
H A Dclk-emev2.c41 struct device_node *np; in emev2_smu_init() local
43 np = of_find_matching_node(NULL, smu_id); in emev2_smu_init()
44 BUG_ON(!np); in emev2_smu_init()
45 smu_base = of_iomap(np, 0); in emev2_smu_init()
47 of_node_put(np); in emev2_smu_init()
64 static void __init emev2_smu_clkdiv_init(struct device_node *np) in emev2_smu_clkdiv_init() argument
68 const char *parent_name = of_clk_get_parent_name(np, 0); in emev2_smu_clkdiv_init()
69 if (WARN_ON(of_property_read_u32_array(np, "reg", reg, 2))) in emev2_smu_clkdiv_init()
73 clk = clk_register_divider(NULL, np->name, parent_name, 0, in emev2_smu_clkdiv_init()
75 of_clk_add_provider(np, of_clk_src_simple_get, clk); in emev2_smu_clkdiv_init()
[all …]
/linux/drivers/of/
H A Doverlay_test.c22 struct device_node *np; in of_overlay_apply_kunit_apply() local
27 np = of_find_node_by_name(NULL, kunit_node_name); in of_overlay_apply_kunit_apply()
28 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, np); in of_overlay_apply_kunit_apply()
29 of_node_put(np); in of_overlay_apply_kunit_apply()
39 struct device_node *np; in of_overlay_apply_kunit_platform_device() local
44 np = of_find_node_by_name(NULL, kunit_node_name); in of_overlay_apply_kunit_platform_device()
45 of_node_put_kunit(test, np); in of_overlay_apply_kunit_platform_device()
46 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, np); in of_overlay_apply_kunit_platform_device()
48 pdev = of_find_device_by_node(np); in of_overlay_apply_kunit_platform_device()
65 struct device_node *np; in of_overlay_apply_kunit_cleanup() local
[all …]
/linux/drivers/clk/
H A Dclk-k210.c544 static int __init k210_register_pll(struct device_node *np, in k210_register_pll() argument
565 return of_clk_hw_register(np, &pll->hw); in k210_register_pll()
568 static int __init k210_register_plls(struct device_node *np, in k210_register_plls() argument
577 ret = k210_register_pll(np, ksc, K210_PLL0, "pll0", 1, &k210_pll_ops); in k210_register_plls()
579 pr_err("%pOFP: register PLL0 failed\n", np); in k210_register_plls()
582 ret = k210_register_pll(np, ksc, K210_PLL1, "pll1", 1, &k210_pll_ops); in k210_register_plls()
584 pr_err("%pOFP: register PLL1 failed\n", np); in k210_register_plls()
589 ret = k210_register_pll(np, ksc, K210_PLL2, "pll2", 3, &k210_pll2_ops); in k210_register_plls()
591 pr_err("%pOFP: register PLL2 failed\n", np); in k210_register_plls()
647 static int __init k210_register_aclk(struct device_node *np, in k210_register_aclk() argument
[all …]
/linux/drivers/pci/pwrctrl/
H A Dcore.c152 static bool pci_pwrctrl_is_required(struct device_node *np) in pci_pwrctrl_is_required() argument
158 ret = of_property_read_string(np, "compatible", &compat); in pci_pwrctrl_is_required()
165 if (of_pci_supply_present(np)) in pci_pwrctrl_is_required()
168 if (of_graph_is_present(np)) { in pci_pwrctrl_is_required()
169 for_each_endpoint_of_node(np, endpoint) { in pci_pwrctrl_is_required()
194 static void pci_pwrctrl_power_off_device(struct device_node *np) in pci_pwrctrl_power_off_device() argument
199 for_each_available_child_of_node_scoped(np, child) in pci_pwrctrl_power_off_device()
202 if (!pci_pwrctrl_is_required(np)) in pci_pwrctrl_power_off_device()
205 pdev = of_find_device_by_node(np); in pci_pwrctrl_power_off_device()
231 struct device_node *np = parent->of_node; in pci_pwrctrl_power_off_devices() local
[all …]
/linux/drivers/macintosh/
H A Dmacio_asic.c179 * @np: pointer to the device node
186 static int macio_resource_quirks(struct device_node *np, struct resource *res, in macio_resource_quirks() argument
194 if (index == 0 && of_node_name_eq(np, "gc")) in macio_resource_quirks()
198 if (index >= 2 && of_node_name_eq(np, "radio")) in macio_resource_quirks()
211 if (of_node_name_eq(np, "escc")) in macio_resource_quirks()
215 if (index >= 3 && (of_node_name_eq(np, "ch-a") || in macio_resource_quirks()
216 of_node_name_eq(np, "ch-b"))) in macio_resource_quirks()
220 if (index > 0 && of_node_name_eq(np, "media-bay")) in macio_resource_quirks()
224 if (of_node_name_eq(np, "IDE") || of_node_name_eq(np, "ATA") || in macio_resource_quirks()
225 of_node_is_type(np, "ide") || of_node_is_type(np, "ata")) { in macio_resource_quirks()
[all …]
/linux/drivers/irqchip/
H A Dirq-orion.c52 static int __init orion_irq_init(struct device_node *np, in orion_irq_init() argument
60 num_chips = of_address_count(np); in orion_irq_init()
62 orion_irq_domain = irq_domain_create_linear(of_fwnode_handle(np), in orion_irq_init()
66 panic("%pOFn: unable to add irq domain\n", np); in orion_irq_init()
69 ORION_IRQS_PER_CHIP, 1, np->full_name, in orion_irq_init()
73 panic("%pOFn: unable to alloc irq domain gc\n", np); in orion_irq_init()
79 of_address_to_resource(np, n, &r); in orion_irq_init()
81 if (!request_mem_region(r.start, resource_size(&r), np->name)) in orion_irq_init()
83 np, n); in orion_irq_init()
87 panic("%pOFn: unable to map resource %d", np, n); in orion_irq_init()
[all …]
/linux/net/core/
H A Dof_net.c19 * @np: Pointer to the given device_node
27 int of_get_phy_mode(struct device_node *np, phy_interface_t *interface) in of_get_phy_mode() argument
34 err = of_property_read_string(np, "phy-mode", &pm); in of_get_phy_mode()
36 err = of_property_read_string(np, "phy-connection-type", &pm); in of_get_phy_mode()
50 static int of_get_mac_addr(struct device_node *np, const char *name, u8 *addr) in of_get_mac_addr() argument
52 struct property *pp = of_find_property(np, name, NULL); in of_get_mac_addr()
61 int of_get_mac_address_nvmem(struct device_node *np, u8 *addr) in of_get_mac_address_nvmem() argument
63 struct platform_device *pdev = of_find_device_by_node(np); in of_get_mac_address_nvmem()
78 cell = of_nvmem_cell_get(np, "mac-address"); in of_get_mac_address_nvmem()
102 * @np: Caller's Device Node
[all …]
/linux/net/ncsi/
H A Dncsi-manage.c36 struct ncsi_package *np; in ncsi_channel_is_last() local
39 NCSI_FOR_EACH_PACKAGE(ndp, np) in ncsi_channel_is_last()
40 NCSI_FOR_EACH_CHANNEL(np, nc) { in ncsi_channel_is_last()
54 struct ncsi_package *np; in ncsi_report_link() local
65 NCSI_FOR_EACH_PACKAGE(ndp, np) { in ncsi_report_link()
66 NCSI_FOR_EACH_CHANNEL(np, nc) { in ncsi_report_link()
92 struct ncsi_package *np = nc->package; in ncsi_channel_monitor() local
93 struct ncsi_dev_priv *ndp = np->ndp; in ncsi_channel_monitor()
129 nca.package = np->id; in ncsi_channel_monitor()
195 struct ncsi_channel *ncsi_find_channel(struct ncsi_package *np, in ncsi_find_channel() argument
[all …]

12345678910>>...63