|
@@ -170,30 +170,10 @@ struct smscusb_device {
|
170
|
170
|
uint32_t int_sts;
|
171
|
171
|
};
|
172
|
172
|
|
173
|
|
-/**
|
174
|
|
- * Write register (without byte-swapping)
|
175
|
|
- *
|
176
|
|
- * @v smscusb Smscusb device
|
177
|
|
- * @v address Register address
|
178
|
|
- * @v value Register value
|
179
|
|
- * @ret rc Return status code
|
180
|
|
- */
|
181
|
|
-static int smscusb_raw_writel ( struct smscusb_device *smscusb,
|
182
|
|
- unsigned int address, uint32_t value ) {
|
183
|
|
- int rc;
|
184
|
|
-
|
185
|
|
- /* Write register */
|
186
|
|
- DBGCIO ( smscusb, "SMSCUSB %p [%03x] <= %08x\n",
|
187
|
|
- smscusb, address, le32_to_cpu ( value ) );
|
188
|
|
- if ( ( rc = usb_control ( smscusb->usb, SMSCUSB_REGISTER_WRITE, 0,
|
189
|
|
- address, &value, sizeof ( value ) ) ) != 0 ) {
|
190
|
|
- DBGC ( smscusb, "SMSCUSB %p could not write %03x: %s\n",
|
191
|
|
- smscusb, address, strerror ( rc ) );
|
192
|
|
- return rc;
|
193
|
|
- }
|
194
|
|
-
|
195
|
|
- return 0;
|
196
|
|
-}
|
|
173
|
+extern int smscusb_raw_writel ( struct smscusb_device *smscusb,
|
|
174
|
+ unsigned int address, uint32_t value );
|
|
175
|
+extern int smscusb_raw_readl ( struct smscusb_device *smscusb,
|
|
176
|
+ unsigned int address, uint32_t *value );
|
197
|
177
|
|
198
|
178
|
/**
|
199
|
179
|
* Write register
|
|
@@ -216,31 +196,6 @@ smscusb_writel ( struct smscusb_device *smscusb, unsigned int address,
|
216
|
196
|
return 0;
|
217
|
197
|
}
|
218
|
198
|
|
219
|
|
-/**
|
220
|
|
- * Read register (without byte-swapping)
|
221
|
|
- *
|
222
|
|
- * @v smscusb SMSC USB device
|
223
|
|
- * @v address Register address
|
224
|
|
- * @ret value Register value
|
225
|
|
- * @ret rc Return status code
|
226
|
|
- */
|
227
|
|
-static int smscusb_raw_readl ( struct smscusb_device *smscusb,
|
228
|
|
- unsigned int address, uint32_t *value ) {
|
229
|
|
- int rc;
|
230
|
|
-
|
231
|
|
- /* Read register */
|
232
|
|
- if ( ( rc = usb_control ( smscusb->usb, SMSCUSB_REGISTER_READ, 0,
|
233
|
|
- address, value, sizeof ( *value ) ) ) != 0 ) {
|
234
|
|
- DBGC ( smscusb, "SMSCUSB %p could not read %03x: %s\n",
|
235
|
|
- smscusb, address, strerror ( rc ) );
|
236
|
|
- return rc;
|
237
|
|
- }
|
238
|
|
- DBGCIO ( smscusb, "SMSCUSB %p [%03x] => %08x\n",
|
239
|
|
- smscusb, address, le32_to_cpu ( *value ) );
|
240
|
|
-
|
241
|
|
- return 0;
|
242
|
|
-}
|
243
|
|
-
|
244
|
199
|
/**
|
245
|
200
|
* Read register
|
246
|
201
|
*
|