mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-28 00:19:36 +00:00

When the core is integrated with glue, it's reasonable to assume that the glue driver will have to touch the IP before/after the core takes the hardware out and into reset. As such the glue must own these resources and be allowed to turn them on/off outside the core's handling. Allow the platform or glue layer to indicate if the core logic for clocks and resets should be skipped to deal with this. Reviewed-by: Frank Li <Frank.Li@nxp.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250414-dwc3-refactor-v7-4-f015b358722d@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
37 lines
1017 B
C
37 lines
1017 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* glue.h - DesignWare USB3 DRD glue header
|
|
*/
|
|
|
|
#ifndef __DRIVERS_USB_DWC3_GLUE_H
|
|
#define __DRIVERS_USB_DWC3_GLUE_H
|
|
|
|
#include <linux/types.h>
|
|
#include "core.h"
|
|
|
|
/**
|
|
* dwc3_probe_data: Initialization parameters passed to dwc3_core_probe()
|
|
* @dwc: Reference to dwc3 context structure
|
|
* @res: resource for the DWC3 core mmio region
|
|
* @ignore_clocks_and_resets: clocks and resets defined for the device should
|
|
* be ignored by the DWC3 core, as they are managed by the glue
|
|
*/
|
|
struct dwc3_probe_data {
|
|
struct dwc3 *dwc;
|
|
struct resource *res;
|
|
bool ignore_clocks_and_resets;
|
|
};
|
|
|
|
int dwc3_core_probe(const struct dwc3_probe_data *data);
|
|
void dwc3_core_remove(struct dwc3 *dwc);
|
|
|
|
int dwc3_runtime_suspend(struct dwc3 *dwc);
|
|
int dwc3_runtime_resume(struct dwc3 *dwc);
|
|
int dwc3_runtime_idle(struct dwc3 *dwc);
|
|
int dwc3_pm_suspend(struct dwc3 *dwc);
|
|
int dwc3_pm_resume(struct dwc3 *dwc);
|
|
void dwc3_pm_complete(struct dwc3 *dwc);
|
|
int dwc3_pm_prepare(struct dwc3 *dwc);
|
|
|
|
#endif
|