diff mbox

[U-Boot,v4,2/2] driver/usb: include upper/lower_32_bits() from linux/compat.h

Message ID 1403284719-14671-1-git-send-email-Lijun.Pan@freescale.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Lijun Pan June 20, 2014, 5:18 p.m. UTC
upper_32_bits() and lower_32_bits() have been ported into linux/compat.h.
Start use them now in drivers/usb/host/xhci.h.

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
---
v4: split v3 into 2 patches.
v3: change the comment message for lower_32_bits() and upper_32_bits()
    change the commit message to argue the necessity of this patch.
v2: add git SHA of linux kernel tree.

drivers/usb/host/xhci.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Tom Rini July 22, 2014, 7:22 p.m. UTC | #1
On Fri, Jun 20, 2014 at 12:18:39PM -0500, Lijun Pan wrote:

> upper_32_bits() and lower_32_bits() have been ported into linux/compat.h.
> Start use them now in drivers/usb/host/xhci.h.
> 
> Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index ceb1573..6685ed2 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -20,9 +20,7 @@ 
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <linux/list.h>
-
-#define upper_32_bits(n) (u32)((n) >> 32)
-#define lower_32_bits(n) (u32)(n)
+#include <linux/compat.h>
 
 #define MAX_EP_CTX_NUM		31
 #define XHCI_ALIGNMENT		64
@@ -1121,7 +1119,7 @@  static inline void xhci_writeq(__le64 volatile *regs, const u64 val)
 	__u32 *ptr = (__u32 *)regs;
 	u32 val_lo = lower_32_bits(val);
 	/* FIXME */
-	u32 val_hi = 0;
+	u32 val_hi = upper_32_bits(val);
 	writel(val_lo, ptr);
 	writel(val_hi, ptr + 1);
 }