Lines Matching +full:hb +full:- +full:sregs +full:- +full:l2 +full:- +full:ecc

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2011-2012 Calxeda, Inc.
28 struct hb_l2_drvdata *drvdata = dci->pvt_info; in highbank_l2_err_handler()
30 if (irq == drvdata->sb_irq) { in highbank_l2_err_handler()
31 writel(1, drvdata->base + SR_CLR_SB_ECC_INTR); in highbank_l2_err_handler()
32 edac_device_handle_ce(dci, 0, 0, dci->ctl_name); in highbank_l2_err_handler()
34 if (irq == drvdata->db_irq) { in highbank_l2_err_handler()
35 writel(1, drvdata->base + SR_CLR_DB_ECC_INTR); in highbank_l2_err_handler()
36 edac_device_handle_ue(dci, 0, 0, dci->ctl_name); in highbank_l2_err_handler()
43 { .compatible = "calxeda,hb-sregs-l2-ecc", },
59 return -ENOMEM; in highbank_l2_err_probe()
61 drvdata = dci->pvt_info; in highbank_l2_err_probe()
62 dci->dev = &pdev->dev; in highbank_l2_err_probe()
65 if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) in highbank_l2_err_probe()
66 return -ENOMEM; in highbank_l2_err_probe()
70 dev_err(&pdev->dev, "Unable to get mem resource\n"); in highbank_l2_err_probe()
71 res = -ENODEV; in highbank_l2_err_probe()
75 if (!devm_request_mem_region(&pdev->dev, r->start, in highbank_l2_err_probe()
76 resource_size(r), dev_name(&pdev->dev))) { in highbank_l2_err_probe()
77 dev_err(&pdev->dev, "Error while requesting mem region\n"); in highbank_l2_err_probe()
78 res = -EBUSY; in highbank_l2_err_probe()
82 drvdata->base = devm_ioremap(&pdev->dev, r->start, resource_size(r)); in highbank_l2_err_probe()
83 if (!drvdata->base) { in highbank_l2_err_probe()
84 dev_err(&pdev->dev, "Unable to map regs\n"); in highbank_l2_err_probe()
85 res = -ENOMEM; in highbank_l2_err_probe()
89 id = of_match_device(hb_l2_err_of_match, &pdev->dev); in highbank_l2_err_probe()
90 dci->mod_name = pdev->dev.driver->name; in highbank_l2_err_probe()
91 dci->ctl_name = id ? id->compatible : "unknown"; in highbank_l2_err_probe()
92 dci->dev_name = dev_name(&pdev->dev); in highbank_l2_err_probe()
97 drvdata->db_irq = platform_get_irq(pdev, 0); in highbank_l2_err_probe()
98 res = devm_request_irq(&pdev->dev, drvdata->db_irq, in highbank_l2_err_probe()
100 0, dev_name(&pdev->dev), dci); in highbank_l2_err_probe()
104 drvdata->sb_irq = platform_get_irq(pdev, 1); in highbank_l2_err_probe()
105 res = devm_request_irq(&pdev->dev, drvdata->sb_irq, in highbank_l2_err_probe()
107 0, dev_name(&pdev->dev), dci); in highbank_l2_err_probe()
111 devres_close_group(&pdev->dev, NULL); in highbank_l2_err_probe()
114 edac_device_del_device(&pdev->dev); in highbank_l2_err_probe()
116 devres_release_group(&pdev->dev, NULL); in highbank_l2_err_probe()
125 edac_device_del_device(&pdev->dev); in highbank_l2_err_remove()
142 MODULE_DESCRIPTION("EDAC Driver for Calxeda Highbank L2 Cache");