Home
last modified time | relevance | path

Searched refs:ofdev (Results 1 – 25 of 72) sorted by relevance

123

/linux/drivers/net/can/mscan/
H A Dmpc5xxx_can.c33 u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name,
35 void (*put_clock)(struct platform_device *ofdev);
44 static u32 mpc52xx_can_get_clock(struct platform_device *ofdev, in mpc52xx_can_get_clock() argument
68 freq = mpc5xxx_get_bus_frequency(&ofdev->dev); in mpc52xx_can_get_clock()
78 dev_err(&ofdev->dev, "can't get clock node!\n"); in mpc52xx_can_get_clock()
84 dev_err(&ofdev->dev, "can't map clock node!\n"); in mpc52xx_can_get_clock()
101 static u32 mpc52xx_can_get_clock(struct platform_device *ofdev, in mpc52xx_can_get_clock() argument
109 static u32 mpc512x_can_get_clock(struct platform_device *ofdev, in mpc512x_can_get_clock() argument
128 np = ofdev->dev.of_node; in mpc512x_can_get_clock()
131 dev_dbg(&ofdev->dev, "device tree specs: clk src[%s] div[%d]\n", in mpc512x_can_get_clock()
[all …]
/linux/drivers/macintosh/
H A Dmacio_asic.c55 tmp = get_device(&dev->ofdev.dev); in macio_dev_get()
65 put_device(&dev->ofdev.dev); in macio_dev_put()
243 dev->interrupt[index].name = dev_name(&dev->ofdev.dev); in macio_create_fixup_irq()
251 struct device_node *np = dev->ofdev.dev.of_node; in macio_add_missing_resources()
292 struct device_node *np = dev->ofdev.dev.of_node; in macio_setup_interrupts()
307 res->name = dev_name(&dev->ofdev.dev); in macio_setup_interrupts()
320 struct device_node *np = dev->ofdev.dev.of_node; in macio_setup_resources()
330 res->name = dev_name(&dev->ofdev.dev); in macio_setup_resources()
343 index, dev_name(&dev->ofdev.dev)); in macio_setup_resources()
377 dev->ofdev.dev.of_node = np; in macio_add_one_device()
[all …]
H A Dmacio_sysfs.c16 of = &to_macio_device (dev)->ofdev; in compatible_show()
44 struct platform_device *ofdev; in devspec_show() local
46 ofdev = to_platform_device(dev); in devspec_show()
47 return sprintf(buf, "%pOF\n", ofdev->dev.of_node); in devspec_show()
/linux/drivers/tty/serial/8250/
H A D8250_of.c87 static int of_platform_serial_setup(struct platform_device *ofdev, in of_platform_serial_setup() argument
92 struct device *dev = &ofdev->dev; in of_platform_serial_setup()
100 pm_runtime_enable(&ofdev->dev); in of_platform_serial_setup()
101 pm_runtime_get_sync(&ofdev->dev); in of_platform_serial_setup()
109 port->dev = &ofdev->dev; in of_platform_serial_setup()
153 info->rst = devm_reset_control_get_optional_shared(&ofdev->dev, NULL); in of_platform_serial_setup()
193 pm_runtime_put_sync(&ofdev->dev); in of_platform_serial_setup()
194 pm_runtime_disable(&ofdev->dev); in of_platform_serial_setup()
201 static int of_platform_serial_probe(struct platform_device *ofdev) in of_platform_serial_probe() argument
210 of_device_is_compatible(ofdev->dev.of_node, "brcm,bcm7271-uart")) in of_platform_serial_probe()
[all …]
/linux/drivers/mtd/nand/raw/
H A Dndfc.c33 struct platform_device *ofdev; member
158 mtd->dev.parent = &ndfc->ofdev->dev; in ndfc_chip_init()
165 mtd->name = kasprintf(GFP_KERNEL, "%s.%pOFn", dev_name(&ndfc->ofdev->dev), in ndfc_chip_init()
185 static int ndfc_probe(struct platform_device *ofdev) in ndfc_probe() argument
194 reg = of_get_property(ofdev->dev.of_node, "reg", &len); in ndfc_probe()
196 dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); in ndfc_probe()
202 dev_err(&ofdev->dev, "invalid CS number (%d)\n", cs); in ndfc_probe()
210 ndfc->ofdev = ofdev; in ndfc_probe()
211 dev_set_drvdata(&ofdev->dev, ndfc); in ndfc_probe()
213 ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); in ndfc_probe()
[all …]
H A Dfsl_upm.c163 static int fun_probe(struct platform_device *ofdev) in fun_probe() argument
172 fun = devm_kzalloc(&ofdev->dev, sizeof(*fun), GFP_KERNEL); in fun_probe()
176 fun->io_base = devm_platform_get_and_ioremap_resource(ofdev, 0, &io_res); in fun_probe()
182 dev_err(&ofdev->dev, "can't find UPM\n"); in fun_probe()
186 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-addr-offset", in fun_probe()
189 dev_err(&ofdev->dev, "can't get UPM address offset\n"); in fun_probe()
194 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-cmd-offset", &size); in fun_probe()
196 dev_err(&ofdev->dev, "can't get UPM command offset\n"); in fun_probe()
201 prop = of_get_property(ofdev->dev.of_node, in fun_probe()
206 dev_err(&ofdev->dev, "too much multiple chips\n"); in fun_probe()
[all …]
H A Dsocrates_nand.c137 static int socrates_nand_probe(struct platform_device *ofdev) in socrates_nand_probe() argument
145 host = devm_kzalloc(&ofdev->dev, sizeof(*host), GFP_KERNEL); in socrates_nand_probe()
149 host->io_base = of_iomap(ofdev->dev.of_node, 0); in socrates_nand_probe()
151 dev_err(&ofdev->dev, "ioremap failed\n"); in socrates_nand_probe()
157 host->dev = &ofdev->dev; in socrates_nand_probe()
165 nand_set_flash_node(nand_chip, ofdev->dev.of_node); in socrates_nand_probe()
167 mtd->dev.parent = &ofdev->dev; in socrates_nand_probe()
185 dev_set_drvdata(&ofdev->dev, host); in socrates_nand_probe()
205 static void socrates_nand_remove(struct platform_device *ofdev) in socrates_nand_remove() argument
207 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev); in socrates_nand_remove()
H A Dpasemi_nand.c96 static int pasemi_nand_probe(struct platform_device *ofdev) in pasemi_nand_probe() argument
98 struct device *dev = &ofdev->dev; in pasemi_nand_probe()
121 platform_set_drvdata(ofdev, ddata); in pasemi_nand_probe()
200 static void pasemi_nand_remove(struct platform_device *ofdev) in pasemi_nand_remove() argument
202 struct pasemi_ddata *ddata = platform_get_drvdata(ofdev); in pasemi_nand_remove()
/linux/drivers/net/ethernet/ibm/emac/
H A Drgmii.h50 struct platform_device *ofdev; member
57 int rgmii_attach(struct platform_device *ofdev, int input, int mode);
58 void rgmii_detach(struct platform_device *ofdev, int input);
59 void rgmii_get_mdio(struct platform_device *ofdev, int input);
60 void rgmii_put_mdio(struct platform_device *ofdev, int input);
61 void rgmii_set_speed(struct platform_device *ofdev, int input, int speed);
62 int rgmii_get_regs_len(struct platform_device *ofdev);
63 void *rgmii_dump_regs(struct platform_device *ofdev, void *buf);
H A Dzmii.h46 struct platform_device *ofdev; member
53 int zmii_attach(struct platform_device *ofdev, int input,
55 void zmii_detach(struct platform_device *ofdev, int input);
56 void zmii_get_mdio(struct platform_device *ofdev, int input);
57 void zmii_put_mdio(struct platform_device *ofdev, int input);
58 void zmii_set_speed(struct platform_device *ofdev, int input, int speed);
60 void *zmii_dump_regs(struct platform_device *ofdev, void *buf);
H A Dmal.c516 static int mal_probe(struct platform_device *ofdev) in mal_probe() argument
527 mal = devm_kzalloc(&ofdev->dev, sizeof(struct mal_instance), in mal_probe()
533 mal->ofdev = ofdev; in mal_probe()
534 mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; in mal_probe()
538 prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL); in mal_probe()
547 prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL); in mal_probe()
556 dcr_base = dcr_resource_start(ofdev->dev.of_node, 0); in mal_probe()
562 mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); in mal_probe()
569 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { in mal_probe()
576 ofdev->dev.of_node); in mal_probe()
[all …]
H A Dtah.h47 struct platform_device *ofdev; member
73 int tah_attach(struct platform_device *ofdev, int channel);
74 void tah_detach(struct platform_device *ofdev, int channel);
75 void tah_reset(struct platform_device *ofdev);
76 int tah_get_regs_len(struct platform_device *ofdev);
77 void *tah_dump_regs(struct platform_device *ofdev, void *buf);
H A Dcore.c124 printk(KERN_ERR "%pOF: %s\n", dev->ofdev->dev.of_node, error); in emac_report_timeout_error()
1071 dma_map_single(&dev->ofdev->dev, skb->data - NET_IP_ALIGN, in emac_resize_rx_ring()
1174 dma_map_single(&dev->ofdev->dev, skb->data - NET_IP_ALIGN, in __emac_prepare_rx_skb()
1451 dev->tx_desc[slot].data_ptr = dma_map_single(&dev->ofdev->dev, in emac_start_xmit()
1522 dma_map_single(&dev->ofdev->dev, skb->data, len, DMA_TO_DEVICE); in emac_start_xmit_sg()
1536 pd = skb_frag_dma_map(&dev->ofdev->dev, frag, 0, len, in emac_start_xmit_sg()
1657 dma_map_single(&dev->ofdev->dev, skb->data - NET_IP_ALIGN, in emac_recycle_rx_skb()
2270 dev->cell_index, dev->ofdev->dev.of_node); in emac_ethtool_get_drvinfo()
2324 struct platform_device *ofdev; member
2363 if (deps[i].ofdev == NULL) in emac_check_deps()
[all …]
/linux/arch/sparc/kernel/
H A Dleon_pci_grpci1.c512 static int grpci1_of_probe(struct platform_device *ofdev) in grpci1_of_probe() argument
522 dev_err(&ofdev->dev, "only one GRPCI1 supported\n"); in grpci1_of_probe()
526 if (ofdev->num_resources < 3) { in grpci1_of_probe()
527 dev_err(&ofdev->dev, "not enough APB/AHB resources\n"); in grpci1_of_probe()
531 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in grpci1_of_probe()
533 dev_err(&ofdev->dev, "memory allocation failed\n"); in grpci1_of_probe()
536 platform_set_drvdata(ofdev, priv); in grpci1_of_probe()
537 priv->dev = &ofdev->dev; in grpci1_of_probe()
540 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in grpci1_of_probe()
541 regs = devm_ioremap_resource(&ofdev->dev, res); in grpci1_of_probe()
[all …]
H A Dleon_pci_grpci2.c686 static int grpci2_of_probe(struct platform_device *ofdev) in grpci2_of_probe() argument
699 if (ofdev->num_resources < 3) { in grpci2_of_probe()
705 regs = of_ioremap(&ofdev->resource[0], 0, in grpci2_of_probe()
706 resource_size(&ofdev->resource[0]), in grpci2_of_probe()
730 priv->irq = ofdev->archdata.irqs[0]; /* BASE IRQ */ in grpci2_of_probe()
739 tmp = of_get_property(ofdev->dev.of_node, "barcfg", &len); in grpci2_of_probe()
746 tmp = of_get_property(ofdev->dev.of_node, "irq_mask", &len); in grpci2_of_probe()
753 tmp = of_get_property(ofdev->dev.of_node, "reset", &len); in grpci2_of_probe()
760 priv->pci_area = ofdev->resource[1].start; in grpci2_of_probe()
761 priv->pci_area_end = ofdev->resource[1].end+1; in grpci2_of_probe()
[all …]
/linux/drivers/usb/host/
H A Dfsl-mph-dr-of.c79 struct platform_device *ofdev, in fsl_usb2_device_register() argument
84 const struct resource *res = ofdev->resource; in fsl_usb2_device_register()
85 unsigned int num = ofdev->num_resources; in fsl_usb2_device_register()
94 pdev->dev.parent = &ofdev->dev; in fsl_usb2_device_register()
96 pdev->dev.coherent_dma_mask = ofdev->dev.coherent_dma_mask; in fsl_usb2_device_register()
99 pdev->dev.dma_mask = &ofdev->dev.coherent_dma_mask; in fsl_usb2_device_register()
116 device_set_of_node_from_dev(&pdev->dev, &ofdev->dev); in fsl_usb2_device_register()
177 static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) in fsl_usb2_mph_dr_of_probe() argument
179 struct device_node *np = ofdev->dev.of_node; in fsl_usb2_mph_dr_of_probe()
191 match = of_match_device(fsl_usb2_mph_dr_of_match, &ofdev->dev); in fsl_usb2_mph_dr_of_probe()
[all …]
/linux/drivers/net/ethernet/freescale/fs_enet/
H A Dmii-fec.c97 static int fs_enet_mdio_probe(struct platform_device *ofdev) in fs_enet_mdio_probe() argument
105 get_bus_freq = device_get_match_data(&ofdev->dev); in fs_enet_mdio_probe()
120 ret = of_address_to_resource(ofdev->dev.of_node, 0, &res); in fs_enet_mdio_probe()
133 clock = get_bus_freq(&ofdev->dev); in fs_enet_mdio_probe()
136 dev_warn(&ofdev->dev, "could not determine IPS clock\n"); in fs_enet_mdio_probe()
149 dev_err(&ofdev->dev, in fs_enet_mdio_probe()
164 new_bus->parent = &ofdev->dev; in fs_enet_mdio_probe()
165 platform_set_drvdata(ofdev, new_bus); in fs_enet_mdio_probe()
167 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); in fs_enet_mdio_probe()
184 static void fs_enet_mdio_remove(struct platform_device *ofdev) in fs_enet_mdio_remove() argument
[all …]
H A Dmii-bitbang.c149 static int fs_enet_mdio_probe(struct platform_device *ofdev) in fs_enet_mdio_probe() argument
167 ret = fs_mii_bitbang_init(new_bus, ofdev->dev.of_node); in fs_enet_mdio_probe()
173 new_bus->parent = &ofdev->dev; in fs_enet_mdio_probe()
174 platform_set_drvdata(ofdev, new_bus); in fs_enet_mdio_probe()
176 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); in fs_enet_mdio_probe()
192 static void fs_enet_mdio_remove(struct platform_device *ofdev) in fs_enet_mdio_remove() argument
194 struct mii_bus *bus = platform_get_drvdata(ofdev); in fs_enet_mdio_remove()
/linux/drivers/input/serio/
H A Dapbps2.c130 static int apbps2_of_probe(struct platform_device *ofdev) in apbps2_of_probe() argument
136 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in apbps2_of_probe()
138 dev_err(&ofdev->dev, "memory allocation failed\n"); in apbps2_of_probe()
143 priv->regs = devm_platform_get_and_ioremap_resource(ofdev, 0, NULL); in apbps2_of_probe()
151 irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in apbps2_of_probe()
152 err = devm_request_irq(&ofdev->dev, irq, apbps2_isr, in apbps2_of_probe()
155 dev_err(&ofdev->dev, "request IRQ%d failed\n", irq); in apbps2_of_probe()
160 if (of_property_read_u32(ofdev->dev.of_node, "freq", &freq_hz)) { in apbps2_of_probe()
161 dev_err(&ofdev->dev, "unable to get core frequency\n"); in apbps2_of_probe()
181 dev_info(&ofdev->dev, "irq = %d, base = 0x%p\n", irq, priv->regs); in apbps2_of_probe()
[all …]
/linux/drivers/tty/serial/
H A Ducc_uart.c1169 static int soft_uart_init(struct platform_device *ofdev) in soft_uart_init() argument
1171 struct device_node *np = ofdev->dev.of_node; in soft_uart_init()
1176 dev_dbg(&ofdev->dev, "using Soft-UART mode\n"); in soft_uart_init()
1195 dev_err(&ofdev->dev, "unknown CPU model\n"); in soft_uart_init()
1201 dev_info(&ofdev->dev, "waiting for firmware %s\n", in soft_uart_init()
1212 FW_ACTION_UEVENT, filename, &ofdev->dev, in soft_uart_init()
1213 GFP_KERNEL, &ofdev->dev, uart_firmware_cont); in soft_uart_init()
1215 dev_err(&ofdev->dev, in soft_uart_init()
1226 static int soft_uart_init(struct platform_device *ofdev) in soft_uart_init() argument
1234 static int ucc_uart_probe(struct platform_device *ofdev) in ucc_uart_probe() argument
[all …]
/linux/sound/aoa/soundbus/
H A Dcore.c23 tmp = get_device(&dev->ofdev.dev); in soundbus_dev_get()
34 put_device(&dev->ofdev.dev); in soundbus_dev_put()
75 of = &soundbus_dev->ofdev; in soundbus_uevent()
145 !dev->ofdev.dev.of_node || in soundbus_add_one()
152 dev_set_name(&dev->ofdev.dev, "soundbus:%x", ++devcount); in soundbus_add_one()
153 dev->ofdev.dev.bus = &soundbus_bus_type; in soundbus_add_one()
154 return of_device_register(&dev->ofdev); in soundbus_add_one()
160 of_device_unregister(&dev->ofdev); in soundbus_remove_one()
/linux/arch/powerpc/include/asm/
H A Dmacio.h43 struct platform_device ofdev; member
50 #define to_macio_device(d) container_of(d, struct macio_dev, ofdev.dev)
51 #define of_to_macio_device(d) container_of(d, struct macio_dev, ofdev)
103 dev_set_drvdata(&dev->ofdev.dev, data); in macio_set_drvdata()
108 return dev_get_drvdata(&dev->ofdev.dev); in macio_get_drvdata()
113 return mdev->ofdev.dev.of_node; in macio_get_of_node()
/linux/drivers/pcmcia/
H A Delectra_cf.c36 struct platform_device *ofdev; member
175 static int electra_cf_probe(struct platform_device *ofdev) in electra_cf_probe() argument
177 struct device *device = &ofdev->dev; in electra_cf_probe()
178 struct device_node *np = ofdev->dev.of_node; in electra_cf_probe()
200 cf->ofdev = ofdev; in electra_cf_probe()
270 cf->socket.dev.parent = &ofdev->dev; in electra_cf_probe()
300 device_init_wakeup(&ofdev->dev, 0); in electra_cf_probe()
310 static void electra_cf_remove(struct platform_device *ofdev) in electra_cf_remove() argument
312 struct device *device = &ofdev->dev; in electra_cf_remove()
/linux/drivers/net/ethernet/xilinx/
H A Dxilinx_emaclite.c1041 static bool get_bool(struct platform_device *ofdev, const char *s) in get_bool() argument
1043 u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); in get_bool()
1046 dev_warn(&ofdev->dev, "Parameter %s not found, defaulting to false\n", s); in get_bool()
1089 static int xemaclite_of_probe(struct platform_device *ofdev) in xemaclite_of_probe() argument
1094 struct device *dev = &ofdev->dev; in xemaclite_of_probe()
1107 SET_NETDEV_DEV(ndev, &ofdev->dev); in xemaclite_of_probe()
1113 rc = platform_get_irq(ofdev, 0); in xemaclite_of_probe()
1119 lp->base_addr = devm_platform_get_and_ioremap_resource(ofdev, 0, &res); in xemaclite_of_probe()
1129 lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); in xemaclite_of_probe()
1130 lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); in xemaclite_of_probe()
[all …]
/linux/arch/powerpc/sysdev/
H A Dfsl_pmc.c59 static int pmc_probe(struct platform_device *ofdev) in pmc_probe() argument
61 pmc_regs = of_iomap(ofdev->dev.of_node, 0); in pmc_probe()
65 pmc_dev = &ofdev->dev; in pmc_probe()

123