Home
last modified time | relevance | path

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

1234

/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 …]
/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()
62 ofdev->dev.of_node->full_name); in tah_reset()
70 int tah_get_regs_len(struct platform_device *ofdev) in tah_get_regs_len() argument
76 void *tah_dump_regs(struct platform_device *ofdev, void *buf) in tah_dump_regs() argument
78 struct tah_instance *dev = platform_get_drvdata(ofdev); in tah_dump_regs()
[all …]
Drgmii.c98 int rgmii_attach(struct platform_device *ofdev, int input, int mode) in rgmii_attach() argument
100 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_attach()
108 ofdev->dev.of_node->full_name); in rgmii_attach()
118 ofdev->dev.of_node->full_name, input, rgmii_mode_name(mode)); in rgmii_attach()
127 void rgmii_set_speed(struct platform_device *ofdev, int input, int speed) in rgmii_set_speed() argument
129 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_set_speed()
151 void rgmii_get_mdio(struct platform_device *ofdev, int input) in rgmii_get_mdio() argument
153 struct rgmii_instance *dev = platform_get_drvdata(ofdev); in rgmii_get_mdio()
172 void rgmii_put_mdio(struct platform_device *ofdev, int input) in rgmii_put_mdio() argument
174 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->full_name, in zmii_attach()
132 ofdev->dev.of_node->full_name, *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->full_name); in mal_probe()
588 mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in mal_probe()
[all …]
/drivers/mtd/nand/
Ddenali_dt.c42 static int denali_dt_probe(struct platform_device *ofdev) in denali_dt_probe() argument
50 of_id = of_match_device(denali_nand_dt_ids, &ofdev->dev); in denali_dt_probe()
52 ofdev->id_entry = of_id->data; in denali_dt_probe()
58 dt = devm_kzalloc(&ofdev->dev, sizeof(*dt), GFP_KERNEL); in denali_dt_probe()
64 denali->dev = &ofdev->dev; in denali_dt_probe()
65 denali->irq = platform_get_irq(ofdev, 0); in denali_dt_probe()
67 dev_err(&ofdev->dev, "no irq defined\n"); in denali_dt_probe()
71 denali_reg = platform_get_resource_byname(ofdev, IORESOURCE_MEM, "denali_reg"); in denali_dt_probe()
72 denali->flash_reg = devm_ioremap_resource(&ofdev->dev, denali_reg); in denali_dt_probe()
76 nand_data = platform_get_resource_byname(ofdev, IORESOURCE_MEM, "nand_data"); in denali_dt_probe()
[all …]
Dfsl_upm.c205 static int fun_probe(struct platform_device *ofdev) in fun_probe() argument
219 ret = of_address_to_resource(ofdev->dev.of_node, 0, &io_res); in fun_probe()
221 dev_err(&ofdev->dev, "can't get IO base\n"); in fun_probe()
227 dev_err(&ofdev->dev, "can't find UPM\n"); in fun_probe()
231 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-addr-offset", in fun_probe()
234 dev_err(&ofdev->dev, "can't get UPM address offset\n"); in fun_probe()
240 prop = of_get_property(ofdev->dev.of_node, "fsl,upm-cmd-offset", &size); in fun_probe()
242 dev_err(&ofdev->dev, "can't get UPM command offset\n"); in fun_probe()
248 prop = of_get_property(ofdev->dev.of_node, in fun_probe()
253 dev_err(&ofdev->dev, "too much multiple chips\n"); in fun_probe()
[all …]
Dndfc.c38 struct platform_device *ofdev; member
172 ndfc->mtd.dev.parent = &ndfc->ofdev->dev; in ndfc_chip_init()
180 dev_name(&ndfc->ofdev->dev), flash_np->name); in ndfc_chip_init()
199 static int ndfc_probe(struct platform_device *ofdev) in ndfc_probe() argument
208 reg = of_get_property(ofdev->dev.of_node, "reg", &len); in ndfc_probe()
210 dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); in ndfc_probe()
216 dev_err(&ofdev->dev, "invalid CS number (%d)\n", cs); in ndfc_probe()
225 ndfc->ofdev = ofdev; in ndfc_probe()
226 dev_set_drvdata(&ofdev->dev, ndfc); in ndfc_probe()
228 ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); in ndfc_probe()
[all …]
Dsocrates_nand.c144 static int socrates_nand_probe(struct platform_device *ofdev) in socrates_nand_probe() argument
153 host = devm_kzalloc(&ofdev->dev, sizeof(*host), GFP_KERNEL); in socrates_nand_probe()
157 host->io_base = of_iomap(ofdev->dev.of_node, 0); in socrates_nand_probe()
159 dev_err(&ofdev->dev, "ioremap failed\n"); in socrates_nand_probe()
165 host->dev = &ofdev->dev; in socrates_nand_probe()
170 mtd->dev.parent = &ofdev->dev; in socrates_nand_probe()
171 ppdata.of_node = ofdev->dev.of_node; in socrates_nand_probe()
189 dev_set_drvdata(&ofdev->dev, host); in socrates_nand_probe()
217 static int socrates_nand_remove(struct platform_device *ofdev) in socrates_nand_remove() argument
219 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev); in socrates_nand_remove()
/drivers/macintosh/
Dmacio_asic.c58 tmp = get_device(&dev->ofdev.dev); in macio_dev_get()
68 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()
376 dev->ofdev.dev.of_node = np; in macio_add_one_device()
[all …]
Dmacio_sysfs.c12 return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \
23 of = &to_macio_device (dev)->ofdev; in compatible_show()
55 struct platform_device *ofdev; in devspec_show() local
57 ofdev = to_platform_device(dev); in devspec_show()
58 return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); in devspec_show()
/drivers/i2c/busses/
Di2c-cpm.c107 struct platform_device *ofdev; member
436 struct platform_device *ofdev = cpm->ofdev; in cpm_i2c_setup() local
444 dev_dbg(&cpm->ofdev->dev, "cpm_i2c_setup()\n"); in cpm_i2c_setup()
448 cpm->irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); in cpm_i2c_setup()
459 i2c_base = of_iomap(ofdev->dev.of_node, 1); in cpm_i2c_setup()
465 if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm1-i2c")) { in cpm_i2c_setup()
482 } else if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm2-i2c")) { in cpm_i2c_setup()
497 cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0); in cpm_i2c_setup()
503 data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); in cpm_i2c_setup()
510 data = of_get_property(ofdev->dev.of_node, "linux,i2c-class", &len); in cpm_i2c_setup()
[all …]
Di2c-ibm_iic.c663 static int iic_request_irq(struct platform_device *ofdev, in iic_request_irq() argument
666 struct device_node *np = ofdev->dev.of_node; in iic_request_irq()
674 dev_err(&ofdev->dev, "irq_of_parse_and_map failed\n"); in iic_request_irq()
683 dev_err(&ofdev->dev, "request_irq %d failed\n", irq); in iic_request_irq()
694 static int iic_probe(struct platform_device *ofdev) in iic_probe() argument
696 struct device_node *np = ofdev->dev.of_node; in iic_probe()
704 dev_err(&ofdev->dev, "failed to allocate device data\n"); in iic_probe()
708 platform_set_drvdata(ofdev, dev); in iic_probe()
712 dev_err(&ofdev->dev, "failed to iomap device\n"); in iic_probe()
719 dev->irq = iic_request_irq(ofdev, dev); in iic_probe()
[all …]
/drivers/tty/serial/
Dof_serial.c61 static int of_platform_serial_setup(struct platform_device *ofdev, in of_platform_serial_setup() argument
66 struct device_node *np = ofdev->dev.of_node; in of_platform_serial_setup()
74 info->clk = devm_clk_get(&ofdev->dev, NULL); in of_platform_serial_setup()
76 dev_warn(&ofdev->dev, in of_platform_serial_setup()
93 dev_warn(&ofdev->dev, "invalid address\n"); in of_platform_serial_setup()
130 dev_warn(&ofdev->dev, "unsupported reg-io-width (%d)\n", in of_platform_serial_setup()
145 port->dev = &ofdev->dev; in of_platform_serial_setup()
173 static int of_platform_serial_probe(struct platform_device *ofdev) in of_platform_serial_probe() argument
181 match = of_match_device(of_platform_serial_table, &ofdev->dev); in of_platform_serial_probe()
185 if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL)) in of_platform_serial_probe()
[all …]
Ducc_uart.c1193 static int ucc_uart_probe(struct platform_device *ofdev) in ucc_uart_probe() argument
1195 struct device_node *np = ofdev->dev.of_node; in ucc_uart_probe()
1206 dev_dbg(&ofdev->dev, "using Soft-UART mode\n"); in ucc_uart_probe()
1230 dev_err(&ofdev->dev, "unknown CPU model\n"); in ucc_uart_probe()
1236 dev_info(&ofdev->dev, "waiting for firmware %s\n", in ucc_uart_probe()
1247 FW_ACTION_HOTPLUG, filename, &ofdev->dev, in ucc_uart_probe()
1248 GFP_KERNEL, &ofdev->dev, uart_firmware_cont); in ucc_uart_probe()
1250 dev_err(&ofdev->dev, in ucc_uart_probe()
1260 dev_err(&ofdev->dev, "can't allocate QE port structure\n"); in ucc_uart_probe()
1267 dev_err(&ofdev->dev, "missing 'reg' property in device tree\n"); in ucc_uart_probe()
[all …]
/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()
39 dev_err(&ofdev->dev, "can't get IO address from " in pata_of_platform_probe()
46 dev_err(&ofdev->dev, "can't get CTL address from " in pata_of_platform_probe()
51 irq_res = platform_get_resource(ofdev, IORESOURCE_IRQ, 0); in pata_of_platform_probe()
61 dev_err(&ofdev->dev, "invalid pio-mode\n"); in pata_of_platform_probe()
65 dev_info(&ofdev->dev, "pio-mode unspecified, assuming PIO0\n"); in pata_of_platform_probe()
71 return __pata_platform_probe(&ofdev->dev, &io_res, &ctl_res, irq_res, in pata_of_platform_probe()
/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 …]
/drivers/usb/host/
Dfsl-mph-dr-of.c81 struct platform_device *ofdev, in fsl_usb2_device_register() argument
86 const struct resource *res = ofdev->resource; in fsl_usb2_device_register()
87 unsigned int num = ofdev->num_resources; in fsl_usb2_device_register()
96 pdev->dev.parent = &ofdev->dev; in fsl_usb2_device_register()
98 pdev->dev.coherent_dma_mask = ofdev->dev.coherent_dma_mask; in fsl_usb2_device_register()
99 *pdev->dev.dma_mask = *ofdev->dev.dma_mask; in fsl_usb2_device_register()
170 static int fsl_usb2_mph_dr_of_probe(struct platform_device *ofdev) in fsl_usb2_mph_dr_of_probe() argument
172 struct device_node *np = ofdev->dev.of_node; in fsl_usb2_mph_dr_of_probe()
184 match = of_match_device(fsl_usb2_mph_dr_of_match, &ofdev->dev); in fsl_usb2_mph_dr_of_probe()
240 dev_warn(&ofdev->dev, "Could not get controller version\n"); in fsl_usb2_mph_dr_of_probe()
[all …]
/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()
175 new_bus->parent = &ofdev->dev; in fs_enet_mdio_probe()
176 platform_set_drvdata(ofdev, new_bus); in fs_enet_mdio_probe()
178 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); in fs_enet_mdio_probe()
197 static int fs_enet_mdio_remove(struct platform_device *ofdev) in fs_enet_mdio_remove() argument
[all …]
/drivers/gpio/
Dgpio-grgpio.c339 static int grgpio_probe(struct platform_device *ofdev) in grgpio_probe() argument
341 struct device_node *np = ofdev->dev.of_node; in grgpio_probe()
353 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); in grgpio_probe()
357 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in grgpio_probe()
358 regs = devm_ioremap_resource(&ofdev->dev, res); in grgpio_probe()
363 err = bgpio_init(bgc, &ofdev->dev, 4, regs + GRGPIO_DATA, in grgpio_probe()
367 dev_err(&ofdev->dev, "bgpio_init() failed\n"); in grgpio_probe()
373 priv->dev = &ofdev->dev; in grgpio_probe()
385 dev_dbg(&ofdev->dev, in grgpio_probe()
398 dev_err(&ofdev->dev, in grgpio_probe()
[all …]
/drivers/of/
Ddevice.c54 int of_device_add(struct platform_device *ofdev) in of_device_add() argument
56 BUG_ON(ofdev->dev.of_node == NULL); in of_device_add()
60 ofdev->name = dev_name(&ofdev->dev); in of_device_add()
61 ofdev->id = -1; in of_device_add()
68 set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); in of_device_add()
70 return device_add(&ofdev->dev); in of_device_add()
161 void of_device_unregister(struct platform_device *ofdev) in of_device_unregister() argument
163 device_unregister(&ofdev->dev); in of_device_unregister()
/drivers/watchdog/
Dmpc8xxx_wdt.c144 static int mpc8xxx_wdt_probe(struct platform_device *ofdev) in mpc8xxx_wdt_probe() argument
154 wdt_type = of_device_get_match_data(&ofdev->dev); in mpc8xxx_wdt_probe()
161 ddata = devm_kzalloc(&ofdev->dev, sizeof(*ddata), GFP_KERNEL); in mpc8xxx_wdt_probe()
165 res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); in mpc8xxx_wdt_probe()
166 ddata->base = devm_ioremap_resource(&ofdev->dev, res); in mpc8xxx_wdt_probe()
207 platform_set_drvdata(ofdev, ddata); in mpc8xxx_wdt_probe()
211 static int mpc8xxx_wdt_remove(struct platform_device *ofdev) in mpc8xxx_wdt_remove() argument
213 struct mpc8xxx_wdt_ddata *ddata = platform_get_drvdata(ofdev); in mpc8xxx_wdt_remove()

1234