Lines Matching refs:ofdev
130 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()
185 platform_set_drvdata(ofdev, priv); in apbps2_of_probe()