summaryrefslogtreecommitdiff
path: root/drivers/usb/usb_ohci.h
diff options
context:
space:
mode:
authorRemy Bohmer <linux@bohmer.net>2008-09-16 14:55:43 +0200
committerMarkus Klotzbuecher <mk@denx.de>2008-09-17 15:41:16 +0200
commit6f5794a6f78b313231256958fd73673c6aacc116 (patch)
tree18625cc19b9f3a940e71be7e3a48ea2f843d988e /drivers/usb/usb_ohci.h
parentbe19d324edc1a1d7f393d24e10d164cd94c91a00 (diff)
downloadu-boot-imx-6f5794a6f78b313231256958fd73673c6aacc116.zip
u-boot-imx-6f5794a6f78b313231256958fd73673c6aacc116.tar.gz
u-boot-imx-6f5794a6f78b313231256958fd73673c6aacc116.tar.bz2
Refactoring parts of the common USB OHCI code
This patch refactors some large routines of the USB OHCI code by making some routines smaller and more readable which helps debugging and understanding the code. (Makes the code looks somewhat more like the Linux implementation.) Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant) Signed-off-by: Remy Bohmer <linux@bohmer.net> Signed-off-by: Markus Klotzbuecher <mk@denx.de>
Diffstat (limited to 'drivers/usb/usb_ohci.h')
-rw-r--r--drivers/usb/usb_ohci.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/usb/usb_ohci.h b/drivers/usb/usb_ohci.h
index 7a04bf5..50aaafd 100644
--- a/drivers/usb/usb_ohci.h
+++ b/drivers/usb/usb_ohci.h
@@ -38,6 +38,41 @@ static int cc_to_error[16] = {
/* Not Access */ -1
};
+static const char *cc_to_string[16] = {
+ "No Error",
+ "CRC: Last data packet from endpoint contained a CRC error.",
+ "BITSTUFFING: Last data packet from endpoint contained a bit " \
+ "stuffing violation",
+ "DATATOGGLEMISMATCH: Last packet from endpoint had data toggle PID\n" \
+ "that did not match the expected value.",
+ "STALL: TD was moved to the Done Queue because the endpoint returned" \
+ " a STALL PID",
+ "DEVICENOTRESPONDING: Device did not respond to token (IN) or did\n" \
+ "not provide a handshake (OUT)",
+ "PIDCHECKFAILURE: Check bits on PID from endpoint failed on data PID\n"\
+ "(IN) or handshake (OUT)",
+ "UNEXPECTEDPID: Receive PID was not valid when encountered or PID\n" \
+ "value is not defined.",
+ "DATAOVERRUN: The amount of data returned by the endpoint exceeded\n" \
+ "either the size of the maximum data packet allowed\n" \
+ "from the endpoint (found in MaximumPacketSize field\n" \
+ "of ED) or the remaining buffer size.",
+ "DATAUNDERRUN: The endpoint returned less than MaximumPacketSize\n" \
+ "and that amount was not sufficient to fill the\n" \
+ "specified buffer",
+ "reserved1",
+ "reserved2",
+ "BUFFEROVERRUN: During an IN, HC received data from endpoint faster\n" \
+ "than it could be written to system memory",
+ "BUFFERUNDERRUN: During an OUT, HC could not retrieve data from\n" \
+ "system memory fast enough to keep up with data USB " \
+ "data rate.",
+ "NOT ACCESSED: This code is set by software before the TD is placed" \
+ "on a list to be processed by the HC.(1)",
+ "NOT ACCESSED: This code is set by software before the TD is placed" \
+ "on a list to be processed by the HC.(2)",
+};
+
/* ED States */
#define ED_NEW 0x00