Home
last modified time | relevance | path

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

1234

/Linux-v4.19/drivers/net/can/mscan/
Dmpc5xxx_can.c40 u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name,
42 void (*put_clock)(struct platform_device *ofdev);
51 static u32 mpc52xx_can_get_clock(struct platform_device *ofdev, in mpc52xx_can_get_clock() argument
75 freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node); in mpc52xx_can_get_clock()
85 dev_err(&ofdev->dev, "can't get clock node!\n"); in mpc52xx_can_get_clock()
91 dev_err(&ofdev->dev, "can't map clock node!\n"); in mpc52xx_can_get_clock()
108 static u32 mpc52xx_can_get_clock(struct platform_device *ofdev, in mpc52xx_can_get_clock() argument
116 static u32 mpc512x_can_get_clock(struct platform_device *ofdev, in mpc512x_can_get_clock() argument
135 np = ofdev->dev.of_node; in mpc512x_can_get_clock()
138 dev_dbg(&ofdev->dev, "device tree specs: clk src[%s] div[%d]\n", in mpc512x_can_get_clock()
[all …]
/Linux-v4.19/drivers/net/ethernet/ibm/emac/
Dtah.c27 int tah_attach(struct platform_device *ofdev, int channel) in tah_attach() argument
29 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_attach()
39 void tah_detach(struct platform_device *ofdev, int channel) in tah_detach() argument
41 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_detach()
48 void tah_reset(struct platform_device *ofdev) in tah_reset() argument
50 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_reset()
61 printk(KERN_ERR "%pOF: reset timeout\n", ofdev->dev.of_node); in tah_reset()
69 int tah_get_regs_len(struct platform_device *ofdev) in tah_get_regs_len() argument
75 void *tah_dump_regs(struct platform_device *ofdev, void *buf) in tah_dump_regs() argument
77 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_dump_regs()
[all …]
Drgmii.c83 int rgmii_attach(struct platform_device *ofdev, int input, int mode) in rgmii_attach() argument
85 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_attach()
93 ofdev->dev.of_node); in rgmii_attach()
103 ofdev->dev.of_node, input, phy_modes(mode)); in rgmii_attach()
112 void rgmii_set_speed(struct platform_device *ofdev, int input, int speed) in rgmii_set_speed() argument
114 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_set_speed()
136 void rgmii_get_mdio(struct platform_device *ofdev, int input) in rgmii_get_mdio() argument
138 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_get_mdio()
157 void rgmii_put_mdio(struct platform_device *ofdev, int input) in rgmii_put_mdio() argument
159 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_put_mdio()
[all …]
Dzmii.c86 int zmii_attach(struct platform_device *ofdev, int input, int *mode) in zmii_attach() argument
88 struct zmii_instance *dev = platform_get_drvdata(ofdev); in zmii_attach()
125 ofdev->dev.of_node, in zmii_attach()
132 ofdev->dev.of_node, *mode, input); in zmii_attach()
152 void zmii_get_mdio(struct platform_device *ofdev, int input) in zmii_get_mdio() argument
154 struct zmii_instance *dev = platform_get_drvdata(ofdev); in zmii_get_mdio()
165 void zmii_put_mdio(struct platform_device *ofdev, int input) in zmii_put_mdio() argument
167 struct zmii_instance *dev = platform_get_drvdata(ofdev); in zmii_put_mdio()
174 void zmii_set_speed(struct platform_device *ofdev, int input, int speed) in zmii_set_speed() argument
176 struct zmii_instance *dev = platform_get_drvdata(ofdev); in zmii_set_speed()
[all …]
Drgmii.h54 struct platform_device *ofdev; member
61 int rgmii_attach(struct platform_device *ofdev, int input, int mode);
62 void rgmii_detach(struct platform_device *ofdev, int input);
63 void rgmii_get_mdio(struct platform_device *ofdev, int input);
64 void rgmii_put_mdio(struct platform_device *ofdev, int input);
65 void rgmii_set_speed(struct platform_device *ofdev, int input, int speed);
66 int rgmii_get_regs_len(struct platform_device *ofdev);
67 void *rgmii_dump_regs(struct platform_device *ofdev, void *buf);
Dzmii.h51 struct platform_device *ofdev; member
58 int zmii_attach(struct platform_device *ofdev, int input, int *mode);
59 void zmii_detach(struct platform_device *ofdev, int input);
60 void zmii_get_mdio(struct platform_device *ofdev, int input);
61 void zmii_put_mdio(struct platform_device *ofdev, int input);
62 void zmii_set_speed(struct platform_device *ofdev, int input, int speed);
64 void *zmii_dump_regs(struct platform_device *ofdev, void *buf);
Dtah.h51 struct platform_device *ofdev; member
77 int tah_attach(struct platform_device *ofdev, int channel);
78 void tah_detach(struct platform_device *ofdev, int channel);
79 void tah_reset(struct platform_device *ofdev);
80 int tah_get_regs_len(struct platform_device *ofdev);
81 void *tah_dump_regs(struct platform_device *ofdev, void *buf);
Dmal.c519 static int mal_probe(struct platform_device *ofdev) in mal_probe() argument
535 mal->ofdev = ofdev; in mal_probe()
536 mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; in mal_probe()
540 prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL); in mal_probe()
550 prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL); in mal_probe()
560 dcr_base = dcr_resource_start(ofdev->dev.of_node, 0); in mal_probe()
567 mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); in mal_probe()
575 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { in mal_probe()
582 ofdev->dev.of_node); in mal_probe()
588 mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in mal_probe()
[all …]
/Linux-v4.19/drivers/tty/serial/8250/
D8250_of.c54 static int of_platform_serial_setup(struct platform_device *ofdev, in of_platform_serial_setup() argument
59 struct device_node *np = ofdev->dev.of_node; in of_platform_serial_setup()
65 pm_runtime_enable(&ofdev->dev); in of_platform_serial_setup()
66 pm_runtime_get_sync(&ofdev->dev); in of_platform_serial_setup()
71 info->clk = devm_clk_get(&ofdev->dev, NULL); in of_platform_serial_setup()
73 dev_warn(&ofdev->dev, in of_platform_serial_setup()
91 dev_warn(&ofdev->dev, "invalid address\n"); in of_platform_serial_setup()
124 dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n", in of_platform_serial_setup()
152 info->rst = devm_reset_control_get_optional_shared(&ofdev->dev, NULL); in of_platform_serial_setup()
169 port->dev = &ofdev->dev; in of_platform_serial_setup()
[all …]
/Linux-v4.19/drivers/macintosh/
Dmacio_asic.c57 tmp = get_device(&dev->ofdev.dev); in macio_dev_get()
67 put_device(&dev->ofdev.dev); in macio_dev_put()
242 dev->interrupt[index].name = dev_name(&dev->ofdev.dev); in macio_create_fixup_irq()
250 struct device_node *np = dev->ofdev.dev.of_node; in macio_add_missing_resources()
291 struct device_node *np = dev->ofdev.dev.of_node; in macio_setup_interrupts()
306 res->name = dev_name(&dev->ofdev.dev); in macio_setup_interrupts()
319 struct device_node *np = dev->ofdev.dev.of_node; in macio_setup_resources()
329 res->name = dev_name(&dev->ofdev.dev); in macio_setup_resources()
342 index, dev_name(&dev->ofdev.dev)); in macio_setup_resources()
375 dev->ofdev.dev.of_node = np; in macio_add_one_device()
[all …]
Dmacio_sysfs.c13 return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \
25 of = &to_macio_device (dev)->ofdev; in compatible_show()
53 struct platform_device *ofdev; in devspec_show() local
55 ofdev = to_platform_device(dev); in devspec_show()
56 return sprintf(buf, "%pOF\n", ofdev->dev.of_node); in devspec_show()
/Linux-v4.19/drivers/mtd/nand/raw/
Dfsl_upm.c206 static int fun_probe(struct platform_device *ofdev) in fun_probe() argument
220 ret = of_address_to_resource(ofdev->dev.of_node, 0, &io_res); in fun_probe()
222 dev_err(&ofdev->dev, "can't get IO base\n"); in fun_probe()
228 dev_err(&ofdev->dev, "can't find UPM\n"); in fun_probe()
232 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-addr-offset", in fun_probe()
235 dev_err(&ofdev->dev, "can't get UPM address offset\n"); in fun_probe()
241 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-cmd-offset", &size); in fun_probe()
243 dev_err(&ofdev->dev, "can't get UPM command offset\n"); in fun_probe()
249 prop = of_get_property(ofdev->dev.of_node, in fun_probe()
254 dev_err(&ofdev->dev, "too much multiple chips\n"); in fun_probe()
[all …]
Dndfc.c38 struct platform_device *ofdev; member
170 mtd->dev.parent = &ndfc->ofdev->dev; in ndfc_chip_init()
177 mtd->name = kasprintf(GFP_KERNEL, "%s.%s", dev_name(&ndfc->ofdev->dev), in ndfc_chip_init()
197 static int ndfc_probe(struct platform_device *ofdev) in ndfc_probe() argument
206 reg = of_get_property(ofdev->dev.of_node, "reg", &len); in ndfc_probe()
208 dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); in ndfc_probe()
214 dev_err(&ofdev->dev, "invalid CS number (%d)\n", cs); in ndfc_probe()
222 ndfc->ofdev = ofdev; in ndfc_probe()
223 dev_set_drvdata(&ofdev->dev, ndfc); in ndfc_probe()
225 ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); in ndfc_probe()
[all …]
Dsocrates_nand.c141 static int socrates_nand_probe(struct platform_device *ofdev) in socrates_nand_probe() argument
149 host = devm_kzalloc(&ofdev->dev, sizeof(*host), GFP_KERNEL); in socrates_nand_probe()
153 host->io_base = of_iomap(ofdev->dev.of_node, 0); in socrates_nand_probe()
155 dev_err(&ofdev->dev, "ioremap failed\n"); in socrates_nand_probe()
161 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()
186 dev_set_drvdata(&ofdev->dev, host); in socrates_nand_probe()
206 static int socrates_nand_remove(struct platform_device *ofdev) in socrates_nand_remove() argument
208 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev); in socrates_nand_remove()
/Linux-v4.19/drivers/ata/
Dpata_of_platform.c25 static int pata_of_platform_probe(struct platform_device *ofdev) in pata_of_platform_probe() argument
28 struct device_node *dn = ofdev->dev.of_node; in pata_of_platform_probe()
38 dev_err(&ofdev->dev, "can't get IO address from " in pata_of_platform_probe()
45 dev_err(&ofdev->dev, "can't get CTL address from " in pata_of_platform_probe()
50 irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0); in pata_of_platform_probe()
56 dev_err(&ofdev->dev, "invalid pio-mode\n"); in pata_of_platform_probe()
60 dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n"); in pata_of_platform_probe()
66 return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, irq_res, in pata_of_platform_probe()
/Linux-v4.19/drivers/input/serio/
Dapbps2.c135 static int apbps2_of_probe(struct platform_device *ofdev) in apbps2_of_probe() argument
142 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in apbps2_of_probe()
144 dev_err(&ofdev->dev, "memory allocation failed\n"); in apbps2_of_probe()
149 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in apbps2_of_probe()
150 priv->regs = devm_ioremap_resource(&ofdev->dev, res); in apbps2_of_probe()
158 irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in apbps2_of_probe()
159 err = devm_request_irq(&ofdev->dev, irq, apbps2_isr, in apbps2_of_probe()
162 dev_err(&ofdev->dev, "request IRQ%d failed\n", irq); in apbps2_of_probe()
167 if (of_property_read_u32(ofdev->dev.of_node, "freq", &freq_hz)) { in apbps2_of_probe()
168 dev_err(&ofdev->dev, "unable to get core frequency\n"); in apbps2_of_probe()
[all …]
/Linux-v4.19/drivers/net/ethernet/freescale/fs_enet/
Dmii-fec.c99 static int fs_enet_mdio_probe(struct platform_device *ofdev) in fs_enet_mdio_probe() argument
108 match = of_match_device(fs_enet_mdio_fec_match, &ofdev->dev); in fs_enet_mdio_probe()
126 ret = of_address_to_resource(ofdev->dev.of_node, 0, &res); in fs_enet_mdio_probe()
139 clock = get_bus_freq(ofdev->dev.of_node); in fs_enet_mdio_probe()
142 dev_warn(&ofdev->dev, "could not determine IPS clock\n"); in fs_enet_mdio_probe()
155 dev_err(&ofdev->dev, in fs_enet_mdio_probe()
170 new_bus->parent = &ofdev->dev; in fs_enet_mdio_probe()
171 platform_set_drvdata(ofdev, new_bus); in fs_enet_mdio_probe()
173 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); in fs_enet_mdio_probe()
190 static int fs_enet_mdio_remove(struct platform_device *ofdev) in fs_enet_mdio_remove() argument
[all …]
/Linux-v4.19/drivers/i2c/busses/
Di2c-cpm.c104 struct platform_device *ofdev; member
431 struct platform_device *ofdev = cpm->ofdev; in cpm_i2c_setup() local
439 dev_dbg(&cpm->ofdev->dev, "cpm_i2c_setup()\n"); in cpm_i2c_setup()
443 cpm->irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in cpm_i2c_setup()
454 i2c_base = of_iomap(ofdev->dev.of_node, 1); in cpm_i2c_setup()
460 if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm1-i2c")) { in cpm_i2c_setup()
477 } else if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm2-i2c")) { in cpm_i2c_setup()
492 cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0); in cpm_i2c_setup()
498 data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); in cpm_i2c_setup()
505 data = of_get_property(ofdev->dev.of_node, "linux,i2c-class", &len); in cpm_i2c_setup()
[all …]
/Linux-v4.19/arch/sparc/kernel/
Dleon_pci_grpci1.c511 static int grpci1_of_probe(struct platform_device *ofdev) in grpci1_of_probe() argument
521 dev_err(&ofdev->dev, "only one GRPCI1 supported\n"); in grpci1_of_probe()
525 if (ofdev->num_resources < 3) { in grpci1_of_probe()
526 dev_err(&ofdev->dev, "not enough APB/AHB resources\n"); in grpci1_of_probe()
530 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in grpci1_of_probe()
532 dev_err(&ofdev->dev, "memory allocation failed\n"); in grpci1_of_probe()
535 platform_set_drvdata(ofdev, priv); in grpci1_of_probe()
536 priv->dev = &ofdev->dev; in grpci1_of_probe()
539 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in grpci1_of_probe()
540 regs = devm_ioremap_resource(&ofdev->dev, res); in grpci1_of_probe()
[all …]
/Linux-v4.19/drivers/gpio/
Dgpio-grgpio.c331 static int grgpio_probe(struct platform_device *ofdev) in grgpio_probe() argument
333 struct device_node *np = ofdev->dev.of_node; in grgpio_probe()
344 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in grgpio_probe()
348 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in grgpio_probe()
349 regs = devm_ioremap_resource(&ofdev->dev, res); in grgpio_probe()
354 err = bgpio_init(gc, &ofdev->dev, 4, regs + GRGPIO_DATA, in grgpio_probe()
358 dev_err(&ofdev->dev, "bgpio_init() failed\n"); in grgpio_probe()
364 priv->dev = &ofdev->dev; in grgpio_probe()
369 gc->label = devm_kasprintf(&ofdev->dev, GFP_KERNEL, "%pOF", np); in grgpio_probe()
375 dev_dbg(&ofdev->dev, in grgpio_probe()
[all …]
/Linux-v4.19/drivers/usb/host/
Dfsl-mph-dr-of.c78 struct platform_device *ofdev, in fsl_usb2_device_register() argument
83 const struct resource *res = ofdev->resource; in fsl_usb2_device_register()
84 unsigned int num = ofdev->num_resources; in fsl_usb2_device_register()
93 pdev->dev.parent = &ofdev->dev; in fsl_usb2_device_register()
95 pdev->dev.coherent_dma_mask = ofdev->dev.coherent_dma_mask; in fsl_usb2_device_register()
98 pdev->dev.dma_mask = &ofdev->dev.coherent_dma_mask; in fsl_usb2_device_register()
171 static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) in fsl_usb2_mph_dr_of_probe() argument
173 struct device_node *np = ofdev->dev.of_node; in fsl_usb2_mph_dr_of_probe()
185 match = of_match_device(fsl_usb2_mph_dr_of_match, &ofdev->dev); in fsl_usb2_mph_dr_of_probe()
237 dev_warn(&ofdev->dev, "Could not get controller version\n"); in fsl_usb2_mph_dr_of_probe()
[all …]
/Linux-v4.19/sound/aoa/soundbus/
Dcore.c22 tmp = get_device(&dev->ofdev.dev); in soundbus_dev_get()
33 put_device(&dev->ofdev.dev); in soundbus_dev_put()
74 of = &soundbus_dev->ofdev; in soundbus_uevent()
146 !dev->ofdev.dev.of_node || in soundbus_add_one()
153 dev_set_name(&dev->ofdev.dev, "soundbus:%x", ++devcount); in soundbus_add_one()
154 dev->ofdev.dev.bus = &soundbus_bus_type; in soundbus_add_one()
155 return of_device_register(&dev->ofdev); in soundbus_add_one()
161 of_device_unregister(&dev->ofdev); in soundbus_remove_one()
/Linux-v4.19/drivers/watchdog/
Dmpc8xxx_wdt.c132 static int mpc8xxx_wdt_probe(struct platform_device *ofdev) in mpc8xxx_wdt_probe() argument
141 wdt_type = of_device_get_match_data(&ofdev->dev); in mpc8xxx_wdt_probe()
148 ddata = devm_kzalloc(&ofdev->dev, sizeof(*ddata), GFP_KERNEL); in mpc8xxx_wdt_probe()
152 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in mpc8xxx_wdt_probe()
153 ddata->base = devm_ioremap_resource(&ofdev->dev, res); in mpc8xxx_wdt_probe()
169 watchdog_init_timeout(&ddata->wdd, timeout, &ofdev->dev); in mpc8xxx_wdt_probe()
199 platform_set_drvdata(ofdev, ddata); in mpc8xxx_wdt_probe()
203 static int mpc8xxx_wdt_remove(struct platform_device *ofdev) in mpc8xxx_wdt_remove() argument
205 struct mpc8xxx_wdt_ddata *ddata = platform_get_drvdata(ofdev); in mpc8xxx_wdt_remove()
/Linux-v4.19/drivers/of/
Ddevice.c56 int of_device_add(struct platform_device *ofdev) in of_device_add() argument
58 BUG_ON(ofdev->dev.of_node == NULL); in of_device_add()
62 ofdev->name = dev_name(&ofdev->dev); in of_device_add()
63 ofdev->id = PLATFORM_DEVID_NONE; in of_device_add()
70 set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); in of_device_add()
72 return device_add(&ofdev->dev); in of_device_add()
192 void of_device_unregister(struct platform_device *ofdev) in of_device_unregister() argument
194 device_unregister(&ofdev->dev); in of_device_unregister()
/Linux-v4.19/arch/powerpc/include/asm/
Dmacio.h42 struct platform_device ofdev; member
49 #define to_macio_device(d) container_of(d, struct macio_dev, ofdev.dev)
50 #define of_to_macio_device(d) container_of(d, struct macio_dev, ofdev)
102 dev_set_drvdata(&dev->ofdev.dev, data); in macio_set_drvdata()
107 return dev_get_drvdata(&dev->ofdev.dev); in macio_get_drvdata()
112 return mdev->ofdev.dev.of_node; in macio_get_of_node()

1234