aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-hcd.h
diff options
context:
space:
mode:
authorNate Case <ncase@xes-inc.com>2008-06-17 12:11:38 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 18:16:33 -0400
commit3faefc88c1a32b0b4a00b9089fab5d917996b16c (patch)
tree705994b76bea1968e3ae7d4149bd77139374220c /drivers/usb/host/isp1760-hcd.h
parent6d243e5c76b632a94d54cac2fe7fe8c0b41cd482 (diff)
USB: isp1760: Support board-specific hardware configurations
This adds support for hardware configurations that don't match the chip default register settings (e.g., 16-bit data bus, DACK and DREQ pulled up instead of down, analog overcurrent mode). These settings are passed in via the OF device tree. The PCI interface still assumes the same default values. Signed-off-by: Nate Case <ncase@xes-inc.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/isp1760-hcd.h')
-rw-r--r--drivers/usb/host/isp1760-hcd.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/usb/host/isp1760-hcd.h b/drivers/usb/host/isp1760-hcd.h
index 3d86d0f6b147..6473dd86993c 100644
--- a/drivers/usb/host/isp1760-hcd.h
+++ b/drivers/usb/host/isp1760-hcd.h
@@ -3,7 +3,8 @@
3 3
4/* exports for if */ 4/* exports for if */
5struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq, 5struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq,
6 u64 irqflags, struct device *dev, const char *busname); 6 u64 irqflags, struct device *dev, const char *busname,
7 unsigned int devflags);
7int init_kmem_once(void); 8int init_kmem_once(void);
8void deinit_kmem_cache(void); 9void deinit_kmem_cache(void);
9 10
@@ -31,6 +32,7 @@ void deinit_kmem_cache(void);
31/* Configuration Register */ 32/* Configuration Register */
32#define HC_HW_MODE_CTRL 0x300 33#define HC_HW_MODE_CTRL 0x300
33#define ALL_ATX_RESET (1 << 31) 34#define ALL_ATX_RESET (1 << 31)
35#define HW_ANA_DIGI_OC (1 << 15)
34#define HW_DATA_BUS_32BIT (1 << 8) 36#define HW_DATA_BUS_32BIT (1 << 8)
35#define HW_DACK_POL_HIGH (1 << 6) 37#define HW_DACK_POL_HIGH (1 << 6)
36#define HW_DREQ_POL_HIGH (1 << 5) 38#define HW_DREQ_POL_HIGH (1 << 5)
@@ -56,13 +58,14 @@ void deinit_kmem_cache(void);
56#define PORT1_POWER (3 << 3) 58#define PORT1_POWER (3 << 3)
57#define PORT1_INIT1 (1 << 7) 59#define PORT1_INIT1 (1 << 7)
58#define PORT1_INIT2 (1 << 23) 60#define PORT1_INIT2 (1 << 23)
61#define HW_OTG_CTRL_SET 0x374
62#define HW_OTG_CTRL_CLR 0x376
59 63
60/* Interrupt Register */ 64/* Interrupt Register */
61#define HC_INTERRUPT_REG 0x310 65#define HC_INTERRUPT_REG 0x310
62 66
63#define HC_INTERRUPT_ENABLE 0x314 67#define HC_INTERRUPT_ENABLE 0x314
64#define INTERRUPT_ENABLE_MASK (HC_INTL_INT | HC_ATL_INT | HC_EOT_INT) 68#define INTERRUPT_ENABLE_MASK (HC_INTL_INT | HC_ATL_INT | HC_EOT_INT)
65#define FINAL_HW_CONFIG (HW_GLOBAL_INTR_EN | HW_DATA_BUS_32BIT)
66 69
67#define HC_ISO_INT (1 << 9) 70#define HC_ISO_INT (1 << 9)
68#define HC_ATL_INT (1 << 8) 71#define HC_ATL_INT (1 << 8)
@@ -122,6 +125,19 @@ typedef void (packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh,
122#define isp1760_err(priv, fmt, args...) \ 125#define isp1760_err(priv, fmt, args...) \
123 dev_err(priv_to_hcd(priv)->self.controller, fmt, ##args) 126 dev_err(priv_to_hcd(priv)->self.controller, fmt, ##args)
124 127
128/*
129 * Device flags that can vary from board to board. All of these
130 * indicate the most "atypical" case, so that a devflags of 0 is
131 * a sane default configuration.
132 */
133#define ISP1760_FLAG_PORT1_DIS 0x00000001 /* Port 1 disabled */
134#define ISP1760_FLAG_BUS_WIDTH_16 0x00000002 /* 16-bit data bus width */
135#define ISP1760_FLAG_OTG_EN 0x00000004 /* Port 1 supports OTG */
136#define ISP1760_FLAG_ANALOG_OC 0x00000008 /* Analog overcurrent */
137#define ISP1760_FLAG_DACK_POL_HIGH 0x00000010 /* DACK active high */
138#define ISP1760_FLAG_DREQ_POL_HIGH 0x00000020 /* DREQ active high */
139#define ISP1760_FLAG_ISP1761 0x00000040 /* Chip is ISP1761 */
140
125/* chip memory management */ 141/* chip memory management */
126struct memory_chunk { 142struct memory_chunk {
127 unsigned int start; 143 unsigned int start;