linux/drivers/usb/host/bcma-hcd.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Broadcom specific Advanced Microcontroller Bus
 * Broadcom USB-core driver (BCMA bus glue)
 *
 * Copyright 2011-2015 Hauke Mehrtens <[email protected]>
 * Copyright 2015 Felix Fietkau <[email protected]>
 *
 * Based on ssb-ohci driver
 * Copyright 2007 Michael Buesch <[email protected]>
 *
 * Derived from the OHCI-PCI driver
 * Copyright 1999 Roman Weissgaerber
 * Copyright 2000-2002 David Brownell
 * Copyright 1999 Linus Torvalds
 * Copyright 1999 Gregory P. Smith
 *
 * Derived from the USBcore related parts of Broadcom-SB
 * Copyright 2005-2011 Broadcom Corporation
 */
#include <linux/bcma/bcma.h>
#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/of_platform.h>
#include <linux/usb/ehci_pdriver.h>
#include <linux/usb/ohci_pdriver.h>

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

/* See BCMA_CLKCTLST_EXTRESREQ and BCMA_CLKCTLST_EXTRESST */
#define USB_BCMA_CLKCTLST_USB_CLK_REQ

struct bcma_hcd_device {};

/* Wait for bitmask in a register to get set or cleared.
 * timeout is in units of ten-microseconds.
 */
static int bcma_wait_bits(struct bcma_device *dev, u16 reg, u32 bitmask,
			  int timeout)
{}

static void bcma_hcd_4716wa(struct bcma_device *dev)
{}

/* based on arch/mips/brcm-boards/bcm947xx/pcibios.c */
static void bcma_hcd_init_chip_mips(struct bcma_device *dev)
{}

/*
 * bcma_hcd_usb20_old_arm_init - Initialize old USB 2.0 controller on ARM
 *
 * Old USB 2.0 core is identified as BCMA_CORE_USB20_HOST and was introduced
 * long before Northstar devices. It seems some cheaper chipsets like BCM53573
 * still use it.
 * Initialization of this old core differs between MIPS and ARM.
 */
static int bcma_hcd_usb20_old_arm_init(struct bcma_hcd_device *usb_dev)
{}

static void bcma_hcd_usb20_ns_init_hc(struct bcma_device *dev)
{}

/*
 * bcma_hcd_usb20_ns_init - Initialize Northstar USB 2.0 controller
 */
static int bcma_hcd_usb20_ns_init(struct bcma_hcd_device *bcma_hcd)
{}

static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
{}

static const struct usb_ehci_pdata ehci_pdata =;

static const struct usb_ohci_pdata ohci_pdata =;

static struct platform_device *bcma_hcd_create_pdev(struct bcma_device *dev,
						    const char *name, u32 addr,
						    const void *data,
						    size_t size)
{}

static int bcma_hcd_usb20_init(struct bcma_hcd_device *usb_dev)
{}

static int bcma_hcd_usb30_init(struct bcma_hcd_device *bcma_hcd)
{}

static int bcma_hcd_probe(struct bcma_device *core)
{}

static void bcma_hcd_remove(struct bcma_device *dev)
{}

static void bcma_hcd_shutdown(struct bcma_device *dev)
{}

#ifdef CONFIG_PM

static int bcma_hcd_suspend(struct bcma_device *dev)
{}

static int bcma_hcd_resume(struct bcma_device *dev)
{}

#else /* !CONFIG_PM */
#define bcma_hcd_suspend
#define bcma_hcd_resume
#endif /* CONFIG_PM */

static const struct bcma_device_id bcma_hcd_table[] =;
MODULE_DEVICE_TABLE(bcma, bcma_hcd_table);

static struct bcma_driver bcma_hcd_driver =;
module_bcma_driver();