aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-04-27 02:59:44 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-02 13:25:56 -0400
commitb02b371e6d14961ad458ca9d88b30eefef77003d (patch)
tree3312107b1fd0d0445eecd079169f5def480fb4fb /include/linux/usb
parentd6f945044ee3b91a170183e8e34c3db29696d9b8 (diff)
USB: add Cypress c67x00 OTG controller core driver
This patch add the core driver for the c67x00 USB OTG controller. The core driver is responsible for the platform bus binding and creating either USB HCD or USB Gadget instances for each of the serial interface engines on the chip. This driver does not directly implement the HCD or gadget behaviours; it just controls access to the chip. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/c67x00.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/linux/usb/c67x00.h b/include/linux/usb/c67x00.h
new file mode 100644
index 000000000000..83c6b45470ca
--- /dev/null
+++ b/include/linux/usb/c67x00.h
@@ -0,0 +1,48 @@
1/*
2 * usb_c67x00.h: platform definitions for the Cypress C67X00 USB chip
3 *
4 * Copyright (C) 2006-2008 Barco N.V.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301 USA.
20 */
21
22#ifndef _LINUX_USB_C67X00_H
23#define _LINUX_USB_C67X00_H
24
25/* SIE configuration */
26#define C67X00_SIE_UNUSED 0
27#define C67X00_SIE_HOST 1
28#define C67X00_SIE_PERIPHERAL_A 2 /* peripheral on A port */
29#define C67X00_SIE_PERIPHERAL_B 3 /* peripheral on B port */
30
31#define c67x00_sie_config(config, n) (((config)>>(4*(n)))&0x3)
32
33#define C67X00_SIE1_UNUSED (C67X00_SIE_UNUSED << 0)
34#define C67X00_SIE1_HOST (C67X00_SIE_HOST << 0)
35#define C67X00_SIE1_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 0)
36#define C67X00_SIE1_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 0)
37
38#define C67X00_SIE2_UNUSED (C67X00_SIE_UNUSED << 4)
39#define C67X00_SIE2_HOST (C67X00_SIE_HOST << 4)
40#define C67X00_SIE2_PERIPHERAL_A (C67X00_SIE_PERIPHERAL_A << 4)
41#define C67X00_SIE2_PERIPHERAL_B (C67X00_SIE_PERIPHERAL_B << 4)
42
43struct c67x00_platform_data {
44 int sie_config; /* SIEs config (C67X00_SIEx_*) */
45 unsigned long hpi_regstep; /* Step between HPI registers */
46};
47
48#endif /* _LINUX_USB_C67X00_H */