From patchwork Wed Oct 9 21:21:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 11182231 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 193AD1864 for ; Wed, 9 Oct 2019 21:22:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EECC521D7C for ; Wed, 9 Oct 2019 21:22:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732013AbfJIVWH (ORCPT ); Wed, 9 Oct 2019 17:22:07 -0400 Received: from muru.com ([72.249.23.125]:36630 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731916AbfJIVWH (ORCPT ); Wed, 9 Oct 2019 17:22:07 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id E2D9881CA; Wed, 9 Oct 2019 21:22:39 +0000 (UTC) From: Tony Lindgren To: Bin Liu Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, Jacopo Mondi , Marcel Partap , Merlijn Wajer , Michael Scott , NeKit , Pavel Machek , Sebastian Reichel Subject: [PATCH 5/7] usb: musb: omap2430: Clean up enable and remove devctl tinkering Date: Wed, 9 Oct 2019 14:21:42 -0700 Message-Id: <20191009212145.28495-6-tony@atomide.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191009212145.28495-1-tony@atomide.com> References: <20191009212145.28495-1-tony@atomide.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org There should be no need to tinker with devctl in enable in the SoC glue code. We have musb_start() to take care of handling it already. Signed-off-by: Tony Lindgren --- drivers/usb/musb/omap2430.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -275,33 +275,13 @@ static int omap2430_musb_init(struct musb *musb) static void omap2430_musb_enable(struct musb *musb) { - u8 devctl; - unsigned long timeout = jiffies + msecs_to_jiffies(1000); struct device *dev = musb->controller; struct omap2430_glue *glue = dev_get_drvdata(dev->parent); - struct musb_hdrc_platform_data *pdata = dev_get_platdata(dev); - struct omap_musb_board_data *data = pdata->board_data; - switch (glue->status) { case MUSB_ID_GROUND: omap_control_usb_set_mode(glue->control_otghs, USB_MODE_HOST); - if (data->interface_type != MUSB_INTERFACE_UTMI) - break; - devctl = musb_readb(musb->mregs, MUSB_DEVCTL); - /* start the session */ - devctl |= MUSB_DEVCTL_SESSION; - musb_writeb(musb->mregs, MUSB_DEVCTL, devctl); - while (musb_readb(musb->mregs, MUSB_DEVCTL) & - MUSB_DEVCTL_BDEVICE) { - cpu_relax(); - - if (time_after(jiffies, timeout)) { - dev_err(dev, "configured as A device timeout"); - break; - } - } break; case MUSB_VBUS_VALID: