2017-11-03 10:28:30 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2014-07-09 01:08:52 +00:00
|
|
|
/*
|
|
|
|
* drivers/usb/host/xhci-rcar.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014 Renesas Electronics Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _XHCI_RCAR_H
|
|
|
|
#define _XHCI_RCAR_H
|
|
|
|
|
2015-11-24 11:09:51 +00:00
|
|
|
#define XHCI_RCAR_FIRMWARE_NAME_V1 "r8a779x_usb3_v1.dlmem"
|
2015-11-24 11:09:53 +00:00
|
|
|
#define XHCI_RCAR_FIRMWARE_NAME_V2 "r8a779x_usb3_v2.dlmem"
|
2016-11-11 13:13:26 +00:00
|
|
|
#define XHCI_RCAR_FIRMWARE_NAME_V3 "r8a779x_usb3_v3.dlmem"
|
2015-11-24 11:09:51 +00:00
|
|
|
|
2014-07-09 01:08:52 +00:00
|
|
|
#if IS_ENABLED(CONFIG_USB_XHCI_RCAR)
|
|
|
|
void xhci_rcar_start(struct usb_hcd *hcd);
|
|
|
|
int xhci_rcar_init_quirk(struct usb_hcd *hcd);
|
2017-04-19 13:55:48 +00:00
|
|
|
int xhci_rcar_resume_quirk(struct usb_hcd *hcd);
|
2014-07-09 01:08:52 +00:00
|
|
|
#else
|
|
|
|
static inline void xhci_rcar_start(struct usb_hcd *hcd)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int xhci_rcar_init_quirk(struct usb_hcd *hcd)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2017-04-19 13:55:48 +00:00
|
|
|
|
|
|
|
static inline int xhci_rcar_resume_quirk(struct usb_hcd *hcd)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2014-07-09 01:08:52 +00:00
|
|
|
#endif
|
2019-09-02 12:01:37 +00:00
|
|
|
|
2019-09-02 12:01:38 +00:00
|
|
|
/*
|
|
|
|
* On R-Car Gen2 and Gen3, the AC64 bit (bit 0) of HCCPARAMS1 is set
|
|
|
|
* to 1. However, these SoCs don't support 64-bit address memory
|
|
|
|
* pointers. So, this driver clears the AC64 bit of xhci->hcc_params
|
|
|
|
* to call dma_set_coherent_mask(dev, DMA_BIT_MASK(32)) in
|
|
|
|
* xhci_gen_setup() by using the XHCI_NO_64BIT_SUPPORT quirk.
|
|
|
|
*
|
|
|
|
* And, since the firmware/internal CPU control the USBSTS.STS_HALT
|
|
|
|
* and the process speed is down when the roothub port enters U3,
|
|
|
|
* long delay for the handshake of STS_HALT is neeed in xhci_suspend()
|
|
|
|
* by using the XHCI_SLOW_SUSPEND quirk.
|
|
|
|
*/
|
2019-09-02 12:01:37 +00:00
|
|
|
#define SET_XHCI_PLAT_PRIV_FOR_RCAR(firmware) \
|
|
|
|
.firmware_name = firmware, \
|
2019-09-02 12:01:38 +00:00
|
|
|
.quirks = XHCI_NO_64BIT_SUPPORT | XHCI_TRUST_TX_LENGTH | \
|
|
|
|
XHCI_SLOW_SUSPEND, \
|
2019-09-02 12:01:37 +00:00
|
|
|
.init_quirk = xhci_rcar_init_quirk, \
|
|
|
|
.plat_start = xhci_rcar_start, \
|
|
|
|
.resume_quirk = xhci_rcar_resume_quirk,
|
|
|
|
|
2014-07-09 01:08:52 +00:00
|
|
|
#endif /* _XHCI_RCAR_H */
|