Lines Matching +full:usb +full:- +full:ehci

1 // SPDX-License-Identifier: GPL-2.0
3 * Nuvoton NPCM7xx driver for EHCI HCD
9 * Based on various ehci-spear.c driver
13 #include <linux/dma-mapping.h>
20 #include <linux/usb.h>
21 #include <linux/usb/hcd.h>
23 #include "ehci.h"
28 #define DRIVER_DESC "EHCI npcm7xx driver"
30 static const char hcd_name[] = "npcm7xx-ehci";
69 dev_dbg(&pdev->dev, "initializing npcm7xx ehci USB Controller\n"); in npcm7xx_ehci_hcd_drv_probe()
71 gcr_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-gcr"); in npcm7xx_ehci_hcd_drv_probe()
73 dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-gcr\n", in npcm7xx_ehci_hcd_drv_probe()
78 rst_regmap = syscon_regmap_lookup_by_compatible("nuvoton,npcm750-rst"); in npcm7xx_ehci_hcd_drv_probe()
80 dev_err(&pdev->dev, "%s: failed to find nuvoton,npcm750-rst\n", in npcm7xx_ehci_hcd_drv_probe()
86 // reset usb host in npcm7xx_ehci_hcd_drv_probe()
110 return -ENODEV; in npcm7xx_ehci_hcd_drv_probe()
119 * Right now device-tree probed devices don't get dma_mask set. in npcm7xx_ehci_hcd_drv_probe()
120 * Since shared usb code relies on it, set it here for now. in npcm7xx_ehci_hcd_drv_probe()
123 retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); in npcm7xx_ehci_hcd_drv_probe()
127 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); in npcm7xx_ehci_hcd_drv_probe()
129 retval = -ENOMEM; in npcm7xx_ehci_hcd_drv_probe()
134 hcd->regs = devm_ioremap_resource(&pdev->dev, res); in npcm7xx_ehci_hcd_drv_probe()
135 if (IS_ERR(hcd->regs)) { in npcm7xx_ehci_hcd_drv_probe()
136 retval = PTR_ERR(hcd->regs); in npcm7xx_ehci_hcd_drv_probe()
139 hcd->rsrc_start = res->start; in npcm7xx_ehci_hcd_drv_probe()
140 hcd->rsrc_len = resource_size(res); in npcm7xx_ehci_hcd_drv_probe()
143 hcd_to_ehci(hcd)->caps = hcd->regs; in npcm7xx_ehci_hcd_drv_probe()
149 device_wakeup_enable(hcd->self.controller); in npcm7xx_ehci_hcd_drv_probe()
155 dev_err(&pdev->dev, "init fail, %d\n", retval); in npcm7xx_ehci_hcd_drv_probe()
172 { .compatible = "nuvoton,npcm750-ehci" },
182 .name = "npcm7xx-ehci",
192 return -ENODEV; in ehci_npcm7xx_init()
208 MODULE_ALIAS("platform:npcm7xx-ehci");