From patchwork Fri Apr 13 15:15:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10340265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 134CD6039A for ; Fri, 13 Apr 2018 15:17:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8EF5288F8 for ; Fri, 13 Apr 2018 15:17:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD67728903; Fri, 13 Apr 2018 15:17:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E6BF288F8 for ; Fri, 13 Apr 2018 15:17:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751931AbeDMPRV (ORCPT ); Fri, 13 Apr 2018 11:17:21 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33203 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751021AbeDMPRS (ORCPT ); Fri, 13 Apr 2018 11:17:18 -0400 Received: by mail-lf0-f65.google.com with SMTP id m14-v6so1126976lfc.0; Fri, 13 Apr 2018 08:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=NoGcnutV/ymlDMWX3loUsHmIqkbfz7R7TnZICl/LtVQ=; b=OXLtG9vg/NH+d7ghDoc4c66TVQwHynVsos8x7N9LN/apt4Lrs9+THM0og17I25ExZ5 ee/upbthsXmfbB/oFU4/HOuadjHLDyboegNH1BrjNdrTliyF8g5nmfJQW6ZkMcdPx5gN 3+3UA5Z2s5uw0v/O1Yez5Yb0rSxuoQOk2xkHuoo48bYYxnVagHqU5tgmSylaW9/OAdCN Q8DhMZQElb/XU+JxXDauqYRNXDucIgN65nuHV6QX5V1SdYkvj2Ahx3y4kNo5JoEUMiDS rNxiucbtjJhCxBo8D21lhXpQT5MQZaJg/4Wke/iJrovPn3L8hcGgzQRtP8+5ZCx5LIm1 Momw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=NoGcnutV/ymlDMWX3loUsHmIqkbfz7R7TnZICl/LtVQ=; b=WkUO4HDya/bYMJNDdmihulRrQmIu/3wsuVkUoiwF3ujN9cNgKmSKuhIZELl+ETHwEh hUcdeMa8eJY+kIn8RMBPL/UfwTI2Pl+aE5HP3RcAkZARPjFYPn/Rdf/sMd0qTkweCvON FSc94bOKxzVLQCdiuBTxjtg5UJLGCkqY4y5ISG17mf9A5Ag7S1aoGcbbOGIVkv/IyXfn +M/IHhOw9P9ongZkPyQXs+tGLsc7FkWok66DLo6qA8b1gZ0qohJl5nmuF4+RG76RfpRZ EpyhRBffpGJLRWBP+rhtH/EuyYi4l1OTiykEhtGhLV5SAql2HpoV5qRcZPNjdkIWaD34 VCow== X-Gm-Message-State: ALQs6tDlXrACgYde7FUaYCNzxupl+nuBJOvX/jN9ozOBwg+q17EDJR53 3klyffTET6ewpMS/0MAWdaQ= X-Google-Smtp-Source: AIpwx49m2oW6xoFhaGIDnAxM9wcKsaoXNkDBVzfJZH9go07Z78TZbR148Xe+6VUca0gEZwrFZWpr/Q== X-Received: by 10.46.149.69 with SMTP id t5mr1853609ljh.45.1523632636905; Fri, 13 Apr 2018 08:17:16 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id s6sm361221ljh.53.2018.04.13.08.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 08:17:13 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1f70Rq-0008Vx-1z; Fri, 13 Apr 2018 17:17:10 +0200 From: Johan Hovold To: Bin Liu Cc: Greg Kroah-Hartman , Alan Stern , Arnd Bergmann , Kishon Vijay Abraham I , Martin Blumenstingl , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/3] USB: musb: host: prevent core phy initialisation Date: Fri, 13 Apr 2018 17:15:04 +0200 Message-Id: <20180413151505.32663-3-johan@kernel.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180413151505.32663-1-johan@kernel.org> References: <20180413151505.32663-1-johan@kernel.org> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Set the new HCD flag which prevents USB core from trying to manage our phys. This is needed to be able to associate the controller platform device with the glue device device-tree node on the BBB which uses legacy USB phys. Otherwise, the generic phy lookup in usb_phy_roothub_init() and thus HCD registration fails repeatedly with -EPROBE_DEFER (see commit 178a0bce05cb ("usb: core: hcd: integrate the PHY wrapper into the HCD core")). Note that a related phy-lookup issue was recently worked around in the phy core by commit b7563e2796f8 ("phy: work around 'phys' references to usb-nop-xceiv devices"). Something similar may now be needed for other USB phys, and in particular if we eventually want to let USB core manage musb generic phys. Cc: Arnd Bergmann Cc: Martin Blumenstingl Signed-off-by: Johan Hovold --- drivers/usb/musb/musb_host.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 3a8451a15f7f..4fa372c845e1 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -2754,6 +2754,7 @@ int musb_host_setup(struct musb *musb, int power_budget) hcd->self.otg_port = 1; musb->xceiv->otg->host = &hcd->self; hcd->power_budget = 2 * (power_budget ? : 250); + hcd->skip_phy_initialization = 1; ret = usb_add_hcd(hcd, 0, 0); if (ret < 0)