diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:23:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 06:23:15 -0400 |
commit | 1be025d3cb40cd295123af2c394f7229ef9b30ca (patch) | |
tree | 5dc14e1ea412cc7fdc3e563ad23187059fe8bfb5 /include/linux | |
parent | 2d03423b2319cc854adeb28a03f65de5b5e0ab63 (diff) | |
parent | a2c76b83fdd763c826f38a55127ccf25708099ce (diff) |
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (260 commits)
usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()
usb/isp1760: Allow to optionally trigger low-level chip reset via GPIOLIB.
USB: gadget: midi: memory leak in f_midi_bind_config()
USB: gadget: midi: fix range check in f_midi_out_open()
QE/FHCI: fixed the CONTROL bug
usb: renesas_usbhs: tidyup for smatch warnings
USB: Fix USB Kconfig dependency problem on 85xx/QoirQ platforms
EHCI: workaround for MosChip controller bug
usb: gadget: file_storage: fix race on unloading
USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers
USB: ftdi_sio.c:Fill MSR fields of the ftdi async_icount structure
USB: ftdi_sio.c: Fill LSR fields of the ftdi async_icount structure
USB: ftdi_sio.c:Fill TX field of the ftdi async_icount structure
USB: ftdi_sio.c: Fill the RX field of the ftdi async_icount structure
USB: ftdi_sio.c: Basic icount infrastructure for ftdi_sio
usb/isp1760: Let OF bindings depend on general CONFIG_OF instead of PPC_OF .
USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board
USB: Fix runtime wakeup on OHCI
xHCI/USB: Make xHCI driver have a BOS descriptor.
usb: gadget: add new usb gadget for ACM and mass storage
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/platform_data/dwc3-omap.h | 47 | ||||
-rw-r--r-- | include/linux/platform_data/mv_usb.h | 50 | ||||
-rw-r--r-- | include/linux/sched.h | 3 | ||||
-rw-r--r-- | include/linux/usb.h | 20 | ||||
-rw-r--r-- | include/linux/usb/ch9.h | 29 | ||||
-rw-r--r-- | include/linux/usb/gadget.h | 4 | ||||
-rw-r--r-- | include/linux/usb/hcd.h | 3 | ||||
-rw-r--r-- | include/linux/usb/r8a66597.h | 60 | ||||
-rw-r--r-- | include/linux/usb/renesas_usbhs.h | 14 |
9 files changed, 225 insertions, 5 deletions
diff --git a/include/linux/platform_data/dwc3-omap.h b/include/linux/platform_data/dwc3-omap.h new file mode 100644 index 000000000000..ada401244e0b --- /dev/null +++ b/include/linux/platform_data/dwc3-omap.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /** | ||
2 | * dwc3-omap.h - OMAP Specific Glue layer, header. | ||
3 | * | ||
4 | * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Author: Felipe Balbi <balbi@ti.com> | ||
8 | * | ||
9 | * Redistribution and use in source and binary forms, with or without | ||
10 | * modification, are permitted provided that the following conditions | ||
11 | * are met: | ||
12 | * 1. Redistributions of source code must retain the above copyright | ||
13 | * notice, this list of conditions, and the following disclaimer, | ||
14 | * without modification. | ||
15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer in the | ||
17 | * documentation and/or other materials provided with the distribution. | ||
18 | * 3. The names of the above-listed copyright holders may not be used | ||
19 | * to endorse or promote products derived from this software without | ||
20 | * specific prior written permission. | ||
21 | * | ||
22 | * ALTERNATIVELY, this software may be distributed under the terms of the | ||
23 | * GNU General Public License ("GPL") version 2, as published by the Free | ||
24 | * Software Foundation. | ||
25 | * | ||
26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
27 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
28 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
29 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
30 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
31 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
32 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
33 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
34 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
35 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
36 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
37 | */ | ||
38 | |||
39 | enum dwc3_omap_utmi_mode { | ||
40 | DWC3_OMAP_UTMI_MODE_UNKNOWN = 0, | ||
41 | DWC3_OMAP_UTMI_MODE_HW, | ||
42 | DWC3_OMAP_UTMI_MODE_SW, | ||
43 | }; | ||
44 | |||
45 | struct dwc3_omap_data { | ||
46 | enum dwc3_omap_utmi_mode utmi_mode; | ||
47 | }; | ||
diff --git a/include/linux/platform_data/mv_usb.h b/include/linux/platform_data/mv_usb.h new file mode 100644 index 000000000000..e9d9149ddf38 --- /dev/null +++ b/include/linux/platform_data/mv_usb.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Marvell International Ltd. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef __MV_PLATFORM_USB_H | ||
11 | #define __MV_PLATFORM_USB_H | ||
12 | |||
13 | enum pxa_ehci_type { | ||
14 | EHCI_UNDEFINED = 0, | ||
15 | PXA_U2OEHCI, /* pxa 168, 9xx */ | ||
16 | PXA_SPH, /* pxa 168, 9xx SPH */ | ||
17 | MMP3_HSIC, /* mmp3 hsic */ | ||
18 | MMP3_FSIC, /* mmp3 fsic */ | ||
19 | }; | ||
20 | |||
21 | enum { | ||
22 | MV_USB_MODE_OTG, | ||
23 | MV_USB_MODE_HOST, | ||
24 | }; | ||
25 | |||
26 | enum { | ||
27 | VBUS_LOW = 0, | ||
28 | VBUS_HIGH = 1 << 0, | ||
29 | }; | ||
30 | |||
31 | struct mv_usb_addon_irq { | ||
32 | unsigned int irq; | ||
33 | int (*poll)(void); | ||
34 | }; | ||
35 | |||
36 | struct mv_usb_platform_data { | ||
37 | unsigned int clknum; | ||
38 | char **clkname; | ||
39 | struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/ | ||
40 | struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/ | ||
41 | |||
42 | /* only valid for HCD. OTG or Host only*/ | ||
43 | unsigned int mode; | ||
44 | |||
45 | int (*phy_init)(unsigned int regbase); | ||
46 | void (*phy_deinit)(unsigned int regbase); | ||
47 | int (*set_vbus)(unsigned int vbus); | ||
48 | }; | ||
49 | |||
50 | #endif | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 41d0237fd449..600eb0a6f89a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -2165,7 +2165,8 @@ extern int force_sigsegv(int, struct task_struct *); | |||
2165 | extern int force_sig_info(int, struct siginfo *, struct task_struct *); | 2165 | extern int force_sig_info(int, struct siginfo *, struct task_struct *); |
2166 | extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); | 2166 | extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); |
2167 | extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | 2167 | extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); |
2168 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); | 2168 | extern int kill_pid_info_as_cred(int, struct siginfo *, struct pid *, |
2169 | const struct cred *, u32); | ||
2169 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 2170 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
2170 | extern int kill_pid(struct pid *pid, int sig, int priv); | 2171 | extern int kill_pid(struct pid *pid, int sig, int priv); |
2171 | extern int kill_proc_info(int, struct siginfo *, pid_t); | 2172 | extern int kill_proc_info(int, struct siginfo *, pid_t); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 73c7df489607..6f49a1b39fa6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -292,6 +292,16 @@ struct usb_host_config { | |||
292 | int extralen; | 292 | int extralen; |
293 | }; | 293 | }; |
294 | 294 | ||
295 | /* USB2.0 and USB3.0 device BOS descriptor set */ | ||
296 | struct usb_host_bos { | ||
297 | struct usb_bos_descriptor *desc; | ||
298 | |||
299 | /* wireless cap descriptor is handled by wusb */ | ||
300 | struct usb_ext_cap_descriptor *ext_cap; | ||
301 | struct usb_ss_cap_descriptor *ss_cap; | ||
302 | struct usb_ss_container_id_descriptor *ss_id; | ||
303 | }; | ||
304 | |||
295 | int __usb_get_extra_descriptor(char *buffer, unsigned size, | 305 | int __usb_get_extra_descriptor(char *buffer, unsigned size, |
296 | unsigned char type, void **ptr); | 306 | unsigned char type, void **ptr); |
297 | #define usb_get_extra_descriptor(ifpoint, type, ptr) \ | 307 | #define usb_get_extra_descriptor(ifpoint, type, ptr) \ |
@@ -381,6 +391,7 @@ struct usb_tt; | |||
381 | * @ep0: endpoint 0 data (default control pipe) | 391 | * @ep0: endpoint 0 data (default control pipe) |
382 | * @dev: generic device interface | 392 | * @dev: generic device interface |
383 | * @descriptor: USB device descriptor | 393 | * @descriptor: USB device descriptor |
394 | * @bos: USB device BOS descriptor set | ||
384 | * @config: all of the device's configs | 395 | * @config: all of the device's configs |
385 | * @actconfig: the active configuration | 396 | * @actconfig: the active configuration |
386 | * @ep_in: array of IN endpoints | 397 | * @ep_in: array of IN endpoints |
@@ -399,6 +410,9 @@ struct usb_tt; | |||
399 | * FIXME -- complete doc | 410 | * FIXME -- complete doc |
400 | * @authenticated: Crypto authentication passed | 411 | * @authenticated: Crypto authentication passed |
401 | * @wusb: device is Wireless USB | 412 | * @wusb: device is Wireless USB |
413 | * @lpm_capable: device supports LPM | ||
414 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM | ||
415 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled | ||
402 | * @string_langid: language ID for strings | 416 | * @string_langid: language ID for strings |
403 | * @product: iProduct string, if present (static) | 417 | * @product: iProduct string, if present (static) |
404 | * @manufacturer: iManufacturer string, if present (static) | 418 | * @manufacturer: iManufacturer string, if present (static) |
@@ -442,6 +456,7 @@ struct usb_device { | |||
442 | struct device dev; | 456 | struct device dev; |
443 | 457 | ||
444 | struct usb_device_descriptor descriptor; | 458 | struct usb_device_descriptor descriptor; |
459 | struct usb_host_bos *bos; | ||
445 | struct usb_host_config *config; | 460 | struct usb_host_config *config; |
446 | 461 | ||
447 | struct usb_host_config *actconfig; | 462 | struct usb_host_config *actconfig; |
@@ -460,6 +475,9 @@ struct usb_device { | |||
460 | unsigned authorized:1; | 475 | unsigned authorized:1; |
461 | unsigned authenticated:1; | 476 | unsigned authenticated:1; |
462 | unsigned wusb:1; | 477 | unsigned wusb:1; |
478 | unsigned lpm_capable:1; | ||
479 | unsigned usb2_hw_lpm_capable:1; | ||
480 | unsigned usb2_hw_lpm_enabled:1; | ||
463 | int string_langid; | 481 | int string_langid; |
464 | 482 | ||
465 | /* static strings from the device */ | 483 | /* static strings from the device */ |
@@ -1574,7 +1592,7 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) | |||
1574 | return 0; | 1592 | return 0; |
1575 | 1593 | ||
1576 | /* NOTE: only 0x07ff bits are for packet size... */ | 1594 | /* NOTE: only 0x07ff bits are for packet size... */ |
1577 | return le16_to_cpu(ep->desc.wMaxPacketSize); | 1595 | return usb_endpoint_maxp(&ep->desc); |
1578 | } | 1596 | } |
1579 | 1597 | ||
1580 | /* ----------------------------------------------------------------------- */ | 1598 | /* ----------------------------------------------------------------------- */ |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 0fd3fbdd8283..f32a64e57f97 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define __LINUX_USB_CH9_H | 34 | #define __LINUX_USB_CH9_H |
35 | 35 | ||
36 | #include <linux/types.h> /* __u8 etc */ | 36 | #include <linux/types.h> /* __u8 etc */ |
37 | #include <asm/byteorder.h> /* le16_to_cpu */ | ||
37 | 38 | ||
38 | /*-------------------------------------------------------------------------*/ | 39 | /*-------------------------------------------------------------------------*/ |
39 | 40 | ||
@@ -143,6 +144,11 @@ | |||
143 | #define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */ | 144 | #define USB_INTRF_FUNC_SUSPEND 0 /* function suspend */ |
144 | 145 | ||
145 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 | 146 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 |
147 | /* | ||
148 | * Suspend Options, Table 9-7 USB 3.0 spec | ||
149 | */ | ||
150 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) | ||
151 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) | ||
146 | 152 | ||
147 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ | 153 | #define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */ |
148 | 154 | ||
@@ -570,6 +576,17 @@ static inline int usb_endpoint_is_isoc_out( | |||
570 | return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd); | 576 | return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd); |
571 | } | 577 | } |
572 | 578 | ||
579 | /** | ||
580 | * usb_endpoint_maxp - get endpoint's max packet size | ||
581 | * @epd: endpoint to be checked | ||
582 | * | ||
583 | * Returns @epd's max packet | ||
584 | */ | ||
585 | static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) | ||
586 | { | ||
587 | return le16_to_cpu(epd->wMaxPacketSize); | ||
588 | } | ||
589 | |||
573 | /*-------------------------------------------------------------------------*/ | 590 | /*-------------------------------------------------------------------------*/ |
574 | 591 | ||
575 | /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */ | 592 | /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */ |
@@ -851,6 +868,18 @@ enum usb_device_speed { | |||
851 | USB_SPEED_SUPER, /* usb 3.0 */ | 868 | USB_SPEED_SUPER, /* usb 3.0 */ |
852 | }; | 869 | }; |
853 | 870 | ||
871 | #ifdef __KERNEL__ | ||
872 | |||
873 | /** | ||
874 | * usb_speed_string() - Returns human readable-name of the speed. | ||
875 | * @speed: The speed to return human-readable name for. If it's not | ||
876 | * any of the speeds defined in usb_device_speed enum, string for | ||
877 | * USB_SPEED_UNKNOWN will be returned. | ||
878 | */ | ||
879 | extern const char *usb_speed_string(enum usb_device_speed speed); | ||
880 | |||
881 | #endif | ||
882 | |||
854 | enum usb_device_state { | 883 | enum usb_device_state { |
855 | /* NOTATTACHED isn't in the USB spec, and this state acts | 884 | /* NOTATTACHED isn't in the USB spec, and this state acts |
856 | * the same as ATTACHED ... but it's clearer this way. | 885 | * the same as ATTACHED ... but it's clearer this way. |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 087f4b931833..1d3a67523ffc 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -437,9 +437,9 @@ static inline void usb_ep_fifo_flush(struct usb_ep *ep) | |||
437 | 437 | ||
438 | struct usb_dcd_config_params { | 438 | struct usb_dcd_config_params { |
439 | __u8 bU1devExitLat; /* U1 Device exit Latency */ | 439 | __u8 bU1devExitLat; /* U1 Device exit Latency */ |
440 | #define USB_DEFULT_U1_DEV_EXIT_LAT 0x01 /* Less then 1 microsec */ | 440 | #define USB_DEFAULT_U1_DEV_EXIT_LAT 0x01 /* Less then 1 microsec */ |
441 | __le16 bU2DevExitLat; /* U2 Device exit Latency */ | 441 | __le16 bU2DevExitLat; /* U2 Device exit Latency */ |
442 | #define USB_DEFULT_U2_DEV_EXIT_LAT 0x1F4 /* Less then 500 microsec */ | 442 | #define USB_DEFAULT_U2_DEV_EXIT_LAT 0x1F4 /* Less then 500 microsec */ |
443 | }; | 443 | }; |
444 | 444 | ||
445 | 445 | ||
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 0097136ba45d..03354d557b79 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -178,7 +178,7 @@ struct usb_hcd { | |||
178 | * this structure. | 178 | * this structure. |
179 | */ | 179 | */ |
180 | unsigned long hcd_priv[0] | 180 | unsigned long hcd_priv[0] |
181 | __attribute__ ((aligned(sizeof(unsigned long)))); | 181 | __attribute__ ((aligned(sizeof(s64)))); |
182 | }; | 182 | }; |
183 | 183 | ||
184 | /* 2.4 does this a bit differently ... */ | 184 | /* 2.4 does this a bit differently ... */ |
@@ -343,6 +343,7 @@ struct hc_driver { | |||
343 | * address is set | 343 | * address is set |
344 | */ | 344 | */ |
345 | int (*update_device)(struct usb_hcd *, struct usb_device *); | 345 | int (*update_device)(struct usb_hcd *, struct usb_device *); |
346 | int (*set_usb2_hw_lpm)(struct usb_hcd *, struct usb_device *, int); | ||
346 | }; | 347 | }; |
347 | 348 | ||
348 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 349 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
diff --git a/include/linux/usb/r8a66597.h b/include/linux/usb/r8a66597.h index b6b8660d0c68..55805f9dcf21 100644 --- a/include/linux/usb/r8a66597.h +++ b/include/linux/usb/r8a66597.h | |||
@@ -48,6 +48,9 @@ struct r8a66597_platdata { | |||
48 | 48 | ||
49 | /* (external controller only) set one = WR0_N shorted to WR1_N */ | 49 | /* (external controller only) set one = WR0_N shorted to WR1_N */ |
50 | unsigned wr0_shorted_to_wr1:1; | 50 | unsigned wr0_shorted_to_wr1:1; |
51 | |||
52 | /* set one = using SUDMAC */ | ||
53 | unsigned sudmac:1; | ||
51 | }; | 54 | }; |
52 | 55 | ||
53 | /* Register definitions */ | 56 | /* Register definitions */ |
@@ -417,5 +420,62 @@ struct r8a66597_platdata { | |||
417 | #define USBSPD 0x00C0 | 420 | #define USBSPD 0x00C0 |
418 | #define RTPORT 0x0001 | 421 | #define RTPORT 0x0001 |
419 | 422 | ||
423 | /* SUDMAC registers */ | ||
424 | #define CH0CFG 0x00 | ||
425 | #define CH1CFG 0x04 | ||
426 | #define CH0BA 0x10 | ||
427 | #define CH1BA 0x14 | ||
428 | #define CH0BBC 0x18 | ||
429 | #define CH1BBC 0x1C | ||
430 | #define CH0CA 0x20 | ||
431 | #define CH1CA 0x24 | ||
432 | #define CH0CBC 0x28 | ||
433 | #define CH1CBC 0x2C | ||
434 | #define CH0DEN 0x30 | ||
435 | #define CH1DEN 0x34 | ||
436 | #define DSTSCLR 0x38 | ||
437 | #define DBUFCTRL 0x3C | ||
438 | #define DINTCTRL 0x40 | ||
439 | #define DINTSTS 0x44 | ||
440 | #define DINTSTSCLR 0x48 | ||
441 | #define CH0SHCTRL 0x50 | ||
442 | #define CH1SHCTRL 0x54 | ||
443 | |||
444 | /* SUDMAC Configuration Registers */ | ||
445 | #define SENDBUFM 0x1000 /* b12: Transmit Buffer Mode */ | ||
446 | #define RCVENDM 0x0100 /* b8: Receive Data Transfer End Mode */ | ||
447 | #define LBA_WAIT 0x0030 /* b5-4: Local Bus Access Wait */ | ||
448 | |||
449 | /* DMA Enable Registers */ | ||
450 | #define DEN 0x0001 /* b1: DMA Transfer Enable */ | ||
451 | |||
452 | /* DMA Status Clear Register */ | ||
453 | #define CH1STCLR 0x0002 /* b2: Ch1 DMA Status Clear */ | ||
454 | #define CH0STCLR 0x0001 /* b1: Ch0 DMA Status Clear */ | ||
455 | |||
456 | /* DMA Buffer Control Register */ | ||
457 | #define CH1BUFW 0x0200 /* b9: Ch1 DMA Buffer Data Transfer Enable */ | ||
458 | #define CH0BUFW 0x0100 /* b8: Ch0 DMA Buffer Data Transfer Enable */ | ||
459 | #define CH1BUFS 0x0002 /* b2: Ch1 DMA Buffer Data Status */ | ||
460 | #define CH0BUFS 0x0001 /* b1: Ch0 DMA Buffer Data Status */ | ||
461 | |||
462 | /* DMA Interrupt Control Register */ | ||
463 | #define CH1ERRE 0x0200 /* b9: Ch1 SHwy Res Err Detect Int Enable */ | ||
464 | #define CH0ERRE 0x0100 /* b8: Ch0 SHwy Res Err Detect Int Enable */ | ||
465 | #define CH1ENDE 0x0002 /* b2: Ch1 DMA Transfer End Int Enable */ | ||
466 | #define CH0ENDE 0x0001 /* b1: Ch0 DMA Transfer End Int Enable */ | ||
467 | |||
468 | /* DMA Interrupt Status Register */ | ||
469 | #define CH1ERRS 0x0200 /* b9: Ch1 SHwy Res Err Detect Int Status */ | ||
470 | #define CH0ERRS 0x0100 /* b8: Ch0 SHwy Res Err Detect Int Status */ | ||
471 | #define CH1ENDS 0x0002 /* b2: Ch1 DMA Transfer End Int Status */ | ||
472 | #define CH0ENDS 0x0001 /* b1: Ch0 DMA Transfer End Int Status */ | ||
473 | |||
474 | /* DMA Interrupt Status Clear Register */ | ||
475 | #define CH1ERRC 0x0200 /* b9: Ch1 SHwy Res Err Detect Int Stat Clear */ | ||
476 | #define CH0ERRC 0x0100 /* b8: Ch0 SHwy Res Err Detect Int Stat Clear */ | ||
477 | #define CH1ENDC 0x0002 /* b2: Ch1 DMA Transfer End Int Stat Clear */ | ||
478 | #define CH0ENDC 0x0001 /* b1: Ch0 DMA Transfer End Int Stat Clear */ | ||
479 | |||
420 | #endif /* __LINUX_USB_R8A66597_H */ | 480 | #endif /* __LINUX_USB_R8A66597_H */ |
421 | 481 | ||
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index 8977431259c6..e5a40c318548 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
@@ -82,6 +82,13 @@ struct renesas_usbhs_platform_callback { | |||
82 | * get VBUS status function. | 82 | * get VBUS status function. |
83 | */ | 83 | */ |
84 | int (*get_vbus)(struct platform_device *pdev); | 84 | int (*get_vbus)(struct platform_device *pdev); |
85 | |||
86 | /* | ||
87 | * option: | ||
88 | * | ||
89 | * VBUS control is needed for Host | ||
90 | */ | ||
91 | int (*set_vbus)(struct platform_device *pdev, int enable); | ||
85 | }; | 92 | }; |
86 | 93 | ||
87 | /* | 94 | /* |
@@ -101,6 +108,8 @@ struct renesas_usbhs_driver_param { | |||
101 | * option: | 108 | * option: |
102 | * | 109 | * |
103 | * for BUSWAIT :: BWAIT | 110 | * for BUSWAIT :: BWAIT |
111 | * see | ||
112 | * renesas_usbhs/common.c :: usbhsc_set_buswait() | ||
104 | * */ | 113 | * */ |
105 | int buswait_bwait; | 114 | int buswait_bwait; |
106 | 115 | ||
@@ -127,6 +136,11 @@ struct renesas_usbhs_driver_param { | |||
127 | * pio <--> dma border. | 136 | * pio <--> dma border. |
128 | */ | 137 | */ |
129 | int pio_dma_border; /* default is 64byte */ | 138 | int pio_dma_border; /* default is 64byte */ |
139 | |||
140 | /* | ||
141 | * option: | ||
142 | */ | ||
143 | u32 has_otg:1; /* for controlling PWEN/EXTLP */ | ||
130 | }; | 144 | }; |
131 | 145 | ||
132 | /* | 146 | /* |