From patchwork Wed May 5 08:41:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 1474181 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=UpnzVl4a; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FZqvl1kGJz9sRR for ; Wed, 5 May 2021 18:42:09 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2D43082B1F; Wed, 5 May 2021 10:41:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="UpnzVl4a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E22B282CB8; Wed, 5 May 2021 10:41:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 22DA382AAF for ; Wed, 5 May 2021 10:41:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=narmstrong@baylibre.com Received: by mail-wm1-x32e.google.com with SMTP id t11-20020a05600c198bb02901476e13296aso637602wmq.0 for ; Wed, 05 May 2021 01:41:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MSBZFLrkO4bRgaq/RwJ1ZGVkf0QEoOwjCn5y1DIy6Kk=; b=UpnzVl4aZTYYsOdN976CT7NVzQzNDWjPd1jgTTWVhsbc6jD8JD704C1g/7h2BxL98e t1+o8iODm2BKtM57k+Kr5gEd0lnrbRHxKWJZ31LPInBIRRgyOvxnNac8Cl8rd6y7v1zy WseOJeIhOCyAS+Un7zOKkE5PdVtIVcBVi//vXOWxSD/NA4JR2h5ykrIeKQ5avmYEU76F OoVCd1iyY+QMydXtMZX3xUWWbt0b6VpWHxD4TmiRxelMYFh2mG6v9CDeKx6GDW+hzBAG cqmRT1n254PQI46Q6Ynpg8Yc4SdhXT0jcdMYRQXwTKujpH8thCYmvhjSjGyMbYiqtT1/ wTyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MSBZFLrkO4bRgaq/RwJ1ZGVkf0QEoOwjCn5y1DIy6Kk=; b=dDGMYRgKyPkwcnj275p5K6HZlucj1BXBnempuvzmH1Fan3fxBntgsIV/scfuKL8lxH RVDcj/9CfdLtyAflJSJMy8xV6KfPo/zG1HWXzn99iNSRqNvceGDZAl924XCbAooxL0x2 /ptooyMWHxbvkRe8WRqh2J2euXh5byf/+RaqclFOAmLwV6/AcRXyc4ACvxJWtU9NAzVx E49OTh5QymGW4+bo677MpS/sPPusHJVGz5pDxNLfeCz46LYEaaarFzzIEGT1pPwnEMYr s00SYMt/CsyRN6cWYT9zMKlK8c4dn326rkAJ6U7kMQgqmMVPXqfWGQiRBlbZK7obeVUA sFqg== X-Gm-Message-State: AOAM5324HAgEFYvInapInZTDlLP/bybgFW2/oxgcZueFshq/bONfCj+r T14H7+oYnCFcHDWnuBZT7h11Aw== X-Google-Smtp-Source: ABdhPJxNA3WhMAkaVV64CaFVjtRFB9o9FI5EzJbZttRtYovf9fbOfwfRT1bAQGGL5osz411Owo3IPA== X-Received: by 2002:a1c:9842:: with SMTP id a63mr8612991wme.125.1620204113543; Wed, 05 May 2021 01:41:53 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:6eb3:66ab:cb1e:ef0]) by smtp.gmail.com with ESMTPSA id m16sm8697502wru.68.2021.05.05.01.41.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 01:41:52 -0700 (PDT) From: Neil Armstrong To: marex@denx.de Cc: u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong Subject: [PATCH] usb: dwc3-meson-g12a: skip phy on -ENODATA aswell Date: Wed, 5 May 2021 10:41:50 +0200 Message-Id: <20210505084150.3862010-1-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean If the PHY isn't specified in the DT, -ENODATA means it should be skipped, handle it like -ENOENT. With that, devices without USB3 supported can have USB working (Odroid-HC4). Fixes: adb049abf7 ("usb: dwc3: Add Meson G12A USB Glue") Signed-off-by: Neil Armstrong --- drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index bd8bf227c8..90418ddc1d 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -298,7 +298,7 @@ static int dwc3_meson_g12a_get_phys(struct dwc3_meson_g12a *priv) for (i = 0 ; i < PHY_COUNT ; ++i) { ret = generic_phy_get_by_name(priv->dev, phy_names[i], &priv->phys[i]); - if (ret == -ENOENT) + if (ret == -ENOENT || ret == -ENODATA) continue; if (ret)