~ubuntu-branches/ubuntu/precise/linux-linaro-u8500/precise

« back to all changes in this revision

Viewing changes to drivers/usb/host/isp1760-hcd.h

  • Committer: Bazaar Package Importer
  • Author(s): John Rigby, Upstream Fixes, Andy Green, John Rigby
  • Date: 2011-04-14 12:16:06 UTC
  • Revision ID: james.westby@ubuntu.com-20110414121606-b77podkyqgr2oix7
Tags: 2.6.38-1002.3
[ Upstream Fixes ]

* MUSB: shutdown: Make sure block is awake before doing shutdown
  - LP: #745737
* Fixed gpio polarity of gpio USB-phy reset.
  - LP: #747639

[ Andy Green ]

* LINARO: SAUCE: disable CONFIG_OMAP_RESET_CLOCKS
  - LP: #752900

[ John Rigby ]

* Rebase to new upstreams:
  Linux v2.6.38.1
  linaro-linux-2.6.38-upstream-29Mar2011
  Ubuntu-2.6.38-7.35
* SAUCE: OMAP4: clock: wait for module to become accessible on
  a clk enable
  - LP: #745737
* Rebase to new upstreams:
  Linux v2.6.38.2
  linaro-linux-2.6.38-upstream-5Apr2011
  Ubuntu-2.6.38-8.41
  - LP: #732842
* Update configs for device tree, dvfs and lttng
* LINARO: add building of dtb's
* LINARO: SAUCE: Disable lowest operating freqs on omap34xx
  - LP: #732912

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
#define HC_INTERRUPT_ENABLE     0x314
71
71
#define INTERRUPT_ENABLE_MASK   (HC_INTL_INT | HC_ATL_INT | HC_EOT_INT)
 
72
#define INTERRUPT_ENABLE_SOT_MASK       (HC_INTL_INT | HC_SOT_INT | HC_EOT_INT)
72
73
 
73
74
#define HC_ISO_INT              (1 << 9)
74
75
#define HC_ATL_INT              (1 << 8)
83
84
#define HC_INT_IRQ_MASK_AND_REG 0x328
84
85
#define HC_ATL_IRQ_MASK_AND_REG 0x32C
85
86
 
86
 
/* Register sets */
87
 
#define HC_BEGIN_OF_ATL         0x0c00
88
 
#define HC_BEGIN_OF_INT         0x0800
89
 
#define HC_BEGIN_OF_ISO         0x0400
90
 
#define HC_BEGIN_OF_PAYLOAD     0x1000
91
 
 
92
87
/* urb state*/
93
88
#define DELETE_URB              (0x0008)
94
89
#define NO_TRANSFER_ACTIVE      (0xffffffff)
95
90
 
96
 
#define ATL_REGS_OFFSET         (0xc00)
97
 
#define INT_REGS_OFFSET         (0x800)
98
 
 
99
 
/* Philips Transfer Descriptor (PTD) */
 
91
/* Philips Proprietary Transfer Descriptor (PTD) */
 
92
typedef __u32 __bitwise __dw;
100
93
struct ptd {
101
 
        __le32 dw0;
102
 
        __le32 dw1;
103
 
        __le32 dw2;
104
 
        __le32 dw3;
105
 
        __le32 dw4;
106
 
        __le32 dw5;
107
 
        __le32 dw6;
108
 
        __le32 dw7;
 
94
        __dw dw0;
 
95
        __dw dw1;
 
96
        __dw dw2;
 
97
        __dw dw3;
 
98
        __dw dw4;
 
99
        __dw dw5;
 
100
        __dw dw6;
 
101
        __dw dw7;
109
102
};
 
103
#define PTD_OFFSET              0x0400
 
104
#define ISO_PTD_OFFSET          0x0400
 
105
#define INT_PTD_OFFSET          0x0800
 
106
#define ATL_PTD_OFFSET          0x0c00
 
107
#define PAYLOAD_OFFSET          0x1000
110
108
 
111
109
struct inter_packet_info {
112
 
        void *data_buffer;
113
 
        u32 payload;
114
 
#define PTD_FIRE_NEXT           (1 << 0)
115
 
#define PTD_URB_FINISHED        (1 << 1)
116
 
        struct urb *urb;
117
110
        struct isp1760_qh *qh;
118
111
        struct isp1760_qtd *qtd;
119
112
};
122
115
typedef void (packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh,
123
116
                struct isp1760_qtd *qtd);
124
117
 
125
 
#define isp1760_dbg(priv, fmt, args...) \
126
 
        dev_dbg(priv_to_hcd(priv)->self.controller, fmt, ##args)
127
 
 
128
 
#define isp1760_info(priv, fmt, args...) \
129
 
        dev_info(priv_to_hcd(priv)->self.controller, fmt, ##args)
130
 
 
131
 
#define isp1760_err(priv, fmt, args...) \
132
 
        dev_err(priv_to_hcd(priv)->self.controller, fmt, ##args)
133
 
 
134
118
/*
135
119
 * Device flags that can vary from board to board.  All of these
136
120
 * indicate the most "atypical" case, so that a devflags of 0 is
167
151
#define BLOCK_2_SIZE 1024
168
152
#define BLOCK_3_SIZE 8192
169
153
#define BLOCKS (BLOCK_1_NUM + BLOCK_2_NUM + BLOCK_3_NUM)
170
 
#define PAYLOAD_SIZE 0xf000
171
 
 
172
 
/* I saw if some reloads if the pointer was negative */
173
 
#define ISP1760_NULL_POINTER    (0x400)
 
154
#define MAX_PAYLOAD_SIZE BLOCK_3_SIZE
 
155
#define PAYLOAD_AREA_SIZE 0xf000
174
156
 
175
157
/* ATL */
176
158
/* DW0 */
224
206
#define NAK_COUNTER     (0)
225
207
#define ERR_COUNTER     (2)
226
208
 
227
 
#define HC_ATL_PL_SIZE  (8192)
228
 
 
229
209
#endif