Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
ushc.c File Reference
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
#include <linux/mmc/host.h>

Go to the source code of this file.

Data Structures

struct  ushc_cbw
 
struct  ushc_csw
 
struct  ushc_int_data
 
struct  ushc_data
 

Macros

#define USHC_GET_CAPS_VERSION_MASK   0xff
 
#define USHC_GET_CAPS_3V3   (1 << 8)
 
#define USHC_GET_CAPS_3V0   (1 << 9)
 
#define USHC_GET_CAPS_1V8   (1 << 10)
 
#define USHC_GET_CAPS_HIGH_SPD   (1 << 16)
 
#define USHC_HOST_CTRL_4BIT   (1 << 1)
 
#define USHC_HOST_CTRL_HIGH_SPD   (1 << 0)
 
#define USHC_PWR_CTRL_OFF   0x00
 
#define USHC_PWR_CTRL_3V3   0x01
 
#define USHC_PWR_CTRL_3V0   0x02
 
#define USHC_PWR_CTRL_1V8   0x03
 
#define USHC_READ_RESP_BUSY   (1 << 4)
 
#define USHC_READ_RESP_ERR_TIMEOUT   (1 << 3)
 
#define USHC_READ_RESP_ERR_CRC   (1 << 2)
 
#define USHC_READ_RESP_ERR_DAT   (1 << 1)
 
#define USHC_READ_RESP_ERR_CMD   (1 << 0)
 
#define USHC_READ_RESP_ERR_MASK   0x0f
 
#define USHC_CBW_SIGNATURE   'C'
 
#define USHC_CSW_SIGNATURE   'S'
 
#define USHC_INT_STATUS_SDIO_INT   (1 << 1)
 
#define USHC_INT_STATUS_CARD_PRESENT   (1 << 0)
 
#define DISCONNECTED   0
 
#define INT_EN   1
 
#define IGNORE_NEXT_INT   2
 

Enumerations

enum  ushc_request {
  USHC_GET_CAPS = 0x00, USHC_HOST_CTRL = 0x01, USHC_PWR_CTRL = 0x02, USHC_CLK_FREQ = 0x03,
  USHC_EXEC_CMD = 0x04, USHC_READ_RESP = 0x05, USHC_RESET = 0x06
}
 
enum  ushc_request_type {
  USHC_GET_CAPS_TYPE = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, USHC_HOST_CTRL_TYPE = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, USHC_PWR_CTRL_TYPE = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, USHC_CLK_FREQ_TYPE = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  USHC_EXEC_CMD_TYPE = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, USHC_READ_RESP_TYPE = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, USHC_RESET_TYPE = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE
}
 

Functions

struct ushc_cbw __attribute__ ((packed))
 
 MODULE_DEVICE_TABLE (usb, ushc_id_table)
 
 module_usb_driver (ushc_driver)
 
 MODULE_DESCRIPTION ("USB SD Host Controller driver")
 
 MODULE_AUTHOR ("David Vrabel <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Variables

__u8 signature
 
__u8 cmd_idx
 
__le16 block_size
 
__le32 arg
 
__u8 status
 
__le32 response
 
struct ushc_int_data __attribute__
 

Macro Definition Documentation

#define DISCONNECTED   0

Definition at line 117 of file ushc.c.

#define IGNORE_NEXT_INT   2

Definition at line 119 of file ushc.c.

#define INT_EN   1

Definition at line 118 of file ushc.c.

#define USHC_CBW_SIGNATURE   'C'

Definition at line 74 of file ushc.c.

#define USHC_CSW_SIGNATURE   'S'

Definition at line 82 of file ushc.c.

#define USHC_GET_CAPS_1V8   (1 << 10)

Definition at line 49 of file ushc.c.

#define USHC_GET_CAPS_3V0   (1 << 9)

Definition at line 48 of file ushc.c.

#define USHC_GET_CAPS_3V3   (1 << 8)

Definition at line 47 of file ushc.c.

#define USHC_GET_CAPS_HIGH_SPD   (1 << 16)

Definition at line 50 of file ushc.c.

#define USHC_GET_CAPS_VERSION_MASK   0xff

Definition at line 46 of file ushc.c.

#define USHC_HOST_CTRL_4BIT   (1 << 1)

Definition at line 52 of file ushc.c.

#define USHC_HOST_CTRL_HIGH_SPD   (1 << 0)

Definition at line 53 of file ushc.c.

#define USHC_INT_STATUS_CARD_PRESENT   (1 << 0)

Definition at line 90 of file ushc.c.

#define USHC_INT_STATUS_SDIO_INT   (1 << 1)

Definition at line 89 of file ushc.c.

#define USHC_PWR_CTRL_1V8   0x03

Definition at line 58 of file ushc.c.

#define USHC_PWR_CTRL_3V0   0x02

Definition at line 57 of file ushc.c.

#define USHC_PWR_CTRL_3V3   0x01

Definition at line 56 of file ushc.c.

#define USHC_PWR_CTRL_OFF   0x00

Definition at line 55 of file ushc.c.

#define USHC_READ_RESP_BUSY   (1 << 4)

Definition at line 60 of file ushc.c.

#define USHC_READ_RESP_ERR_CMD   (1 << 0)

Definition at line 64 of file ushc.c.

#define USHC_READ_RESP_ERR_CRC   (1 << 2)

Definition at line 62 of file ushc.c.

#define USHC_READ_RESP_ERR_DAT   (1 << 1)

Definition at line 63 of file ushc.c.

#define USHC_READ_RESP_ERR_MASK   0x0f

Definition at line 65 of file ushc.c.

#define USHC_READ_RESP_ERR_TIMEOUT   (1 << 3)

Definition at line 61 of file ushc.c.

Enumeration Type Documentation

Enumerator:
USHC_GET_CAPS 
USHC_HOST_CTRL 
USHC_PWR_CTRL 
USHC_CLK_FREQ 
USHC_EXEC_CMD 
USHC_READ_RESP 
USHC_RESET 

Definition at line 26 of file ushc.c.

Enumerator:
USHC_GET_CAPS_TYPE 
USHC_HOST_CTRL_TYPE 
USHC_PWR_CTRL_TYPE 
USHC_CLK_FREQ_TYPE 
USHC_EXEC_CMD_TYPE 
USHC_READ_RESP_TYPE 
USHC_RESET_TYPE 

Definition at line 36 of file ushc.c.

Function Documentation

struct ushc_cbw __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

MODULE_AUTHOR ( "David Vrabel <[email protected]>"  )
MODULE_DESCRIPTION ( "USB SD Host Controller driver )
MODULE_DEVICE_TABLE ( usb  ,
ushc_id_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( ushc_driver  )

Variable Documentation

__le32 arg

Definition at line 76 of file ushc.c.

__le16 block_size

Definition at line 75 of file ushc.c.

__u8 cmd_idx

Definition at line 74 of file ushc.c.

Definition at line 83 of file ushc.c.

__u8 signature

Definition at line 73 of file ushc.c.

Definition at line 82 of file ushc.c.