/linux/drivers/net/can/mscan/ |
A D | mpc5xxx_can.c | 124 np = ofdev->dev.of_node; in mpc512x_can_get_clock() 161 clk_in = devm_clk_get(&ofdev->dev, "sys"); in mpc512x_can_get_clock() 171 dev_dbg(&ofdev->dev, in mpc512x_can_get_clock() 179 clk_in = devm_clk_get(&ofdev->dev, "ref"); in mpc512x_can_get_clock() 184 dev_dbg(&ofdev->dev, in mpc512x_can_get_clock() 196 clk_can = devm_clk_get(&ofdev->dev, "ips"); in mpc512x_can_get_clock() 235 clk_ipg = devm_clk_get(&ofdev->dev, "ipg"); in mpc512x_can_get_clock() 301 dev_err(&ofdev->dev, "no irq found\n"); in mpc5xxx_can_probe() 309 platform_set_drvdata(ofdev, dev); in mpc5xxx_can_probe() 310 SET_NETDEV_DEV(dev, &ofdev->dev); in mpc5xxx_can_probe() [all …]
|
/linux/drivers/net/ethernet/ibm/emac/ |
A D | tah.c | 23 int tah_attach(struct platform_device *ofdev, int channel) in tah_attach() argument 25 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_attach() 37 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_detach() 44 void tah_reset(struct platform_device *ofdev) in tah_reset() argument 65 int tah_get_regs_len(struct platform_device *ofdev) in tah_get_regs_len() argument 86 static int tah_probe(struct platform_device *ofdev) in tah_probe() argument 88 struct device_node *np = ofdev->dev.of_node; in tah_probe() 99 dev->ofdev = ofdev; in tah_probe() 115 platform_set_drvdata(ofdev, dev); in tah_probe() 118 tah_reset(ofdev); in tah_probe() [all …]
|
A D | rgmii.c | 80 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_attach() 88 ofdev->dev.of_node); in rgmii_attach() 98 ofdev->dev.of_node, input, phy_modes(mode)); in rgmii_attach() 109 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_set_speed() 193 int rgmii_get_regs_len(struct platform_device *ofdev) in rgmii_get_regs_len() argument 215 static int rgmii_probe(struct platform_device *ofdev) in rgmii_probe() argument 217 struct device_node *np = ofdev->dev.of_node; in rgmii_probe() 228 dev->ofdev = ofdev; in rgmii_probe() 260 ofdev->dev.of_node, in rgmii_probe() 264 platform_set_drvdata(ofdev, dev); in rgmii_probe() [all …]
|
A D | zmii.c | 81 int zmii_attach(struct platform_device *ofdev, int input, in zmii_attach() argument 84 struct zmii_instance *dev = platform_get_drvdata(ofdev); in zmii_attach() 121 ofdev->dev.of_node, in zmii_attach() 128 ofdev->dev.of_node, *mode, input); in zmii_attach() 150 struct zmii_instance *dev = platform_get_drvdata(ofdev); in zmii_get_mdio() 210 int zmii_get_regs_len(struct platform_device *ofdev) in zmii_get_regs_len() argument 231 static int zmii_probe(struct platform_device *ofdev) in zmii_probe() argument 233 struct device_node *np = ofdev->dev.of_node; in zmii_probe() 244 dev->ofdev = ofdev; in zmii_probe() 269 platform_set_drvdata(ofdev, dev); in zmii_probe() [all …]
|
A D | rgmii.h | 50 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);
|
A D | zmii.h | 46 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);
|
A D | tah.h | 47 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);
|
A D | mal.c | 514 static int mal_probe(struct platform_device *ofdev) in mal_probe() argument 530 mal->ofdev = ofdev; in mal_probe() 555 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() 577 ofdev->dev.of_node); in mal_probe() 585 mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2); in mal_probe() 685 mal->version, ofdev->dev.of_node, in mal_probe() 690 platform_set_drvdata(ofdev, mal); in mal_probe() 712 static int mal_remove(struct platform_device *ofdev) in mal_remove() argument 714 struct mal_instance *mal = platform_get_drvdata(ofdev); in mal_remove() [all …]
|
/linux/drivers/tty/serial/8250/ |
A D | 8250_of.c | 43 pm_runtime_enable(&ofdev->dev); in of_platform_serial_setup() 44 pm_runtime_get_sync(&ofdev->dev); in of_platform_serial_setup() 53 dev_warn(&ofdev->dev, in of_platform_serial_setup() 157 port->dev = &ofdev->dev; in of_platform_serial_setup() 179 pm_runtime_put_sync(&ofdev->dev); in of_platform_serial_setup() 180 pm_runtime_disable(&ofdev->dev); in of_platform_serial_setup() 238 platform_set_drvdata(ofdev, info); in of_platform_serial_probe() 242 pm_runtime_put_sync(&ofdev->dev); in of_platform_serial_probe() 243 pm_runtime_disable(&ofdev->dev); in of_platform_serial_probe() 260 pm_runtime_put_sync(&ofdev->dev); in of_platform_serial_remove() [all …]
|
/linux/drivers/macintosh/ |
A D | macio_asic.c | 53 tmp = get_device(&dev->ofdev.dev); in macio_dev_get() 63 put_device(&dev->ofdev.dev); in macio_dev_put() 370 dev->ofdev.dev.of_node = np; in macio_add_one_device() 372 dev->ofdev.dev.dma_mask = &dev->ofdev.archdata.dma_mask; in macio_add_one_device() 373 dev->ofdev.dev.coherent_dma_mask = dev->ofdev.archdata.dma_mask; in macio_add_one_device() 374 dev->ofdev.dev.parent = parent; in macio_add_one_device() 396 dev, &dev->ofdev, &dev->ofdev.dev, &dev->ofdev.dev.kobj); in macio_add_one_device() 425 dev_name(&dev->ofdev.dev)); in macio_add_one_device() 491 pnode = mbdev->ofdev.dev.of_node; in macio_pci_add_devices() 504 pnode = sdev->ofdev.dev.of_node; in macio_pci_add_devices() [all …]
|
/linux/drivers/mtd/nand/raw/ |
A D | ndfc.c | 32 struct platform_device *ofdev; member 157 mtd->dev.parent = &ndfc->ofdev->dev; in ndfc_chip_init() 184 static int ndfc_probe(struct platform_device *ofdev) in ndfc_probe() argument 193 reg = of_get_property(ofdev->dev.of_node, "reg", &len); in ndfc_probe() 201 dev_err(&ofdev->dev, "invalid CS number (%d)\n", cs); in ndfc_probe() 209 ndfc->ofdev = ofdev; in ndfc_probe() 210 dev_set_drvdata(&ofdev->dev, ndfc); in ndfc_probe() 212 ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); in ndfc_probe() 214 dev_err(&ofdev->dev, "failed to get memory\n"); in ndfc_probe() 234 err = ndfc_chip_init(ndfc, ofdev->dev.of_node); in ndfc_probe() [all …]
|
A D | fsl_upm.c | 162 static int fun_probe(struct platform_device *ofdev) in fun_probe() argument 182 dev_err(&ofdev->dev, "can't find UPM\n"); in fun_probe() 189 dev_err(&ofdev->dev, "can't get UPM address offset\n"); 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() 220 dev_err(&ofdev->dev, "RNB gpio #%d is invalid\n", i); in fun_probe() 227 fun->dev = &ofdev->dev; in fun_probe() 229 ret = fun_chip_init(fun, ofdev->dev.of_node, io_res); in fun_probe() 233 dev_set_drvdata(&ofdev->dev, fun); in fun_probe() [all …]
|
A D | socrates_nand.c | 136 static int socrates_nand_probe(struct platform_device *ofdev) in socrates_nand_probe() argument 144 host = devm_kzalloc(&ofdev->dev, sizeof(*host), GFP_KERNEL); in socrates_nand_probe() 148 host->io_base = of_iomap(ofdev->dev.of_node, 0); in socrates_nand_probe() 150 dev_err(&ofdev->dev, "ioremap failed\n"); in socrates_nand_probe() 156 host->dev = &ofdev->dev; in socrates_nand_probe() 164 nand_set_flash_node(nand_chip, ofdev->dev.of_node); in socrates_nand_probe() 166 mtd->dev.parent = &ofdev->dev; in socrates_nand_probe() 184 dev_set_drvdata(&ofdev->dev, host); in socrates_nand_probe() 204 static int socrates_nand_remove(struct platform_device *ofdev) in socrates_nand_remove() argument 206 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev); in socrates_nand_remove()
|
/linux/drivers/i2c/busses/ |
A D | i2c-cpm.c | 98 struct platform_device *ofdev; member 425 struct platform_device *ofdev = cpm->ofdev; in cpm_i2c_setup() local 433 dev_dbg(&cpm->ofdev->dev, "cpm_i2c_setup()\n"); in cpm_i2c_setup() 448 i2c_base = of_iomap(ofdev->dev.of_node, 1); in cpm_i2c_setup() 486 cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0); in cpm_i2c_setup() 528 cpm->rxbuf[i] = dma_alloc_coherent(&cpm->ofdev->dev, in cpm_i2c_setup() 643 cpm->ofdev = ofdev; in cpm_i2c_probe() 645 platform_set_drvdata(ofdev, cpm); in cpm_i2c_probe() 649 cpm->adap.dev.parent = &ofdev->dev; in cpm_i2c_probe() 654 dev_err(&ofdev->dev, "Unable to init hardware\n"); in cpm_i2c_probe() [all …]
|
/linux/arch/sparc/kernel/ |
A D | leon_pci_grpci1.c | 525 if (ofdev->num_resources < 3) { 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() 540 regs = devm_ioremap_resource(&ofdev->dev, res); in grpci1_of_probe() 550 dev_err(&ofdev->dev, "not in host system slot\n"); in grpci1_of_probe() 573 priv->pci_area = ofdev->resource[1].start; in grpci1_of_probe() 574 priv->pci_area_end = ofdev->resource[1].end+1; in grpci1_of_probe() 575 priv->pci_io = ofdev->resource[2].start; in grpci1_of_probe() 659 err = devm_request_irq(&ofdev->dev, priv->irq_err, in grpci1_of_probe() [all …]
|
A D | leon_pci_grpci2.c | 697 if (ofdev->num_resources < 3) { in grpci2_of_probe() 703 regs = of_ioremap(&ofdev->resource[0], 0, in grpci2_of_probe() 704 resource_size(&ofdev->resource[0]), in grpci2_of_probe() 758 priv->pci_area = ofdev->resource[1].start; in grpci2_of_probe() 760 priv->pci_io = ofdev->resource[2].start; in grpci2_of_probe() 826 priv->virq_dma = ofdev->archdata.irqs[1]; in grpci2_of_probe() 842 priv->irq_map[i] = ofdev->archdata.irqs[i]; in grpci2_of_probe() 846 priv->virq_dma = ofdev->archdata.irqs[4]; in grpci2_of_probe() 871 leon_pci_init(ofdev, &priv->info); in grpci2_of_probe() 885 of_iounmap(&ofdev->resource[0], regs, in grpci2_of_probe() [all …]
|
/linux/drivers/ata/ |
A D | pata_of_platform.c | 22 static int pata_of_platform_probe(struct platform_device *ofdev) in pata_of_platform_probe() argument 25 struct device_node *dn = ofdev->dev.of_node; in pata_of_platform_probe() 36 dev_err(&ofdev->dev, "can't get IO address from " in pata_of_platform_probe() 43 dev_err(&ofdev->dev, "can't get CTL address from " in pata_of_platform_probe() 48 irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0); in pata_of_platform_probe() 54 dev_err(&ofdev->dev, "invalid pio-mode\n"); in pata_of_platform_probe() 58 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/drivers/input/serio/ |
A D | apbps2.c | 130 static int apbps2_of_probe(struct platform_device *ofdev) in apbps2_of_probe() argument 137 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in apbps2_of_probe() 139 dev_err(&ofdev->dev, "memory allocation failed\n"); in apbps2_of_probe() 144 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in apbps2_of_probe() 145 priv->regs = devm_ioremap_resource(&ofdev->dev, res); in apbps2_of_probe() 153 irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in apbps2_of_probe() 154 err = devm_request_irq(&ofdev->dev, irq, apbps2_isr, in apbps2_of_probe() 157 dev_err(&ofdev->dev, "request IRQ%d failed\n", irq); in apbps2_of_probe() 162 if (of_property_read_u32(ofdev->dev.of_node, "freq", &freq_hz)) { in apbps2_of_probe() 163 dev_err(&ofdev->dev, "unable to get core frequency\n"); in apbps2_of_probe() [all …]
|
/linux/drivers/net/ethernet/freescale/fs_enet/ |
A D | mii-fec.c | 99 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/drivers/usb/host/ |
A D | fsl-mph-dr-of.c | 78 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() 176 struct device_node *np = ofdev->dev.of_node; in fsl_usb2_mph_dr_of_probe() 244 dev_warn(&ofdev->dev, "Could not get controller version\n"); in fsl_usb2_mph_dr_of_probe() 252 usb_dev = fsl_usb2_device_register(ofdev, pdata, in fsl_usb2_mph_dr_of_probe() 255 dev_err(&ofdev->dev, "Can't register usb device\n"); in fsl_usb2_mph_dr_of_probe() [all …]
|
/linux/drivers/gpio/ |
A D | gpio-grgpio.c | 328 static int grgpio_probe(struct platform_device *ofdev) in grgpio_probe() argument 330 struct device_node *np = ofdev->dev.of_node; in grgpio_probe() 344 regs = devm_platform_ioremap_resource(ofdev, 0); in grgpio_probe() 353 dev_err(&ofdev->dev, "bgpio_init() failed\n"); in grgpio_probe() 359 priv->dev = &ofdev->dev; in grgpio_probe() 370 dev_dbg(&ofdev->dev, in grgpio_probe() 383 dev_err(&ofdev->dev, in grgpio_probe() 393 dev_err(&ofdev->dev, "Could not add irq domain\n"); in grgpio_probe() 407 ret = platform_get_irq(ofdev, lirq->index); in grgpio_probe() 419 platform_set_drvdata(ofdev, priv); in grgpio_probe() [all …]
|
/linux/drivers/tty/serial/ |
A D | ucc_uart.c | 1189 struct device_node *np = ofdev->dev.of_node; in soft_uart_init() 1213 dev_err(&ofdev->dev, "unknown CPU model\n"); in soft_uart_init() 1233 dev_err(&ofdev->dev, in soft_uart_init() 1254 struct device_node *np = ofdev->dev.of_node; in ucc_uart_probe() 1264 ret = soft_uart_init(ofdev); in ucc_uart_probe() 1382 dev_err(&ofdev->dev, in ucc_uart_probe() 1392 dev_err(&ofdev->dev, in ucc_uart_probe() 1404 dev_err(&ofdev->dev, in ucc_uart_probe() 1412 dev_err(&ofdev->dev, in ucc_uart_probe() 1421 qe_port->port.dev = &ofdev->dev; in ucc_uart_probe() [all …]
|
/linux/sound/aoa/soundbus/ |
A D | core.c | 21 tmp = get_device(&dev->ofdev.dev); in soundbus_dev_get() 32 put_device(&dev->ofdev.dev); in soundbus_dev_put() 73 of = &soundbus_dev->ofdev; in soundbus_uevent() 143 !dev->ofdev.dev.of_node || in soundbus_add_one() 150 dev_set_name(&dev->ofdev.dev, "soundbus:%x", ++devcount); in soundbus_add_one() 151 dev->ofdev.dev.bus = &soundbus_bus_type; in soundbus_add_one() 152 return of_device_register(&dev->ofdev); in soundbus_add_one() 158 of_device_unregister(&dev->ofdev); in soundbus_remove_one()
|
/linux/sound/aoa/soundbus/i2sbus/ |
A D | core.c | 75 i2sdev = container_of(dev, struct i2sbus_dev, sound.ofdev.dev); in i2sbus_release_dev() 221 dev->sound.ofdev.archdata.dma_mask = macio->ofdev.archdata.dma_mask; in i2sbus_add_dev() 222 dev->sound.ofdev.dev.of_node = np; in i2sbus_add_dev() 223 dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.archdata.dma_mask; in i2sbus_add_dev() 224 dev->sound.ofdev.dev.parent = &macio->ofdev.dev; in i2sbus_add_dev() 225 dev->sound.ofdev.dev.release = i2sbus_release_dev; in i2sbus_add_dev() 344 while ((np = of_get_next_child(dev->ofdev.dev.of_node, np))) { in i2sbus_probe() 357 dev_set_drvdata(&dev->ofdev.dev, control); in i2sbus_probe() 364 struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev); in i2sbus_remove() 376 struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev); in i2sbus_suspend() [all …]
|
/linux/drivers/of/ |
A D | device.c | 37 int of_device_add(struct platform_device *ofdev) in of_device_add() argument 39 BUG_ON(ofdev->dev.of_node == NULL); in of_device_add() 43 ofdev->name = dev_name(&ofdev->dev); in of_device_add() 44 ofdev->id = PLATFORM_DEVID_NONE; in of_device_add() 51 set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); in of_device_add() 53 return device_add(&ofdev->dev); in of_device_add() 223 void of_device_unregister(struct platform_device *ofdev) in of_device_unregister() argument 225 device_unregister(&ofdev->dev); in of_device_unregister()
|