linux/drivers/usb/gadget/udc/bdc/bdc_core.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * bdc_core.c - BRCM BDC USB3.0 device controller core operations
 *
 * Copyright (C) 2014 Broadcom Corporation
 *
 * Author: Ashwini Pahuja
 */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <linux/list.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#include <linux/of.h>
#include <linux/phy/phy.h>
#include <linux/moduleparam.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/clk.h>

#include "bdc.h"
#include "bdc_dbg.h"

/* Poll till controller status is not OIP */
static int poll_oip(struct bdc *bdc, u32 usec)
{}

/* Stop the BDC controller */
int bdc_stop(struct bdc *bdc)
{}

/* Issue a reset to BDC controller */
int bdc_reset(struct bdc *bdc)
{}

/* Run the BDC controller */
int bdc_run(struct bdc *bdc)
{}

/*
 * Present the termination to the host, typically called from upstream port
 * event with Vbus present =1
 */
void bdc_softconn(struct bdc *bdc)
{}

/* Remove the termination */
void bdc_softdisconn(struct bdc *bdc)
{}

/* Set up the scratchpad buffer array and scratchpad buffers, if needed. */
static int scratchpad_setup(struct bdc *bdc)
{}

/* Allocate the status report ring */
static int setup_srr(struct bdc *bdc, int interrupter)
{}

/* Initialize the HW regs and internal data structures */
static void bdc_mem_init(struct bdc *bdc, bool reinit)
{}

/* Free the dynamic memory */
static void bdc_mem_free(struct bdc *bdc)
{}

/*
 * bdc reinit gives a controller reset and reinitialize the registers,
 * called from disconnect/bus reset scenario's, to ensure proper HW cleanup
 */
int bdc_reinit(struct bdc *bdc)
{}

/* Allocate all the dyanmic memory */
static int bdc_mem_alloc(struct bdc *bdc)
{}

/* opposite to bdc_hw_init */
static void bdc_hw_exit(struct bdc *bdc)
{}

/* Initialize the bdc HW and memory */
static int bdc_hw_init(struct bdc *bdc)
{}

static int bdc_phy_init(struct bdc *bdc)
{}

static void bdc_phy_exit(struct bdc *bdc)
{}

static int bdc_probe(struct platform_device *pdev)
{}

static void bdc_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int bdc_suspend(struct device *dev)
{}

static int bdc_resume(struct device *dev)
{}

#endif /* CONFIG_PM_SLEEP */

static SIMPLE_DEV_PM_OPS(bdc_pm_ops, bdc_suspend,
		bdc_resume);

static const struct of_device_id bdc_of_match[] =;

static struct platform_driver bdc_driver =;

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