Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (144 commits) USB: add support for Dream Cheeky DL100B Webmail Notifier (1d34:0004) USB: serial: ftdi_sio: add support for TIOCSERGETLSR USB: ehci-mxc: Setup portsc register prior to accessing OTG viewport USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() usb: ehci-omap: fix tll channel enable mask usb: ohci-omap3: fix trivial typo USB: gadget: ci13xxx: don't assume that PAGE_SIZE is 4096 USB: gadget: ci13xxx: fix complete() callback for no_interrupt rq's USB: gadget: update ci13xxx to work with g_ether USB: gadgets: ci13xxx: fix probing of compiled-in gadget drivers Revert "USB: musb: pm: don't rely fully on clock support" Revert "USB: musb: blackfin: pm: make it work" USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added ... Manually fix up trivial conflicts in USB Kconfig changes in: arch/arm/mach-omap2/Kconfig arch/sh/Kconfig drivers/usb/Kconfig drivers/usb/host/ehci-hcd.c and annoying chip clock data conflicts in: arch/arm/mach-omap2/clock3xxx_data.c arch/arm/mach-omap2/clock44xx_data.c
This commit is contained in:
@ -27,6 +27,13 @@
|
||||
#define HUB_GET_TT_STATE 10
|
||||
#define HUB_STOP_TT 11
|
||||
|
||||
/*
|
||||
* Hub class additional requests defined by USB 3.0 spec
|
||||
* See USB 3.0 spec Table 10-6
|
||||
*/
|
||||
#define HUB_SET_DEPTH 12
|
||||
#define HUB_GET_PORT_ERR_COUNT 13
|
||||
|
||||
/*
|
||||
* Hub Class feature numbers
|
||||
* See USB 2.0 spec Table 11-17
|
||||
@ -55,6 +62,20 @@
|
||||
#define USB_PORT_FEAT_INDICATOR 22
|
||||
#define USB_PORT_FEAT_C_PORT_L1 23
|
||||
|
||||
/*
|
||||
* Port feature selectors added by USB 3.0 spec.
|
||||
* See USB 3.0 spec Table 10-7
|
||||
*/
|
||||
#define USB_PORT_FEAT_LINK_STATE 5
|
||||
#define USB_PORT_FEAT_U1_TIMEOUT 23
|
||||
#define USB_PORT_FEAT_U2_TIMEOUT 24
|
||||
#define USB_PORT_FEAT_C_LINK_STATE 25
|
||||
#define USB_PORT_FEAT_C_CONFIG_ERR 26
|
||||
#define USB_PORT_FEAT_REMOTE_WAKE_MASK 27
|
||||
#define USB_PORT_FEAT_BH_PORT_RESET 28
|
||||
#define USB_PORT_FEAT_C_BH_PORT_RESET 29
|
||||
#define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30
|
||||
|
||||
/*
|
||||
* Hub Status and Hub Change results
|
||||
* See USB 2.0 spec Table 11-19 and Table 11-20
|
||||
@ -83,6 +104,32 @@ struct usb_port_status {
|
||||
/* bits 13 to 15 are reserved */
|
||||
#define USB_PORT_STAT_SUPER_SPEED 0x8000 /* Linux-internal */
|
||||
|
||||
/*
|
||||
* Additions to wPortStatus bit field from USB 3.0
|
||||
* See USB 3.0 spec Table 10-10
|
||||
*/
|
||||
#define USB_PORT_STAT_LINK_STATE 0x01e0
|
||||
#define USB_SS_PORT_STAT_POWER 0x0200
|
||||
#define USB_PORT_STAT_SPEED_5GBPS 0x0000
|
||||
/* Valid only if port is enabled */
|
||||
|
||||
/*
|
||||
* Definitions for PORT_LINK_STATE values
|
||||
* (bits 5-8) in wPortStatus
|
||||
*/
|
||||
#define USB_SS_PORT_LS_U0 0x0000
|
||||
#define USB_SS_PORT_LS_U1 0x0020
|
||||
#define USB_SS_PORT_LS_U2 0x0040
|
||||
#define USB_SS_PORT_LS_U3 0x0060
|
||||
#define USB_SS_PORT_LS_SS_DISABLED 0x0080
|
||||
#define USB_SS_PORT_LS_RX_DETECT 0x00a0
|
||||
#define USB_SS_PORT_LS_SS_INACTIVE 0x00c0
|
||||
#define USB_SS_PORT_LS_POLLING 0x00e0
|
||||
#define USB_SS_PORT_LS_RECOVERY 0x0100
|
||||
#define USB_SS_PORT_LS_HOT_RESET 0x0120
|
||||
#define USB_SS_PORT_LS_COMP_MOD 0x0140
|
||||
#define USB_SS_PORT_LS_LOOPBACK 0x0160
|
||||
|
||||
/*
|
||||
* wPortChange bit field
|
||||
* See USB 2.0 spec Table 11-22
|
||||
|
@ -123,6 +123,16 @@
|
||||
#define USB_DEVICE_A_ALT_HNP_SUPPORT 5 /* (otg) other RH port does */
|
||||
#define USB_DEVICE_DEBUG_MODE 6 /* (special devices only) */
|
||||
|
||||
/*
|
||||
* Test Mode Selectors
|
||||
* See USB 2.0 spec Table 9-7
|
||||
*/
|
||||
#define TEST_J 1
|
||||
#define TEST_K 2
|
||||
#define TEST_SE0_NAK 3
|
||||
#define TEST_PACKET 4
|
||||
#define TEST_FORCE_EN 5
|
||||
|
||||
/*
|
||||
* New Feature Selectors as added by USB 3.0
|
||||
* See USB 3.0 spec Table 9-6
|
||||
|
@ -471,6 +471,10 @@ extern void usb_ep0_reinit(struct usb_device *);
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/* class requests from USB 3.0 hub spec, table 10-5 */
|
||||
#define SetHubDepth (0x3000 | HUB_SET_DEPTH)
|
||||
#define GetPortErrorCount (0x8000 | HUB_GET_PORT_ERR_COUNT)
|
||||
|
||||
/*
|
||||
* Generic bandwidth allocation constants/support
|
||||
*/
|
||||
|
112
include/linux/usb/msm_hsusb.h
Normal file
112
include/linux/usb/msm_hsusb.h
Normal file
@ -0,0 +1,112 @@
|
||||
/* linux/include/asm-arm/arch-msm/hsusb.h
|
||||
*
|
||||
* Copyright (C) 2008 Google, Inc.
|
||||
* Author: Brian Swetland <swetland@google.com>
|
||||
* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ASM_ARCH_MSM_HSUSB_H
|
||||
#define __ASM_ARCH_MSM_HSUSB_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/usb/otg.h>
|
||||
|
||||
/**
|
||||
* Supported USB modes
|
||||
*
|
||||
* USB_PERIPHERAL Only peripheral mode is supported.
|
||||
* USB_HOST Only host mode is supported.
|
||||
* USB_OTG OTG mode is supported.
|
||||
*
|
||||
*/
|
||||
enum usb_mode_type {
|
||||
USB_NONE = 0,
|
||||
USB_PERIPHERAL,
|
||||
USB_HOST,
|
||||
USB_OTG,
|
||||
};
|
||||
|
||||
/**
|
||||
* OTG control
|
||||
*
|
||||
* OTG_NO_CONTROL Id/VBUS notifications not required. Useful in host
|
||||
* only configuration.
|
||||
* OTG_PHY_CONTROL Id/VBUS notifications comes form USB PHY.
|
||||
* OTG_PMIC_CONTROL Id/VBUS notifications comes from PMIC hardware.
|
||||
* OTG_USER_CONTROL Id/VBUS notifcations comes from User via sysfs.
|
||||
*
|
||||
*/
|
||||
enum otg_control_type {
|
||||
OTG_NO_CONTROL = 0,
|
||||
OTG_PHY_CONTROL,
|
||||
OTG_PMIC_CONTROL,
|
||||
OTG_USER_CONTROL,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct msm_otg_platform_data - platform device data
|
||||
* for msm72k_otg driver.
|
||||
* @phy_init_seq: PHY configuration sequence. val, reg pairs
|
||||
* terminated by -1.
|
||||
* @vbus_power: VBUS power on/off routine.
|
||||
* @power_budget: VBUS power budget in mA (0 will be treated as 500mA).
|
||||
* @mode: Supported mode (OTG/peripheral/host).
|
||||
* @otg_control: OTG switch controlled by user/Id pin
|
||||
* @default_mode: Default operational mode. Applicable only if
|
||||
* OTG switch is controller by user.
|
||||
*
|
||||
*/
|
||||
struct msm_otg_platform_data {
|
||||
int *phy_init_seq;
|
||||
void (*vbus_power)(bool on);
|
||||
unsigned power_budget;
|
||||
enum usb_mode_type mode;
|
||||
enum otg_control_type otg_control;
|
||||
enum usb_mode_type default_mode;
|
||||
void (*setup_gpio)(enum usb_otg_state state);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct msm_otg: OTG driver data. Shared by HCD and DCD.
|
||||
* @otg: USB OTG Transceiver structure.
|
||||
* @pdata: otg device platform data.
|
||||
* @irq: IRQ number assigned for HSUSB controller.
|
||||
* @clk: clock struct of usb_hs_clk.
|
||||
* @pclk: clock struct of usb_hs_pclk.
|
||||
* @phy_reset_clk: clock struct of usb_phy_clk.
|
||||
* @core_clk: clock struct of usb_hs_core_clk.
|
||||
* @regs: ioremapped register base address.
|
||||
* @inputs: OTG state machine inputs(Id, SessValid etc).
|
||||
* @sm_work: OTG state machine work.
|
||||
* @in_lpm: indicates low power mode (LPM) state.
|
||||
* @async_int: Async interrupt arrived.
|
||||
*
|
||||
*/
|
||||
struct msm_otg {
|
||||
struct otg_transceiver otg;
|
||||
struct msm_otg_platform_data *pdata;
|
||||
int irq;
|
||||
struct clk *clk;
|
||||
struct clk *pclk;
|
||||
struct clk *phy_reset_clk;
|
||||
struct clk *core_clk;
|
||||
void __iomem *regs;
|
||||
#define ID 0
|
||||
#define B_SESS_VLD 1
|
||||
unsigned long inputs;
|
||||
struct work_struct sm_work;
|
||||
atomic_t in_lpm;
|
||||
int async_int;
|
||||
};
|
||||
|
||||
#endif
|
59
include/linux/usb/msm_hsusb_hw.h
Normal file
59
include/linux/usb/msm_hsusb_hw.h
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2007 Google, Inc.
|
||||
* Author: Brian Swetland <swetland@google.com>
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_USB_GADGET_MSM72K_UDC_H__
|
||||
#define __LINUX_USB_GADGET_MSM72K_UDC_H__
|
||||
|
||||
#ifdef CONFIG_ARCH_MSM7X00A
|
||||
#define USB_SBUSCFG (MSM_USB_BASE + 0x0090)
|
||||
#else
|
||||
#define USB_AHBBURST (MSM_USB_BASE + 0x0090)
|
||||
#define USB_AHBMODE (MSM_USB_BASE + 0x0098)
|
||||
#endif
|
||||
#define USB_CAPLENGTH (MSM_USB_BASE + 0x0100) /* 8 bit */
|
||||
|
||||
#define USB_USBCMD (MSM_USB_BASE + 0x0140)
|
||||
#define USB_PORTSC (MSM_USB_BASE + 0x0184)
|
||||
#define USB_OTGSC (MSM_USB_BASE + 0x01A4)
|
||||
#define USB_USBMODE (MSM_USB_BASE + 0x01A8)
|
||||
|
||||
#define USBCMD_RESET 2
|
||||
#define USB_USBINTR (MSM_USB_BASE + 0x0148)
|
||||
|
||||
#define PORTSC_PHCD (1 << 23) /* phy suspend mode */
|
||||
#define PORTSC_PTS_MASK (3 << 30)
|
||||
#define PORTSC_PTS_ULPI (3 << 30)
|
||||
|
||||
#define USB_ULPI_VIEWPORT (MSM_USB_BASE + 0x0170)
|
||||
#define ULPI_RUN (1 << 30)
|
||||
#define ULPI_WRITE (1 << 29)
|
||||
#define ULPI_READ (0 << 29)
|
||||
#define ULPI_ADDR(n) (((n) & 255) << 16)
|
||||
#define ULPI_DATA(n) ((n) & 255)
|
||||
#define ULPI_DATA_READ(n) (((n) >> 8) & 255)
|
||||
|
||||
#define ASYNC_INTR_CTRL (1 << 29) /* Enable async interrupt */
|
||||
#define ULPI_STP_CTRL (1 << 30) /* Block communication with PHY */
|
||||
|
||||
/* OTG definitions */
|
||||
#define OTGSC_INTSTS_MASK (0x7f << 16)
|
||||
#define OTGSC_ID (1 << 8)
|
||||
#define OTGSC_BSV (1 << 11)
|
||||
#define OTGSC_IDIS (1 << 16)
|
||||
#define OTGSC_BSVIS (1 << 19)
|
||||
#define OTGSC_IDIE (1 << 24)
|
||||
#define OTGSC_BSVIE (1 << 27)
|
||||
|
||||
#endif /* __LINUX_USB_GADGET_MSM72K_UDC_H__ */
|
@ -3,7 +3,7 @@
|
||||
* Inventra (Multidrop) Highspeed Dual-Role Controllers: (M)HDRC.
|
||||
*
|
||||
* Board initialization should put one of these into dev->platform_data,
|
||||
* probably on some platform_device named "musb_hdrc". It encapsulates
|
||||
* probably on some platform_device named "musb-hdrc". It encapsulates
|
||||
* key configuration differences between boards.
|
||||
*/
|
||||
|
||||
@ -120,14 +120,14 @@ struct musb_hdrc_platform_data {
|
||||
/* Power the device on or off */
|
||||
int (*set_power)(int state);
|
||||
|
||||
/* Turn device clock on or off */
|
||||
int (*set_clock)(struct clk *clock, int is_on);
|
||||
|
||||
/* MUSB configuration-specific details */
|
||||
struct musb_hdrc_config *config;
|
||||
|
||||
/* Architecture specific board data */
|
||||
void *board_data;
|
||||
|
||||
/* Platform specific struct musb_ops pointer */
|
||||
const void *platform_ops;
|
||||
};
|
||||
|
||||
|
||||
|
@ -116,7 +116,7 @@ struct otg_transceiver {
|
||||
/* for board-specific init logic */
|
||||
extern int otg_set_transceiver(struct otg_transceiver *);
|
||||
|
||||
#if defined(CONFIG_NOP_USB_XCEIV) || defined(CONFIG_NOP_USB_XCEIV_MODULE)
|
||||
#if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
|
||||
/* sometimes transceivers are accessed only through e.g. ULPI */
|
||||
extern void usb_nop_xceiv_register(void);
|
||||
extern void usb_nop_xceiv_unregister(void);
|
||||
|
Reference in New Issue
Block a user