common: Move ARM cache operations out of common.h
[oweals/u-boot.git] / drivers / usb / host / xhci-ring.c
index 579e6707eb35a11067458da2f8cf643048b18df8..3cd6c8a0dcb4ea5561a4572fd6ab72dfce5a249c 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * USB HOST XHCI Controller stack
  *
  * Copyright (C) 2013 Samsung Electronics Co.Ltd
  * Authors: Vivek Gautam <gautam.vivek@samsung.com>
  *         Vikas Sajjan <vikas.sajjan@samsung.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <asm/byteorder.h>
 #include <usb.h>
 #include <asm/unaligned.h>
 #include <linux/errno.h>
 
-#include "xhci.h"
+#include <usb/xhci.h>
 
 /**
  * Is this TRB a link TRB or was the last TRB the last TRB in this event ring
@@ -557,7 +557,7 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe,
 {
        int num_trbs = 0;
        struct xhci_generic_trb *start_trb;
-       bool first_trb = 0;
+       bool first_trb = false;
        int start_cycle;
        u32 field = 0;
        u32 length_field = 0;
@@ -828,7 +828,7 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
                field |= 0x1;
 
        /* xHCI 1.0 6.4.1.2.1: Transfer Type field */
-       if (HC_VERSION(xhci_readl(&ctrl->hccr->cr_capbase)) == 0x100) {
+       if (HC_VERSION(xhci_readl(&ctrl->hccr->cr_capbase)) >= 0x100) {
                if (length > 0) {
                        if (req->requesttype & USB_DIR_IN)
                                field |= (TRB_DATA_IN << TRB_TX_TYPE_SHIFT);