/openbmc/linux/drivers/net/ethernet/nvidia/ |
H A D | forcedeth.c | 727 __this_cpu_inc(np->txrx_stats->member) 729 __this_cpu_add(np->txrx_stats->member, (count)) 797 * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); 818 * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); 961 static bool nv_optimized(struct fe_priv *np) in nv_optimized() argument 963 if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) in nv_optimized() 998 struct fe_priv *np = get_nvpriv(dev); in setup_hw_rings() local 1001 if (!nv_optimized(np)) { in setup_hw_rings() 1003 writel(dma_low(np->ring_addr), base + NvRegRxRingPhysAddr); in setup_hw_rings() 1005 …writel(dma_low(np->ring_addr + np->rx_ring_size*sizeof(struct ring_desc)), base + NvRegTxRingPhysA… in setup_hw_rings() [all …]
|
/openbmc/linux/drivers/net/ethernet/sun/ |
H A D | niu.c | 91 #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 …]
|
/openbmc/linux/drivers/scsi/sym53c8xx_2/ |
H A D | sym_hipd.c | 41 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 D | sym_nvram.c | 37 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 …]
|
/openbmc/linux/drivers/net/ethernet/dlink/ |
H A D | dl2k.c | 52 static void dl2k_enable_int(struct netdev_private *np) in dl2k_enable_int() argument 54 void __iomem *ioaddr = np->ioaddr; in dl2k_enable_int() 106 struct netdev_private *np; in rio_probe1() local 127 dev = alloc_etherdev (sizeof (*np)); in rio_probe1() 132 np = netdev_priv(dev); in rio_probe1() 138 np->eeprom_addr = ioaddr; in rio_probe1() 146 np->ioaddr = ioaddr; in rio_probe1() 147 np->chip_id = chip_idx; in rio_probe1() 148 np->pdev = pdev; in rio_probe1() 149 spin_lock_init (&np->tx_lock); in rio_probe1() [all …]
|
H A D | sundance.c | 448 struct netdev_private *np = netdev_priv(dev); in sundance_reset() local 449 void __iomem *ioaddr = np->base + ASICCtrl; in sundance_reset() 468 struct netdev_private *np = netdev_priv(dev); in sundance_poll_controller() local 470 disable_irq(np->pci_dev->irq); in sundance_poll_controller() 471 intr_handler(np->pci_dev->irq, dev); in sundance_poll_controller() 472 enable_irq(np->pci_dev->irq); in sundance_poll_controller() 496 struct netdev_private *np; in sundance_probe1() local 519 dev = alloc_etherdev(sizeof(*np)); in sundance_probe1() 536 np = netdev_priv(dev); in sundance_probe1() 537 np->ndev = dev; in sundance_probe1() [all …]
|
/openbmc/linux/drivers/clk/at91/ |
H A D | dt-compat.c | 30 static void __init of_sama5d2_clk_audio_pll_frac_setup(struct device_node *np) in of_sama5d2_clk_audio_pll_frac_setup() argument 33 const char *name = np->name; in of_sama5d2_clk_audio_pll_frac_setup() 38 parent_np = of_get_parent(np); in of_sama5d2_clk_audio_pll_frac_setup() 44 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d2_clk_audio_pll_frac_setup() 50 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d2_clk_audio_pll_frac_setup() 56 static void __init of_sama5d2_clk_audio_pll_pad_setup(struct device_node *np) in of_sama5d2_clk_audio_pll_pad_setup() argument 59 const char *name = np->name; in of_sama5d2_clk_audio_pll_pad_setup() 64 parent_np = of_get_parent(np); in of_sama5d2_clk_audio_pll_pad_setup() 70 parent_name = of_clk_get_parent_name(np, 0); in of_sama5d2_clk_audio_pll_pad_setup() 76 of_clk_add_hw_provider(np, of_clk_hw_simple_get, hw); in of_sama5d2_clk_audio_pll_pad_setup() [all …]
|
/openbmc/linux/drivers/net/ethernet/ |
H A D | fealnx.c | 475 struct netdev_private *np; in fealnx_init_one() local 536 np = netdev_priv(dev); in fealnx_init_one() 537 np->mem = ioaddr; in fealnx_init_one() 538 spin_lock_init(&np->lock); in fealnx_init_one() 539 np->pci_dev = pdev; in fealnx_init_one() 540 np->flags = skel_netdrv_tbl[chip_id].flags; in fealnx_init_one() 542 np->mii.dev = dev; in fealnx_init_one() 543 np->mii.mdio_read = mdio_read; in fealnx_init_one() 544 np->mii.mdio_write = mdio_write; in fealnx_init_one() 545 np->mii.phy_id_mask = 0x1f; in fealnx_init_one() [all …]
|
/openbmc/linux/drivers/net/ethernet/dec/tulip/ |
H A D | winbond-840.c | 322 static void free_rxtx_rings(struct netdev_private *np); 326 static void free_ringdesc(struct netdev_private *np); 353 struct netdev_private *np; in w840_probe1() local 373 dev = alloc_etherdev(sizeof(*np)); in w840_probe1() 393 np = netdev_priv(dev); in w840_probe1() 394 np->pci_dev = pdev; in w840_probe1() 395 np->chip_id = chip_idx; in w840_probe1() 396 np->drv_flags = pci_id_tbl[chip_idx].drv_flags; in w840_probe1() 397 spin_lock_init(&np->lock); in w840_probe1() 398 np->mii_if.dev = dev; in w840_probe1() [all …]
|
/openbmc/linux/drivers/char/hw_random/ |
H A D | n2-drv.c | 147 static unsigned long n2rng_control_settle_v2(struct n2rng *np, int unit) in n2rng_control_settle_v2() argument 149 unsigned long ra = __pa(&np->scratch_control[0]); in n2rng_control_settle_v2() 154 static unsigned long n2rng_write_ctl_one(struct n2rng *np, int unit, in n2rng_write_ctl_one() argument 162 if (np->hvapi_major == 1) { in n2rng_write_ctl_one() 169 hv_err = n2rng_control_settle_v2(np, unit); in n2rng_write_ctl_one() 201 static unsigned long n2rng_read_diag_data_one(struct n2rng *np, in n2rng_read_diag_data_one() argument 209 if (np->hvapi_major == 1) { in n2rng_read_diag_data_one() 220 static int n2rng_generic_read_diag_data(struct n2rng *np, in n2rng_generic_read_diag_data() argument 229 hv_err = n2rng_read_diag_data_one(np, unit, in n2rng_generic_read_diag_data() 249 static int n2rng_generic_write_control(struct n2rng *np, in n2rng_generic_write_control() argument [all …]
|
/openbmc/linux/drivers/memory/ |
H A D | of_memory.c | 20 * @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 …]
|
/openbmc/linux/drivers/net/ethernet/adaptec/ |
H A D | starfire.c | 592 struct netdev_private *np = netdev_priv(dev); in netdev_vlan_rx_add_vid() local 594 spin_lock(&np->lock); in netdev_vlan_rx_add_vid() 597 set_bit(vid, np->active_vlans); in netdev_vlan_rx_add_vid() 599 spin_unlock(&np->lock); in netdev_vlan_rx_add_vid() 607 struct netdev_private *np = netdev_priv(dev); in netdev_vlan_rx_kill_vid() local 609 spin_lock(&np->lock); in netdev_vlan_rx_kill_vid() 612 clear_bit(vid, np->active_vlans); in netdev_vlan_rx_kill_vid() 614 spin_unlock(&np->lock); in netdev_vlan_rx_kill_vid() 641 struct netdev_private *np; in starfire_init_one() local 660 dev = alloc_etherdev(sizeof(*np)); in starfire_init_one() [all …]
|
/openbmc/linux/net/core/ |
H A D | netpoll.c | 66 #define np_info(np, fmt, ...) \ argument 67 pr_info("%s: " fmt, np->name, ##__VA_ARGS__) 68 #define np_err(np, fmt, ...) \ argument 69 pr_err("%s: " fmt, np->name, ##__VA_ARGS__) 70 #define np_notice(np, fmt, ...) \ argument 71 pr_notice("%s: " fmt, np->name, ##__VA_ARGS__) 288 static struct sk_buff *find_skb(struct netpoll *np, int len, int reserve) in find_skb() argument 303 netpoll_poll_dev(np->dev); in find_skb() 326 static netdev_tx_t __netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) in __netpoll_send_skb() argument 336 dev = np->dev; in __netpoll_send_skb() [all …]
|
/openbmc/linux/drivers/net/ethernet/natsemi/ |
H A D | natsemi.c | 205 Most operations are synchronized on the np->lock irq spinlock, except the 672 struct netdev_private *np = netdev_priv(to_net_dev(dev)); in natsemi_show_dspcfg_workaround() local 674 return sprintf(buf, "%s\n", np->dspcfg_workaround ? "on" : "off"); in natsemi_show_dspcfg_workaround() 681 struct netdev_private *np = netdev_priv(to_net_dev(dev)); in natsemi_set_dspcfg_workaround() local 694 spin_lock_irqsave(&np->lock, flags); in natsemi_set_dspcfg_workaround() 696 np->dspcfg_workaround = new_setting; in natsemi_set_dspcfg_workaround() 698 spin_unlock_irqrestore(&np->lock, flags); in natsemi_set_dspcfg_workaround() 705 struct netdev_private *np = netdev_priv(dev); in ns_ioaddr() local 707 return np->ioaddr; in ns_ioaddr() 724 struct netdev_private *np = netdev_priv(dev); in move_int_phy() local [all …]
|
/openbmc/u-boot/drivers/core/ |
H A D | of_access.c | 54 * @np: Pointer to device_node that the alias stands for 61 struct device_node *np; member 66 int of_n_addr_cells(const struct device_node *np) in of_n_addr_cells() argument 71 if (np->parent) in of_n_addr_cells() 72 np = np->parent; in of_n_addr_cells() 73 ip = of_get_property(np, "#address-cells", NULL); in of_n_addr_cells() 76 } while (np->parent); in of_n_addr_cells() 82 int of_n_size_cells(const struct device_node *np) in of_n_size_cells() argument 87 if (np->parent) in of_n_size_cells() 88 np = np->parent; in of_n_size_cells() [all …]
|
/openbmc/linux/drivers/video/ |
H A D | of_display_timing.c | 17 * @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 …]
|
/openbmc/linux/drivers/misc/cxl/ |
H A D | of.c | 16 static const __be32 *read_prop_string(const struct device_node *np, in read_prop_string() argument 21 prop = of_get_property(np, prop_name, NULL); in read_prop_string() 27 static const __be32 *read_prop_dword(const struct device_node *np, in read_prop_dword() argument 32 prop = of_get_property(np, prop_name, NULL); in read_prop_dword() 40 static const __be64 *read_prop64_dword(const struct device_node *np, in read_prop64_dword() argument 45 prop = of_get_property(np, prop_name, NULL); in read_prop64_dword() 54 static int read_handle(struct device_node *np, u64 *handle) in read_handle() argument 60 prop = of_get_address(np, 0, &size, NULL); in read_handle() 65 *handle = of_read_number(prop, of_n_addr_cells(np)); in read_handle() 69 static int read_phys_addr(struct device_node *np, char *prop_name, in read_phys_addr() argument [all …]
|
/openbmc/linux/drivers/of/ |
H A D | kobj.c | 63 int __of_add_property_sysfs(struct device_node *np, struct property *pp) in __of_add_property_sysfs() argument 73 if (!of_kset || !of_node_is_attached(np)) in __of_add_property_sysfs() 77 pp->attr.attr.name = safe_name(&np->kobj, pp->name); in __of_add_property_sysfs() 82 rc = sysfs_create_bin_file(&np->kobj, &pp->attr); in __of_add_property_sysfs() 83 WARN(rc, "error adding attribute %s to node %pOF\n", pp->name, np); in __of_add_property_sysfs() 87 void __of_sysfs_remove_bin_file(struct device_node *np, struct property *prop) in __of_sysfs_remove_bin_file() argument 92 sysfs_remove_bin_file(&np->kobj, &prop->attr); in __of_sysfs_remove_bin_file() 96 void __of_remove_property_sysfs(struct device_node *np, struct property *prop) in __of_remove_property_sysfs() argument 99 if (of_kset && of_node_is_attached(np)) in __of_remove_property_sysfs() 100 __of_sysfs_remove_bin_file(np, prop); in __of_remove_property_sysfs() [all …]
|
H A D | base.c | 58 bool of_node_name_eq(const struct device_node *np, const char *name) in of_node_name_eq() argument 63 if (!np) in of_node_name_eq() 66 node_name = kbasename(np->full_name); in of_node_name_eq() 73 bool of_node_name_prefix(const struct device_node *np, const char *prefix) in of_node_name_prefix() argument 75 if (!np) in of_node_name_prefix() 78 return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0; in of_node_name_prefix() 82 static bool __of_node_is_type(const struct device_node *np, const char *type) in __of_node_is_type() argument 84 const char *match = __of_get_property(np, "device_type", NULL); in __of_node_is_type() 86 return np && match && type && !strcmp(match, type); in __of_node_is_type() 89 int of_bus_n_addr_cells(struct device_node *np) in of_bus_n_addr_cells() argument [all …]
|
H A D | unittest.c | 82 struct device_node *np; in of_unittest_find_node_by_name() local 85 np = of_find_node_by_path("/testcase-data"); in of_unittest_find_node_by_name() 86 name = kasprintf(GFP_KERNEL, "%pOF", np); in of_unittest_find_node_by_name() 87 unittest(np && name && !strcmp("/testcase-data", name), in of_unittest_find_node_by_name() 89 of_node_put(np); in of_unittest_find_node_by_name() 93 np = of_find_node_by_path("/testcase-data/"); in of_unittest_find_node_by_name() 94 unittest(!np, "trailing '/' on /testcase-data/ should fail\n"); in of_unittest_find_node_by_name() 96 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); in of_unittest_find_node_by_name() 97 name = kasprintf(GFP_KERNEL, "%pOF", np); in of_unittest_find_node_by_name() 98 unittest(np && name && !strcmp("/testcase-data/phandle-tests/consumer-a", name), in of_unittest_find_node_by_name() [all …]
|
H A D | of_private.h | 17 * @np: Pointer to device_node that the alias stands for 27 struct device_node *np; member 46 extern int of_property_notify(int action, struct device_node *np, 56 static inline int of_property_notify(int action, struct device_node *np, in of_property_notify() argument 71 int __of_add_property_sysfs(struct device_node *np, struct property *pp); 72 void __of_remove_property_sysfs(struct device_node *np, struct property *prop); 73 void __of_update_property_sysfs(struct device_node *np, struct property *newprop, 75 int __of_attach_node_sysfs(struct device_node *np); 76 void __of_detach_node_sysfs(struct device_node *np); 78 static inline int __of_add_property_sysfs(struct device_node *np, struct property *pp) in __of_add_property_sysfs() argument [all …]
|
/openbmc/linux/include/linux/ |
H A D | of.h | 72 struct device_node *np; member 263 extern bool of_node_name_eq(const struct device_node *np, const char *name); 264 extern bool of_node_name_prefix(const struct device_node *np, const char *prefix); 266 static inline const char *of_node_full_name(const struct device_node *np) in of_node_full_name() argument 268 return np ? np->full_name : "<no-node>"; in of_node_full_name() 311 extern struct property *of_find_property(const struct device_node *np, 314 extern int of_property_count_elems_of_size(const struct device_node *np, 316 extern int of_property_read_u32_index(const struct device_node *np, 319 extern int of_property_read_u64_index(const struct device_node *np, 322 extern int of_property_read_variable_u8_array(const struct device_node *np, [all …]
|
/openbmc/u-boot/drivers/net/phy/ |
H A D | ncsi.c | 32 static void ncsi_send_ebf(unsigned int np, unsigned int nc); 33 static void ncsi_send_ae(unsigned int np, unsigned int nc); 34 static void ncsi_send_gls(unsigned int np, unsigned int nc); 35 static int ncsi_send_command(unsigned int np, unsigned int nc, unsigned int cmd, 92 unsigned int np, nc; in ncsi_active() local 97 np = ncsi_priv->current_package; in ncsi_active() 103 return np < NCSI_PACKAGE_MAX && nc < NCSI_CHANNEL_MAX && in ncsi_active() 104 ncsi_priv->packages[np].channels[nc].has_link; in ncsi_active() 226 unsigned int np, nc; in ncsi_rsp_ec() local 228 np = NCSI_PACKAGE_INDEX(rsp->common.channel); in ncsi_rsp_ec() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | eeprom.c | 15 struct device_node *np = dev->dev->of_node; in mt76_get_of_eeprom_data() local 19 data = of_get_property(np, "mediatek,eeprom-data", &size); in mt76_get_of_eeprom_data() 34 struct device_node *np = dev->dev->of_node; in mt76_get_of_epprom_from_mtd() local 43 list = of_get_property(np, "mediatek,mtd-eeprom", &size); in mt76_get_of_epprom_from_mtd() 51 np = of_find_node_by_phandle(phandle); in mt76_get_of_epprom_from_mtd() 52 if (!np) in mt76_get_of_epprom_from_mtd() 55 part = of_get_property(np, "label", NULL); in mt76_get_of_epprom_from_mtd() 57 part = np->name; in mt76_get_of_epprom_from_mtd() 102 of_node_put(np); in mt76_get_of_epprom_from_mtd() 111 struct device_node *np = dev->dev->of_node; in mt76_get_of_eeprom_from_nvmem() local [all …]
|
/openbmc/linux/arch/powerpc/kernel/ |
H A D | legacy_serial.c | 33 struct device_node *np; member 75 static int __init add_legacy_port(struct device_node *np, int want_index, in add_legacy_port() argument 86 clk = of_get_property(np, "clock-frequency", NULL); in add_legacy_port() 91 spd = of_get_property(np, "current-speed", NULL); in add_legacy_port() 94 rs = of_get_property(np, "reg-shift", NULL); in add_legacy_port() 114 if (legacy_serial_infos[index].np != NULL) { in add_legacy_port() 143 legacy_serial_infos[index].np = of_node_get(np); in add_legacy_port() 154 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 …]
|