From ac8d5508541874b60aae6363f50e56f7df40b27f Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 13 Jun 2012 15:49:09 +0200 Subject: libpayload: Correct interchanged parameters in OHCI driver In ohci_private.h some invocations of a MASK macro were called with its parameters interchanged. This fixes it with the hope not to break anything nasty. Change-Id: I56cb483b208442b497dbd32ce993cc53d1fba1e5 Signed-off-by: Nico Huber Reviewed-on: http://review.coreboot.org/1122 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- payloads/libpayload/drivers/usb/ohci_private.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'payloads/libpayload/drivers/usb') diff --git a/payloads/libpayload/drivers/usb/ohci_private.h b/payloads/libpayload/drivers/usb/ohci_private.h index d0b8ffcca9..a60b294607 100644 --- a/payloads/libpayload/drivers/usb/ohci_private.h +++ b/payloads/libpayload/drivers/usb/ohci_private.h @@ -215,11 +215,11 @@ #define ED_TOGGLE 2 #define ED_FUNC_SHIFT 0 -#define ED_FUNC_MASK MASK(7, 0) +#define ED_FUNC_MASK MASK(0, 7) #define ED_EP_SHIFT 7 -#define ED_EP_MASK MASK(4, 7) +#define ED_EP_MASK MASK(7, 4) #define ED_DIR_SHIFT 11 -#define ED_DIR_MASK MASK(2, 11) +#define ED_DIR_MASK MASK(11, 2) #define ED_LOWSPEED (1 << 13) #define ED_MPS_SHIFT 16 @@ -230,7 +230,7 @@ u32 buffer_end; } __attribute__ ((packed)) td_t; #define TD_DIRECTION_SHIFT 19 -#define TD_DIRECTION_MASK MASK(2, TD_DIRECTION_SHIFT) +#define TD_DIRECTION_MASK MASK(TD_DIRECTION_SHIFT, 2) #define TD_DIRECTION_SETUP OHCI_SETUP << TD_DIRECTION_SHIFT #define TD_DIRECTION_IN OHCI_IN << TD_DIRECTION_SHIFT #define TD_DIRECTION_OUT OHCI_OUT << TD_DIRECTION_SHIFT @@ -240,7 +240,7 @@ #define TD_TOGGLE_FROM_ED 0 #define TD_TOGGLE_FROM_TD (1 << 25) #define TD_CC_SHIFT 28 -#define TD_CC_MASK MASK(4, TD_CC_SHIFT) +#define TD_CC_MASK MASK(TD_CC_SHIFT, 4) #define TD_CC_NOERR 0 #define TD_CC_NOACCESS (14 << TD_CC_SHIFT) /* the lower of the two values, so "no access" can be tested with >= */ -- cgit v1.2.3