Drop all duplicate newlines. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
priv->base = map_physmem(plat->base, DWC3_OTG_REGS_END, MAP_NOCACHE);
dwc3->regs = priv->base + DWC3_GLOBALS_REGS_START;
-
rc = dwc3_init(dwc3);
if (rc) {
unmap_physmem(priv->base, MAP_NOCACHE);
dep->name, req, (unsigned long long)dma,
length, last ? " last" : "", chain ? " chain" : "");
-
trb = &dep->trb_pool[dep->free_slot & DWC3_TRB_MASK];
if (!req->trb) {
PHYPARAM0_REF_LOSLEVEL_MASK);
setbits_le32(&phy->phy_param0, PHYPARAM0_REF_LOSLEVEL);
-
writel(0x0, &phy->phy_resume);
/*
#define FLAG_TYPE_AX88772B (1U << 2)
#define FLAG_EEPROM_MAC (1U << 3) /* initial mac address in eeprom */
-
/* driver private */
struct asix_private {
int flags;
u8 buf[2], tmp[5], link_sts;
u16 *tmp16, mode;
-
tmp16 = (u16 *)buf;
debug("** %s()\n", __func__);
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
-
/**
* usb_descriptor_fillbuf - fill buffer with descriptors
* @buf: Buffer to be filled
return dest - (u8 *)buf;
}
-
/**
* usb_gadget_config_buf - builts a complete configuration descriptor
* @config: Header for the descriptor, including characteristics such
#define MAX_INTERFACES 2
-
int maxstrings = 20;
/* Global variables ************************************************************************** */
#define USBD_DEVICE_STATUS(x) (((unsigned int)x <= USBD_CLOSING) ? usbd_device_status[x] : "UNKNOWN")
-
/* Descriptor support functions ************************************************************** */
-
/**
* usbd_get_string - find and return a string descriptor
* @index: string index to return
return usb_strings[index];
}
-
/* Access to device descriptor functions ***************************************************** */
-
/* *
* usbd_device_configuration_instance - find a configuration instance for this device
* @device:
return device->configuration_instance_array + configuration;
}
-
/* *
* usbd_device_interface_instance
* @device:
return interface_instance->alternates_instance_array + alternate;
}
-
/* *
* usbd_device_device_descriptor
* @device: which device
return (configuration_instance->configuration_descriptor);
}
-
/**
* usbd_device_interface_descriptor
* @device: which device
return *(alternate_instance->endpoints_descriptor_array + index);
}
-
/**
* usbd_device_endpoint_transfersize
* @device: which device
return *(alternate_instance->endpoint_transfersize_array + index);
}
-
/**
* usbd_device_endpoint_descriptor
* @device: which device
return (device->status == USB_STATUS_HALT);
}
-
/**
* usbd_rcv_complete - complete a receive
* @endpoint:
return urb;
}
-
/*
* Append an urb_link (or a whole list of
* urb_links) to the tail of another list
#define DIEPCTL0_NEXT_EP_BIT (11)
-
/* DWC2_UDC_OTG_DIEPMSK/DOEPMSK device IN/OUT endpoint
common interrupt mask register */
/* DWC2_UDC_OTG_DIEPINTn/DOEPINTn device IN/OUT endpoint interrupt register */
}
-
static int setdma_rx(struct dwc2_ep *ep, struct dwc2_request *req)
{
u32 *buf, ctrl;
return;
}
-
static void dwc2_udc_ep_set_stall(struct dwc2_ep *ep)
{
u8 ep_num;
}
}
-
if (likely(dev->driver)) {
/* device-2-host (IN) or no data setup command,
* process immediately */
" bRequest = %d\n",
i, usb_ctrl->bRequest);
-
} else if (dev->req_pending) {
dev->req_pending = 0;
debug_cond(DEBUG_SETUP != 0,
/* EP0 Configuration Set ********************************************************************* */
-
/**
* ep0_get_status - fill in URB data with appropriate status
* @device:
return -1;
}
-
dbg_ep0 (1, "urb: buffer: %p buffer_length: %2d actual_length: %2d tx_packetSize: %2d",
urb->buffer, urb->buffer_length, urb->actual_length,
device->bus->endpoint_array[0].tx_packetSize);
dbg_ep0 (3, "urb: %p device: %p", urb, urb->device);
-
/*dbg_ep0(2, "- - - - - - - - - -"); */
dbg_ep0 (2,
/* handle the requests that do not return data */
else {
-
/*dbg_ep0(3, "Host-to-Device"); */
switch (request->bRequest) {
#ifndef __USBDCORE_EP0_H__
#define __USBDCORE_EP0_H__
-
int ep0_recv_setup (struct urb *urb);
-
#endif
static unsigned in_epnum;
#endif
-
/*
* This should work with endpoints from controller drivers sharing the
* same endpoint naming convention. By example:
extern struct platform_data brd;
-
unsigned packet_received, packet_sent;
/*
static char host_addr[18];
-
/*-------------------------------------------------------------------------*/
/*
};
#endif
-
/* maxpacket and other transfer characteristics vary by speed. */
static inline struct usb_endpoint_descriptor *
ep_desc(struct usb_gadget *g, struct usb_endpoint_descriptor *hs,
#endif
}
-
/* network device setup */
dev->net = l_priv->netdev;
struct usb_ep *bulk_out;
};
-
static inline int __fsg_is_set(struct fsg_common *common,
const char *func, unsigned line)
{
#define fsg_is_set(common) likely(__fsg_is_set(common, __func__, __LINE__))
-
static inline struct fsg_dev *fsg_from_func(struct usb_function *f)
{
return container_of(f, struct fsg_dev, function);
}
-
typedef void (*fsg_routine_t)(struct fsg_dev *);
static int exception_in_progress(struct fsg_common *common)
return 36;
}
-
static int do_request_sense(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = &common->luns[common->lun];
return 8;
}
-
static int do_read_toc(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = &common->luns[common->lun];
return len;
}
-
static int do_start_stop(struct fsg_common *common)
{
struct fsg_lun *curlun = &common->luns[common->lun];
return 0;
}
-
static int do_read_format_capacities(struct fsg_common *common,
struct fsg_buffhd *bh)
{
return 12;
}
-
static int do_mode_select(struct fsg_common *common, struct fsg_buffhd *bh)
{
struct fsg_lun *curlun = &common->luns[common->lun];
return -EINVAL;
}
-
/*-------------------------------------------------------------------------*/
static int halt_bulk_in_endpoint(struct fsg_dev *fsg)
return 0;
}
-
static int finish_reply(struct fsg_common *common)
{
struct fsg_buffhd *bh = common->next_buffhd_to_fill;
return rc;
}
-
static int send_status(struct fsg_common *common)
{
struct fsg_lun *curlun = &common->luns[common->lun];
return 0;
}
-
/*-------------------------------------------------------------------------*/
/* Check whether the command is properly formed and whether its data size
mask, needs_medium, name);
}
-
static int do_scsi_command(struct fsg_common *common)
{
struct fsg_buffhd *bh;
return 0;
}
-
static int get_next_command(struct fsg_common *common)
{
struct fsg_buffhd *bh;
return rc;
}
-
/*-------------------------------------------------------------------------*/
static int enable_endpoint(struct fsg_common *common, struct usb_ep *ep,
return rc;
}
-
/****************************** ALT CONFIGS ******************************/
-
static int fsg_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{
struct fsg_dev *fsg = fsg_from_func(f);
kfree(common);
}
-
/*-------------------------------------------------------------------------*/
/**
return -ENOTSUPP;
}
-
/****************************** ADD FUNCTION ******************************/
static struct usb_gadget_strings *fsg_strings_array[] = {
return req;
}
-
static struct usb_request *sdp_start_ep(struct usb_ep *ep, bool in)
{
struct usb_request *req;
#ifndef _USBGADGET_NDIS_H
#define _USBGADGET_NDIS_H
-
#define NDIS_STATUS_MULTICAST_FULL 0xC0010009
#define NDIS_STATUS_MULTICAST_EXISTS 0xC001000A
#define NDIS_STATUS_MULTICAST_NOT_FOUND 0xC001000B
__le32 PatternFlags;
};
-
/* Required Object IDs (OIDs) */
#define OID_GEN_SUPPORTED_LIST 0x00010101
#define OID_GEN_HARDWARE_STATUS 0x00010102
/* Function Prototypes */
static rndis_resp_t *rndis_add_response(int configNr, u32 length);
-
/* supported OIDs */
static const u32 oid_supported_list[] = {
/* the general stuff */
#endif /* RNDIS_PM */
};
-
/* NDIS Functions */
static int gen_ndis_query_resp(int configNr, u32 OID, u8 *buf,
unsigned buf_len, rndis_resp_t *r)
return 0;
}
-
/*
* Device to Host Comunication
*/
#define OID_PNP_REMOVE_WAKE_UP_PATTERN 0xFD010104
#define OID_PNP_ENABLE_WAKE_UP 0xFD010106
-
typedef struct rndis_init_msg_type {
__le32 MessageType;
__le32 MessageLength;
* Ćukasz Majewski <l.majewski@samsung.com>
*/
-
/*
* This file requires the following identifiers used in USB strings to
* be defined (each of type pointer to char):
* characters rather then a pointer to void.
*/
-
/* #include <asm/unaligned.h> */
-
/*
* Thanks to NetChip Technologies for donating this product ID.
*
#define MX5_USBOTHER_REGS_OFFSET 0x800
-
#define MXC_OTG_OFFSET 0
#define MXC_H1_OFFSET 0x200
#define MXC_H2_OFFSET 0x400
} __attribute__((aligned(ED_ALIGNMENT)));
typedef struct ed ed_t;
-
/* TD info field */
#define TD_CC 0xf0000000
#define TD_CC_GET(td_p) ((td_p >>28) & 0x0f)
#define TD_BUFFERUNDERRUN 0x0D
#define TD_NOTACCESSED 0x0F
-
#define MAXPSW 1
struct td {
#define OHCI_INTR_OC (1 << 30) /* ownership change */
#define OHCI_INTR_MIE (1 << 31) /* master interrupt enable */
-
/* Virtual Root HUB */
struct virt_root_hub {
int devnum; /* Address of Root Hub endpoint */
/* Our Vendor Specific Request */
#define RH_SET_EP 0x2000
-
/* Hub port features */
#define RH_PORT_CONNECTION 0x00
#define RH_PORT_ENABLE 0x01
#define RH_REQ_ERR -1
#define RH_NACK 0x00
-
/* OHCI ROOT HUB REGISTER MASKS */
/* roothub.portstatus [i] bits */
* a subset of what the full implementation needs. (Linus)
*/
-
typedef struct ohci {
/* this allocates EDs for all possible endpoints */
struct ohci_device ohci_dev __aligned(TD_ALIGNMENT);
ALIGN(addr + len, CACHELINE_SIZE));
}
-
/**
* frees the "segment" pointer passed
*
#define TA_WAIT_BCON(m) max_t(int, (m)->a_wait_bcon, OTG_TIME_A_WAIT_BCON)
-
#define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"
#define DRIVER_DESC "Inventra Dual-Role USB Controller Driver"
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" MUSB_DRIVER_NAME);
-
#ifndef __UBOOT__
/*-------------------------------------------------------------------------*/
#endif /* normal PIO */
-
/*-------------------------------------------------------------------------*/
/* for high speed test mode; see USB 2.0 spec 7.1.20 */
#endif
}
-
static void musb_generic_disable(struct musb *musb)
{
void __iomem *mbase = musb->mregs;
}
#endif
-
/*-------------------------------------------------------------------------*/
/*
return 0;
}
-
/*
* ep_config_from_hw - when MUSB_C_DYNFIFO_DEF is false
* @param musb the controller
#define OTG_TIME_A_AIDL_BDIS 200 /* min 200 msec */
#define OTG_TIME_B_ASE0_BRST 100 /* min 3.125 ms */
-
/*************************** REGISTER ACCESS ********************************/
/* Endpoint registers (other than dynfifo setup) can be accessed either
/* called after channel_program(), may indicate a fault */
extern void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit);
-
extern struct dma_controller *__init
dma_controller_create(struct musb *, void __iomem *);
#include "musb_core.h"
-
/* MUSB PERIPHERAL status 3-mar-2006:
*
* - EP0 seems solid. It passes both USBCV and usbtest control cases.
return ep->packet_sz;
}
-
#ifdef CONFIG_USB_INVENTRA_DMA
/* Peripheral tx (IN) using Mentor DMA works as follows:
}
#endif
-
static void __devinit
init_peripheral_ep(struct musb *musb, struct musb_ep *ep, u8 epnum, int is_in)
{
else if (devctl & MUSB_DEVCTL_HR)
musb_writeb(mbase, MUSB_DEVCTL, MUSB_DEVCTL_SESSION);
-
/* what speed did we negotiate? */
power = musb_readb(mbase, MUSB_POWER);
musb->g.speed = (power & MUSB_POWER_HSMODE)
musb_alloc_request(struct usb_ep *ep, gfp_t gfp_flags);
extern void musb_free_request(struct usb_ep *ep, struct usb_request *req);
-
/*
* struct musb_ep - peripheral side view of endpoint rx or tx side
*/
} else
csr = MUSB_CSR0_P_SVDRXPKTRDY | MUSB_CSR0_P_SENDSTALL;
-
/* Completion handler may choose to stall, e.g. because the
* message just received holds invalid data.
*/
return retval;
}
-
static int
musb_g_ep0_enable(struct usb_ep *ep, const struct usb_endpoint_descriptor *desc)
{
#include "musb_core.h"
#include "musb_host.h"
-
/* MUSB HOST status 22-mar-2006
*
* - There's still lots of partial code duplication for fault paths, so
* although ARP RX wins. (That test was done with a full speed link.)
*/
-
/*
* NOTE on endpoint usage:
*
* of transfers between endpoints, or anything clever.
*/
-
static void musb_ep_program(struct musb *musb, u8 epnum,
struct urb *urb, int is_out,
u8 *buf, u32 offset, u32 len);
}
}
-
/*
* Service the default endpoint (ep0) as host.
* Return true until it's time to start the status stage.
return retval;
}
-
#ifdef CONFIG_USB_INVENTRA_DMA
/* Host side TX (OUT) using Mentor DMA works as follows:
MUSB_TXCSR_H_WZC_BITS | MUSB_TXCSR_TXPKTRDY);
}
-
#ifdef CONFIG_USB_INVENTRA_DMA
/* Host side RX (IN) using Mentor DMA works as follows:
return list_entry(q->next, struct musb_qh, ring);
}
-
extern void musb_root_disconnect(struct musb *musb);
struct usb_hcd;
static inline u32 musb_readl(const void __iomem *addr, unsigned offset)
{ return __raw_readl(addr + offset); }
-
static inline void musb_writew(void __iomem *addr, unsigned offset, u16 data)
{ __raw_writew(data, addr + offset); }
static inline void musb_writel(void __iomem *addr, unsigned offset, u32 data)
{ __raw_writel(data, addr + offset); }
-
#if defined(CONFIG_USB_MUSB_TUSB6010) || defined (CONFIG_USB_MUSB_TUSB6010_MODULE)
/*
/* HUBADDR */
#define MUSB_HUBADDR_MULTI_TT 0x80
-
/* SUNXI has different reg addresses, but identical r/w functions */
#ifndef CONFIG_ARCH_SUNXI
#define OMAP3_OTG_FORCESTDBY_STANDBY 0x0001
-
#ifdef DEBUG_MUSB_OMAP3
static void musb_db_otg_regs(void)
{
writel(val, pdata->regs_phy + reg->offset);
}
-
void otg_phy_init(struct dwc2_udc *dev)
{
struct dwc2_plat_otg_data *pdata = dev->pdata;