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"
25 #define DRIVER_DESC "EHCI npcm7xx driver"
56 dev_dbg(&pdev->dev, "initializing npcm7xx ehci USB Controller\n"); in npcm7xx_ehci_hcd_drv_probe()
59 return -ENODEV; in npcm7xx_ehci_hcd_drv_probe()
68 * Right now device-tree probed devices don't get dma_mask set. in npcm7xx_ehci_hcd_drv_probe()
69 * Since shared usb code relies on it, set it here for now. in npcm7xx_ehci_hcd_drv_probe()
72 retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); in npcm7xx_ehci_hcd_drv_probe()
76 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); in npcm7xx_ehci_hcd_drv_probe()
78 retval = -ENOMEM; in npcm7xx_ehci_hcd_drv_probe()
82 hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in npcm7xx_ehci_hcd_drv_probe()
83 if (IS_ERR(hcd->regs)) { in npcm7xx_ehci_hcd_drv_probe()
84 retval = PTR_ERR(hcd->regs); in npcm7xx_ehci_hcd_drv_probe()
87 hcd->rsrc_start = res->start; in npcm7xx_ehci_hcd_drv_probe()
88 hcd->rsrc_len = resource_size(res); in npcm7xx_ehci_hcd_drv_probe()
91 hcd_to_ehci(hcd)->caps = hcd->regs; in npcm7xx_ehci_hcd_drv_probe()
97 device_wakeup_enable(hcd->self.controller); in npcm7xx_ehci_hcd_drv_probe()
103 dev_err(&pdev->dev, "init fail, %d\n", retval); in npcm7xx_ehci_hcd_drv_probe()
118 { .compatible = "nuvoton,npcm750-ehci" },
128 .name = "npcm7xx-ehci",
138 return -ENODEV; in ehci_npcm7xx_init()
152 MODULE_ALIAS("platform:npcm7xx-ehci");