@@ -14,8 +14,8 @@
#include "drd.h"
#include "host-export.h"
#include <linux/usb/hcd.h>
+#include <linux/usb/xhci-plat.h>
#include "../host/xhci.h"
-#include "../host/xhci-plat.h"
#define XECP_PORT_CAP_REG 0x8000
#define XECP_AUX_CTRL_REG1 0x8120
@@ -19,9 +19,9 @@
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/usb/of.h>
+#include <linux/usb/xhci-plat.h>
#include "xhci.h"
-#include "xhci-plat.h"
#include "xhci-mvebu.h"
#include "xhci-rcar.h"
@@ -12,9 +12,9 @@
#include <linux/of.h>
#include <linux/usb/phy.h>
#include <linux/sys_soc.h>
+#include <linux/usb/xhci-plat.h>
#include "xhci.h"
-#include "xhci-plat.h"
#include "xhci-rcar.h"
/*
similarity index 54%
rename from drivers/usb/host/xhci-plat.h
rename to include/linux/usb/xhci-plat.h
@@ -5,21 +5,21 @@
* Copyright (C) 2015 Renesas Electronics Corporation
*/
-#ifndef _XHCI_PLAT_H
-#define _XHCI_PLAT_H
+#ifndef __LINUX_USB_XHCI_PLAT_H
+#define __LINUX_USB_XHCI_PLAT_H
-#include "xhci.h" /* for hcd_to_xhci() */
+struct usb_hcd;
struct xhci_plat_priv {
const char *firmware_name;
unsigned long long quirks;
- int (*plat_setup)(struct usb_hcd *);
- void (*plat_start)(struct usb_hcd *);
- int (*init_quirk)(struct usb_hcd *);
- int (*suspend_quirk)(struct usb_hcd *);
- int (*resume_quirk)(struct usb_hcd *);
+ int (*plat_setup)(struct usb_hcd *hcd);
+ void (*plat_start)(struct usb_hcd *hcd);
+ int (*init_quirk)(struct usb_hcd *hcd);
+ int (*suspend_quirk)(struct usb_hcd *hcd);
+ int (*resume_quirk)(struct usb_hcd *hcd);
};
#define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)
#define xhci_to_priv(x) ((struct xhci_plat_priv *)(x)->priv)
-#endif /* _XHCI_PLAT_H */
+#endif /* __LINUX_USB_XHCI_PLAT_H */
DWC3 and CDNS3 need to access the private platform structure to pass quirks to the xhci-plat glue layer. Move xhci-plat.h to a common header location under include/linux/usb so DWC3 and CDNS3 can properly access them. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> --- Changes in v2: - New patch for this series drivers/usb/cdns3/host.c | 2 +- drivers/usb/host/xhci-plat.c | 2 +- drivers/usb/host/xhci-rcar.c | 2 +- .../usb/host => include/linux/usb}/xhci-plat.h | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) rename {drivers/usb/host => include/linux/usb}/xhci-plat.h (54%)