Lines Matching +full:ctu +full:-
1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * CTU CAN FD IP Core
6 * Copyright (C) 2015-2018 Ondrej Ille <ondrej.ille@gmail.com> FEE CTU
7 * Copyright (C) 2018-2021 Ondrej Ille <ondrej.ille@gmail.com> self-funded
8 * Copyright (C) 2018-2019 Martin Jerabek <martin.jerabek01@gmail.com> FEE CTU
9 * Copyright (C) 2018-2022 Pavel Pisa <pisa@cmp.felk.cvut.cz> FEE CTU/self-funded
68 list_add(&priv->peers_on_pdev, &bdata->ndev_list_head); in ctucan_pci_set_drvdata()
69 priv->irq_flags = IRQF_SHARED; in ctucan_pci_set_drvdata()
73 * ctucan_pci_probe - PCI registration call
85 struct device *dev = &pdev->dev; in ctucan_pci_probe()
86 unsigned long driver_data = ent->driver_data; in ctucan_pci_probe()
130 ret = -ENOMEM; in ctucan_pci_probe()
138 ret = -EIO; in ctucan_pci_probe()
152 irq = pdev->irq; in ctucan_pci_probe()
158 ret = -ENOMEM; in ctucan_pci_probe()
162 INIT_LIST_HEAD(&bdata->ndev_list_head); in ctucan_pci_probe()
163 bdata->bar0_base = bar0_base; in ctucan_pci_probe()
164 bdata->cra_base = cra_addr; in ctucan_pci_probe()
165 bdata->bar1_base = addr; in ctucan_pci_probe()
166 bdata->use_msi = msi_ok; in ctucan_pci_probe()
182 dev_info(dev, "CTU CAN FD core %d initialization failed\n", in ctucan_pci_probe()
190 * Avalon-MM to PCI Express Interrupt Enable Register in ctucan_pci_probe()
221 * ctucan_pci_remove - Unregister the device after releasing the resources
233 dev_dbg(&pdev->dev, "ctucan_remove"); in ctucan_pci_remove()
236 dev_err(&pdev->dev, "%s: no list of devices\n", __func__); in ctucan_pci_remove()
241 * Avalon-MM to PCI Express Interrupt Enable Register in ctucan_pci_remove()
243 if (bdata->cra_base) in ctucan_pci_remove()
244 iowrite32(0, bdata->cra_base + CYCLONE_IV_CRA_A2P_IE); in ctucan_pci_remove()
246 while ((priv = list_first_entry_or_null(&bdata->ndev_list_head, struct ctucan_priv, in ctucan_pci_remove()
248 ndev = priv->can.dev; in ctucan_pci_remove()
252 netif_napi_del(&priv->napi); in ctucan_pci_remove()
254 list_del_init(&priv->peers_on_pdev); in ctucan_pci_remove()
258 pci_iounmap(pdev, bdata->bar1_base); in ctucan_pci_remove()
260 if (bdata->use_msi) { in ctucan_pci_remove()
268 pci_iounmap(pdev, bdata->bar0_base); in ctucan_pci_remove()
294 MODULE_DESCRIPTION("CTU CAN FD for PCI bus");