Skip to content

Commit bbe0e38

Browse files
authored
MT-134856: Silence noisy console messages (nxp-imx#29)
* Silence noisy console messages * Replaced ifdef NEVER with ifdef MT_DEBUG
1 parent 0de062c commit bbe0e38

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

drivers/usb/chipidea/otg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ static int hw_wait_vbus_lower_bsv(struct ci_hdrc *ci)
155155

156156
while (hw_read_otgsc(ci, mask)) {
157157
if (time_after(jiffies, elapse)) {
158+
#ifdef MT_DEBUG
158159
dev_err(ci->dev, "timeout waiting for %08x in OTGSC\n",
159160
mask);
161+
#endif
160162
return -ETIMEDOUT;
161163
}
162164
msleep(20);

drivers/usb/chipidea/usbmisc_imx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,9 @@ static int imx7d_charger_detection(struct imx_usbmisc_data *data)
871871
/* Check if vbus is valid */
872872
val = readl(usbmisc->base + MX7D_USB_OTG_PHY_STATUS);
873873
if (!(val & MX7D_USB_OTG_PHY_STATUS_VBUS_VLD)) {
874+
#ifdef MT_DEBUG
874875
dev_err(data->dev, "vbus is error\n");
876+
#endif
875877
return -EINVAL;
876878
}
877879

@@ -1241,9 +1243,11 @@ int imx_usbmisc_charger_detection(struct imx_usbmisc_data *data, bool connect)
12411243
if (connect) {
12421244
ret = usbmisc->ops->charger_detection(data);
12431245
if (ret) {
1246+
#ifdef MT_DEBUG
12441247
dev_err(data->dev,
12451248
"Error occurs during detection: %d\n",
12461249
ret);
1250+
#endif
12471251
usb_phy->chg_state = USB_CHARGER_ABSENT;
12481252
} else {
12491253
usb_phy->chg_state = USB_CHARGER_PRESENT;

drivers/usb/core/hcd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2943,7 +2943,9 @@ int usb_add_hcd(struct usb_hcd *hcd,
29432943
hcd->state = HC_STATE_RUNNING;
29442944
retval = hcd->driver->start(hcd);
29452945
if (retval < 0) {
2946+
#ifdef MT_DEBUG
29462947
dev_err(hcd->self.controller, "startup error %d\n", retval);
2948+
#endif
29472949
goto err_hcd_driver_start;
29482950
}
29492951

drivers/usb/host/ehci-hcd.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,10 @@ static int ehci_run (struct usb_hcd *hcd)
649649
up_write(&ehci_cf_port_reset_rwsem);
650650

651651
if (rc) {
652+
#ifdef MT_DEBUG
652653
ehci_err(ehci, "USB %x.%x, controller refused to start: %d\n",
653654
((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), rc);
655+
#endif
654656
return rc;
655657
}
656658

0 commit comments

Comments
 (0)