diff options
author | Arvid Brodin <arvid.brodin@enea.com> | 2011-02-26 16:02:57 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-28 22:23:36 -0500 |
commit | bedc0c31ac3db828e6ade7a8c5cb708688f0a7e1 (patch) | |
tree | 4d673769f7cc5a7fac603cd3822f644d650c3096 /drivers/usb/host/isp1760-hcd.h | |
parent | 6d42fcdb685e3b7af45c77181537db4bc1a715f9 (diff) |
usb/isp1760: Move to native-endian ptds
This helps users with platform-bus-connected isp176xs, big-endian cpu,
and missing byteswapping on the data bus. It does so by collecting all
SW byteswaps in one place and also fixes a bug with non-32-bit io
transfers on this hardware, where payload has to be byteswapped
instead of ptds.
Signed-off-by: Arvid Brodin <arvid.brodin@enea.com>
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.h | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/usb/host/isp1760-hcd.h b/drivers/usb/host/isp1760-hcd.h index 612bce5dce03..c01c59171bc7 100644 --- a/drivers/usb/host/isp1760-hcd.h +++ b/drivers/usb/host/isp1760-hcd.h | |||
@@ -84,30 +84,27 @@ void deinit_kmem_cache(void); | |||
84 | #define HC_INT_IRQ_MASK_AND_REG 0x328 | 84 | #define HC_INT_IRQ_MASK_AND_REG 0x328 |
85 | #define HC_ATL_IRQ_MASK_AND_REG 0x32C | 85 | #define HC_ATL_IRQ_MASK_AND_REG 0x32C |
86 | 86 | ||
87 | /* Register sets */ | ||
88 | #define HC_BEGIN_OF_ATL 0x0c00 | ||
89 | #define HC_BEGIN_OF_INT 0x0800 | ||
90 | #define HC_BEGIN_OF_ISO 0x0400 | ||
91 | #define HC_BEGIN_OF_PAYLOAD 0x1000 | ||
92 | |||
93 | /* urb state*/ | 87 | /* urb state*/ |
94 | #define DELETE_URB (0x0008) | 88 | #define DELETE_URB (0x0008) |
95 | #define NO_TRANSFER_ACTIVE (0xffffffff) | 89 | #define NO_TRANSFER_ACTIVE (0xffffffff) |
96 | 90 | ||
97 | #define ATL_REGS_OFFSET (0xc00) | 91 | /* Philips Proprietary Transfer Descriptor (PTD) */ |
98 | #define INT_REGS_OFFSET (0x800) | 92 | typedef __u32 __bitwise __dw; |
99 | |||
100 | /* Philips Transfer Descriptor (PTD) */ | ||
101 | struct ptd { | 93 | struct ptd { |
102 | __le32 dw0; | 94 | __dw dw0; |
103 | __le32 dw1; | 95 | __dw dw1; |
104 | __le32 dw2; | 96 | __dw dw2; |
105 | __le32 dw3; | 97 | __dw dw3; |
106 | __le32 dw4; | 98 | __dw dw4; |
107 | __le32 dw5; | 99 | __dw dw5; |
108 | __le32 dw6; | 100 | __dw dw6; |
109 | __le32 dw7; | 101 | __dw dw7; |
110 | }; | 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 | ||
111 | 108 | ||
112 | struct inter_packet_info { | 109 | struct inter_packet_info { |
113 | void *data_buffer; | 110 | void *data_buffer; |