mirror of https://gitee.com/openkylin/linux.git
staging: dwc2: rename dwc2_check_core_status()
Rename dwc2_check_core_status() to dwc2_is_controller_alive(), and make it a boolean function. Also change the message when the controller is dead to say "dead" instead of "disconnected". Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b66a3f0573
commit
057715f280
|
@ -2736,12 +2736,12 @@ u16 dwc2_get_otg_version(struct dwc2_hsotg *hsotg)
|
|||
return hsotg->core_params->otg_ver == 1 ? 0x0200 : 0x0103;
|
||||
}
|
||||
|
||||
int dwc2_check_core_status(struct dwc2_hsotg *hsotg)
|
||||
bool dwc2_is_controller_alive(struct dwc2_hsotg *hsotg)
|
||||
{
|
||||
if (readl(hsotg->regs + GSNPSID) == 0xffffffff)
|
||||
return -1;
|
||||
return false;
|
||||
else
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -544,7 +544,7 @@ extern void dwc2_enable_host_interrupts(struct dwc2_hsotg *hsotg);
|
|||
extern void dwc2_disable_host_interrupts(struct dwc2_hsotg *hsotg);
|
||||
|
||||
extern u32 dwc2_calc_frame_interval(struct dwc2_hsotg *hsotg);
|
||||
extern int dwc2_check_core_status(struct dwc2_hsotg *hsotg);
|
||||
extern bool dwc2_is_controller_alive(struct dwc2_hsotg *hsotg);
|
||||
|
||||
/*
|
||||
* Common core Functions.
|
||||
|
|
|
@ -451,8 +451,8 @@ irqreturn_t dwc2_handle_common_intr(int irq, void *dev)
|
|||
u32 gintsts;
|
||||
irqreturn_t retval = IRQ_NONE;
|
||||
|
||||
if (dwc2_check_core_status(hsotg) < 0) {
|
||||
dev_warn(hsotg->dev, "Controller is disconnected\n");
|
||||
if (!dwc2_is_controller_alive(hsotg)) {
|
||||
dev_warn(hsotg->dev, "Controller is dead\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
@ -2059,8 +2059,8 @@ irqreturn_t dwc2_handle_hcd_intr(struct dwc2_hsotg *hsotg)
|
|||
u32 gintsts, dbg_gintsts;
|
||||
irqreturn_t retval = IRQ_NONE;
|
||||
|
||||
if (dwc2_check_core_status(hsotg) < 0) {
|
||||
dev_warn(hsotg->dev, "Controller is disconnected\n");
|
||||
if (!dwc2_is_controller_alive(hsotg) < 0) {
|
||||
dev_warn(hsotg->dev, "Controller is dead\n");
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue