Lines Matching refs:pdev

156 static int highbank_mc_probe(struct platform_device *pdev)  in highbank_mc_probe()  argument
170 id = of_match_device(hb_ddr_ctrl_of_match, &pdev->dev); in highbank_mc_probe()
185 mci->pdev = &pdev->dev; in highbank_mc_probe()
187 platform_set_drvdata(pdev, mci); in highbank_mc_probe()
189 if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) in highbank_mc_probe()
192 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); in highbank_mc_probe()
194 dev_err(&pdev->dev, "Unable to get mem resource\n"); in highbank_mc_probe()
199 if (!devm_request_mem_region(&pdev->dev, r->start, in highbank_mc_probe()
200 resource_size(r), dev_name(&pdev->dev))) { in highbank_mc_probe()
201 dev_err(&pdev->dev, "Error while requesting mem region\n"); in highbank_mc_probe()
206 base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); in highbank_mc_probe()
208 dev_err(&pdev->dev, "Unable to map regs\n"); in highbank_mc_probe()
219 dev_err(&pdev->dev, "No ECC present, or ECC disabled\n"); in highbank_mc_probe()
227 mci->mod_name = pdev->dev.driver->name; in highbank_mc_probe()
230 mci->dev_name = dev_name(&pdev->dev); in highbank_mc_probe()
245 irq = platform_get_irq(pdev, 0); in highbank_mc_probe()
246 res = devm_request_irq(&pdev->dev, irq, highbank_mc_err_handler, in highbank_mc_probe()
247 0, dev_name(&pdev->dev), mci); in highbank_mc_probe()
249 dev_err(&pdev->dev, "Unable to request irq %d\n", irq); in highbank_mc_probe()
253 devres_close_group(&pdev->dev, NULL); in highbank_mc_probe()
256 edac_mc_del_mc(&pdev->dev); in highbank_mc_probe()
258 devres_release_group(&pdev->dev, NULL); in highbank_mc_probe()
263 static int highbank_mc_remove(struct platform_device *pdev) in highbank_mc_remove() argument
265 struct mem_ctl_info *mci = platform_get_drvdata(pdev); in highbank_mc_remove()
267 edac_mc_del_mc(&pdev->dev); in highbank_mc_remove()