Home
last modified time | relevance | path

Searched refs:np (Results 1 – 200 of 1379) sorted by relevance

1234567

/linux-4.1.27/drivers/scsi/sym53c8xx_2/
Dsym_hipd.c54 static void sym_int_ma (struct sym_hcb *np);
56 static struct sym_ccb *sym_alloc_ccb(struct sym_hcb *np);
57 static struct sym_ccb *sym_ccb_from_dsa(struct sym_hcb *np, u32 dsa);
58 static void sym_alloc_lcb_tags (struct sym_hcb *np, u_char tn, u_char ln);
59 static void sym_complete_error (struct sym_hcb *np, struct sym_ccb *cp);
60 static void sym_complete_ok (struct sym_hcb *np, struct sym_ccb *cp);
61 static int sym_compute_residual(struct sym_hcb *np, struct sym_ccb *cp);
81 static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_char *msg) in sym_print_nego_msg() argument
83 struct sym_tcb *tp = &np->target[target]; in sym_print_nego_msg()
133 static void sym_chip_reset (struct sym_hcb *np) in sym_chip_reset() argument
[all …]
Dsym_nvram.c50 void sym_nvram_setup_host(struct Scsi_Host *shost, struct sym_hcb *np, struct sym_nvram *nvram) in sym_nvram_setup_host() argument
59 np->rv_scntl0 &= ~0x0a; in sym_nvram_setup_host()
60 np->myaddr = nvram->data.Symbios.host_id & 0x0f; in sym_nvram_setup_host()
62 np->verbose += 1; in sym_nvram_setup_host()
66 np->usrflags |= SYM_AVOID_BUS_RESET; in sym_nvram_setup_host()
69 np->myaddr = nvram->data.Tekram.host_id & 0x0f; in sym_nvram_setup_host()
74 np->myaddr = nvram->data.parisc.host_id; in sym_nvram_setup_host()
76 np->minsync = nvram->data.parisc.factor; in sym_nvram_setup_host()
78 np->maxwide = nvram->data.parisc.width; in sym_nvram_setup_host()
80 case 0: np->scsi_mode = SMODE_SE; break; in sym_nvram_setup_host()
[all …]
Dsym_fw.c109 struct sym_hcb *np = sym_get_hcb(shost); in sym_fw1_patch() local
113 scripta0 = (struct sym_fw1a_scr *) np->scripta0; in sym_fw1_patch()
114 scriptb0 = (struct sym_fw1b_scr *) np->scriptb0; in sym_fw1_patch()
119 if (!(np->features & FE_LED0)) { in sym_fw1_patch()
139 scriptb0->startpos[0] = cpu_to_scr(np->squeue_ba); in sym_fw1_patch()
140 scriptb0->done_pos[0] = cpu_to_scr(np->dqueue_ba); in sym_fw1_patch()
141 scriptb0->targtbl[0] = cpu_to_scr(np->targtbl_ba); in sym_fw1_patch()
153 struct sym_hcb *np = sym_data->ncb; in sym_fw2_patch() local
157 scripta0 = (struct sym_fw2a_scr *) np->scripta0; in sym_fw2_patch()
158 scriptb0 = (struct sym_fw2b_scr *) np->scriptb0; in sym_fw2_patch()
[all …]
Dsym_hipd.h88 #define sym_verbose (np->verbose)
197 #define INB_OFF(np, o) ioread8(np->s.ioaddr + (o)) argument
198 #define INW_OFF(np, o) ioread16(np->s.ioaddr + (o)) argument
199 #define INL_OFF(np, o) ioread32(np->s.ioaddr + (o)) argument
201 #define OUTB_OFF(np, o, val) iowrite8((val), np->s.ioaddr + (o)) argument
202 #define OUTW_OFF(np, o, val) iowrite16((val), np->s.ioaddr + (o)) argument
203 #define OUTL_OFF(np, o, val) iowrite32((val), np->s.ioaddr + (o)) argument
205 #define INB(np, r) INB_OFF(np, offsetof(struct sym_reg, r)) argument
206 #define INW(np, r) INW_OFF(np, offsetof(struct sym_reg, r)) argument
207 #define INL(np, r) INL_OFF(np, offsetof(struct sym_reg, r)) argument
[all …]
Dsym_glue.c140 void sym_xpt_done(struct sym_hcb *np, struct scsi_cmnd *cmd) in sym_xpt_done() argument
155 void sym_xpt_async_bus_reset(struct sym_hcb *np) in sym_xpt_async_bus_reset() argument
157 printf_notice("%s: SCSI BUS has been reset.\n", sym_name(np)); in sym_xpt_async_bus_reset()
158 np->s.settle_time = jiffies + sym_driver_setup.settle_delay * HZ; in sym_xpt_async_bus_reset()
159 np->s.settle_time_valid = 1; in sym_xpt_async_bus_reset()
162 sym_name(np), sym_driver_setup.settle_delay); in sym_xpt_async_bus_reset()
187 void sym_set_cam_result_error(struct sym_hcb *np, struct sym_ccb *cp, int resid) in sym_set_cam_result_error() argument
223 sym_clear_tasks(np, DID_ABORT, in sym_set_cam_result_error()
234 sym_reset_scsi_target(np, cmd->device->id); in sym_set_cam_result_error()
258 static int sym_scatter(struct sym_hcb *np, struct sym_ccb *cp, struct scsi_cmnd *cmd) in sym_scatter() argument
[all …]
/linux-4.1.27/drivers/net/ethernet/
Dfealnx.c483 struct netdev_private *np; in fealnx_init_one() local
549 np = netdev_priv(dev); in fealnx_init_one()
550 np->mem = ioaddr; in fealnx_init_one()
551 spin_lock_init(&np->lock); in fealnx_init_one()
552 np->pci_dev = pdev; in fealnx_init_one()
553 np->flags = skel_netdrv_tbl[chip_id].flags; in fealnx_init_one()
555 np->mii.dev = dev; in fealnx_init_one()
556 np->mii.mdio_read = mdio_read; in fealnx_init_one()
557 np->mii.mdio_write = mdio_write; in fealnx_init_one()
558 np->mii.phy_id_mask = 0x1f; in fealnx_init_one()
[all …]
/linux-4.1.27/drivers/net/ethernet/nvidia/
Dforcedeth.c964 static bool nv_optimized(struct fe_priv *np) in nv_optimized() argument
966 if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) in nv_optimized()
1001 struct fe_priv *np = get_nvpriv(dev); in setup_hw_rings() local
1004 if (!nv_optimized(np)) { in setup_hw_rings()
1006 writel(dma_low(np->ring_addr), base + NvRegRxRingPhysAddr); in setup_hw_rings()
1008 …writel(dma_low(np->ring_addr + np->rx_ring_size*sizeof(struct ring_desc)), base + NvRegTxRingPhysA… in setup_hw_rings()
1011 writel(dma_low(np->ring_addr), base + NvRegRxRingPhysAddr); in setup_hw_rings()
1012 writel(dma_high(np->ring_addr), base + NvRegRxRingPhysAddrHigh); in setup_hw_rings()
1015 …writel(dma_low(np->ring_addr + np->rx_ring_size*sizeof(struct ring_desc_ex)), base + NvRegTxRingPh… in setup_hw_rings()
1016 …writel(dma_high(np->ring_addr + np->rx_ring_size*sizeof(struct ring_desc_ex)), base + NvRegTxRingP… in setup_hw_rings()
[all …]
/linux-4.1.27/drivers/isdn/capi/
Dcapilib.c31 static inline void mq_init(struct capilib_ncci *np) in mq_init() argument
34 np->msgidqueue = NULL; in mq_init()
35 np->msgidlast = NULL; in mq_init()
36 np->nmsg = 0; in mq_init()
37 memset(np->msgidpool, 0, sizeof(np->msgidpool)); in mq_init()
38 np->msgidfree = &np->msgidpool[0]; in mq_init()
39 for (i = 1; i < np->winsize; i++) { in mq_init()
40 np->msgidpool[i].next = np->msgidfree; in mq_init()
41 np->msgidfree = &np->msgidpool[i]; in mq_init()
45 static inline int mq_enqueue(struct capilib_ncci *np, u16 msgid) in mq_enqueue() argument
[all …]
/linux-4.1.27/drivers/char/hw_random/
Dn2-drv.c146 static unsigned long n2rng_control_settle_v2(struct n2rng *np, int unit) in n2rng_control_settle_v2() argument
148 unsigned long ra = __pa(&np->scratch_control[0]); in n2rng_control_settle_v2()
153 static unsigned long n2rng_write_ctl_one(struct n2rng *np, int unit, in n2rng_write_ctl_one() argument
161 if (np->hvapi_major == 1) { in n2rng_write_ctl_one()
168 hv_err = n2rng_control_settle_v2(np, unit); in n2rng_write_ctl_one()
200 static unsigned long n2rng_read_diag_data_one(struct n2rng *np, in n2rng_read_diag_data_one() argument
208 if (np->hvapi_major == 1) { in n2rng_read_diag_data_one()
219 static int n2rng_generic_read_diag_data(struct n2rng *np, in n2rng_generic_read_diag_data() argument
228 hv_err = n2rng_read_diag_data_one(np, unit, in n2rng_generic_read_diag_data()
248 static int n2rng_generic_write_control(struct n2rng *np, in n2rng_generic_write_control() argument
[all …]
/linux-4.1.27/drivers/net/ethernet/dec/tulip/
Dwinbond-840.c332 static void free_rxtx_rings(struct netdev_private *np);
336 static void free_ringdesc(struct netdev_private *np);
364 struct netdev_private *np; in w840_probe1() local
383 dev = alloc_etherdev(sizeof(*np)); in w840_probe1()
402 np = netdev_priv(dev); in w840_probe1()
403 np->pci_dev = pdev; in w840_probe1()
404 np->chip_id = chip_idx; in w840_probe1()
405 np->drv_flags = pci_id_tbl[chip_idx].drv_flags; in w840_probe1()
406 spin_lock_init(&np->lock); in w840_probe1()
407 np->mii_if.dev = dev; in w840_probe1()
[all …]
/linux-4.1.27/drivers/net/ethernet/dlink/
Ddl2k.c60 static void dl2k_enable_int(struct netdev_private *np) in dl2k_enable_int() argument
62 void __iomem *ioaddr = np->ioaddr; in dl2k_enable_int()
117 struct netdev_private *np; in rio_probe1() local
142 dev = alloc_etherdev (sizeof (*np)); in rio_probe1()
147 np = netdev_priv(dev); in rio_probe1()
153 np->eeprom_addr = ioaddr; in rio_probe1()
161 np->ioaddr = ioaddr; in rio_probe1()
162 np->chip_id = chip_idx; in rio_probe1()
163 np->pdev = pdev; in rio_probe1()
164 spin_lock_init (&np->tx_lock); in rio_probe1()
[all …]
Dsundance.c455 struct netdev_private *np = netdev_priv(dev); in sundance_reset() local
456 void __iomem *ioaddr = np->base + ASICCtrl; in sundance_reset()
475 struct netdev_private *np = netdev_priv(dev); in sundance_poll_controller() local
477 disable_irq(np->pci_dev->irq); in sundance_poll_controller()
478 intr_handler(np->pci_dev->irq, dev); in sundance_poll_controller()
479 enable_irq(np->pci_dev->irq); in sundance_poll_controller()
503 struct netdev_private *np; in sundance_probe1() local
532 dev = alloc_etherdev(sizeof(*np)); in sundance_probe1()
548 np = netdev_priv(dev); in sundance_probe1()
549 np->base = ioaddr; in sundance_probe1()
[all …]
/linux-4.1.27/drivers/net/ethernet/sun/
Dniu.c71 #define nr64(reg) readq(np->regs + (reg))
72 #define nw64(reg, val) writeq((val), np->regs + (reg))
74 #define nr64_mac(reg) readq(np->mac_regs + (reg))
75 #define nw64_mac(reg, val) writeq((val), np->mac_regs + (reg))
77 #define nr64_ipp(reg) readq(np->regs + np->ipp_off + (reg))
78 #define nw64_ipp(reg, val) writeq((val), np->regs + np->ipp_off + (reg))
80 #define nr64_pcs(reg) readq(np->regs + np->pcs_off + (reg))
81 #define nw64_pcs(reg, val) writeq((val), np->regs + np->pcs_off + (reg))
83 #define nr64_xpcs(reg) readq(np->regs + np->xpcs_off + (reg))
84 #define nw64_xpcs(reg, val) writeq((val), np->regs + np->xpcs_off + (reg))
[all …]
/linux-4.1.27/drivers/net/ethernet/adaptec/
Dstarfire.c600 struct netdev_private *np = netdev_priv(dev); in netdev_vlan_rx_add_vid() local
602 spin_lock(&np->lock); in netdev_vlan_rx_add_vid()
605 set_bit(vid, np->active_vlans); in netdev_vlan_rx_add_vid()
607 spin_unlock(&np->lock); in netdev_vlan_rx_add_vid()
615 struct netdev_private *np = netdev_priv(dev); in netdev_vlan_rx_kill_vid() local
617 spin_lock(&np->lock); in netdev_vlan_rx_kill_vid()
620 clear_bit(vid, np->active_vlans); in netdev_vlan_rx_kill_vid()
622 spin_unlock(&np->lock); in netdev_vlan_rx_kill_vid()
650 struct netdev_private *np; in starfire_init_one() local
675 dev = alloc_etherdev(sizeof(*np)); in starfire_init_one()
[all …]
/linux-4.1.27/drivers/net/ethernet/natsemi/
Dnatsemi.c670 struct netdev_private *np = netdev_priv(to_net_dev(dev)); in natsemi_show_dspcfg_workaround() local
672 return sprintf(buf, "%s\n", np->dspcfg_workaround ? "on" : "off"); in natsemi_show_dspcfg_workaround()
679 struct netdev_private *np = netdev_priv(to_net_dev(dev)); in natsemi_set_dspcfg_workaround() local
692 spin_lock_irqsave(&np->lock, flags); in natsemi_set_dspcfg_workaround()
694 np->dspcfg_workaround = new_setting; in natsemi_set_dspcfg_workaround()
696 spin_unlock_irqrestore(&np->lock, flags); in natsemi_set_dspcfg_workaround()
703 struct netdev_private *np = netdev_priv(dev); in ns_ioaddr() local
705 return np->ioaddr; in ns_ioaddr()
722 struct netdev_private *np = netdev_priv(dev); in move_int_phy() local
738 if (target == np->phy_addr_external) in move_int_phy()
[all …]
/linux-4.1.27/drivers/of/
Dunittest.c49 struct device_node *np; in of_unittest_find_node_by_name() local
52 np = of_find_node_by_path("/testcase-data"); in of_unittest_find_node_by_name()
53 unittest(np && !strcmp("/testcase-data", np->full_name), in of_unittest_find_node_by_name()
55 of_node_put(np); in of_unittest_find_node_by_name()
58 np = of_find_node_by_path("/testcase-data/"); in of_unittest_find_node_by_name()
59 unittest(!np, "trailing '/' on /testcase-data/ should fail\n"); in of_unittest_find_node_by_name()
61 np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-a"); in of_unittest_find_node_by_name()
62 unittest(np && !strcmp("/testcase-data/phandle-tests/consumer-a", np->full_name), in of_unittest_find_node_by_name()
64 of_node_put(np); in of_unittest_find_node_by_name()
66 np = of_find_node_by_path("testcase-alias"); in of_unittest_find_node_by_name()
[all …]
Dbase.c57 int of_n_addr_cells(struct device_node *np) in of_n_addr_cells() argument
62 if (np->parent) in of_n_addr_cells()
63 np = np->parent; in of_n_addr_cells()
64 ip = of_get_property(np, "#address-cells", NULL); in of_n_addr_cells()
67 } while (np->parent); in of_n_addr_cells()
73 int of_n_size_cells(struct device_node *np) in of_n_size_cells() argument
78 if (np->parent) in of_n_size_cells()
79 np = np->parent; in of_n_size_cells()
80 ip = of_get_property(np, "#size-cells", NULL); in of_n_size_cells()
83 } while (np->parent); in of_n_size_cells()
[all …]
Ddynamic.c44 void __of_detach_node_sysfs(struct device_node *np) in __of_detach_node_sysfs() argument
51 BUG_ON(!of_node_is_initialized(np)); in __of_detach_node_sysfs()
56 if (of_node_is_attached(np)) { in __of_detach_node_sysfs()
57 for_each_property_of_node(np, pp) in __of_detach_node_sysfs()
58 sysfs_remove_bin_file(&np->kobj, &pp->attr); in __of_detach_node_sysfs()
59 kobject_del(&np->kobj); in __of_detach_node_sysfs()
63 of_node_put(np); in __of_detach_node_sysfs()
202 int of_property_notify(int action, struct device_node *np, in of_property_notify() argument
208 if (!of_node_is_attached(np)) in of_property_notify()
211 pr.dn = np; in of_property_notify()
[all …]
Dof_private.h29 struct device_node *np; member
45 extern int of_property_notify(int action, struct device_node *np,
49 static inline int of_property_notify(int action, struct device_node *np, in of_property_notify() argument
64 __printf(2, 3) struct device_node *__of_node_dup(const struct device_node *np, const char *fmt, ...…
66 extern const void *__of_get_property(const struct device_node *np,
68 extern int __of_add_property(struct device_node *np, struct property *prop);
69 extern int __of_add_property_sysfs(struct device_node *np,
71 extern int __of_remove_property(struct device_node *np, struct property *prop);
72 extern void __of_remove_property_sysfs(struct device_node *np,
74 extern int __of_update_property(struct device_node *np,
[all …]
Dof_mtd.c35 int of_get_nand_ecc_mode(struct device_node *np) in of_get_nand_ecc_mode() argument
40 err = of_property_read_string(np, "nand-ecc-mode", &pm); in of_get_nand_ecc_mode()
59 int of_get_nand_ecc_step_size(struct device_node *np) in of_get_nand_ecc_step_size() argument
64 ret = of_property_read_u32(np, "nand-ecc-step-size", &val); in of_get_nand_ecc_step_size()
76 int of_get_nand_ecc_strength(struct device_node *np) in of_get_nand_ecc_strength() argument
81 ret = of_property_read_u32(np, "nand-ecc-strength", &val); in of_get_nand_ecc_strength()
92 int of_get_nand_bus_width(struct device_node *np) in of_get_nand_bus_width() argument
96 if (of_property_read_u32(np, "nand-bus-width", &val)) in of_get_nand_bus_width()
115 bool of_get_nand_on_flash_bbt(struct device_node *np) in of_get_nand_on_flash_bbt() argument
117 return of_property_read_bool(np, "nand-on-flash-bbt"); in of_get_nand_on_flash_bbt()
Dof_net.c22 int of_get_phy_mode(struct device_node *np) in of_get_phy_mode() argument
27 err = of_property_read_string(np, "phy-mode", &pm); in of_get_phy_mode()
29 err = of_property_read_string(np, "phy-connection-type", &pm); in of_get_phy_mode()
41 static const void *of_get_mac_addr(struct device_node *np, const char *name) in of_get_mac_addr() argument
43 struct property *pp = of_find_property(np, name, NULL); in of_get_mac_addr()
68 const void *of_get_mac_address(struct device_node *np) in of_get_mac_address() argument
72 addr = of_get_mac_addr(np, "mac-address"); in of_get_mac_address()
76 addr = of_get_mac_addr(np, "local-mac-address"); in of_get_mac_address()
80 return of_get_mac_addr(np, "address"); in of_get_mac_address()
Dof_mdio.c91 int of_mdio_parse_addr(struct device *dev, const struct device_node *np) in of_mdio_parse_addr() argument
96 ret = of_property_read_u32(np, "reg", &addr); in of_mdio_parse_addr()
98 dev_err(dev, "%s has invalid PHY address\n", np->full_name); in of_mdio_parse_addr()
105 np->full_name, addr); in of_mdio_parse_addr()
121 int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) in of_mdiobus_register() argument
137 mdio->dev.of_node = np; in of_mdiobus_register()
145 for_each_available_child_of_node(np, child) { in of_mdiobus_register()
161 for_each_available_child_of_node(np, child) { in of_mdiobus_register()
263 bool of_phy_is_fixed_link(struct device_node *np) in of_phy_is_fixed_link() argument
270 dn = of_get_child_by_name(np, "fixed-link"); in of_phy_is_fixed_link()
[all …]
Dplatform.c46 struct platform_device *of_find_device_by_node(struct device_node *np) in of_find_device_by_node() argument
50 dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match); in of_find_device_by_node()
105 struct platform_device *of_device_alloc(struct device_node *np, in of_device_alloc() argument
118 while (of_address_to_resource(np, num_reg, &temp_res) == 0) in of_device_alloc()
120 num_irq = of_irq_count(np); in of_device_alloc()
133 rc = of_address_to_resource(np, i, res); in of_device_alloc()
136 if (of_irq_to_resource_table(np, res, num_irq) != num_irq) in of_device_alloc()
138 np->name); in of_device_alloc()
141 dev->dev.of_node = of_node_get(np); in of_device_alloc()
169 struct device_node *np, in of_platform_device_create_pdata() argument
[all …]
/linux-4.1.27/drivers/scsi/
Dncr53c8xx.c513 #define _m_calloc_dma(np, s, n) __m_calloc_dma(np->dev, s, n) argument
514 #define _m_free_dma(np, p, s, n) __m_free_dma(np->dev, p, s, n) argument
515 #define m_calloc_dma(s, n) _m_calloc_dma(np, s, n)
516 #define m_free_dma(p, s, n) _m_free_dma(np, p, s, n)
517 #define _vtobus(np, p) __vtobus(np->dev, p) argument
518 #define vtobus(p) _vtobus(np, p)
552 #define unmap_scsi_data(np, cmd) __unmap_scsi_data(np->dev, cmd) argument
553 #define map_scsi_sg_data(np, cmd) __map_scsi_sg_data(np->dev, cmd) argument
576 #define bootverbose (np->verbose)
1016 #define bootverbose (np->verbose)
[all …]
/linux-4.1.27/net/core/
Dnetpoll.c65 #define np_info(np, fmt, ...) \ argument
66 pr_info("%s: " fmt, np->name, ##__VA_ARGS__)
67 #define np_err(np, fmt, ...) \ argument
68 pr_err("%s: " fmt, np->name, ##__VA_ARGS__)
69 #define np_notice(np, fmt, ...) \ argument
70 pr_notice("%s: " fmt, np->name, ##__VA_ARGS__)
280 static struct sk_buff *find_skb(struct netpoll *np, int len, int reserve) in find_skb() argument
295 netpoll_poll_dev(np->dev); in find_skb()
318 void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, in netpoll_send_skb_on_dev() argument
328 npinfo = rcu_dereference_bh(np->dev->npinfo); in netpoll_send_skb_on_dev()
[all …]
/linux-4.1.27/drivers/video/
Dof_display_timing.c26 static int parse_timing_property(const struct device_node *np, const char *name, in parse_timing_property() argument
32 prop = of_find_property(np, name, &length); in parse_timing_property()
35 of_node_full_name(np), name); in parse_timing_property()
41 ret = of_property_read_u32(np, name, &result->typ); in parse_timing_property()
45 ret = of_property_read_u32_array(np, name, &result->min, cells); in parse_timing_property()
48 of_node_full_name(np), name); in parse_timing_property()
59 static int of_parse_display_timing(const struct device_node *np, in of_parse_display_timing() argument
67 ret |= parse_timing_property(np, "hback-porch", &dt->hback_porch); in of_parse_display_timing()
68 ret |= parse_timing_property(np, "hfront-porch", &dt->hfront_porch); in of_parse_display_timing()
69 ret |= parse_timing_property(np, "hactive", &dt->hactive); in of_parse_display_timing()
[all …]
/linux-4.1.27/arch/powerpc/sysdev/
Dmv64x60_dev.c34 static int __init mv64x60_mpsc_register_shared_pdev(struct device_node *np) in mv64x60_mpsc_register_shared_pdev() argument
43 ph = of_get_property(np, "mpscrouting", NULL); in mv64x60_mpsc_register_shared_pdev()
53 ph = of_get_property(np, "mpscintr", NULL); in mv64x60_mpsc_register_shared_pdev()
89 static int __init mv64x60_mpsc_device_setup(struct device_node *np, int id) in mv64x60_mpsc_device_setup() argument
101 if (id == 0 && (err = mv64x60_mpsc_register_shared_pdev(np))) in mv64x60_mpsc_device_setup()
106 err = of_address_to_resource(np, 0, &r[0]); in mv64x60_mpsc_device_setup()
110 of_irq_to_resource(np, 0, &r[4]); in mv64x60_mpsc_device_setup()
112 ph = of_get_property(np, "sdma", NULL); in mv64x60_mpsc_device_setup()
123 ph = of_get_property(np, "brg", NULL); in mv64x60_mpsc_device_setup()
133 prop = of_get_property(np, "cell-index", NULL); in mv64x60_mpsc_device_setup()
[all …]
Dppc4xx_soc.c76 struct device_node *np; in ppc4xx_l2c_probe() local
86 np = of_find_compatible_node(NULL, NULL, "ibm,l2-cache"); in ppc4xx_l2c_probe()
87 if (!np) in ppc4xx_l2c_probe()
91 prop = of_get_property(np, "cache-size", NULL); in ppc4xx_l2c_probe()
93 printk(KERN_ERR "%s: Can't get cache-size!\n", np->full_name); in ppc4xx_l2c_probe()
94 of_node_put(np); in ppc4xx_l2c_probe()
100 dcrreg = of_get_property(np, "dcr-reg", &len); in ppc4xx_l2c_probe()
103 np->full_name); in ppc4xx_l2c_probe()
104 of_node_put(np); in ppc4xx_l2c_probe()
111 irq = irq_of_parse_and_map(np, 0); in ppc4xx_l2c_probe()
[all …]
Drtc_cmos_setup.c22 struct device_node *np; in add_rtc() local
30 np = of_find_compatible_node(NULL, NULL, "pnpPNP,b00"); in add_rtc()
31 if (!np) in add_rtc()
34 ret = of_address_to_resource(np, 0, &res[0]); in add_rtc()
35 of_node_put(np); in add_rtc()
46 np = of_find_compatible_node(NULL, NULL, "chrp,iic"); in add_rtc()
47 if (!np) in add_rtc()
48 np = of_find_compatible_node(NULL, NULL, "pnpPNP,000"); in add_rtc()
49 if (np) { in add_rtc()
50 of_node_put(np); in add_rtc()
Dppc4xx_cpm.c248 static int cpm_get_uint_property(struct device_node *np, in cpm_get_uint_property() argument
252 const unsigned int *prop = of_get_property(np, name, &len); in cpm_get_uint_property()
262 struct device_node *np; in cpm_init() local
271 np = of_find_compatible_node(NULL, NULL, "ibm,cpm"); in cpm_init()
272 if (!np) { in cpm_init()
277 dcr_base = dcr_resource_start(np, 0); in cpm_init()
278 dcr_len = dcr_resource_len(np, 0); in cpm_init()
282 np->full_name); in cpm_init()
287 cpm.dcr_host = dcr_map(np, dcr_base, dcr_len); in cpm_init()
291 np->full_name); in cpm_init()
[all …]
Dmv64x60_udbg.c72 struct device_node *np, *mpscintr, *stdout = NULL; in mv64x60_udbg_init() local
88 for_each_compatible_node(np, NULL, "marvell,mv64360-mpsc") { in mv64x60_udbg_init()
89 if (np == stdout) in mv64x60_udbg_init()
94 if (!np) in mv64x60_udbg_init()
97 block_index = of_get_property(np, "cell-index", NULL); in mv64x60_udbg_init()
112 err = of_address_to_resource(np, 0, &r[0]); in mv64x60_udbg_init()
116 ph = of_get_property(np, "mpscintr", NULL); in mv64x60_udbg_init()
126 of_node_put(np); in mv64x60_udbg_init()
146 of_node_put(np); in mv64x60_udbg_init()
Dtsi108_dev.c68 struct device_node *np; in tsi108_eth_of_init() local
74 for_each_compatible_node(np, "network", "tsi108-ethernet") { in tsi108_eth_of_init()
85 ret = of_address_to_resource(np, 0, &r[0]); in tsi108_eth_of_init()
92 r[1].start = irq_of_parse_and_map(np, 0); in tsi108_eth_of_init()
93 r[1].end = irq_of_parse_and_map(np, 0); in tsi108_eth_of_init()
107 mac_addr = of_get_mac_address(np); in tsi108_eth_of_init()
111 ph = of_get_property(np, "mdio-handle", NULL); in tsi108_eth_of_init()
118 ph = of_get_property(np, "phy-handle", NULL); in tsi108_eth_of_init()
131 tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0); in tsi108_eth_of_init()
155 of_node_put(np); in tsi108_eth_of_init()
Dcpm1.c133 struct device_node *np = NULL; in cpm_pic_init() local
140 np = of_find_compatible_node(NULL, NULL, "fsl,cpm1-pic"); in cpm_pic_init()
141 if (np == NULL) in cpm_pic_init()
142 np = of_find_compatible_node(NULL, "cpm-pic", "CPM"); in cpm_pic_init()
143 if (np == NULL) { in cpm_pic_init()
148 ret = of_address_to_resource(np, 0, &res); in cpm_pic_init()
156 sirq = irq_of_parse_and_map(np, 0); in cpm_pic_init()
168 cpm_pic_host = irq_domain_add_linear(np, 64, &cpm_pic_host_ops, NULL); in cpm_pic_init()
176 np = of_find_compatible_node(NULL, NULL, "fsl,cpm1"); in cpm_pic_init()
177 if (np == NULL) in cpm_pic_init()
[all …]
Dppc4xx_pci.c99 int np = pna + 5; in ppc4xx_parse_dma_ranges() local
113 while ((rlen -= np * 4) >= 0) { in ppc4xx_parse_dma_ranges()
118 ranges += np; in ppc4xx_parse_dma_ranges()
323 static void __init ppc4xx_probe_pci_bridge(struct device_node *np) in ppc4xx_probe_pci_bridge() argument
335 if (!of_device_is_available(np)) { in ppc4xx_probe_pci_bridge()
337 np->full_name); in ppc4xx_probe_pci_bridge()
342 if (of_address_to_resource(np, 0, &rsrc_cfg)) { in ppc4xx_probe_pci_bridge()
344 np->full_name); in ppc4xx_probe_pci_bridge()
348 if (of_address_to_resource(np, 3, &rsrc_reg)) { in ppc4xx_probe_pci_bridge()
350 np->full_name); in ppc4xx_probe_pci_bridge()
[all …]
Dmv64x60_pci.c85 struct device_node *np; in mv64x60_sysfs_init() local
89 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360"); in mv64x60_sysfs_init()
90 if (!np) in mv64x60_sysfs_init()
93 prop = of_get_property(np, "hs_reg_valid", NULL); in mv64x60_sysfs_init()
94 of_node_put(np); in mv64x60_sysfs_init()
167 struct device_node *np; in mv64x60_pci_init() local
169 for_each_compatible_node(np, "pci", "marvell,mv64360-pci") in mv64x60_pci_init()
170 mv64x60_add_bridge(np); in mv64x60_pci_init()
Dmpc8xx_pic.c131 struct device_node *np; in mpc8xx_pic_init() local
134 np = of_find_compatible_node(NULL, NULL, "fsl,pq1-pic"); in mpc8xx_pic_init()
135 if (np == NULL) in mpc8xx_pic_init()
136 np = of_find_node_by_type(NULL, "mpc8xx-pic"); in mpc8xx_pic_init()
137 if (np == NULL) { in mpc8xx_pic_init()
142 ret = of_address_to_resource(np, 0, &res); in mpc8xx_pic_init()
152 mpc8xx_pic_host = irq_domain_add_linear(np, 64, &mpc8xx_pic_host_ops, NULL); in mpc8xx_pic_init()
161 of_node_put(np); in mpc8xx_pic_init()
Dsimple_gpio.c88 static int __init u8_simple_gpiochip_add(struct device_node *np) in u8_simple_gpiochip_add() argument
111 ret = of_mm_gpiochip_add(np, mm_gc); in u8_simple_gpiochip_add()
122 struct device_node *np; in simple_gpiochip_init() local
124 for_each_compatible_node(np, NULL, compatible) { in simple_gpiochip_init()
128 ret = of_address_to_resource(np, 0, &r); in simple_gpiochip_init()
134 ret = u8_simple_gpiochip_add(np); in simple_gpiochip_init()
150 np->full_name, ret); in simple_gpiochip_init()
/linux-4.1.27/drivers/memory/
Dof_memory.c30 const struct lpddr2_min_tck *of_get_min_tck(struct device_node *np, in of_get_min_tck() argument
40 ret |= of_property_read_u32(np, "tRPab-min-tck", &min->tRPab); in of_get_min_tck()
41 ret |= of_property_read_u32(np, "tRCD-min-tck", &min->tRCD); in of_get_min_tck()
42 ret |= of_property_read_u32(np, "tWR-min-tck", &min->tWR); in of_get_min_tck()
43 ret |= of_property_read_u32(np, "tRASmin-min-tck", &min->tRASmin); in of_get_min_tck()
44 ret |= of_property_read_u32(np, "tRRD-min-tck", &min->tRRD); in of_get_min_tck()
45 ret |= of_property_read_u32(np, "tWTR-min-tck", &min->tWTR); in of_get_min_tck()
46 ret |= of_property_read_u32(np, "tXP-min-tck", &min->tXP); in of_get_min_tck()
47 ret |= of_property_read_u32(np, "tRTP-min-tck", &min->tRTP); in of_get_min_tck()
48 ret |= of_property_read_u32(np, "tCKE-min-tck", &min->tCKE); in of_get_min_tck()
[all …]
Dti-aemif.c264 struct device_node *np) in of_aemif_parse_abus_config() argument
271 if (of_property_read_u32(np, "ti,cs-chipselect", &cs)) { in of_aemif_parse_abus_config()
293 if (!of_property_read_u32(np, "ti,cs-min-turnaround-ns", &val)) in of_aemif_parse_abus_config()
296 if (!of_property_read_u32(np, "ti,cs-read-hold-ns", &val)) in of_aemif_parse_abus_config()
299 if (!of_property_read_u32(np, "ti,cs-read-strobe-ns", &val)) in of_aemif_parse_abus_config()
302 if (!of_property_read_u32(np, "ti,cs-read-setup-ns", &val)) in of_aemif_parse_abus_config()
305 if (!of_property_read_u32(np, "ti,cs-write-hold-ns", &val)) in of_aemif_parse_abus_config()
308 if (!of_property_read_u32(np, "ti,cs-write-strobe-ns", &val)) in of_aemif_parse_abus_config()
311 if (!of_property_read_u32(np, "ti,cs-write-setup-ns", &val)) in of_aemif_parse_abus_config()
314 if (!of_property_read_u32(np, "ti,cs-bus-width", &val)) in of_aemif_parse_abus_config()
[all …]
/linux-4.1.27/arch/powerpc/kernel/
Dlegacy_serial.c31 struct device_node *np; member
72 static int __init add_legacy_port(struct device_node *np, int want_index, in add_legacy_port() argument
83 clk = of_get_property(np, "clock-frequency", NULL); in add_legacy_port()
88 spd = of_get_property(np, "current-speed", NULL); in add_legacy_port()
91 rs = of_get_property(np, "reg-shift", NULL); in add_legacy_port()
111 if (legacy_serial_infos[index].np != NULL) { in add_legacy_port()
140 legacy_serial_infos[index].np = of_node_get(np); in add_legacy_port()
151 index, np->full_name); in add_legacy_port()
161 static int __init add_legacy_soc_port(struct device_node *np, in add_legacy_soc_port() argument
166 struct device_node *tsi = of_get_parent(np); in add_legacy_soc_port()
[all …]
Dsetup-common.c558 struct device_node *np; in add_pcspkr() local
562 np = of_find_compatible_node(NULL, NULL, "pnpPNP,100"); in add_pcspkr()
563 of_node_put(np); in add_pcspkr()
564 if (!np) in add_pcspkr()
614 struct device_node *parent, *np = NULL; in check_legacy_ioport() local
619 if (!(np = of_find_compatible_node(NULL, NULL, "pnpPNP,303"))) in check_legacy_ioport()
620 np = of_find_compatible_node(NULL, NULL, "pnpPNP,f03"); in check_legacy_ioport()
621 if (np) { in check_legacy_ioport()
622 parent = of_get_parent(np); in check_legacy_ioport()
632 of_node_put(np); in check_legacy_ioport()
[all …]
Dbtext.c172 int btext_initialize(struct device_node *np) in btext_initialize() argument
178 prop = of_get_property(np, "linux,bootx-width", NULL); in btext_initialize()
180 prop = of_get_property(np, "width", NULL); in btext_initialize()
184 prop = of_get_property(np, "linux,bootx-height", NULL); in btext_initialize()
186 prop = of_get_property(np, "height", NULL); in btext_initialize()
190 prop = of_get_property(np, "linux,bootx-depth", NULL); in btext_initialize()
192 prop = of_get_property(np, "depth", NULL); in btext_initialize()
197 prop = of_get_property(np, "linux,bootx-linebytes", NULL); in btext_initialize()
199 prop = of_get_property(np, "linebytes", NULL); in btext_initialize()
204 prop = of_get_property(np, "linux,bootx-addr", NULL); in btext_initialize()
[all …]
Dsmp.c556 struct device_node *np; in cpu_to_core_id() local
560 np = of_get_cpu_node(cpu, NULL); in cpu_to_core_id()
561 if (!np) in cpu_to_core_id()
564 reg = of_get_property(np, "reg", NULL); in cpu_to_core_id()
570 of_node_put(np); in cpu_to_core_id()
590 struct device_node *np; in traverse_siblings_chip_id() local
596 np = of_get_cpu_node(i, NULL); in traverse_siblings_chip_id()
597 if (!np) in traverse_siblings_chip_id()
599 prop = of_get_property(np, "ibm,chip-id", &plen); in traverse_siblings_chip_id()
610 of_node_put(np); in traverse_siblings_chip_id()
[all …]
/linux-4.1.27/lib/mpi/
Dmpih-div.c59 mpi_ptr_t np, mpi_size_t nsize, mpi_ptr_t dp, mpi_size_t dsize) in mpihelp_divrem() argument
80 n1 = np[nsize - 1]; in mpihelp_divrem()
89 udiv_qrnnd(qp[i], n1, n1, np[i], d); in mpihelp_divrem()
95 np[0] = n1; in mpihelp_divrem()
105 np += nsize - 2; in mpihelp_divrem()
108 n1 = np[1]; in mpihelp_divrem()
109 n0 = np[0]; in mpihelp_divrem()
121 np--; in mpihelp_divrem()
123 np[0] = 0; in mpihelp_divrem()
134 np[0], 0, d0); in mpihelp_divrem()
[all …]
/linux-4.1.27/arch/powerpc/platforms/85xx/
Dcommon.c66 struct device_node *np; in mpc85xx_cpm2_pic_init() local
70 np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic"); in mpc85xx_cpm2_pic_init()
71 if (np == NULL) { in mpc85xx_cpm2_pic_init()
75 irq = irq_of_parse_and_map(np, 0); in mpc85xx_cpm2_pic_init()
77 of_node_put(np); in mpc85xx_cpm2_pic_init()
82 cpm2_pic_init(np); in mpc85xx_cpm2_pic_init()
83 of_node_put(np); in mpc85xx_cpm2_pic_init()
91 struct device_node *np; in mpc85xx_qe_init() local
93 np = of_find_compatible_node(NULL, NULL, "fsl,qe"); in mpc85xx_qe_init()
94 if (!np) { in mpc85xx_qe_init()
[all …]
Dmpc85xx_mds.c163 struct device_node *np; in mpc85xx_mds_reset_ucc_phys() local
167 np = of_find_node_by_name(NULL, "bcsr"); in mpc85xx_mds_reset_ucc_phys()
168 if (!np) in mpc85xx_mds_reset_ucc_phys()
171 bcsr_regs = of_iomap(np, 0); in mpc85xx_mds_reset_ucc_phys()
172 of_node_put(np); in mpc85xx_mds_reset_ucc_phys()
209 for_each_compatible_node(np, "network", "ucc_geth") { in mpc85xx_mds_reset_ucc_phys()
213 prop = of_get_property(np, "cell-index", NULL); in mpc85xx_mds_reset_ucc_phys()
219 prop = of_get_property(np, "phy-connection-type", NULL); in mpc85xx_mds_reset_ucc_phys()
239 struct device_node *np; in mpc85xx_mds_qe_init() local
249 np = of_find_node_by_name(NULL, "global-utilities"); in mpc85xx_mds_qe_init()
[all …]
Dtwr_p102x.c39 struct device_node *np; in twr_p1025_pic_init() local
50 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); in twr_p1025_pic_init()
51 if (np) { in twr_p1025_pic_init()
52 qe_ic_init(np, 0, qe_ic_cascade_low_mpic, in twr_p1025_pic_init()
54 of_node_put(np); in twr_p1025_pic_init()
68 struct device_node *np; in twr_p1025_setup_arch() local
86 np = of_find_compatible_node(NULL, NULL, "fsl,p1021-guts"); in twr_p1025_setup_arch()
87 if (np) { in twr_p1025_setup_arch()
88 guts = of_iomap(np, 0); in twr_p1025_setup_arch()
118 of_node_put(np); in twr_p1025_setup_arch()
Dmpc85xx_cds.c234 struct device_node *np = NULL; in mpc85xx_cds_8259_attach() local
239 for_each_node_by_type(np, "interrupt-controller") in mpc85xx_cds_8259_attach()
240 if (of_device_is_compatible(np, "chrp,iic")) { in mpc85xx_cds_8259_attach()
241 cascade_node = np; in mpc85xx_cds_8259_attach()
282 struct device_node *np; in mpc85xx_cds_pci_assign_primary() local
293 np = of_find_node_by_name(NULL, "i8259"); in mpc85xx_cds_pci_assign_primary()
294 while ((fsl_pci_primary = of_get_parent(np))) { in mpc85xx_cds_pci_assign_primary()
295 of_node_put(np); in mpc85xx_cds_pci_assign_primary()
296 np = fsl_pci_primary; in mpc85xx_cds_pci_assign_primary()
298 if ((of_device_is_compatible(np, "fsl,mpc8540-pci") || in mpc85xx_cds_pci_assign_primary()
[all …]
Dge_imp3a.c48 struct device_node *np; in ge_imp3a_pic_init() local
71 for_each_node_by_type(np, "interrupt-controller") in ge_imp3a_pic_init()
72 if (of_device_is_compatible(np, "gef,fpga-pic-1.00")) { in ge_imp3a_pic_init()
73 cascade_node = np; in ge_imp3a_pic_init()
89 struct device_node *np; in ge_imp3a_pci_assign_primary() local
92 for_each_node_by_type(np, "pci") { in ge_imp3a_pci_assign_primary()
93 if (of_device_is_compatible(np, "fsl,mpc8540-pci") || in ge_imp3a_pci_assign_primary()
94 of_device_is_compatible(np, "fsl,mpc8548-pcie") || in ge_imp3a_pci_assign_primary()
95 of_device_is_compatible(np, "fsl,p2020-pcie")) { in ge_imp3a_pci_assign_primary()
96 of_address_to_resource(np, 0, &rsrc); in ge_imp3a_pci_assign_primary()
[all …]
Dsocrates.c48 struct device_node *np; in socrates_pic_init() local
55 np = of_find_compatible_node(NULL, NULL, "abb,socrates-fpga-pic"); in socrates_pic_init()
56 if (!np) { in socrates_pic_init()
60 socrates_fpga_pic_init(np); in socrates_pic_init()
61 of_node_put(np); in socrates_pic_init()
/linux-4.1.27/drivers/clk/at91/
Dpmc.h59 int of_at91_get_clk_range(struct device_node *np, const char *propname,
62 extern void __init of_at91sam9260_clk_slow_setup(struct device_node *np,
65 extern void __init of_at91rm9200_clk_main_osc_setup(struct device_node *np,
67 extern void __init of_at91sam9x5_clk_main_rc_osc_setup(struct device_node *np,
69 extern void __init of_at91rm9200_clk_main_setup(struct device_node *np,
71 extern void __init of_at91sam9x5_clk_main_setup(struct device_node *np,
74 extern void __init of_at91rm9200_clk_pll_setup(struct device_node *np,
76 extern void __init of_at91sam9g45_clk_pll_setup(struct device_node *np,
78 extern void __init of_at91sam9g20_clk_pllb_setup(struct device_node *np,
80 extern void __init of_sama5d3_clk_pll_setup(struct device_node *np,
[all …]
Dpmc.c45 int of_at91_get_clk_range(struct device_node *np, const char *propname, in of_at91_get_clk_range() argument
51 ret = of_property_read_u32_index(np, propname, 0, &min); in of_at91_get_clk_range()
55 ret = of_property_read_u32_index(np, propname, 1, &max); in of_at91_get_clk_range()
218 static struct at91_pmc *__init at91_pmc_init(struct device_node *np, in at91_pmc_init() argument
238 pmc->irqdomain = irq_domain_add_linear(np, 32, &pmc_irq_ops, pmc); in at91_pmc_init()
376 static void __init of_at91_pmc_setup(struct device_node *np, in of_at91_pmc_setup() argument
383 void __iomem *regbase = of_iomap(np, 0); in of_at91_pmc_setup()
389 virq = irq_of_parse_and_map(np, 0); in of_at91_pmc_setup()
393 pmc = at91_pmc_init(np, regbase, virq, caps); in of_at91_pmc_setup()
396 for_each_child_of_node(np, childnp) { in of_at91_pmc_setup()
[all …]
Dclk-slow.c160 void __init of_at91sam9x5_clk_slow_osc_setup(struct device_node *np, in of_at91sam9x5_clk_slow_osc_setup() argument
165 const char *name = np->name; in of_at91sam9x5_clk_slow_osc_setup()
169 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9x5_clk_slow_osc_setup()
170 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_slow_osc_setup()
171 of_property_read_u32(np, "atmel,startup-time-usec", &startup); in of_at91sam9x5_clk_slow_osc_setup()
172 bypass = of_property_read_bool(np, "atmel,osc-bypass"); in of_at91sam9x5_clk_slow_osc_setup()
179 of_clk_add_provider(np, of_clk_src_simple_get, clk); in of_at91sam9x5_clk_slow_osc_setup()
270 void __init of_at91sam9x5_clk_slow_rc_osc_setup(struct device_node *np, in of_at91sam9x5_clk_slow_rc_osc_setup() argument
277 const char *name = np->name; in of_at91sam9x5_clk_slow_rc_osc_setup()
279 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_slow_rc_osc_setup()
[all …]
Dclk-master.c191 of_at91_clk_master_get_characteristics(struct device_node *np) in of_at91_clk_master_get_characteristics() argument
199 if (of_at91_get_clk_range(np, "atmel,clk-output-range", &characteristics->output)) in of_at91_clk_master_get_characteristics()
202 of_property_read_u32_array(np, "atmel,clk-divisors", in of_at91_clk_master_get_characteristics()
206 of_property_read_bool(np, "atmel,master-clk-have-div3-pres"); in of_at91_clk_master_get_characteristics()
216 of_at91_clk_master_setup(struct device_node *np, struct at91_pmc *pmc, in of_at91_clk_master_setup() argument
224 const char *name = np->name; in of_at91_clk_master_setup()
227 num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); in of_at91_clk_master_setup()
232 parent_names[i] = of_clk_get_parent_name(np, i); in of_at91_clk_master_setup()
237 of_property_read_string(np, "clock-output-names", &name); in of_at91_clk_master_setup()
239 characteristics = of_at91_clk_master_get_characteristics(np); in of_at91_clk_master_setup()
[all …]
Dclk-pll.c386 of_at91_clk_pll_get_characteristics(struct device_node *np) in of_at91_clk_pll_get_characteristics() argument
399 if (of_at91_get_clk_range(np, "atmel,clk-input-range", &input)) in of_at91_clk_pll_get_characteristics()
402 if (of_property_read_u32(np, "#atmel,pll-clk-output-range-cells", in of_at91_clk_pll_get_characteristics()
409 if (!of_get_property(np, "atmel,pll-clk-output-ranges", &tmp)) in of_at91_clk_pll_get_characteristics()
435 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
440 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
449 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
458 if (of_property_read_u32_index(np, in of_at91_clk_pll_get_characteristics()
482 of_at91_clk_pll_setup(struct device_node *np, struct at91_pmc *pmc, in of_at91_clk_pll_setup() argument
489 const char *name = np->name; in of_at91_clk_pll_setup()
[all …]
Dclk-main.c192 void __init of_at91rm9200_clk_main_osc_setup(struct device_node *np, in of_at91rm9200_clk_main_osc_setup() argument
197 const char *name = np->name; in of_at91rm9200_clk_main_osc_setup()
201 of_property_read_string(np, "clock-output-names", &name); in of_at91rm9200_clk_main_osc_setup()
202 bypass = of_property_read_bool(np, "atmel,osc-bypass"); in of_at91rm9200_clk_main_osc_setup()
203 parent_name = of_clk_get_parent_name(np, 0); in of_at91rm9200_clk_main_osc_setup()
205 irq = irq_of_parse_and_map(np, 0); in of_at91rm9200_clk_main_osc_setup()
213 of_clk_add_provider(np, of_clk_src_simple_get, clk); in of_at91rm9200_clk_main_osc_setup()
340 void __init of_at91sam9x5_clk_main_rc_osc_setup(struct device_node *np, in of_at91sam9x5_clk_main_rc_osc_setup() argument
347 const char *name = np->name; in of_at91sam9x5_clk_main_rc_osc_setup()
349 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_main_rc_osc_setup()
[all …]
Dclk-usb.c372 void __init of_at91sam9x5_clk_usb_setup(struct device_node *np, in of_at91sam9x5_clk_usb_setup() argument
379 const char *name = np->name; in of_at91sam9x5_clk_usb_setup()
381 num_parents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); in of_at91sam9x5_clk_usb_setup()
386 parent_names[i] = of_clk_get_parent_name(np, i); in of_at91sam9x5_clk_usb_setup()
391 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9x5_clk_usb_setup()
397 of_clk_add_provider(np, of_clk_src_simple_get, clk); in of_at91sam9x5_clk_usb_setup()
400 void __init of_at91sam9n12_clk_usb_setup(struct device_node *np, in of_at91sam9n12_clk_usb_setup() argument
405 const char *name = np->name; in of_at91sam9n12_clk_usb_setup()
407 parent_name = of_clk_get_parent_name(np, 0); in of_at91sam9n12_clk_usb_setup()
411 of_property_read_string(np, "clock-output-names", &name); in of_at91sam9n12_clk_usb_setup()
[all …]
/linux-4.1.27/arch/powerpc/platforms/83xx/
Dmisc.c76 struct device_node *np; in mpc83xx_ipic_init_IRQ() local
79 np = of_find_compatible_node(NULL, NULL, "fsl,ipic"); in mpc83xx_ipic_init_IRQ()
80 if (!np) in mpc83xx_ipic_init_IRQ()
81 np = of_find_node_by_type(NULL, "ipic"); in mpc83xx_ipic_init_IRQ()
82 if (!np) in mpc83xx_ipic_init_IRQ()
85 ipic_init(np, 0); in mpc83xx_ipic_init_IRQ()
87 of_node_put(np); in mpc83xx_ipic_init_IRQ()
98 struct device_node *np; in mpc83xx_qe_init_IRQ() local
100 np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); in mpc83xx_qe_init_IRQ()
101 if (!np) { in mpc83xx_qe_init_IRQ()
[all …]
Dmpc836x_mds.c66 struct device_node *np; in mpc836x_mds_setup_arch() local
73 np = of_find_node_by_name(NULL, "bcsr"); in mpc836x_mds_setup_arch()
74 if (np) { in mpc836x_mds_setup_arch()
77 of_address_to_resource(np, 0, &res); in mpc836x_mds_setup_arch()
79 of_node_put(np); in mpc836x_mds_setup_arch()
87 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) { in mpc836x_mds_setup_arch()
88 par_io_init(np); in mpc836x_mds_setup_arch()
89 of_node_put(np); in mpc836x_mds_setup_arch()
91 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;) in mpc836x_mds_setup_arch()
92 par_io_of_config(np); in mpc836x_mds_setup_arch()
[all …]
Dusb.c31 struct device_node *np = NULL; in mpc834x_usb_cfg() local
45 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr"); in mpc834x_usb_cfg()
46 if (np) { in mpc834x_usb_cfg()
49 prop = of_get_property(np, "phy_type", NULL); in mpc834x_usb_cfg()
57 dr_mode = of_get_property(np, "dr_mode", NULL); in mpc834x_usb_cfg()
69 of_node_put(np); in mpc834x_usb_cfg()
71 np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph"); in mpc834x_usb_cfg()
72 if (np) { in mpc834x_usb_cfg()
75 prop = of_get_property(np, "port0", NULL); in mpc834x_usb_cfg()
82 prop = of_get_property(np, "port1", NULL); in mpc834x_usb_cfg()
[all …]
Dmpc832x_mds.c58 struct device_node *np; in mpc832x_sys_setup_arch() local
65 np = of_find_node_by_name(NULL, "bcsr"); in mpc832x_sys_setup_arch()
66 if (np) { in mpc832x_sys_setup_arch()
69 of_address_to_resource(np, 0, &res); in mpc832x_sys_setup_arch()
71 of_node_put(np); in mpc832x_sys_setup_arch()
79 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) { in mpc832x_sys_setup_arch()
80 par_io_init(np); in mpc832x_sys_setup_arch()
81 of_node_put(np); in mpc832x_sys_setup_arch()
83 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;) in mpc832x_sys_setup_arch()
84 par_io_of_config(np); in mpc832x_sys_setup_arch()
[all …]
Dkm83xx.c130 struct device_node *np; in mpc83xx_km_setup_arch() local
141 np = of_find_node_by_name(NULL, "par_io"); in mpc83xx_km_setup_arch()
142 if (np != NULL) { in mpc83xx_km_setup_arch()
143 par_io_init(np); in mpc83xx_km_setup_arch()
144 of_node_put(np); in mpc83xx_km_setup_arch()
146 for_each_node_by_name(np, "spi") in mpc83xx_km_setup_arch()
147 par_io_of_config(np); in mpc83xx_km_setup_arch()
149 for_each_node_by_name(np, "ucc") in mpc83xx_km_setup_arch()
150 par_io_of_config(np); in mpc83xx_km_setup_arch()
153 np = of_find_compatible_node(NULL, "network", "ucc_geth"); in mpc83xx_km_setup_arch()
[all …]
Dmpc832x_rdb.c49 struct device_node *np; in of_fsl_spi_probe() local
52 for_each_compatible_node(np, type, compatible) { in of_fsl_spi_probe()
66 prop = of_get_property(np, "reg", NULL); in of_fsl_spi_probe()
71 prop = of_get_property(np, "cell-index", NULL); in of_fsl_spi_probe()
75 prop = of_get_property(np, "mode", NULL); in of_fsl_spi_probe()
87 ret = of_address_to_resource(np, 0, &res[0]); in of_fsl_spi_probe()
91 ret = of_irq_to_resource(np, 0, &res[1]); in of_fsl_spi_probe()
116 pr_err("%s: registration failed\n", np->full_name); in of_fsl_spi_probe()
197 struct device_node *np; in mpc832x_rdb_setup_arch() local
208 if ((np = of_find_node_by_name(NULL, "par_io")) != NULL) { in mpc832x_rdb_setup_arch()
[all …]
Dmpc837x_mds.c32 struct device_node *np; in mpc837xmds_usb_cfg() local
42 np = of_find_compatible_node(NULL, NULL, "fsl,mpc837xmds-bcsr"); in mpc837xmds_usb_cfg()
43 if (np) { in mpc837xmds_usb_cfg()
44 bcsr_regs = of_iomap(np, 0); in mpc837xmds_usb_cfg()
45 of_node_put(np); in mpc837xmds_usb_cfg()
50 np = of_find_node_by_name(NULL, "usb"); in mpc837xmds_usb_cfg()
51 if (!np) { in mpc837xmds_usb_cfg()
55 phy_type = of_get_property(np, "phy_type", NULL); in mpc837xmds_usb_cfg()
59 mode = of_get_property(np, "dr_mode", NULL); in mpc837xmds_usb_cfg()
69 of_node_put(np); in mpc837xmds_usb_cfg()
/linux-4.1.27/drivers/gpio/
Dgpiolib-of.c43 if ((gc->of_node != gg_data->gpiospec.np) || in of_gpiochip_find_and_xlate()
74 struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, in of_get_named_gpiod_flags() argument
90 ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", index, in of_get_named_gpiod_flags()
94 __func__, propname, np->full_name, index); in of_get_named_gpiod_flags()
100 of_node_put(gg_data.gpiospec.np); in of_get_named_gpiod_flags()
102 __func__, propname, np->full_name, index, in of_get_named_gpiod_flags()
107 int of_get_named_gpio_flags(struct device_node *np, const char *list_name, in of_get_named_gpio_flags() argument
112 desc = of_get_named_gpiod_flags(np, list_name, index, flags); in of_get_named_gpio_flags()
132 static struct gpio_desc *of_get_gpio_hog(struct device_node *np, in of_get_gpio_hog() argument
146 chip_np = np->parent; in of_get_gpio_hog()
[all …]
/linux-4.1.27/drivers/cpufreq/
Darm_big_little_dt.c36 struct device_node *np = of_cpu_device_node_get(cpu); in get_cpu_node_with_valid_op() local
38 if (!of_get_property(np, "operating-points", NULL)) { in get_cpu_node_with_valid_op()
39 of_node_put(np); in get_cpu_node_with_valid_op()
40 np = NULL; in get_cpu_node_with_valid_op()
43 return np; in get_cpu_node_with_valid_op()
48 struct device_node *np; in dt_init_opp_table() local
51 np = of_node_get(cpu_dev->of_node); in dt_init_opp_table()
52 if (!np) { in dt_init_opp_table()
58 of_node_put(np); in dt_init_opp_table()
65 struct device_node *np; in dt_get_transition_latency() local
[all …]
Dqoriq-cpufreq.c104 struct device_node *np, *clk_np; in cpu_to_clk_node() local
109 np = of_get_cpu_node(cpu, NULL); in cpu_to_clk_node()
110 if (!np) in cpu_to_clk_node()
113 clk_np = of_parse_phandle(np, "clocks", 0); in cpu_to_clk_node()
117 of_node_put(np); in cpu_to_clk_node()
125 struct device_node *np, *clk_np; in set_affected_cpus() local
129 np = cpu_to_clk_node(policy->cpu); in set_affected_cpus()
130 if (!np) in set_affected_cpus()
138 if (clk_np == np) in set_affected_cpus()
143 of_node_put(np); in set_affected_cpus()
[all …]
Dkirkwood-cpufreq.c107 struct device_node *np; in kirkwood_cpufreq_probe() local
118 np = of_cpu_device_node_get(0); in kirkwood_cpufreq_probe()
119 if (!np) { in kirkwood_cpufreq_probe()
124 priv.cpu_clk = of_clk_get_by_name(np, "cpu_clk"); in kirkwood_cpufreq_probe()
133 priv.ddr_clk = of_clk_get_by_name(np, "ddrclk"); in kirkwood_cpufreq_probe()
143 priv.powersave_clk = of_clk_get_by_name(np, "powersave"); in kirkwood_cpufreq_probe()
151 of_node_put(np); in kirkwood_cpufreq_probe()
152 np = NULL; in kirkwood_cpufreq_probe()
165 of_node_put(np); in kirkwood_cpufreq_probe()
/linux-4.1.27/include/linux/
Dof.h73 struct device_node *np; member
233 static inline const char *of_node_full_name(const struct device_node *np) in of_node_full_name() argument
235 return np ? np->full_name : "<no-node>"; in of_node_full_name()
275 extern struct property *of_find_property(const struct device_node *np,
278 extern int of_property_count_elems_of_size(const struct device_node *np,
280 extern int of_property_read_u32_index(const struct device_node *np,
283 extern int of_property_read_u8_array(const struct device_node *np,
285 extern int of_property_read_u16_array(const struct device_node *np,
287 extern int of_property_read_u32_array(const struct device_node *np,
291 extern int of_property_read_u64(const struct device_node *np,
[all …]
Dof_mtd.h15 int of_get_nand_ecc_mode(struct device_node *np);
16 int of_get_nand_ecc_step_size(struct device_node *np);
17 int of_get_nand_ecc_strength(struct device_node *np);
18 int of_get_nand_bus_width(struct device_node *np);
19 bool of_get_nand_on_flash_bbt(struct device_node *np);
23 static inline int of_get_nand_ecc_mode(struct device_node *np) in of_get_nand_ecc_mode() argument
28 static inline int of_get_nand_ecc_step_size(struct device_node *np) in of_get_nand_ecc_step_size() argument
33 static inline int of_get_nand_ecc_strength(struct device_node *np) in of_get_nand_ecc_strength() argument
38 static inline int of_get_nand_bus_width(struct device_node *np) in of_get_nand_bus_width() argument
43 static inline bool of_get_nand_on_flash_bbt(struct device_node *np) in of_get_nand_on_flash_bbt() argument
Dof_gpio.h50 extern int of_get_named_gpio_flags(struct device_node *np,
53 extern int of_mm_gpiochip_add(struct device_node *np,
66 static inline int of_get_named_gpio_flags(struct device_node *np, in of_get_named_gpio_flags() argument
104 static inline int of_gpio_named_count(struct device_node *np, const char* propname) in of_gpio_named_count() argument
106 return of_count_phandle_with_args(np, propname, "#gpio-cells"); in of_gpio_named_count()
115 static inline int of_gpio_count(struct device_node *np) in of_gpio_count() argument
117 return of_gpio_named_count(np, "gpios"); in of_gpio_count()
120 static inline int of_get_gpio_flags(struct device_node *np, int index, in of_get_gpio_flags() argument
123 return of_get_named_gpio_flags(np, "gpios", index, flags); in of_get_gpio_flags()
135 static inline int of_get_named_gpio(struct device_node *np, in of_get_named_gpio() argument
[all …]
Dnetpoll.h57 void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
58 void netpoll_print_options(struct netpoll *np);
59 int netpoll_parse_options(struct netpoll *np, char *opt);
60 int __netpoll_setup(struct netpoll *np, struct net_device *ndev);
61 int netpoll_setup(struct netpoll *np);
62 void __netpoll_cleanup(struct netpoll *np);
63 void __netpoll_free_async(struct netpoll *np);
64 void netpoll_cleanup(struct netpoll *np);
65 void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
67 static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) in netpoll_send_skb() argument
[all …]
Dof_net.h14 extern int of_get_phy_mode(struct device_node *np);
15 extern const void *of_get_mac_address(struct device_node *np);
16 extern struct net_device *of_find_net_device_by_node(struct device_node *np);
18 static inline int of_get_phy_mode(struct device_node *np) in of_get_phy_mode() argument
23 static inline const void *of_get_mac_address(struct device_node *np) in of_get_mac_address() argument
28 static inline struct net_device *of_find_net_device_by_node(struct device_node *np) in of_find_net_device_by_node() argument
Dof_mdio.h16 extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np);
27 extern int of_mdio_parse_addr(struct device *dev, const struct device_node *np);
30 static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) in of_mdiobus_register() argument
66 const struct device_node *np) in of_mdio_parse_addr() argument
73 extern int of_phy_register_fixed_link(struct device_node *np);
74 extern bool of_phy_is_fixed_link(struct device_node *np);
76 static inline int of_phy_register_fixed_link(struct device_node *np) in of_phy_register_fixed_link() argument
80 static inline bool of_phy_is_fixed_link(struct device_node *np) in of_phy_is_fixed_link() argument
Dof_dma.h35 extern int of_dma_controller_register(struct device_node *np,
39 extern void of_dma_controller_free(struct device_node *np);
40 extern struct dma_chan *of_dma_request_slave_channel(struct device_node *np,
47 static inline int of_dma_controller_register(struct device_node *np, in of_dma_controller_register() argument
55 static inline void of_dma_controller_free(struct device_node *np) in of_dma_controller_free() argument
59 static inline struct dma_chan *of_dma_request_slave_channel(struct device_node *np, in of_dma_request_slave_channel() argument
/linux-4.1.27/drivers/clk/
Dclk-qoriq.c67 static void __init core_mux_init(struct device_node *np) in core_mux_init() argument
79 rc = of_property_read_u32(np, "reg", &offset); in core_mux_init()
81 pr_err("%s: could not get reg property\n", np->name); in core_mux_init()
86 count = of_property_count_strings(np, "clock-names"); in core_mux_init()
88 pr_err("%s: get clock count error\n", np->name); in core_mux_init()
96 parent_names[i] = of_clk_get_parent_name(np, i); in core_mux_init()
102 cmux_clk->reg = of_iomap(np, 0); in core_mux_init()
108 rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", 0, in core_mux_init()
115 cmux_clk->clk_per_pll = of_property_count_strings(clkspec.np, in core_mux_init()
117 of_node_put(clkspec.np); in core_mux_init()
[all …]
Dclkdev.c31 static struct clk *__of_clk_get(struct device_node *np, int index, in __of_clk_get() argument
41 rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index, in __of_clk_get()
47 of_node_put(clkspec.np); in __of_clk_get()
52 struct clk *of_clk_get(struct device_node *np, int index) in of_clk_get() argument
54 return __of_clk_get(np, index, np->full_name, NULL); in of_clk_get()
58 static struct clk *__of_clk_get_by_name(struct device_node *np, in __of_clk_get_by_name() argument
65 while (np) { in __of_clk_get_by_name()
74 index = of_property_match_string(np, "clock-names", name); in __of_clk_get_by_name()
75 clk = __of_clk_get(np, index, dev_id, name); in __of_clk_get_by_name()
81 np->full_name, name ? name : "", index); in __of_clk_get_by_name()
[all …]
Dclk-xgene.c166 static void xgene_pllclk_init(struct device_node *np, enum xgene_pll_type pll_type) in xgene_pllclk_init() argument
168 const char *clk_name = np->full_name; in xgene_pllclk_init()
172 reg = of_iomap(np, 0); in xgene_pllclk_init()
174 pr_err("Unable to map CSR register for %s\n", np->full_name); in xgene_pllclk_init()
177 of_property_read_string(np, "clock-output-names", &clk_name); in xgene_pllclk_init()
179 clk_name, of_clk_get_parent_name(np, 0), in xgene_pllclk_init()
182 of_clk_add_provider(np, of_clk_src_simple_get, clk); in xgene_pllclk_init()
188 static void xgene_socpllclk_init(struct device_node *np) in xgene_socpllclk_init() argument
190 xgene_pllclk_init(np, PLL_TYPE_SOC); in xgene_socpllclk_init()
193 static void xgene_pcppllclk_init(struct device_node *np) in xgene_pcppllclk_init() argument
[all …]
Dclk-nomadik.c91 struct device_node *np; in nomadik_src_init() local
94 np = of_find_matching_node(NULL, nomadik_src_match); in nomadik_src_init()
95 if (!np) { in nomadik_src_init()
99 src_base = of_iomap(np, 0); in nomadik_src_init()
102 __func__, np->name); in nomadik_src_init()
123 if (of_property_read_bool(np, "disable-sxtalo")) { in nomadik_src_init()
128 if (of_property_read_bool(np, "disable-mxtalo")) { in nomadik_src_init()
511 static void __init of_nomadik_pll_setup(struct device_node *np) in of_nomadik_pll_setup() argument
514 const char *clk_name = np->name; in of_nomadik_pll_setup()
521 if (of_property_read_u32(np, "pll-id", &pll_id)) { in of_nomadik_pll_setup()
[all …]
/linux-4.1.27/drivers/clk/shmobile/
Dclk-emev2.c52 struct device_node *np; in emev2_smu_init() local
54 np = of_find_matching_node(NULL, smu_id); in emev2_smu_init()
55 BUG_ON(!np); in emev2_smu_init()
56 smu_base = of_iomap(np, 0); in emev2_smu_init()
58 of_node_put(np); in emev2_smu_init()
71 static void __init emev2_smu_clkdiv_init(struct device_node *np) in emev2_smu_clkdiv_init() argument
75 const char *parent_name = of_clk_get_parent_name(np, 0); in emev2_smu_clkdiv_init()
76 if (WARN_ON(of_property_read_u32_array(np, "reg", reg, 2))) in emev2_smu_clkdiv_init()
80 clk = clk_register_divider(NULL, np->name, parent_name, 0, in emev2_smu_clkdiv_init()
82 of_clk_add_provider(np, of_clk_src_simple_get, clk); in emev2_smu_clkdiv_init()
[all …]
Dclk-r8a7740.c65 r8a7740_cpg_register_clock(struct device_node *np, struct r8a7740_cpg *cpg, in r8a7740_cpg_register_clock() argument
78 parent_name = of_clk_get_parent_name(np, 0); in r8a7740_cpg_register_clock()
83 parent_name = of_clk_get_parent_name(np, 0); in r8a7740_cpg_register_clock()
88 parent_name = of_clk_get_parent_name(np, 2); in r8a7740_cpg_register_clock()
92 parent_name = of_clk_get_parent_name(np, 0); in r8a7740_cpg_register_clock()
117 parent_name = of_clk_get_parent_name(np, 1); in r8a7740_cpg_register_clock()
147 static void __init r8a7740_cpg_clocks_init(struct device_node *np) in r8a7740_cpg_clocks_init() argument
154 if (of_property_read_u32(np, "renesas,mode", &cpg_mode)) in r8a7740_cpg_clocks_init()
157 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a7740_cpg_clocks_init()
177 cpg->reg = of_iomap(np, 0); in r8a7740_cpg_clocks_init()
[all …]
Dclk-r8a7778.c52 r8a7778_cpg_register_clock(struct device_node *np, struct r8a7778_cpg *cpg, in r8a7778_cpg_register_clock() argument
57 of_clk_get_parent_name(np, 0), 0, in r8a7778_cpg_register_clock()
61 of_clk_get_parent_name(np, 0), 0, in r8a7778_cpg_register_clock()
80 static void __init r8a7778_cpg_clocks_init(struct device_node *np) in r8a7778_cpg_clocks_init() argument
87 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a7778_cpg_clocks_init()
107 cpg->reg = of_iomap(np, 0); in r8a7778_cpg_clocks_init()
115 of_property_read_string_index(np, "clock-output-names", i, in r8a7778_cpg_clocks_init()
118 clk = r8a7778_cpg_register_clock(np, cpg, name); in r8a7778_cpg_clocks_init()
121 __func__, np->name, name, PTR_ERR(clk)); in r8a7778_cpg_clocks_init()
126 of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); in r8a7778_cpg_clocks_init()
Dclk-rz.c32 rz_cpg_register_clock(struct device_node *np, struct rz_cpg *cpg, const char *name) in rz_cpg_register_clock() argument
41 const char *parent_name = of_clk_get_parent_name(np, cpg_mode); in rz_cpg_register_clock()
67 static void __init rz_cpg_clocks_init(struct device_node *np) in rz_cpg_clocks_init() argument
74 num_clks = of_property_count_strings(np, "clock-output-names"); in rz_cpg_clocks_init()
85 cpg->reg = of_iomap(np, 0); in rz_cpg_clocks_init()
91 of_property_read_string_index(np, "clock-output-names", i, &name); in rz_cpg_clocks_init()
93 clk = rz_cpg_register_clock(np, cpg, name); in rz_cpg_clocks_init()
96 __func__, np->name, name, PTR_ERR(clk)); in rz_cpg_clocks_init()
101 of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); in rz_cpg_clocks_init()
Dclk-r8a73a4.c63 r8a73a4_cpg_register_clock(struct device_node *np, struct r8a73a4_cpg *cpg, in r8a73a4_cpg_register_clock() argument
78 parent_name = of_clk_get_parent_name(np, 0); in r8a73a4_cpg_register_clock()
81 parent_name = of_clk_get_parent_name(np, 0); in r8a73a4_cpg_register_clock()
85 parent_name = of_clk_get_parent_name(np, 1); in r8a73a4_cpg_register_clock()
88 parent_name = of_clk_get_parent_name(np, 1); in r8a73a4_cpg_register_clock()
192 static void __init r8a73a4_cpg_clocks_init(struct device_node *np) in r8a73a4_cpg_clocks_init() argument
199 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a73a4_cpg_clocks_init()
219 cpg->reg = of_iomap(np, 0); in r8a73a4_cpg_clocks_init()
227 of_property_read_string_index(np, "clock-output-names", i, in r8a73a4_cpg_clocks_init()
230 clk = r8a73a4_cpg_register_clock(np, cpg, name); in r8a73a4_cpg_clocks_init()
[all …]
Dclk-r8a7779.c94 r8a7779_cpg_register_clock(struct device_node *np, struct r8a7779_cpg *cpg, in r8a7779_cpg_register_clock() argument
103 parent_name = of_clk_get_parent_name(np, 0); in r8a7779_cpg_register_clock()
123 static void __init r8a7779_cpg_clocks_init(struct device_node *np) in r8a7779_cpg_clocks_init() argument
131 num_clks = of_property_count_strings(np, "clock-output-names"); in r8a7779_cpg_clocks_init()
158 of_property_read_string_index(np, "clock-output-names", i, in r8a7779_cpg_clocks_init()
161 clk = r8a7779_cpg_register_clock(np, cpg, config, in r8a7779_cpg_clocks_init()
165 __func__, np->name, name, PTR_ERR(clk)); in r8a7779_cpg_clocks_init()
170 of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data); in r8a7779_cpg_clocks_init()
Dclk-mstp.c156 static void __init cpg_mstp_clocks_init(struct device_node *np) in cpg_mstp_clocks_init() argument
175 group->smstpcr = of_iomap(np, 0); in cpg_mstp_clocks_init()
176 group->mstpsr = of_iomap(np, 1); in cpg_mstp_clocks_init()
188 if (of_find_property(np, "clock-indices", &i)) in cpg_mstp_clocks_init()
200 ret = of_property_read_string_index(np, "clock-output-names", in cpg_mstp_clocks_init()
205 parent_name = of_clk_get_parent_name(np, i); in cpg_mstp_clocks_init()
206 ret = of_property_read_u32_index(np, idxname, i, &clkidx); in cpg_mstp_clocks_init()
212 __func__, np->name, name, clkidx); in cpg_mstp_clocks_init()
232 __func__, np->name, name, PTR_ERR(clks[clkidx])); in cpg_mstp_clocks_init()
236 of_clk_add_provider(np, of_clk_src_onecell_get, &group->data); in cpg_mstp_clocks_init()
Dclk-div6.c175 static void __init cpg_div6_clock_init(struct device_node *np) in cpg_div6_clock_init() argument
190 num_parents = of_clk_get_parent_count(np); in cpg_div6_clock_init()
193 __func__, np->name); in cpg_div6_clock_init()
208 clock->reg = of_iomap(np, 0); in cpg_div6_clock_init()
211 __func__, np->name); in cpg_div6_clock_init()
218 ret = of_property_read_string(np, "clock-output-names", &name); in cpg_div6_clock_init()
221 __func__, np->name); in cpg_div6_clock_init()
227 const char *name = of_clk_get_parent_name(np, i); in cpg_div6_clock_init()
253 __func__, np->name); in cpg_div6_clock_init()
269 __func__, np->name, PTR_ERR(clk)); in cpg_div6_clock_init()
[all …]
/linux-4.1.27/arch/powerpc/platforms/powermac/
Dsetup.c107 struct device_node *np; in pmac_show_cpuinfo() local
124 np = of_find_node_by_path("/"); in pmac_show_cpuinfo()
125 if (np != NULL) { in pmac_show_cpuinfo()
126 pp = of_get_property(np, "model", NULL); in pmac_show_cpuinfo()
131 pp = of_get_property(np, "compatible", &plen); in pmac_show_cpuinfo()
142 of_node_put(np); in pmac_show_cpuinfo()
151 np = of_find_node_by_name(NULL, "l2-cache"); in pmac_show_cpuinfo()
152 if (np == NULL) in pmac_show_cpuinfo()
153 np = of_find_node_by_type(NULL, "cache"); in pmac_show_cpuinfo()
154 if (np != NULL) { in pmac_show_cpuinfo()
[all …]
Dpic.c428 out_irq->np = NULL; in of_irq_parse_oldworld()
454 static struct mpic * __init pmac_setup_one_mpic(struct device_node *np, in pmac_setup_one_mpic() argument
461 pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0); in pmac_setup_one_mpic()
463 if (of_get_property(np, "big-endian", NULL)) in pmac_setup_one_mpic()
472 mpic = mpic_alloc(np, 0, flags, 0, 0, name); in pmac_setup_one_mpic()
484 struct device_node *np, *master = NULL, *slave = NULL; in pmac_pic_probe_mpic() local
487 for (np = NULL; (np = of_find_node_by_type(np, "open-pic")) in pmac_pic_probe_mpic()
490 of_get_property(np, "interrupts", NULL) == NULL) in pmac_pic_probe_mpic()
491 master = of_node_get(np); in pmac_pic_probe_mpic()
493 slave = of_node_get(np); in pmac_pic_probe_mpic()
[all …]
Dpci.c179 struct device_node *np; in chaos_map_bus() local
184 np = of_pci_find_child_device(bus->dev.of_node, devfn); in chaos_map_bus()
185 if (np == NULL) in chaos_map_bus()
188 vendor = of_get_property(np, "vendor-id", NULL); in chaos_map_bus()
189 device = of_get_property(np, "device-id", NULL); in chaos_map_bus()
534 struct device_node *np = of_find_node_by_name(NULL, "pci106b,7"); in init_second_ohare() local
538 if (np == NULL) in init_second_ohare()
544 if (pci_device_from_OF_node(np, &bus, &devfn) == 0) { in init_second_ohare()
546 pci_find_hose_for_OF_device(np); in init_second_ohare()
549 of_node_put(np); in init_second_ohare()
[all …]
/linux-4.1.27/arch/powerpc/platforms/cell/
Dcbe_regs.c51 static struct cbe_regs_map *cbe_find_map(struct device_node *np) in cbe_find_map() argument
56 if (strcasecmp(np->type, "spe")) { in cbe_find_map()
58 if (cbe_regs_maps[i].cpu_node == np || in cbe_find_map()
59 cbe_regs_maps[i].be_node == np) in cbe_find_map()
64 if (np->data) in cbe_find_map()
65 return np->data; in cbe_find_map()
68 tmp_np = np; in cbe_find_map()
76 np->data = cbe_find_map(tmp_np); in cbe_find_map()
78 return np->data; in cbe_find_map()
81 struct cbe_pmd_regs __iomem *cbe_get_pmd_regs(struct device_node *np) in cbe_get_pmd_regs() argument
[all …]
Diommu.c271 struct device_node *np; in cell_iommu_find_ioc() local
277 for_each_node_by_name(np, "ioc") { in cell_iommu_find_ioc()
278 if (of_node_to_nid(np) != nid) in cell_iommu_find_ioc()
280 if (of_address_to_resource(np, 0, &r)) { in cell_iommu_find_ioc()
282 np->full_name); in cell_iommu_find_ioc()
286 of_node_put(np); in cell_iommu_find_ioc()
291 for_each_node_by_type(np, "cpu") { in cell_iommu_find_ioc()
295 nidp = of_get_property(np, "node-id", NULL); in cell_iommu_find_ioc()
297 tmp = of_get_property(np, "ioc-translation", NULL); in cell_iommu_find_ioc()
300 of_node_put(np); in cell_iommu_find_ioc()
[all …]
Dsetup.c124 struct device_node *np; in cell_setup_phb() local
132 np = phb->dn; in cell_setup_phb()
133 model = of_get_property(np, "model", NULL); in cell_setup_phb()
134 if (model == NULL || strcmp(np->name, "pci")) in cell_setup_phb()
161 struct device_node *np; in cell_publish_devices() local
170 for_each_child_of_node(root, np) { in cell_publish_devices()
171 if (np->type == NULL || (strcmp(np->type, "pci") != 0 && in cell_publish_devices()
172 strcmp(np->type, "pciex") != 0)) in cell_publish_devices()
174 of_platform_device_create(np, NULL, NULL); in cell_publish_devices()
Dras.c169 struct device_node *np; in cbe_ptcal_enable() local
172 np = of_find_node_by_path("/rtas"); in cbe_ptcal_enable()
173 if (!np) in cbe_ptcal_enable()
176 size = of_get_property(np, "ibm,cbe-ptcal-size", NULL); in cbe_ptcal_enable()
178 of_node_put(np); in cbe_ptcal_enable()
184 of_node_put(np); in cbe_ptcal_enable()
187 for_each_node_by_type(np, "mic-tm") { in cbe_ptcal_enable()
188 cbe_ptcal_enable_on_node(of_node_to_nid(np), order); in cbe_ptcal_enable()
196 for_each_node_by_type(np, "cpu") { in cbe_ptcal_enable()
197 const u32 *nid = of_get_property(np, "node-id", NULL); in cbe_ptcal_enable()
[all …]
/linux-4.1.27/scripts/coccinelle/iterators/
Dfen.cocci19 expression np,E;
23 for_each_node_by_name(np,...) {
27 ... when != np = E
28 - of_node_put(np);
32 expression np,E;
36 for_each_node_by_type(np,...) {
40 ... when != np = E
41 - of_node_put(np);
45 expression np,E;
49 for_each_compatible_node(np,...) {
[all …]
/linux-4.1.27/drivers/macintosh/
Dmacio_asic.c186 static int macio_resource_quirks(struct device_node *np, struct resource *res, in macio_resource_quirks() argument
194 if (index == 0 && !strcmp(np->name, "gc")) in macio_resource_quirks()
198 if (index >= 2 && !strcmp(np->name, "radio")) in macio_resource_quirks()
211 if (!strcmp(np->name, "escc")) in macio_resource_quirks()
215 if (index >= 3 && !(strcmp(np->name, "ch-a") && in macio_resource_quirks()
216 strcmp(np->name, "ch-b"))) in macio_resource_quirks()
220 if (index > 0 && !strcmp(np->name, "media-bay")) in macio_resource_quirks()
224 if (!(strcmp(np->name, "IDE") && strcmp(np->name, "ATA") && in macio_resource_quirks()
225 strcmp(np->type, "ide") && strcmp(np->type, "ata"))) { in macio_resource_quirks()
251 struct device_node *np = dev->ofdev.dev.of_node; in macio_add_missing_resources() local
[all …]
/linux-4.1.27/arch/powerpc/platforms/pseries/
Dreconfig.c59 struct device_node *np; in pSeries_reconfig_add_node() local
62 np = kzalloc(sizeof(*np), GFP_KERNEL); in pSeries_reconfig_add_node()
63 if (!np) in pSeries_reconfig_add_node()
66 np->full_name = kstrdup(path, GFP_KERNEL); in pSeries_reconfig_add_node()
67 if (!np->full_name) in pSeries_reconfig_add_node()
70 np->properties = proplist; in pSeries_reconfig_add_node()
71 of_node_set_flag(np, OF_DYNAMIC); in pSeries_reconfig_add_node()
72 of_node_init(np); in pSeries_reconfig_add_node()
74 np->parent = derive_parent(path); in pSeries_reconfig_add_node()
75 if (IS_ERR(np->parent)) { in pSeries_reconfig_add_node()
[all …]
Dsetup.c127 struct device_node *np, *old, *found = NULL; in pseries_setup_i8259_cascade() local
133 for_each_node_by_type(np, "interrupt-controller") { in pseries_setup_i8259_cascade()
134 if (of_device_is_compatible(np, "chrp,iic")) { in pseries_setup_i8259_cascade()
135 found = np; in pseries_setup_i8259_cascade()
152 for (old = of_node_get(found); old != NULL ; old = np) { in pseries_setup_i8259_cascade()
153 np = of_get_parent(old); in pseries_setup_i8259_cascade()
155 if (np == NULL) in pseries_setup_i8259_cascade()
157 if (strcmp(np->name, "pci") != 0) in pseries_setup_i8259_cascade()
159 addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL); in pseries_setup_i8259_cascade()
162 naddr = of_n_addr_cells(np); in pseries_setup_i8259_cascade()
[all …]
Devent_sources.c23 void request_event_sources_irqs(struct device_node *np, in request_event_sources_irqs() argument
37 opicprop = of_get_property(np, "open-pic-interrupt", &opicplen); in request_event_sources_irqs()
47 np->full_name); in request_event_sources_irqs()
58 for (index = 0; of_irq_parse_one(np, index, &oirq) == 0; in request_event_sources_irqs()
66 np->full_name); in request_event_sources_irqs()
78 "%d for %s\n", virqs[i], np->full_name); in request_event_sources_irqs()
/linux-4.1.27/drivers/net/fddi/skfp/
Dpcmplc.c207 static void sm_ph_lem_start(struct s_smc *smc, int np, int threshold);
208 static void sm_ph_lem_stop(struct s_smc *smc, int np);
221 EV_TOKEN(EVENT_PCM+phy->np,event)) ; in start_pcm_timer0()
240 int np ; in pcm_init() local
244 for (np = 0,phy = smc->y ; np < NUMPHYS ; np++,phy++) { in pcm_init()
248 phy->np = np ; in pcm_init()
252 mib->fddiPORTMy_Type = (np == PS) ? TS : TM ; in pcm_init()
255 mib->fddiPORTMy_Type = (np == PA) ? TA : in pcm_init()
256 (np == PB) ? TB : TM ; in pcm_init()
263 mib->fddiPORTMy_Type = (np == PS) ? TS : TNONE ; in pcm_init()
[all …]
/linux-4.1.27/arch/powerpc/platforms/512x/
Dmpc512x_shared.c38 struct device_node *np; in mpc512x_restart_init() local
42 np = of_find_compatible_node(NULL, NULL, reset_compat); in mpc512x_restart_init()
43 if (!np) in mpc512x_restart_init()
46 reset_module_base = of_iomap(np, 0); in mpc512x_restart_init()
47 of_node_put(np); in mpc512x_restart_init()
75 struct device_node *np; in mpc512x_set_pixel_clock() local
81 np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-diu"); in mpc512x_set_pixel_clock()
82 if (!np) { in mpc512x_set_pixel_clock()
86 clk_diu = of_clk_get(np, 0); in mpc512x_set_pixel_clock()
89 clk_diu = clk_get_sys(np->name, "ipg"); in mpc512x_set_pixel_clock()
[all …]
Dmpc5121_ads_cpld.c148 struct device_node *np = NULL; in mpc5121_ads_cpld_map() local
150 np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121ads-cpld-pic"); in mpc5121_ads_cpld_map()
151 if (!np) { in mpc5121_ads_cpld_map()
156 cpld_regs = of_iomap(np, 0); in mpc5121_ads_cpld_map()
157 of_node_put(np); in mpc5121_ads_cpld_map()
164 struct device_node *np = NULL; in mpc5121_ads_cpld_pic_init() local
168 np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121ads-cpld-pic"); in mpc5121_ads_cpld_pic_init()
169 if (!np) { in mpc5121_ads_cpld_pic_init()
177 cascade_irq = irq_of_parse_and_map(np, 0); in mpc5121_ads_cpld_pic_init()
191 cpld_pic_node = of_node_get(np); in mpc5121_ads_cpld_pic_init()
[all …]
/linux-4.1.27/drivers/target/iscsi/
Discsi_target_login.c750 struct iscsi_np *np, in iscsi_post_login_handler() argument
879 struct iscsi_np *np = (struct iscsi_np *) data; in iscsi_handle_login_thread_timeout() local
881 spin_lock_bh(&np->np_thread_lock); in iscsi_handle_login_thread_timeout()
883 &np->np_sockaddr, np->np_port); in iscsi_handle_login_thread_timeout()
885 if (np->np_login_timer_flags & ISCSI_TF_STOP) { in iscsi_handle_login_thread_timeout()
886 spin_unlock_bh(&np->np_thread_lock); in iscsi_handle_login_thread_timeout()
890 if (np->np_thread) in iscsi_handle_login_thread_timeout()
891 send_sig(SIGINT, np->np_thread, 1); in iscsi_handle_login_thread_timeout()
893 np->np_login_timer_flags &= ~ISCSI_TF_RUNNING; in iscsi_handle_login_thread_timeout()
894 spin_unlock_bh(&np->np_thread_lock); in iscsi_handle_login_thread_timeout()
[all …]
/linux-4.1.27/arch/powerpc/platforms/44x/
Dwarp.c71 struct device_node *np; in warp_post_info() local
76 np = of_find_compatible_node(NULL, NULL, "pika,fpga-sd"); in warp_post_info()
77 if (np == NULL) in warp_post_info()
80 fpga = of_iomap(np, 0); in warp_post_info()
81 of_node_put(np); in warp_post_info()
175 struct device_node *np, *child; in pika_setup_leds() local
177 np = of_find_compatible_node(NULL, NULL, "gpio-leds"); in pika_setup_leds()
178 if (!np) { in pika_setup_leds()
183 for_each_child_of_node(np, child) in pika_setup_leds()
189 of_node_put(np); in pika_setup_leds()
[all …]
Dcanyonlands.c70 struct device_node *np; in ppc460ex_canyonlands_fixup() local
73 np = of_find_compatible_node(NULL, NULL, "amcc,ppc460ex-bcsr"); in ppc460ex_canyonlands_fixup()
74 if (!np) { in ppc460ex_canyonlands_fixup()
79 bcsr = of_iomap(np, 0); in ppc460ex_canyonlands_fixup()
80 of_node_put(np); in ppc460ex_canyonlands_fixup()
88 np = of_find_compatible_node(NULL, NULL, "ibm,ppc4xx-gpio"); in ppc460ex_canyonlands_fixup()
89 if (!np) { in ppc460ex_canyonlands_fixup()
94 vaddr = of_iomap(np, 0); in ppc460ex_canyonlands_fixup()
95 of_node_put(np); in ppc460ex_canyonlands_fixup()
Dppc476.c125 struct device_node *np; in ppc47x_init_irq() local
128 for_each_node_with_property(np, "interrupt-controller") { in ppc47x_init_irq()
129 if (of_get_property(np, "interrupts", NULL) == NULL) in ppc47x_init_irq()
132 if (np == NULL) in ppc47x_init_irq()
136 if (of_device_is_compatible(np, "chrp,open-pic")) { in ppc47x_init_irq()
141 mpic_alloc(np, 0, MPIC_NO_RESET, 0, 0, " MPIC "); in ppc47x_init_irq()
227 struct device_node *np = NULL; in ppc47x_get_board_rev() local
230 np = of_find_compatible_node(NULL, NULL, "ibm,currituck-fpga"); in ppc47x_get_board_rev()
233 np = of_find_compatible_node(NULL, NULL, "ibm,akebono-fpga"); in ppc47x_get_board_rev()
237 if (!np) in ppc47x_get_board_rev()
[all …]
Diss4xx.c55 struct device_node *np; in iss4xx_init_irq() local
58 for_each_node_with_property(np, "interrupt-controller") { in iss4xx_init_irq()
59 if (of_get_property(np, "interrupts", NULL) == NULL) in iss4xx_init_irq()
62 if (np == NULL) in iss4xx_init_irq()
66 if (of_device_is_compatible(np, "ibm,uic")) { in iss4xx_init_irq()
70 } else if (of_device_is_compatible(np, "chrp,open-pic")) { in iss4xx_init_irq()
74 struct mpic *mpic = mpic_alloc(np, 0, MPIC_NO_RESET, 0, 0, " MPIC "); in iss4xx_init_irq()
/linux-4.1.27/drivers/irqchip/
Dirq-orion.c53 static int __init orion_irq_init(struct device_node *np, in orion_irq_init() argument
61 while (of_address_to_resource(np, num_chips, &r) == 0) in orion_irq_init()
64 orion_irq_domain = irq_domain_add_linear(np, in orion_irq_init()
68 panic("%s: unable to add irq domain\n", np->name); in orion_irq_init()
71 ORION_IRQS_PER_CHIP, 1, np->name, in orion_irq_init()
75 panic("%s: unable to alloc irq domain gc\n", np->name); in orion_irq_init()
81 of_address_to_resource(np, n, &r); in orion_irq_init()
83 if (!request_mem_region(r.start, resource_size(&r), np->name)) in orion_irq_init()
85 np->name, n); in orion_irq_init()
89 panic("%s: unable to map resource %d", np->name, n); in orion_irq_init()
[all …]
Dirq-dw-apb-ictl.c68 static int __init dw_apb_ictl_init(struct device_node *np, in dw_apb_ictl_init() argument
80 irq = irq_of_parse_and_map(np, 0); in dw_apb_ictl_init()
82 pr_err("%s: unable to parse irq\n", np->full_name); in dw_apb_ictl_init()
86 ret = of_address_to_resource(np, 0, &r); in dw_apb_ictl_init()
88 pr_err("%s: unable to get resource\n", np->full_name); in dw_apb_ictl_init()
92 if (!request_mem_region(r.start, resource_size(&r), np->full_name)) { in dw_apb_ictl_init()
93 pr_err("%s: unable to request mem region\n", np->full_name); in dw_apb_ictl_init()
99 pr_err("%s: unable to map resource\n", np->full_name); in dw_apb_ictl_init()
123 domain = irq_domain_add_linear(np, nrirqs, in dw_apb_ictl_init()
126 pr_err("%s: unable to add irq domain\n", np->full_name); in dw_apb_ictl_init()
[all …]
/linux-4.1.27/drivers/media/v4l2-core/
Dv4l2-of.c188 struct device_node *np; in v4l2_of_parse_link() local
192 np = of_get_parent(node); in v4l2_of_parse_link()
193 of_property_read_u32(np, "reg", &link->local_port); in v4l2_of_parse_link()
194 np = of_get_next_parent(np); in v4l2_of_parse_link()
195 if (of_node_cmp(np->name, "ports") == 0) in v4l2_of_parse_link()
196 np = of_get_next_parent(np); in v4l2_of_parse_link()
197 link->local_node = np; in v4l2_of_parse_link()
199 np = of_parse_phandle(node, "remote-endpoint", 0); in v4l2_of_parse_link()
200 if (!np) { in v4l2_of_parse_link()
205 np = of_get_parent(np); in v4l2_of_parse_link()
[all …]
/linux-4.1.27/net/ipv6/
Dipv6_sockglue.c143 struct ipv6_pinfo *np = inet6_sk(sk); in do_ipv6_setsockopt() local
235 opt = xchg((__force struct ipv6_txoptions **)&np->opt, in do_ipv6_setsockopt()
241 pktopt = xchg(&np->pktoptions, NULL); in do_ipv6_setsockopt()
267 np->rxopt.bits.rxinfo = valbool; in do_ipv6_setsockopt()
274 np->rxopt.bits.rxoinfo = valbool; in do_ipv6_setsockopt()
281 np->rxopt.bits.rxhlim = valbool; in do_ipv6_setsockopt()
288 np->rxopt.bits.rxohlim = valbool; in do_ipv6_setsockopt()
295 np->rxopt.bits.srcrt = valbool; in do_ipv6_setsockopt()
302 np->rxopt.bits.osrcrt = valbool; in do_ipv6_setsockopt()
309 np->rxopt.bits.hopopts = valbool; in do_ipv6_setsockopt()
[all …]
Ddatagram.c47 struct ipv6_pinfo *np = inet6_sk(sk); in __ip6_datagram_connect() local
70 if (np->sndflow) { in __ip6_datagram_connect()
111 if (ipv6_addr_any(&np->saddr) || in __ip6_datagram_connect()
112 ipv6_mapped_addr_any(&np->saddr)) in __ip6_datagram_connect()
113 ipv6_addr_set_v4mapped(inet->inet_saddr, &np->saddr); in __ip6_datagram_connect()
138 sk->sk_bound_dev_if = np->mcast_oif; in __ip6_datagram_connect()
148 np->flow_label = fl6.flowlabel; in __ip6_datagram_connect()
159 fl6.saddr = np->saddr; in __ip6_datagram_connect()
166 fl6.flowi6_oif = np->sticky_pktinfo.ipi6_ifindex; in __ip6_datagram_connect()
169 fl6.flowi6_oif = np->mcast_oif; in __ip6_datagram_connect()
[all …]
/linux-4.1.27/arch/arm/mach-vt8500/
Dvt8500.c77 struct device_node *np; in vt8500_init() local
86 np = of_find_compatible_node(NULL, NULL, "via,vt8500-gpio"); in vt8500_init()
87 if (np) { in vt8500_init()
88 gpio_base = of_iomap(np, 0); in vt8500_init()
94 of_node_put(np); in vt8500_init()
115 np = of_find_compatible_node(NULL, NULL, "wm,wm8505-gpio"); in vt8500_init()
116 if (!np) in vt8500_init()
117 np = of_find_compatible_node(NULL, NULL, in vt8500_init()
119 if (np) { in vt8500_init()
120 gpio_base = of_iomap(np, 0); in vt8500_init()
[all …]
/linux-4.1.27/drivers/net/
Dnetconsole.c109 struct netpoll np; member
184 nt->np.name = "netconsole"; in alloc_param_target()
185 strlcpy(nt->np.dev_name, "eth0", IFNAMSIZ); in alloc_param_target()
186 nt->np.local_port = 6665; in alloc_param_target()
187 nt->np.remote_port = 6666; in alloc_param_target()
189 eth_broadcast_addr(nt->np.remote_mac); in alloc_param_target()
192 err = netpoll_parse_options(&nt->np, target_config); in alloc_param_target()
196 err = netpoll_setup(&nt->np); in alloc_param_target()
212 netpoll_cleanup(&nt->np); in free_param_target()
263 return snprintf(buf, PAGE_SIZE, "%s\n", nt->np.dev_name); in show_dev_name()
[all …]
/linux-4.1.27/drivers/iommu/
Dof_iommu.c100 struct device_node *np; member
106 void of_iommu_set_ops(struct device_node *np, struct iommu_ops *ops) in of_iommu_set_ops() argument
114 iommu->np = np; in of_iommu_set_ops()
121 struct iommu_ops *of_iommu_get_ops(struct device_node *np) in of_iommu_get_ops() argument
128 if (node->np == np) { in of_iommu_get_ops()
140 struct device_node *np; in of_iommu_configure() local
157 np = iommu_spec.np; in of_iommu_configure()
158 ops = of_iommu_get_ops(np); in of_iommu_configure()
163 of_node_put(np); in of_iommu_configure()
170 of_node_put(np); in of_iommu_configure()
[all …]
/linux-4.1.27/drivers/dma/
Dof-dma.c38 if (ofdma->of_node == dma_spec->np) in of_dma_find_controller()
42 dma_spec->np->full_name); in of_dma_find_controller()
60 int of_dma_controller_register(struct device_node *np, in of_dma_controller_register() argument
67 if (!np || !of_dma_xlate) { in of_dma_controller_register()
76 ofdma->of_node = np; in of_dma_controller_register()
95 void of_dma_controller_free(struct device_node *np) in of_dma_controller_free() argument
102 if (ofdma->of_node == np) { in of_dma_controller_free()
123 static int of_dma_match_channel(struct device_node *np, const char *name, in of_dma_match_channel() argument
128 if (of_property_read_string_index(np, "dma-names", index, &s)) in of_dma_match_channel()
134 if (of_parse_phandle_with_args(np, "dmas", "#dma-cells", index, in of_dma_match_channel()
[all …]
/linux-4.1.27/arch/arm/mach-mvebu/
Dcoherency.c100 static void __init armada_370_coherency_init(struct device_node *np) in armada_370_coherency_init() argument
104 of_address_to_resource(np, 0, &res); in armada_370_coherency_init()
113 coherency_base = of_iomap(np, 0); in armada_370_coherency_init()
114 coherency_cpu_base = of_iomap(np, 1); in armada_370_coherency_init()
138 static void __init armada_375_380_coherency_init(struct device_node *np) in armada_375_380_coherency_init() argument
142 coherency_cpu_base = of_iomap(np, 0); in armada_375_380_coherency_init()
170 struct device_node *np; in coherency_type() local
198 np = of_find_matching_node_and_match(NULL, of_coherency_table, &match); in coherency_type()
199 if (!np) in coherency_type()
204 of_node_put(np); in coherency_type()
[all …]
Dpmsu.c164 struct device_node *np; in mvebu_v7_pmsu_init() local
168 np = of_find_matching_node(NULL, of_pmsu_table); in mvebu_v7_pmsu_init()
169 if (!np) in mvebu_v7_pmsu_init()
174 if (of_address_to_resource(np, 0, &res)) { in mvebu_v7_pmsu_init()
180 if (of_device_is_compatible(np, "marvell,armada-370-xp-pmsu")) { in mvebu_v7_pmsu_init()
187 np->full_name)) { in mvebu_v7_pmsu_init()
204 of_node_put(np); in mvebu_v7_pmsu_init()
384 struct device_node *np; in armada_370_cpuidle_init() local
387 np = of_find_compatible_node(NULL, NULL, "marvell,coherency-fabric"); in armada_370_cpuidle_init()
388 if (!np) in armada_370_cpuidle_init()
[all …]
Dcpu-reset.c42 static int mvebu_cpu_reset_map(struct device_node *np, int res_idx) in mvebu_cpu_reset_map() argument
46 if (of_address_to_resource(np, res_idx, &res)) { in mvebu_cpu_reset_map()
52 np->full_name)) { in mvebu_cpu_reset_map()
71 struct device_node *np; in mvebu_cpu_reset_init() local
75 np = of_find_compatible_node(NULL, NULL, in mvebu_cpu_reset_init()
77 if (np) { in mvebu_cpu_reset_init()
84 np = of_find_compatible_node(NULL, NULL, in mvebu_cpu_reset_init()
86 if (np) { in mvebu_cpu_reset_init()
93 if (!np) in mvebu_cpu_reset_init()
96 ret = mvebu_cpu_reset_map(np, res_idx); in mvebu_cpu_reset_init()
[all …]
Dpm.c91 struct device_node *np; in mvebu_internal_reg_base() local
94 np = of_find_node_by_name(NULL, "internal-regs"); in mvebu_internal_reg_base()
95 BUG_ON(!np); in mvebu_internal_reg_base()
105 return of_translate_address(np, in_addr); in mvebu_internal_reg_base()
182 struct device_node *np; in mvebu_pm_init() local
188 np = of_find_compatible_node(NULL, NULL, in mvebu_pm_init()
190 if (!np) in mvebu_pm_init()
193 if (of_address_to_resource(np, 0, &res)) { in mvebu_pm_init()
194 of_node_put(np); in mvebu_pm_init()
199 np->full_name)) { in mvebu_pm_init()
[all …]
Dpm-board.c81 struct device_node *np; in mvebu_armada_xp_gp_pm_init() local
88 np = of_find_node_by_name(NULL, "pm_pic"); in mvebu_armada_xp_gp_pm_init()
89 if (!np) in mvebu_armada_xp_gp_pm_init()
96 pic_gpios[i] = of_get_named_gpio(np, "ctrl-gpios", i); in mvebu_armada_xp_gp_pm_init()
121 ret = of_parse_phandle_with_fixed_args(np, "ctrl-gpios", 2, in mvebu_armada_xp_gp_pm_init()
129 gpio_ctrl_np = args.np; in mvebu_armada_xp_gp_pm_init()
140 of_node_put(np); in mvebu_armada_xp_gp_pm_init()
/linux-4.1.27/drivers/gpu/drm/exynos/
Dexynos_drm_dpi.c178 struct device_node *np; in of_get_child_by_name_reg() local
180 for_each_child_of_node(parent, np) { in of_get_child_by_name_reg()
183 if (!np->name || of_node_cmp(np->name, name)) in of_get_child_by_name_reg()
186 if (of_property_read_u32(np, "reg", &r) < 0) in of_get_child_by_name_reg()
193 return np; in of_get_child_by_name_reg()
221 struct device_node *np; in of_graph_get_remote_port_parent() local
224 np = of_parse_phandle(node, "remote-endpoint", 0); in of_graph_get_remote_port_parent()
227 for (depth = 3; depth && np; depth--) { in of_graph_get_remote_port_parent()
228 np = of_get_next_parent(np); in of_graph_get_remote_port_parent()
229 if (depth == 2 && of_node_cmp(np->name, "ports")) in of_graph_get_remote_port_parent()
[all …]
/linux-4.1.27/arch/powerpc/platforms/52xx/
Dmpc52xx_common.c59 struct device_node *np; in mpc5200_setup_xlb_arbiter() local
62 np = of_find_matching_node(NULL, mpc52xx_xlb_ids); in mpc5200_setup_xlb_arbiter()
63 xlb = of_iomap(np, 0); in mpc5200_setup_xlb_arbiter()
64 of_node_put(np); in mpc5200_setup_xlb_arbiter()
137 struct device_node *np; in mpc52xx_map_common_devices() local
143 for_each_matching_node(np, mpc52xx_gpt_ids) { in mpc52xx_map_common_devices()
144 if (of_get_property(np, "fsl,has-wdt", NULL) || in mpc52xx_map_common_devices()
145 of_get_property(np, "has-wdt", NULL)) { in mpc52xx_map_common_devices()
146 mpc52xx_wdt = of_iomap(np, 0); in mpc52xx_map_common_devices()
147 of_node_put(np); in mpc52xx_map_common_devices()
[all …]
Dlite5200.c59 struct device_node *np; in lite5200_fix_clock_config() local
62 np = of_find_matching_node(NULL, mpc5200_cdm_ids); in lite5200_fix_clock_config()
63 cdm = of_iomap(np, 0); in lite5200_fix_clock_config()
64 of_node_put(np); in lite5200_fix_clock_config()
93 struct device_node *np; in lite5200_fix_port_config() local
97 np = of_find_matching_node(NULL, mpc5200_gpio_ids); in lite5200_fix_port_config()
98 gpio = of_iomap(np, 0); in lite5200_fix_port_config()
99 of_node_put(np); in lite5200_fix_port_config()
/linux-4.1.27/drivers/thermal/
Dof-thermal.c224 if (tbp->cooling_device == cdev->np) { in of_thermal_bind()
252 if (tbp->cooling_device == cdev->np) { in of_thermal_unbind()
459 struct device_node *np, *child, *sensor_np; in thermal_zone_of_sensor_register() local
462 np = of_find_node_by_name(NULL, "thermal-zones"); in thermal_zone_of_sensor_register()
463 if (!np) in thermal_zone_of_sensor_register()
467 of_node_put(np); in thermal_zone_of_sensor_register()
473 for_each_child_of_node(np, child) { in thermal_zone_of_sensor_register()
492 sensor_specs.np->name, sensor_specs.args_count); in thermal_zone_of_sensor_register()
497 if (sensor_specs.np == sensor_np && id == sensor_id) { in thermal_zone_of_sensor_register()
503 of_node_put(sensor_specs.np); in thermal_zone_of_sensor_register()
[all …]
/linux-4.1.27/drivers/net/cris/
Deth_v10.c200 static void e100_hardware_send_packet(struct net_local* np, char *buf, int length);
288 struct net_local* np; in etrax_ethernet_init() local
303 np = netdev_priv(dev); in etrax_ethernet_init()
320 spin_lock_init(&np->lock); in etrax_ethernet_init()
321 spin_lock_init(&np->led_lock); in etrax_ethernet_init()
322 spin_lock_init(&np->transceiver_lock); in etrax_ethernet_init()
400 np->mii_if.phy_id_mask = 0x1f; in etrax_ethernet_init()
401 np->mii_if.reg_num_mask = 0x1f; in etrax_ethernet_init()
402 np->mii_if.dev = dev; in etrax_ethernet_init()
403 np->mii_if.mdio_read = e100_get_mdio_reg; in etrax_ethernet_init()
[all …]
/linux-4.1.27/drivers/usb/host/
Dfsl-mph-dr-of.c45 static struct fsl_usb2_dev_data *get_dr_mode_data(struct device_node *np) in get_dr_mode_data() argument
50 prop = of_get_property(np, "dr_mode", NULL); in get_dr_mode_data()
58 np->full_name); in get_dr_mode_data()
122 static int usb_get_ver_info(struct device_node *np) in usb_get_ver_info() argument
131 if (of_device_is_compatible(np, "fsl-usb2-dr")) { in usb_get_ver_info()
132 if (of_device_is_compatible(np, "fsl-usb2-dr-v1.6")) in usb_get_ver_info()
134 else if (of_device_is_compatible(np, "fsl-usb2-dr-v2.2")) in usb_get_ver_info()
136 else if (of_device_is_compatible(np, "fsl-usb2-dr-v2.4")) in usb_get_ver_info()
145 if (of_device_is_compatible(np, "fsl,mpc5121-usb2-dr")) in usb_get_ver_info()
148 if (of_device_is_compatible(np, "fsl-usb2-mph")) { in usb_get_ver_info()
[all …]
Dehci-ppc-of.c102 struct device_node *np; in ehci_hcd_ppc_of_probe() local
135 np = of_find_compatible_node(NULL, NULL, "ibm,usb-ohci-440epx"); in ehci_hcd_ppc_of_probe()
136 if (np != NULL) { in ehci_hcd_ppc_of_probe()
138 if (!of_address_to_resource(np, 0, &res)) in ehci_hcd_ppc_of_probe()
190 struct device_node *np; in ehci_hcd_ppc_of_remove() local
203 np = of_find_compatible_node(NULL, NULL, "ibm,usb-ohci-440epx"); in ehci_hcd_ppc_of_remove()
204 if (np != NULL) { in ehci_hcd_ppc_of_remove()
205 if (!of_address_to_resource(np, 0, &res)) in ehci_hcd_ppc_of_remove()
213 of_node_put(np); in ehci_hcd_ppc_of_remove()
/linux-4.1.27/arch/arm/mach-shmobile/
Dpm-rmobile.c245 static void __init add_special_pd(struct device_node *np, enum pd_types type) in add_special_pd() argument
250 pd = of_parse_phandle(np, "power-domains", 0); in add_special_pd()
267 np->full_name); in add_special_pd()
276 struct device_node *np; in get_special_pds() local
280 for_each_node_by_type(np, "cpu") in get_special_pds()
281 add_special_pd(np, PD_CPU); in get_special_pds()
288 for_each_matching_node_and_match(np, special_ids, &id) in get_special_pds()
289 add_special_pd(np, (enum pd_types)id->data); in get_special_pds()
311 static void __init rmobile_setup_pm_domain(struct device_node *np, in rmobile_setup_pm_domain() argument
316 switch (pd_type(np)) { in rmobile_setup_pm_domain()
[all …]
Dtimer.c40 struct device_node *np, *cpus; in shmobile_init_delay() local
50 for_each_child_of_node(cpus, np) { in shmobile_init_delay()
53 if (!of_property_read_u32(np, "clock-frequency", &freq)) in shmobile_init_delay()
56 if (of_device_is_compatible(np, "arm,cortex-a8") || in shmobile_init_delay()
57 of_device_is_compatible(np, "arm,cortex-a9")) { in shmobile_init_delay()
59 } else if (of_device_is_compatible(np, "arm,cortex-a7")) { in shmobile_init_delay()
62 } else if (of_device_is_compatible(np, "arm,cortex-a15")) { in shmobile_init_delay()
/linux-4.1.27/drivers/video/fbdev/omap2/dss/
Ddss-of.c91 struct device_node *np; in dss_of_port_get_parent_device() local
97 np = of_get_next_parent(port); in dss_of_port_get_parent_device()
99 for (i = 0; i < 2 && np; ++i) { in dss_of_port_get_parent_device()
102 prop = of_find_property(np, "compatible", NULL); in dss_of_port_get_parent_device()
105 return np; in dss_of_port_get_parent_device()
107 np = of_get_next_parent(np); in dss_of_port_get_parent_device()
127 struct device_node *np; in omapdss_of_get_remote_port() local
129 np = of_parse_phandle(node, "remote-endpoint", 0); in omapdss_of_get_remote_port()
130 if (!np) in omapdss_of_get_remote_port()
133 np = of_get_next_parent(np); in omapdss_of_get_remote_port()
[all …]
/linux-4.1.27/include/linux/usb/
Dof.h15 enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np);
16 enum usb_device_speed of_usb_get_maximum_speed(struct device_node *np);
17 bool of_usb_host_tpl_support(struct device_node *np);
19 static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np) in of_usb_get_dr_mode() argument
25 of_usb_get_maximum_speed(struct device_node *np) in of_usb_get_maximum_speed() argument
29 static inline bool of_usb_host_tpl_support(struct device_node *np) in of_usb_host_tpl_support() argument
36 enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
38 static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) in of_usb_get_phy_mode() argument
/linux-4.1.27/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_platform.c129 struct device_node *np = pdev->dev.of_node; in stmmac_probe_config_dt() local
133 if (!np) in stmmac_probe_config_dt()
157 *mac = of_get_mac_address(np); in stmmac_probe_config_dt()
158 plat->interface = of_get_phy_mode(np); in stmmac_probe_config_dt()
161 if (of_property_read_u32(np, "max-speed", &plat->max_speed)) in stmmac_probe_config_dt()
164 plat->bus_id = of_alias_get_id(np, "ethernet"); in stmmac_probe_config_dt()
174 if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0) in stmmac_probe_config_dt()
185 of_property_read_u32(np, "tx-fifo-depth", &plat->tx_fifo_size); in stmmac_probe_config_dt()
187 of_property_read_u32(np, "rx-fifo-depth", &plat->rx_fifo_size); in stmmac_probe_config_dt()
190 of_property_read_bool(np, "snps,force_sf_dma_mode"); in stmmac_probe_config_dt()
[all …]
/linux-4.1.27/drivers/mfd/
Dsyscon.c34 struct device_node *np; member
45 static struct syscon *of_syscon_register(struct device_node *np) in of_syscon_register() argument
53 if (!of_device_is_compatible(np, "syscon")) in of_syscon_register()
60 base = of_iomap(np, 0); in of_syscon_register()
67 if (of_property_read_bool(np, "big-endian")) in of_syscon_register()
69 else if (of_property_read_bool(np, "little-endian")) in of_syscon_register()
80 syscon->np = np; in of_syscon_register()
95 struct regmap *syscon_node_to_regmap(struct device_node *np) in syscon_node_to_regmap() argument
102 if (entry->np == np) { in syscon_node_to_regmap()
110 syscon = of_syscon_register(np); in syscon_node_to_regmap()
[all …]
/linux-4.1.27/drivers/mmc/host/
Dsdhci-pltfm.c55 static bool sdhci_of_wp_inverted(struct device_node *np) in sdhci_of_wp_inverted() argument
57 if (of_get_property(np, "sdhci,wp-inverted", NULL) || in sdhci_of_wp_inverted()
58 of_get_property(np, "wp-inverted", NULL)) in sdhci_of_wp_inverted()
71 struct device_node *np = pdev->dev.of_node; in sdhci_get_of_property() local
78 if (of_get_property(np, "sdhci,auto-cmd12", NULL)) in sdhci_get_of_property()
81 if (of_get_property(np, "sdhci,1-bit-only", NULL) || in sdhci_get_of_property()
82 (of_property_read_u32(np, "bus-width", &bus_width) == 0 && in sdhci_get_of_property()
86 if (sdhci_of_wp_inverted(np)) in sdhci_get_of_property()
89 if (of_get_property(np, "broken-cd", NULL)) in sdhci_get_of_property()
92 if (of_get_property(np, "no-1-8-v", NULL)) in sdhci_get_of_property()
[all …]
/linux-4.1.27/drivers/mmc/core/
Dhost.c315 struct device_node *np; in mmc_of_parse() local
324 np = host->parent->of_node; in mmc_of_parse()
327 if (of_property_read_u32(np, "bus-width", &bus_width) < 0) { in mmc_of_parse()
349 of_property_read_u32(np, "max-frequency", &host->f_max); in mmc_of_parse()
364 if (of_find_property(np, "non-removable", &len)) { in mmc_of_parse()
367 cd_cap_invert = of_property_read_bool(np, "cd-inverted"); in mmc_of_parse()
369 if (of_find_property(np, "broken-cd", &len)) in mmc_of_parse()
395 ro_cap_invert = of_property_read_bool(np, "wp-inverted"); in mmc_of_parse()
407 if (of_find_property(np, "cap-sd-highspeed", &len)) in mmc_of_parse()
409 if (of_find_property(np, "cap-mmc-highspeed", &len)) in mmc_of_parse()
[all …]
Dpwrseq.c35 static struct mmc_pwrseq_match *mmc_pwrseq_find(struct device_node *np) in mmc_pwrseq_find() argument
41 if (of_device_is_compatible(np, pwrseq_match[i].compatible)) { in mmc_pwrseq_find()
53 struct device_node *np; in mmc_pwrseq_alloc() local
58 np = of_parse_phandle(host->parent->of_node, "mmc-pwrseq", 0); in mmc_pwrseq_alloc()
59 if (!np) in mmc_pwrseq_alloc()
62 pdev = of_find_device_by_node(np); in mmc_pwrseq_alloc()
68 match = mmc_pwrseq_find(np); in mmc_pwrseq_alloc()
84 of_node_put(np); in mmc_pwrseq_alloc()
/linux-4.1.27/arch/mips/bmips/
Dsetup.c127 struct device_node *np; in plat_time_init() local
130 np = of_find_node_by_name(NULL, "cpus"); in plat_time_init()
131 if (!np) in plat_time_init()
133 if (of_property_read_u32(np, "mips-hpt-frequency", &freq) < 0) in plat_time_init()
135 of_node_put(np); in plat_time_init()
170 struct device_node *np; in device_tree_init() local
175 np = of_find_node_by_name(NULL, "cpus"); in device_tree_init()
176 if (np && of_get_available_child_count(np) <= 1) in device_tree_init()
178 of_node_put(np); in device_tree_init()
/linux-4.1.27/arch/arm/mach-omap2/
Dtimer.c171 struct device_node *np; in omap_get_timer_dt() local
173 for_each_matching_node(np, match) { in omap_get_timer_dt()
174 if (!of_device_is_available(np)) in omap_get_timer_dt()
177 if (property && !of_get_property(np, property, NULL)) in omap_get_timer_dt()
180 if (!property && (of_get_property(np, "ti,timer-alwon", NULL) || in omap_get_timer_dt()
181 of_get_property(np, "ti,timer-dsp", NULL) || in omap_get_timer_dt()
182 of_get_property(np, "ti,timer-pwm", NULL) || in omap_get_timer_dt()
183 of_get_property(np, "ti,timer-secure", NULL))) in omap_get_timer_dt()
186 of_add_property(np, &device_disabled); in omap_get_timer_dt()
187 return np; in omap_get_timer_dt()
[all …]
/linux-4.1.27/drivers/input/touchscreen/
Dof_touchscreen.c17 static u32 of_get_optional_u32(struct device_node *np, in of_get_optional_u32() argument
22 of_property_read_u32(np, property, &val); in of_get_optional_u32()
59 struct device_node *np = dev->dev.parent->of_node; in touchscreen_parse_of_params() local
66 maximum = of_get_optional_u32(np, "touchscreen-size-x"); in touchscreen_parse_of_params()
67 fuzz = of_get_optional_u32(np, "touchscreen-fuzz-x"); in touchscreen_parse_of_params()
73 maximum = of_get_optional_u32(np, "touchscreen-size-y"); in touchscreen_parse_of_params()
74 fuzz = of_get_optional_u32(np, "touchscreen-fuzz-y"); in touchscreen_parse_of_params()
80 maximum = of_get_optional_u32(np, "touchscreen-max-pressure"); in touchscreen_parse_of_params()
81 fuzz = of_get_optional_u32(np, "touchscreen-fuzz-pressure"); in touchscreen_parse_of_params()
/linux-4.1.27/arch/arm/kernel/
Dpsci.c147 static int get_set_conduit_method(struct device_node *np) in get_set_conduit_method() argument
153 if (of_property_read_string(np, "method", &method)) { in get_set_conduit_method()
183 static int psci_0_2_init(struct device_node *np) in psci_0_2_init() argument
187 err = get_set_conduit_method(np); in psci_0_2_init()
237 of_node_put(np); in psci_0_2_init()
244 static int psci_0_1_init(struct device_node *np) in psci_0_1_init() argument
249 err = get_set_conduit_method(np); in psci_0_1_init()
256 if (!of_property_read_u32(np, "cpu_suspend", &id)) { in psci_0_1_init()
261 if (!of_property_read_u32(np, "cpu_off", &id)) { in psci_0_1_init()
266 if (!of_property_read_u32(np, "cpu_on", &id)) { in psci_0_1_init()
[all …]
/linux-4.1.27/drivers/clk/versatile/
Dclk-versatile.c60 static void __init cm_osc_setup(struct device_node *np, in cm_osc_setup() argument
64 const char *clk_name = np->name; in cm_osc_setup()
71 parent = of_get_parent(np); in cm_osc_setup()
83 parent_name = of_clk_get_parent_name(np, 0); in cm_osc_setup()
86 of_clk_add_provider(np, of_clk_src_simple_get, clk); in cm_osc_setup()
89 static void __init of_integrator_cm_osc_setup(struct device_node *np) in of_integrator_cm_osc_setup() argument
91 cm_osc_setup(np, &cm_auxosc_desc); in of_integrator_cm_osc_setup()
96 static void __init of_versatile_cm_osc_setup(struct device_node *np) in of_versatile_cm_osc_setup() argument
98 cm_osc_setup(np, &versatile_auxosc_desc); in of_versatile_cm_osc_setup()
/linux-4.1.27/arch/powerpc/platforms/embedded6xx/
Dmvme5100.c59 struct device_node *np; in mvme5100_pic_init() local
65 np = of_find_node_by_type(NULL, "open-pic"); in mvme5100_pic_init()
66 if (!np) { in mvme5100_pic_init()
71 mpic = mpic_alloc(np, pci_membase, 0, 16, 256, " OpenPIC "); in mvme5100_pic_init()
74 of_node_put(np); in mvme5100_pic_init()
92 np = of_find_compatible_node(NULL, "pci", "mpc10x-pci"); in mvme5100_pic_init()
93 if (np) { in mvme5100_pic_init()
94 prop = of_get_property(np, "8259-interrupt-acknowledge", NULL); in mvme5100_pic_init()
99 of_node_put(np); in mvme5100_pic_init()
162 struct device_node *np; in mvme5100_setup_arch() local
[all …]
Dc2k.c44 struct device_node *np; in c2k_setup_arch() local
52 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-mpp"); in c2k_setup_arch()
53 reg = of_get_property(np, "reg", NULL); in c2k_setup_arch()
54 paddr = of_translate_address(np, reg); in c2k_setup_arch()
55 of_node_put(np); in c2k_setup_arch()
58 np = of_find_compatible_node(NULL, NULL, "marvell,mv64360-gpp"); in c2k_setup_arch()
59 reg = of_get_property(np, "reg", NULL); in c2k_setup_arch()
60 paddr = of_translate_address(np, reg); in c2k_setup_arch()
61 of_node_put(np); in c2k_setup_arch()
Dflipper-pic.c111 static int flipper_pic_match(struct irq_domain *h, struct device_node *np) in flipper_pic_match() argument
134 struct irq_domain * __init flipper_pic_init(struct device_node *np) in flipper_pic_init() argument
142 pi = of_get_parent(np); in flipper_pic_init()
163 irq_domain = irq_domain_add_linear(np, FLIPPER_NR_IRQS, in flipper_pic_init()
196 struct device_node *np; in flipper_pic_probe() local
198 np = of_find_compatible_node(NULL, NULL, "nintendo,flipper-pic"); in flipper_pic_probe()
199 BUG_ON(!np); in flipper_pic_probe()
201 flipper_irq_host = flipper_pic_init(np); in flipper_pic_probe()
206 of_node_put(np); in flipper_pic_probe()
/linux-4.1.27/arch/powerpc/platforms/82xx/
Dpq2.c47 static void __init pq2_pci_add_bridge(struct device_node *np) in pq2_pci_add_bridge() argument
52 if (of_address_to_resource(np, 0, &r) || r.end - r.start < 0x10b) in pq2_pci_add_bridge()
57 hose = pcibios_alloc_controller(np); in pq2_pci_add_bridge()
61 hose->dn = np; in pq2_pci_add_bridge()
64 pci_process_bridge_OF_ranges(hose, np, 1); in pq2_pci_add_bridge()
74 struct device_node *np; in pq2_init_pci() local
78 for_each_compatible_node(np, NULL, "fsl,pq2-pci") in pq2_init_pci()
79 pq2_pci_add_bridge(np); in pq2_init_pci()
Dpq2ads-pci-pic.c122 struct device_node *np; in pq2ads_pci_init_irq() local
126 np = of_find_compatible_node(NULL, NULL, "fsl,pq2ads-pci-pic"); in pq2ads_pci_init_irq()
127 if (!np) { in pq2ads_pci_init_irq()
129 of_node_put(np); in pq2ads_pci_init_irq()
133 irq = irq_of_parse_and_map(np, 0); in pq2ads_pci_init_irq()
136 of_node_put(np); in pq2ads_pci_init_irq()
142 of_node_put(np); in pq2ads_pci_init_irq()
148 priv->regs = of_iomap(np, 0); in pq2ads_pci_init_irq()
158 host = irq_domain_add_linear(np, NUM_IRQS, &pci_pic_host_ops, priv); in pq2ads_pci_init_irq()
168 of_node_put(np); in pq2ads_pci_init_irq()
[all …]
Dpq2fads.c36 struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic"); in pq2fads_pic_init() local
37 if (!np) { in pq2fads_pic_init()
42 cpm2_pic_init(np); in pq2fads_pic_init()
43 of_node_put(np); in pq2fads_pic_init()
120 struct device_node *np; in pq2fads_setup_arch() local
128 np = of_find_compatible_node(NULL, NULL, "fsl,pq2fads-bcsr"); in pq2fads_setup_arch()
129 if (!np) { in pq2fads_setup_arch()
134 bcsr = of_iomap(np, 0); in pq2fads_setup_arch()
135 of_node_put(np); in pq2fads_setup_arch()
Dmpc8272_ads.c38 struct device_node *np = of_find_compatible_node(NULL, NULL, in mpc8272_ads_pic_init() local
40 if (!np) { in mpc8272_ads_pic_init()
45 cpm2_pic_init(np); in mpc8272_ads_pic_init()
46 of_node_put(np); in mpc8272_ads_pic_init()
138 struct device_node *np; in mpc8272_ads_setup_arch() local
146 np = of_find_compatible_node(NULL, NULL, "fsl,mpc8272ads-bcsr"); in mpc8272_ads_setup_arch()
147 if (!np) { in mpc8272_ads_setup_arch()
152 bcsr = of_iomap(np, 0); in mpc8272_ads_setup_arch()
153 of_node_put(np); in mpc8272_ads_setup_arch()
/linux-4.1.27/arch/arm/mach-mxs/
Dmach-mxs.c92 struct device_node *np; in mxs_get_ocotp() local
101 np = of_find_compatible_node(NULL, NULL, "fsl,ocotp"); in mxs_get_ocotp()
102 ocotp_base = of_iomap(np, 0); in mxs_get_ocotp()
166 struct device_node *np, *from = NULL; in update_fec_mac_prop() local
174 np = of_find_compatible_node(from, NULL, "fsl,imx28-fec"); in update_fec_mac_prop()
175 if (!np) in update_fec_mac_prop()
178 from = np; in update_fec_mac_prop()
180 if (of_get_property(np, "local-mac-address", NULL)) in update_fec_mac_prop()
232 of_update_property(np, newmac); in update_fec_mac_prop()
302 struct device_node *np; in tx28_post_init() local
[all …]
/linux-4.1.27/drivers/regulator/
Dof_regulator.c27 static void of_get_regulation_constraints(struct device_node *np, in of_get_regulation_constraints() argument
38 constraints->name = of_get_property(np, "regulator-name", NULL); in of_get_regulation_constraints()
40 min_uV = of_get_property(np, "regulator-min-microvolt", NULL); in of_get_regulation_constraints()
43 max_uV = of_get_property(np, "regulator-max-microvolt", NULL); in of_get_regulation_constraints()
54 if (!of_property_read_u32(np, "regulator-microvolt-offset", &pval)) in of_get_regulation_constraints()
56 if (!of_property_read_u32(np, "regulator-min-microamp", &pval)) in of_get_regulation_constraints()
58 if (!of_property_read_u32(np, "regulator-max-microamp", &pval)) in of_get_regulation_constraints()
65 constraints->boot_on = of_property_read_bool(np, "regulator-boot-on"); in of_get_regulation_constraints()
66 constraints->always_on = of_property_read_bool(np, "regulator-always-on"); in of_get_regulation_constraints()
70 if (of_property_read_bool(np, "regulator-allow-bypass")) in of_get_regulation_constraints()
[all …]
Dgpio-regulator.c136 of_get_gpio_regulator_config(struct device *dev, struct device_node *np, in of_get_gpio_regulator_config() argument
150 config->init_data = of_get_regulator_init_data(dev, np, desc); in of_get_gpio_regulator_config()
156 if (of_property_read_bool(np, "enable-active-high")) in of_get_gpio_regulator_config()
159 if (of_property_read_bool(np, "enable-at-boot")) in of_get_gpio_regulator_config()
162 of_property_read_u32(np, "startup-delay-us", &config->startup_delay); in of_get_gpio_regulator_config()
164 config->enable_gpio = of_get_named_gpio(np, "enable-gpio", 0); in of_get_gpio_regulator_config()
167 ret = of_gpio_count(np); in of_get_gpio_regulator_config()
179 proplen = of_property_count_u32_elems(np, "gpios-states"); in of_get_gpio_regulator_config()
190 gpio = of_get_named_gpio(np, "gpios", i); in of_get_gpio_regulator_config()
195 of_property_read_u32_index(np, "gpios-states", in of_get_gpio_regulator_config()
[all …]
Danatop-regulator.c182 struct device_node *np = dev->of_node; in anatop_regulator_probe() local
195 sreg->name = of_get_property(np, "regulator-name", NULL); in anatop_regulator_probe()
201 initdata = of_get_regulator_init_data(dev, np, rdesc); in anatop_regulator_probe()
204 anatop_np = of_get_parent(np); in anatop_regulator_probe()
212 ret = of_property_read_u32(np, "anatop-reg-offset", in anatop_regulator_probe()
218 ret = of_property_read_u32(np, "anatop-vol-bit-width", in anatop_regulator_probe()
224 ret = of_property_read_u32(np, "anatop-vol-bit-shift", in anatop_regulator_probe()
230 ret = of_property_read_u32(np, "anatop-min-bit-val", in anatop_regulator_probe()
236 ret = of_property_read_u32(np, "anatop-min-voltage", in anatop_regulator_probe()
242 ret = of_property_read_u32(np, "anatop-max-voltage", in anatop_regulator_probe()
[all …]
/linux-4.1.27/arch/arm/common/
Dtimer-sp.c212 static void __init sp804_of_init(struct device_node *np) in sp804_of_init() argument
219 const char *name = of_get_property(np, "compatible", NULL); in sp804_of_init()
221 base = of_iomap(np, 0); in sp804_of_init()
229 if (initialized || !of_device_is_available(np)) in sp804_of_init()
232 clk1 = of_clk_get(np, 0); in sp804_of_init()
237 if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) { in sp804_of_init()
238 clk2 = of_clk_get(np, 1); in sp804_of_init()
240 pr_err("sp804: %s clock not found: %d\n", np->name, in sp804_of_init()
247 irq = irq_of_parse_and_map(np, 0); in sp804_of_init()
251 of_property_read_u32(np, "arm,sp804-has-irq", &irq_num); in sp804_of_init()
[all …]
/linux-4.1.27/drivers/hwmon/
Dibmpowernv.c128 static void __init make_sensor_label(struct device_node *np, in make_sensor_label() argument
140 if (!of_property_read_u32(np, "ibm,pir", &id)) { in make_sensor_label()
161 if (!of_property_read_u32(np, "ibm,chip-id", &id)) in make_sensor_label()
239 static int get_sensor_type(struct device_node *np) in get_sensor_type() argument
245 if (of_device_is_compatible(np, sensor_groups[type].compatible)) in get_sensor_type()
252 if (!of_device_is_compatible(np, "ibm,opal-sensor")) in get_sensor_type()
255 if (of_property_read_string(np, "sensor-type", &str)) in get_sensor_type()
286 struct device_node *opal, *np; in populate_attr_groups() local
290 for_each_child_of_node(opal, np) { in populate_attr_groups()
293 if (np->name == NULL) in populate_attr_groups()
[all …]
/linux-4.1.27/arch/c6x/platforms/
Dtimer64.c179 struct device_node *np, *first = NULL; in timer64_init() local
183 for_each_compatible_node(np, NULL, "ti,c64x+timer64") { in timer64_init()
184 err = of_property_read_u32(np, "ti,core-mask", &val); in timer64_init()
191 first = np; in timer64_init()
196 np = of_node_get(first); in timer64_init()
203 timer = of_iomap(np, 0); in timer64_init()
205 pr_debug("%s: Cannot map timer registers.\n", np->full_name); in timer64_init()
208 pr_debug("%s: Timer registers=%p.\n", np->full_name, timer); in timer64_init()
210 cd->irq = irq_of_parse_and_map(np, 0); in timer64_init()
212 pr_debug("%s: Cannot find interrupt.\n", np->full_name); in timer64_init()
[all …]
Dmegamod-pic.c180 struct device_node *np = pic->irqhost->of_node; in parse_priority_map() local
185 map = of_get_property(np, "ti,c64x+megamod-pic-mux", &maplen); in parse_priority_map()
200 static struct megamod_pic * __init init_megamod_pic(struct device_node *np) in init_megamod_pic() argument
210 pr_err("%s: Could not alloc PIC structure.\n", np->full_name); in init_megamod_pic()
214 pic->irqhost = irq_domain_add_linear(np, NR_COMBINERS * 32, in init_megamod_pic()
217 pr_err("%s: Could not alloc host.\n", np->full_name); in init_megamod_pic()
225 pic->regs = of_iomap(np, 0); in init_megamod_pic()
227 pr_err("%s: Could not map registers.\n", np->full_name); in init_megamod_pic()
249 irq = irq_of_parse_and_map(np, i); in init_megamod_pic()
256 np->full_name, i, irq); in init_megamod_pic()
[all …]
/linux-4.1.27/arch/powerpc/platforms/chrp/
Dsetup.c217 struct device_node *np; in pegasos_set_l2cr() local
224 np = of_find_node_by_type(NULL, "cpu"); in pegasos_set_l2cr()
225 if (np != NULL) { in pegasos_set_l2cr()
226 const unsigned int *l2cr = of_get_property(np, "l2cr", NULL); in pegasos_set_l2cr()
239 of_node_put(np); in pegasos_set_l2cr()
382 struct device_node *np, *root; in chrp_find_openpic() local
390 np = of_find_node_by_type(NULL, "open-pic"); in chrp_find_openpic()
391 if (np == NULL) in chrp_find_openpic()
403 if (of_address_to_resource(np, 0, &r)) { in chrp_find_openpic()
412 iranges = of_get_property(np, "interrupt-ranges", &len); in chrp_find_openpic()
[all …]
/linux-4.1.27/drivers/char/tpm/
Dtpm_of.c25 struct device_node *np; in read_log() local
34 np = of_find_node_by_name(NULL, "ibm,vtpm"); in read_log()
35 if (!np) { in read_log()
40 sizep = of_get_property(np, "linux,sml-size", NULL); in read_log()
50 basep = of_get_property(np, "linux,sml-base", NULL); in read_log()
56 of_node_put(np); in read_log()
71 of_node_put(np); in read_log()
/linux-4.1.27/include/video/
Dof_display_timing.h19 int of_get_display_timing(struct device_node *np, const char *name,
21 struct display_timings *of_get_display_timings(struct device_node *np);
22 int of_display_timings_exist(struct device_node *np);
24 static inline int of_get_display_timing(struct device_node *np, const char *name, in of_get_display_timing() argument
29 static inline struct display_timings *of_get_display_timings(struct device_node *np) in of_get_display_timings() argument
33 static inline int of_display_timings_exist(struct device_node *np) in of_display_timings_exist() argument
/linux-4.1.27/arch/powerpc/platforms/maple/
Dpci.c573 struct device_node *np, *root; in maple_pci_init() local
586 for (np = NULL; (np = of_get_next_child(root, np)) != NULL;) { in maple_pci_init()
587 if (!np->type) in maple_pci_init()
589 if (strcmp(np->type, "pci") && strcmp(np->type, "ht")) in maple_pci_init()
591 if ((of_device_is_compatible(np, "u4-pcie") || in maple_pci_init()
592 of_device_is_compatible(np, "u3-agp")) && in maple_pci_init()
593 maple_add_bridge(np) == 0) in maple_pci_init()
594 of_node_get(np); in maple_pci_init()
596 if (of_device_is_compatible(np, "u3-ht")) { in maple_pci_init()
597 of_node_get(np); in maple_pci_init()
[all …]
Dsetup.c218 struct device_node *root, *np, *mpic_node = NULL; in maple_init_IRQ() local
230 for_each_node_by_type(np, "interrupt-controller") in maple_init_IRQ()
231 if (of_device_is_compatible(np, "open-pic")) { in maple_init_IRQ()
232 mpic_node = np; in maple_init_IRQ()
236 for_each_node_by_type(np, "open-pic") { in maple_init_IRQ()
237 mpic_node = np; in maple_init_IRQ()
260 if (of_get_property(np, "big-endian", NULL) != NULL) in maple_init_IRQ()
346 struct device_node *np = NULL; in maple_cpc925_edac_setup() local
352 np = of_find_node_by_type(NULL, "memory-controller"); in maple_cpc925_edac_setup()
353 if (!np) { in maple_cpc925_edac_setup()
[all …]
/linux-4.1.27/drivers/clocksource/
Ddw_apb_timer_of.c26 static void __init timer_get_base_and_rate(struct device_node *np, in timer_get_base_and_rate() argument
32 *base = of_iomap(np, 0); in timer_get_base_and_rate()
35 panic("Unable to map regs for %s", np->name); in timer_get_base_and_rate()
41 pclk = of_clk_get_by_name(np, "pclk"); in timer_get_base_and_rate()
45 np->name); in timer_get_base_and_rate()
47 timer_clk = of_clk_get_by_name(np, "timer"); in timer_get_base_and_rate()
57 if (of_property_read_u32(np, "clock-freq", rate) && in timer_get_base_and_rate()
58 of_property_read_u32(np, "clock-frequency", rate)) in timer_get_base_and_rate()
59 panic("No clock nor clock-frequency property for %s", np->name); in timer_get_base_and_rate()
Dtime-armada-370-xp.c249 static void __init armada_370_xp_timer_common_init(struct device_node *np) in armada_370_xp_timer_common_init() argument
254 timer_base = of_iomap(np, 0); in armada_370_xp_timer_common_init()
256 local_base = of_iomap(np, 1); in armada_370_xp_timer_common_init()
272 armada_370_xp_clkevt_irq = irq_of_parse_and_map(np, 4); in armada_370_xp_timer_common_init()
315 static void __init armada_xp_timer_init(struct device_node *np) in armada_xp_timer_init() argument
317 struct clk *clk = of_clk_get_by_name(np, "fixed"); in armada_xp_timer_init()
324 armada_370_xp_timer_common_init(np); in armada_xp_timer_init()
329 static void __init armada_375_timer_init(struct device_node *np) in armada_375_timer_init() argument
333 clk = of_clk_get_by_name(np, "fixed"); in armada_375_timer_init()
343 clk = of_clk_get(np, 0); in armada_375_timer_init()
[all …]
Dtime-orion.c101 static void __init orion_timer_init(struct device_node *np) in orion_timer_init() argument
107 timer_base = of_iomap(np, 0); in orion_timer_init()
109 panic("%s: unable to map resource\n", np->name); in orion_timer_init()
111 clk = of_clk_get(np, 0); in orion_timer_init()
113 panic("%s: unable to get clk\n", np->name); in orion_timer_init()
117 irq = irq_of_parse_and_map(np, 1); in orion_timer_init()
119 panic("%s: unable to parse timer1 irq\n", np->name); in orion_timer_init()
134 panic("%s: unable to setup irq\n", np->name); in orion_timer_init()
Dtime-efm32.c128 static int __init efm32_clocksource_init(struct device_node *np) in efm32_clocksource_init() argument
135 clk = of_clk_get(np, 0); in efm32_clocksource_init()
150 base = of_iomap(np, 0); in efm32_clocksource_init()
186 static int __init efm32_clockevent_init(struct device_node *np) in efm32_clockevent_init() argument
194 clk = of_clk_get(np, 0); in efm32_clockevent_init()
209 base = of_iomap(np, 0); in efm32_clockevent_init()
216 irq = irq_of_parse_and_map(np, 0); in efm32_clockevent_init()
254 static void __init efm32_timer_init(struct device_node *np) in efm32_timer_init() argument
260 ret = efm32_clocksource_init(np); in efm32_timer_init()
268 ret = efm32_clockevent_init(np); in efm32_timer_init()
/linux-4.1.27/drivers/pinctrl/
Dpinctrl-lantiq.c69 struct device_node *np, in ltq_pinctrl_dt_subnode_to_map() argument
73 struct property *pins = of_find_property(np, "lantiq,pins", NULL); in ltq_pinctrl_dt_subnode_to_map()
74 struct property *groups = of_find_property(np, "lantiq,groups", NULL); in ltq_pinctrl_dt_subnode_to_map()
84 np->name); in ltq_pinctrl_dt_subnode_to_map()
90 np->name); in ltq_pinctrl_dt_subnode_to_map()
94 ret = of_property_read_string(np, "lantiq,function", &function); in ltq_pinctrl_dt_subnode_to_map()
96 of_property_for_each_string(np, "lantiq,groups", prop, group) { in ltq_pinctrl_dt_subnode_to_map()
107 int ret = of_property_read_u32(np, in ltq_pinctrl_dt_subnode_to_map()
118 of_property_for_each_string(np, "lantiq,pins", prop, pin) { in ltq_pinctrl_dt_subnode_to_map()
128 of_property_for_each_string(np, "lantiq,groups", prop, group) { in ltq_pinctrl_dt_subnode_to_map()
[all …]
Dpinconf-generic.c189 static void parse_dt_cfg(struct device_node *np, in parse_dt_cfg() argument
201 ret = of_property_read_u32(np, par->property, &val); in parse_dt_cfg()
224 int pinconf_generic_parse_dt_config(struct device_node *np, in pinconf_generic_parse_dt_config() argument
233 if (!np) in pinconf_generic_parse_dt_config()
244 parse_dt_cfg(np, dt_params, ARRAY_SIZE(dt_params), cfg, &ncfg); in pinconf_generic_parse_dt_config()
247 parse_dt_cfg(np, pctldev->desc->custom_params, in pinconf_generic_parse_dt_config()
277 struct device_node *np, struct pinctrl_map **map, in pinconf_generic_dt_subnode_to_map() argument
291 ret = of_property_count_strings(np, "pins"); in pinconf_generic_dt_subnode_to_map()
293 ret = of_property_count_strings(np, "groups"); in pinconf_generic_dt_subnode_to_map()
306 ret = of_property_read_string(np, "function", &function); in pinconf_generic_dt_subnode_to_map()
[all …]
/linux-4.1.27/arch/arm/mach-berlin/
Dplatsmp.c54 struct device_node *np; in berlin_smp_prepare_cpus() local
58 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); in berlin_smp_prepare_cpus()
59 scu_base = of_iomap(np, 0); in berlin_smp_prepare_cpus()
60 of_node_put(np); in berlin_smp_prepare_cpus()
64 np = of_find_compatible_node(NULL, NULL, "marvell,berlin-cpu-ctrl"); in berlin_smp_prepare_cpus()
65 cpu_ctrl = of_iomap(np, 0); in berlin_smp_prepare_cpus()
66 of_node_put(np); in berlin_smp_prepare_cpus()
/linux-4.1.27/arch/arm/mach-imx/
Dmach-imx6q.c185 struct device_node *np; in imx6q_1588_init() local
191 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-fec"); in imx6q_1588_init()
192 if (!np) { in imx6q_1588_init()
197 ptp_clk = of_clk_get(np, 2); in imx6q_1588_init()
229 of_node_put(np); in imx6q_1588_init()
294 struct device_node *np; in imx6q_opp_check_speed_grading() local
298 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-ocotp"); in imx6q_opp_check_speed_grading()
299 if (!np) { in imx6q_opp_check_speed_grading()
304 base = of_iomap(np, 0); in imx6q_opp_check_speed_grading()
335 of_node_put(np); in imx6q_opp_check_speed_grading()
[all …]
Dsystem.c96 struct device_node *np; in imx_init_l2cache() local
99 np = of_find_compatible_node(NULL, NULL, "arm,pl310-cache"); in imx_init_l2cache()
100 if (!np) in imx_init_l2cache()
103 l2x0_base = of_iomap(np, 0); in imx_init_l2cache()
105 of_node_put(np); in imx_init_l2cache()
126 of_node_put(np); in imx_init_l2cache()
/linux-4.1.27/arch/powerpc/platforms/8xx/
Dmpc885ads_setup.c131 struct device_node *np; in mpc885ads_setup_arch() local
136 np = of_find_compatible_node(NULL, NULL, "fsl,mpc885ads-bcsr"); in mpc885ads_setup_arch()
137 if (!np) { in mpc885ads_setup_arch()
142 bcsr = of_iomap(np, 0); in mpc885ads_setup_arch()
143 bcsr5 = of_iomap(np, 1); in mpc885ads_setup_arch()
144 of_node_put(np); in mpc885ads_setup_arch()
179 np = of_find_node_by_path("/soc@ff000000/cpm@9c0/serial@a80"); in mpc885ads_setup_arch()
181 np = of_find_node_by_path("/soc@ff000000/cpm@9c0/ethernet@a40"); in mpc885ads_setup_arch()
188 if (np) { in mpc885ads_setup_arch()
189 of_detach_node(np); in mpc885ads_setup_arch()
[all …]
/linux-4.1.27/drivers/misc/lis3lv02d/
Dlis3lv02d.c951 struct device_node *np = lis3->of_node; in lis3lv02d_init_dt() local
962 if (of_get_property(np, "st,click-single-x", NULL)) in lis3lv02d_init_dt()
964 if (of_get_property(np, "st,click-double-x", NULL)) in lis3lv02d_init_dt()
967 if (of_get_property(np, "st,click-single-y", NULL)) in lis3lv02d_init_dt()
969 if (of_get_property(np, "st,click-double-y", NULL)) in lis3lv02d_init_dt()
972 if (of_get_property(np, "st,click-single-z", NULL)) in lis3lv02d_init_dt()
974 if (of_get_property(np, "st,click-double-z", NULL)) in lis3lv02d_init_dt()
977 if (!of_property_read_u32(np, "st,click-threshold-x", &val)) in lis3lv02d_init_dt()
979 if (!of_property_read_u32(np, "st,click-threshold-y", &val)) in lis3lv02d_init_dt()
981 if (!of_property_read_u32(np, "st,click-threshold-z", &val)) in lis3lv02d_init_dt()
[all …]
/linux-4.1.27/drivers/clk/st/
Dclkgen-mux.c23 static const char ** __init clkgen_mux_get_parents(struct device_node *np, in clkgen_mux_get_parents() argument
29 nparents = of_count_phandle_with_args(np, "clocks", "#clock-cells"); in clkgen_mux_get_parents()
38 parents[i] = of_clk_get_parent_name(np, i); in clkgen_mux_get_parents()
373 struct device_node *np) in clkgen_get_register_base() argument
378 pnode = of_get_parent(np); in clkgen_get_register_base()
388 void __init st_of_clkgena_divmux_setup(struct device_node *np) in st_of_clkgena_divmux_setup() argument
397 match = of_match_node(clkgena_divmux_of_match, np); in st_of_clkgena_divmux_setup()
403 reg = clkgen_get_register_base(np); in st_of_clkgena_divmux_setup()
407 parents = clkgen_mux_get_parents(np, &num_parents); in st_of_clkgena_divmux_setup()
426 if (of_property_read_string_index(np, "clock-output-names", in st_of_clkgena_divmux_setup()
[all …]
/linux-4.1.27/drivers/iio/frequency/
Dadf4350.c384 struct device_node *np = dev->of_node; in adf4350_parse_dt() local
393 strncpy(&pdata->name[0], np->name, SPI_NAME_SIZE - 1); in adf4350_parse_dt()
396 of_property_read_u32(np, "adi,channel-spacing", &tmp); in adf4350_parse_dt()
400 of_property_read_u32(np, "adi,power-up-frequency", &tmp); in adf4350_parse_dt()
404 of_property_read_u32(np, "adi,reference-div-factor", &tmp); in adf4350_parse_dt()
407 ret = of_get_gpio(np, 0); in adf4350_parse_dt()
413 pdata->ref_doubler_en = of_property_read_bool(np, in adf4350_parse_dt()
415 pdata->ref_div2_en = of_property_read_bool(np, in adf4350_parse_dt()
419 pdata->r2_user_settings = of_property_read_bool(np, in adf4350_parse_dt()
422 pdata->r2_user_settings |= of_property_read_bool(np, in adf4350_parse_dt()
[all …]
/linux-4.1.27/drivers/pinctrl/freescale/
Dpinctrl-mxs.c69 struct device_node *np, in mxs_dt_node_to_map() argument
77 int length = strlen(np->name) + SUFFIX_LEN; in mxs_dt_node_to_map()
83 if (of_property_read_u32(np, "reg", &reg)) in mxs_dt_node_to_map()
86 ret = of_property_read_u32(np, "fsl,drive-strength", &val); in mxs_dt_node_to_map()
89 ret = of_property_read_u32(np, "fsl,voltage", &val); in mxs_dt_node_to_map()
92 ret = of_property_read_u32(np, "fsl,pull-up", &val); in mxs_dt_node_to_map()
106 new_map[i].data.mux.function = np->name; in mxs_dt_node_to_map()
114 snprintf(group, length, "%s.%d", np->name, reg); in mxs_dt_node_to_map()
127 new_map[i].data.configs.group_or_pin = purecfg ? np->name : in mxs_dt_node_to_map()
348 struct device_node *np, int idx, in mxs_pinctrl_parse_group() argument
[all …]
/linux-4.1.27/arch/powerpc/platforms/powernv/
Dpci-p5ioc2.c98 static void __init pnv_pci_init_p5ioc2_phb(struct device_node *np, u64 hub_id, in pnv_pci_init_p5ioc2_phb() argument
107 pr_info(" Initializing p5ioc2 PHB %s\n", np->full_name); in pnv_pci_init_p5ioc2_phb()
109 prop64 = of_get_property(np, "ibm,opal-phbid", NULL); in pnv_pci_init_p5ioc2_phb()
126 phb->hose = pcibios_alloc_controller(np); in pnv_pci_init_p5ioc2_phb()
142 phb->regs = of_iomap(np, 0); in pnv_pci_init_p5ioc2_phb()
162 pci_process_bridge_OF_ranges(phb->hose, np, primary); in pnv_pci_init_p5ioc2_phb()
177 void __init pnv_pci_init_p5ioc2_hub(struct device_node *np) in pnv_pci_init_p5ioc2_hub() argument
187 pr_info("Probing p5ioc2 IO-Hub %s\n", np->full_name); in pnv_pci_init_p5ioc2_hub()
189 prop64 = of_get_property(np, "ibm,opal-hubid", NULL); in pnv_pci_init_p5ioc2_hub()
198 for_each_child_of_node(np, phbn) { in pnv_pci_init_p5ioc2_hub()
[all …]
Dopal-nvram.c77 struct device_node *np; in opal_nvram_init() local
80 np = of_find_compatible_node(NULL, NULL, "ibm,opal-nvram"); in opal_nvram_init()
81 if (np == NULL) in opal_nvram_init()
84 nbytes_p = of_get_property(np, "#bytes", NULL); in opal_nvram_init()
86 of_node_put(np); in opal_nvram_init()
92 of_node_put(np); in opal_nvram_init()
/linux-4.1.27/arch/arm/mach-at91/
Dsoc.c35 struct device_node *np; in at91_soc_init() local
39 np = of_find_compatible_node(NULL, NULL, "atmel,at91rm9200-dbgu"); in at91_soc_init()
40 if (!np) in at91_soc_init()
41 np = of_find_compatible_node(NULL, NULL, in at91_soc_init()
44 if (!np) { in at91_soc_init()
49 regs = of_iomap(np, 0); in at91_soc_init()
50 of_node_put(np); in at91_soc_init()
/linux-4.1.27/arch/arm/mach-prima2/
Dpm.c97 struct device_node *np; in sirfsoc_of_pwrc_init() local
99 np = of_find_matching_node(NULL, pwrc_ids); in sirfsoc_of_pwrc_init()
100 if (!np) { in sirfsoc_of_pwrc_init()
110 if (of_property_read_u32(np, "reg", &sirfsoc_pwrc_base)) in sirfsoc_of_pwrc_init()
113 of_node_put(np); in sirfsoc_of_pwrc_init()
125 struct device_node *np = op->dev.of_node; in sirfsoc_memc_probe() local
127 sirfsoc_memc_base = of_iomap(np, 0); in sirfsoc_memc_probe()
/linux-4.1.27/drivers/power/reset/
Dkeystone-reset.c87 struct device_node *np = dev->of_node; in rsctrl_probe() local
89 if (!np) in rsctrl_probe()
93 pllctrl_regs = syscon_regmap_lookup_by_phandle(np, "ti,syscon-pll"); in rsctrl_probe()
97 devctrl_regs = syscon_regmap_lookup_by_phandle(np, "ti,syscon-dev"); in rsctrl_probe()
101 ret = of_property_read_u32_index(np, "ti,syscon-pll", 1, &rspll_offset); in rsctrl_probe()
107 ret = of_property_read_u32_index(np, "ti,syscon-dev", 1, &rsmux_offset); in rsctrl_probe()
114 val = of_property_read_bool(np, "ti,soft-reset"); in rsctrl_probe()
132 ret = of_property_read_u32_index(np, "ti,wdt-list", i, &val); in rsctrl_probe()
Dat91-poweroff.c74 static int at91_poweroff_get_wakeup_mode(struct device_node *np) in at91_poweroff_get_wakeup_mode() argument
80 err = of_property_read_string(np, "atmel,wakeup-mode", &pm); in at91_poweroff_get_wakeup_mode()
93 struct device_node *np = pdev->dev.of_node; in at91_poweroff_dt_set_wakeup_mode() local
97 wakeup_mode = at91_poweroff_get_wakeup_mode(np); in at91_poweroff_dt_set_wakeup_mode()
103 if (!of_property_read_u32(np, "atmel,wakeup-counter", &tmp)) { in at91_poweroff_dt_set_wakeup_mode()
113 if (of_property_read_bool(np, "atmel,wakeup-rtc-timer")) in at91_poweroff_dt_set_wakeup_mode()
116 if (of_property_read_bool(np, "atmel,wakeup-rtt-timer")) in at91_poweroff_dt_set_wakeup_mode()
/linux-4.1.27/arch/powerpc/platforms/amigaone/
Dsetup.c73 struct device_node *np; in amigaone_setup_arch() local
77 for_each_compatible_node(np, "pci", "mai-logic,articia-s") in amigaone_setup_arch()
78 phb = amigaone_add_bridge(np); in amigaone_setup_arch()
88 struct device_node *pic, *np = NULL; in amigaone_init_IRQ() local
98 np = of_find_compatible_node(NULL, "pci", "mai-logic,articia-s"); in amigaone_init_IRQ()
99 if (np) { in amigaone_init_IRQ()
100 prop = of_get_property(np, "8259-interrupt-acknowledge", NULL); in amigaone_init_IRQ()
103 of_node_put(np); in amigaone_init_IRQ()
/linux-4.1.27/crypto/
Dtestmgr.h45 unsigned char np; member
55 int np; member
72 int np; member
142 .np = 2,
187 .np = 2,
251 .np = 2,
315 .np = 2,
395 .np = 2,
463 .np = 2,
496 .np = 2,
[all …]
/linux-4.1.27/arch/mips/ralink/
Dill_acc.c52 struct device_node *np; in ill_acc_of_setup() local
59 np = of_find_compatible_node(NULL, NULL, "ralink,rt3050-memc"); in ill_acc_of_setup()
60 if (!np) in ill_acc_of_setup()
63 pdev = of_find_device_by_node(np); in ill_acc_of_setup()
65 pr_err("%s: failed to lookup pdev\n", np->name); in ill_acc_of_setup()
69 irq = irq_of_parse_and_map(np, 0); in ill_acc_of_setup()
Dcevt-rt3352.c119 static void __init ralink_systick_init(struct device_node *np) in ralink_systick_init() argument
121 systick.membase = of_iomap(np, 0); in ralink_systick_init()
125 systick_irqaction.name = np->name; in ralink_systick_init()
126 systick.dev.name = np->name; in ralink_systick_init()
130 systick.dev.irq = irq_of_parse_and_map(np, 0); in ralink_systick_init()
132 pr_err("%s: request_irq failed", np->name); in ralink_systick_init()
136 clocksource_mmio_init(systick.membase + SYSTICK_COUNT, np->name, in ralink_systick_init()
142 np->name, systick.dev.mult, systick.dev.shift); in ralink_systick_init()
/linux-4.1.27/drivers/input/
Dmatrix-keymap.c56 struct device_node *np = dev->of_node; in matrix_keypad_parse_of_params() local
58 if (!np) { in matrix_keypad_parse_of_params()
62 of_property_read_u32(np, "keypad,num-rows", rows); in matrix_keypad_parse_of_params()
63 of_property_read_u32(np, "keypad,num-columns", cols); in matrix_keypad_parse_of_params()
78 struct device_node *np = dev->of_node; in matrix_keypad_parse_of_keymap() local
84 if (!np) in matrix_keypad_parse_of_keymap()
90 prop = of_get_property(np, propname, &proplen); in matrix_keypad_parse_of_keymap()
93 propname, np->full_name); in matrix_keypad_parse_of_keymap()
99 propname, np->full_name); in matrix_keypad_parse_of_keymap()
/linux-4.1.27/sound/aoa/soundbus/i2sbus/
Dcore.c115 static int i2sbus_get_and_fixup_rsrc(struct device_node *np, int index, in i2sbus_get_and_fixup_rsrc() argument
132 return of_address_to_resource(np, index, res); in i2sbus_get_and_fixup_rsrc()
134 parent = of_get_parent(np); in i2sbus_get_and_fixup_rsrc()
139 reg = of_get_property(np, "reg", NULL); in i2sbus_get_and_fixup_rsrc()
154 struct device_node *np) in i2sbus_add_dev() argument
169 if (strlen(np->name) != 5) in i2sbus_add_dev()
171 if (strncmp(np->name, "i2s-", 4)) in i2sbus_add_dev()
179 while ((child = of_get_next_child(np, child))) { in i2sbus_add_dev()
222 dev->sound.ofdev.dev.of_node = np; in i2sbus_add_dev()
231 dev->bus_number = np->name[4] - 'a'; in i2sbus_add_dev()
[all …]
/linux-4.1.27/arch/powerpc/sysdev/xics/
Dicp-native.c247 static int __init icp_native_init_one_node(struct device_node *np, in icp_native_init_one_node() argument
261 ireg = of_get_property(np, "ibm,interrupt-server-ranges", &ilen); in icp_native_init_one_node()
274 ireg = of_get_property(np, "reg", &ilen); in icp_native_init_one_node()
280 reg_tuple_size = (of_n_addr_cells(np) + of_n_size_cells(np)) * 4; in icp_native_init_one_node()
292 err = of_address_to_resource(np, i, &r); in icp_native_init_one_node()
321 struct device_node *np; in icp_native_init() local
325 for_each_compatible_node(np, NULL, "ibm,ppc-xicp") in icp_native_init()
326 if (icp_native_init_one_node(np, &indx) == 0) in icp_native_init()
329 for_each_node_by_type(np, in icp_native_init()
331 if (icp_native_init_one_node(np, &indx) == 0) in icp_native_init()
/linux-4.1.27/drivers/net/ethernet/packetengines/
Dyellowfin.c374 struct yellowfin_private *np; in yellowfin_init_one() local
399 dev = alloc_etherdev(sizeof(*np)); in yellowfin_init_one()
405 np = netdev_priv(dev); in yellowfin_init_one()
431 spin_lock_init(&np->lock); in yellowfin_init_one()
433 np->pci_dev = pdev; in yellowfin_init_one()
434 np->chip_id = chip_idx; in yellowfin_init_one()
435 np->drv_flags = drv_flags; in yellowfin_init_one()
436 np->base = ioaddr; in yellowfin_init_one()
441 np->tx_ring = ring_space; in yellowfin_init_one()
442 np->tx_ring_dma = ring_dma; in yellowfin_init_one()
[all …]
/linux-4.1.27/arch/arm/mach-zynq/
Dpm.c46 struct device_node *np; in zynq_pm_ioremap() local
49 np = of_find_compatible_node(NULL, NULL, comp); in zynq_pm_ioremap()
50 if (np) { in zynq_pm_ioremap()
51 base = of_iomap(np, 0); in zynq_pm_ioremap()
52 of_node_put(np); in zynq_pm_ioremap()
Dslcr.c197 struct device_node *np; in zynq_early_slcr_init() local
199 np = of_find_compatible_node(NULL, NULL, "xlnx,zynq-slcr"); in zynq_early_slcr_init()
200 if (!np) { in zynq_early_slcr_init()
205 zynq_slcr_base = of_iomap(np, 0); in zynq_early_slcr_init()
211 np->data = (__force void *)zynq_slcr_base; in zynq_early_slcr_init()
222 pr_info("%s mapped to %p\n", np->name, zynq_slcr_base); in zynq_early_slcr_init()
224 of_node_put(np); in zynq_early_slcr_init()
/linux-4.1.27/drivers/leds/
Dleds-syscon.c69 static int __init syscon_leds_spawn(struct device_node *np, in syscon_leds_spawn() argument
76 for_each_available_child_of_node(np, child) { in syscon_leds_spawn()
137 struct device_node *np; in syscon_leds_init() local
139 for_each_of_allnodes(np) { in syscon_leds_init()
144 if (!of_device_is_compatible(np, "syscon")) in syscon_leds_init()
147 map = syscon_node_to_regmap(np); in syscon_leds_init()
157 pdev = of_find_device_by_node(np); in syscon_leds_init()
160 ret = syscon_leds_spawn(np, &pdev->dev, map); in syscon_leds_init()
/linux-4.1.27/arch/arm64/kernel/
Dpsci.c246 static int get_set_conduit_method(struct device_node *np) in get_set_conduit_method() argument
252 if (of_property_read_string(np, "method", &method)) { in get_set_conduit_method()
341 static int __init psci_0_2_init(struct device_node *np) in psci_0_2_init() argument
345 err = get_set_conduit_method(np); in psci_0_2_init()
359 of_node_put(np); in psci_0_2_init()
366 static int __init psci_0_1_init(struct device_node *np) in psci_0_1_init() argument
371 err = get_set_conduit_method(np); in psci_0_1_init()
378 if (!of_property_read_u32(np, "cpu_suspend", &id)) { in psci_0_1_init()
383 if (!of_property_read_u32(np, "cpu_off", &id)) { in psci_0_1_init()
388 if (!of_property_read_u32(np, "cpu_on", &id)) { in psci_0_1_init()
[all …]
/linux-4.1.27/arch/powerpc/platforms/pasemi/
Dgpio_mdio.c223 struct device_node *np = ofdev->dev.of_node; in gpio_mdio_probe() local
244 prop = of_get_property(np, "reg", NULL); in gpio_mdio_probe()
250 prop = of_get_property(np, "mdc-pin", NULL); in gpio_mdio_probe()
253 prop = of_get_property(np, "mdio-pin", NULL); in gpio_mdio_probe()
259 err = of_mdiobus_register(new_bus, np); in gpio_mdio_probe()
314 struct device_node *np; in gpio_mdio_init() local
316 np = of_find_compatible_node(NULL, NULL, "1682m-gpio"); in gpio_mdio_init()
317 if (!np) in gpio_mdio_init()
318 np = of_find_compatible_node(NULL, NULL, in gpio_mdio_init()
320 if (!np) in gpio_mdio_init()
[all …]
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmfmac/
Dof.c30 struct device_node *np = dev->of_node; in brcmf_of_probe() local
35 if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac")) in brcmf_of_probe()
42 irq = irq_of_parse_and_map(np, 0); in brcmf_of_probe()
54 if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) in brcmf_of_probe()
/linux-4.1.27/arch/arm/mach-exynos/
Dpm_domains.c121 struct device_node *np; in exynos4_pm_init_power_domain() local
123 for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") { in exynos4_pm_init_power_domain()
128 pdev = of_find_device_by_node(np); in exynos4_pm_init_power_domain()
140 pd->base = of_iomap(np, 0); in exynos4_pm_init_power_domain()
180 of_genpd_add_provider_simple(np, &pd->pd); in exynos4_pm_init_power_domain()
184 for_each_compatible_node(np, NULL, "samsung,exynos4210-pd") { in exynos4_pm_init_power_domain()
188 args.np = np; in exynos4_pm_init_power_domain()
194 if (of_parse_phandle_with_args(np, "power-domains", in exynos4_pm_init_power_domain()
208 of_node_put(np); in exynos4_pm_init_power_domain()
/linux-4.1.27/arch/arm/mach-socfpga/
Dsocfpga.c69 struct device_node *np; in socfpga_sysmgr_init() local
71 np = of_find_compatible_node(NULL, NULL, "altr,sys-mgr"); in socfpga_sysmgr_init()
73 if (of_property_read_u32(np, "cpu1-start-addr", in socfpga_sysmgr_init()
81 sys_manager_base_addr = of_iomap(np, 0); in socfpga_sysmgr_init()
83 np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); in socfpga_sysmgr_init()
84 rst_manager_base_addr = of_iomap(np, 0); in socfpga_sysmgr_init()
/linux-4.1.27/drivers/i2c/busses/
Di2c-gpio.c88 static int of_i2c_gpio_get_pins(struct device_node *np, in of_i2c_gpio_get_pins() argument
91 if (of_gpio_count(np) < 2) in of_i2c_gpio_get_pins()
94 *sda_pin = of_get_gpio(np, 0); in of_i2c_gpio_get_pins()
95 *scl_pin = of_get_gpio(np, 1); in of_i2c_gpio_get_pins()
102 np->full_name, *sda_pin, *scl_pin); in of_i2c_gpio_get_pins()
109 static void of_i2c_gpio_get_props(struct device_node *np, in of_i2c_gpio_get_props() argument
114 of_property_read_u32(np, "i2c-gpio,delay-us", &pdata->udelay); in of_i2c_gpio_get_props()
116 if (!of_property_read_u32(np, "i2c-gpio,timeout-ms", &reg)) in of_i2c_gpio_get_props()
120 of_property_read_bool(np, "i2c-gpio,sda-open-drain"); in of_i2c_gpio_get_props()
122 of_property_read_bool(np, "i2c-gpio,scl-open-drain"); in of_i2c_gpio_get_props()
[all …]
/linux-4.1.27/drivers/net/can/cc770/
Dcc770_platform.c81 struct device_node *np = pdev->dev.of_node; in cc770_get_of_node_data() local
86 prop = of_get_property(np, "bosch,external-clock-frequency", in cc770_get_of_node_data()
104 if (of_get_property(np, "bosch,divide-memory-clock", NULL)) in cc770_get_of_node_data()
106 if (of_get_property(np, "bosch,iso-low-speed-mux", NULL)) in cc770_get_of_node_data()
109 if (!of_get_property(np, "bosch,no-comperator-bypass", NULL)) in cc770_get_of_node_data()
111 if (of_get_property(np, "bosch,disconnect-rx0-input", NULL)) in cc770_get_of_node_data()
113 if (of_get_property(np, "bosch,disconnect-rx1-input", NULL)) in cc770_get_of_node_data()
115 if (of_get_property(np, "bosch,disconnect-tx1-output", NULL)) in cc770_get_of_node_data()
117 if (of_get_property(np, "bosch,polarity-dominant", NULL)) in cc770_get_of_node_data()
120 prop = of_get_property(np, "bosch,clock-out-frequency", &prop_size); in cc770_get_of_node_data()
[all …]

1234567