Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
s3c-hsotg.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/clk.h>
#include <linux/regulator/consumer.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/platform_data/s3c-hsotg.h>
#include <mach/map.h>
#include "s3c-hsotg.h"

Go to the source code of this file.

Data Structures

struct  s3c_hsotg_ep
 
struct  s3c_hsotg
 
struct  s3c_hsotg_req
 

Macros

#define DMA_ADDR_INVALID   (~((dma_addr_t)0))
 
#define EP0_MPS_LIMIT   64
 
#define __status(x)   ((x) >> GRXSTS_PktSts_SHIFT)
 

: The name array passed to the USB core.

: Set if the endpoint has been halted. : Set if this is a periodic ep, such as Interrupt : Set if we've sent a zero-length packet. : The total number of data bytes done. : The size of the FIFO (for periodic IN endpoints) : The amount of data loaded into the FIFO (periodic IN) : The offset of data for the last start of request. : The last loaded size for DxEPTSIZE for periodic IN

This is the driver's state for each registered enpoint, allowing it to keep track of transactions that need doing. Each endpoint has a lock to protect the state, to try and avoid using an overall lock for the host controller as much as possible.

For periodic IN endpoints, we have fifo_size and fifo_load to try and keep track of the amount of data in the periodic FIFO for each of these as we don't have a status register that tells us how much is in each of them. (note, this may actually be useless information as in shared-fifo mode periodic in acts like a single-frame packet buffer than a fifo)

#define call_gadget(_hs, _entry)
 
#define IRQ_RETRY_MASK
 
#define s3c_hsotg_suspend   NULL
 
#define s3c_hsotg_resume   NULL
 
 module_platform_driver (s3c_hsotg_driver)
 
 MODULE_DESCRIPTION ("Samsung S3C USB High-speed/OtG device")
 
 MODULE_AUTHOR ("Ben Dooks <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:s3c-hsotg")
 

Macro Definition Documentation

#define __status (   x)    ((x) >> GRXSTS_PktSts_SHIFT)
#define call_gadget (   _hs,
  _entry 
)
Value:
if ((_hs)->gadget.speed != USB_SPEED_UNKNOWN && \
(_hs)->driver && (_hs)->driver->_entry) { \
spin_unlock(&_hs->lock); \
(_hs)->driver->_entry(&(_hs)->gadget); \
spin_lock(&_hs->lock); \
}

Definition at line 2125 of file s3c-hsotg.c.

#define DMA_ADDR_INVALID   (~((dma_addr_t)0))

linux/drivers/usb/gadget/s3c-hsotg.c

Copyright (c) 2011 Samsung Electronics Co., Ltd. http://www.samsung.com

Copyright 2008 Openmoko, Inc. Copyright 2008 Simtec Electronics Ben Dooks ben@s.nosp@m.imte.nosp@m.c.co..nosp@m.uk http://armlinux.simtec.co.uk/

S3C USB2.0 High-speed / OtG driver

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Definition at line 41 of file s3c-hsotg.c.

#define EP0_MPS_LIMIT   64

Definition at line 66 of file s3c-hsotg.c.

#define IRQ_RETRY_MASK
Value:
GINTSTS_PTxFEmp | \
GINTSTS_RxFLvl)

Definition at line 2180 of file s3c-hsotg.c.

#define s3c_hsotg_resume   NULL

Definition at line 3702 of file s3c-hsotg.c.

#define s3c_hsotg_suspend   NULL

Definition at line 3701 of file s3c-hsotg.c.

Function Documentation

MODULE_ALIAS ( "platform:s3c-hsotg"  )
MODULE_AUTHOR ( "Ben Dooks <[email protected]>"  )
MODULE_DESCRIPTION ( "Samsung S3C USB High-speed/OtG device )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( s3c_hsotg_driver  )