Lines Matching refs:ofdev
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()
183 dev_info(&ofdev->dev, "irq = %d, base = 0x%p\n", irq, priv->regs); in apbps2_of_probe()
187 platform_set_drvdata(ofdev, priv); in apbps2_of_probe()