// SPDX-License-Identifier: GPL-2.0+ /* * amd5536udc_pci.c -- AMD 5536 UDC high/full speed USB device controller * * Copyright (C) 2005-2007 AMD (https://www.amd.com) * Author: Thomas Dahlmann */ /* * The AMD5536 UDC is part of the x86 southbridge AMD Geode CS5536. * It is a USB Highspeed DMA capable USB device controller. Beside ep0 it * provides 4 IN and 4 OUT endpoints (bulk or interrupt type). * * Make sure that UDC is assigned to port 4 by BIOS settings (port can also * be used as host port) and UOC bits PAD_EN and APU are set (should be done * by BIOS init). * * UDC DMA requires 32-bit aligned buffers so DMA with gadget ether does not * work without updating NET_IP_ALIGN. Or PIO mode (module param "use_dma=0") * can be used with gadget ether. * * This file does pci device registration, and the core driver implementation * is done in amd5536udc.c * * The driver is split so as to use the core UDC driver which is based on * Synopsys device controller IP (different than HS OTG IP) in UDCs * integrated to SoC platforms. * */ /* Driver strings */ #define UDC_MOD_DESCRIPTION … /* system */ #include <linux/device.h> #include <linux/dmapool.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/irq.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/prefetch.h> #include <linux/pci.h> /* udc specific */ #include "amd5536udc.h" /* pointer to device object */ static struct udc *udc; /* description */ static const char name[] = …; /* Reset all pci context */ static void udc_pci_remove(struct pci_dev *pdev) { … } /* Called by pci bus driver to init pci context */ static int udc_pci_probe( struct pci_dev *pdev, const struct pci_device_id *id ) { … } /* PCI device parameters */ static const struct pci_device_id pci_id[] = …; MODULE_DEVICE_TABLE(pci, pci_id); /* PCI functions */ static struct pci_driver udc_pci_driver = …; module_pci_driver(…) …; MODULE_DESCRIPTION(…); MODULE_AUTHOR(…) …; MODULE_LICENSE(…) …;