From patchwork Thu Jun 20 07:42:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805970 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp167131wrt; Thu, 20 Jun 2024 00:43:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUHh52Qb6YRLONNIBuhYnJWEYbM/Uwbzb33BHTww2BHkyTCBet0P+DO9o1UO3pFarPjTguT4rtgGi3ndMDaaxsh X-Google-Smtp-Source: AGHT+IFE5XBrKPHfcJfZ4B+vKwPfc+X9/x0KfJYBurnH04Gz6rcggr+SOJXUx5COlzuLUxNqFu6V X-Received: by 2002:a17:907:c80a:b0:a6f:b857:64b0 with SMTP id a640c23a62f3a-a6fb8576ae3mr151147066b.2.1718869401863; Thu, 20 Jun 2024 00:43:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718869401; cv=none; d=google.com; s=arc-20160816; b=rNp9SZQU0oTM4Ur/AaJSdJt1iTUQwT8/KbpSkwfTLZwDEBwIaR7tfCPSR0vRPp9NGp BCOO/XTCMFTURviJaOqyo1IL5LSZ/qPN3cgtxvEs8JW9HeQHI/gsNRQHyZ9576qa8mub zKY9LSMbJi+k38dujD5s81opm8y5WzXtMgztmyn48dFejVnvw3YlV2WfstzhpRDRjj3d furLCyEaJym28jcLQ70bvipPayYms86BrY/xSfv/eFQWqefV1LJsEQOvCq3Qexs1kBOo 77B8+HYJG2+uQzTtSO2/T9LKNjIZXKbG1n0jppIzQLXJXjCaHS79EfE+qnberl3UcB3C P19Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=FDDH6W1yI8NI4YqelULBhfcX0NinRTSGgqj9ke2z5fw=; fh=gOtdLnX3PRbUjvimTWiQByLfYkc68TyGNIhNQg4MgI0=; b=pC+xoyBlSdFxTnja8q3U+1an/wECntHxbG9nbEciCpmZWwVr9IYdhJn4uIsZpZ3WkA G8Ilj5UO33iBdBZ8I1c/0QVNLwMWk2loA2fxSudnlvmaSbDOEv/yqQXpHx52Uj2G+vjO yOall0yzV5M9sywIJRGb+AOX1UmF0tFnRIi+oDaPgvqUXHEi8strha5OxxTO4CZIuip1 BZLSG74Ce03A9A7Ib8qVyBBj+lJ7DYHU12CD/fjjv9SWE9uCPipbXIJp7wA4YW4TYvhM i3VzCvPVkz/p3Bn8qw2c4Dbd07G0I7TjViCK1ugTC3ZXbX/ATJQQ3iwE3XESMFwf9PiA /M8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=deooOwXW; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d4c386si679278966b.242.2024.06.20.00.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:21 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=deooOwXW; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CC1A88013; Thu, 20 Jun 2024 09:43:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="deooOwXW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6CE8D87C83; Thu, 20 Jun 2024 09:43:12 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 5CA0987F3F for ; Thu, 20 Jun 2024 09:43:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-421b9068274so6744165e9.1 for ; Thu, 20 Jun 2024 00:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718869388; x=1719474188; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=FDDH6W1yI8NI4YqelULBhfcX0NinRTSGgqj9ke2z5fw=; b=deooOwXW3TyWY/tE7L+P7AIgxGTKqLqy87+pFhBdJH/of2uErdDcqyVmAiUr5MtCBB 45gwQKYxB9KJ4s2J08XY3fVdCdZtpPUbGAMi9ZvDBhRq8x9HogSdr3VI721Suj/bx6tH QHVPv80eB+yP3Q2KqLe0vGg0hpiTHDk4+vcSvkgnrESlcJTsMNq9Kw4EzHMpnFvVCIKT rlL+ek+JIZSYSLsoO/v0hVe8VvMHkM9dtOqmU+3bpOWQHkvPSCWRRAqJSzuDpQvuI+1m fkETRqaKCZAcHD8ocmYnHV6/SHXoE69tV/gSjVfrq2DyrsfcqBA6zuzcnQTMa1gGEoV4 2ZtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718869388; x=1719474188; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FDDH6W1yI8NI4YqelULBhfcX0NinRTSGgqj9ke2z5fw=; b=TAeXItvY9+zJ7y11FvvCHwiSWtLZGFoVsVdbBgNSMg16niwZufUcC9bMVqV9JLUd2y GqFkCkm2nITy2XJglBwfB5qSrx1NBGB6g8+QeDKlm6hBSqHFqKPCGNWrUZR8wQFUjAr9 I5WzdUDxPbMj2ANjWcok8gAtI8QDCymFxQH7zYQc+sQ6IJkHsoo6OHYgOZddc1NfoKEa z1Nkq8P/+unwHL0Dfncf3n1VekWrQ2tXE3CSf1iUetQUwZs3FjHuiKAqRTOgR5Ug1atf LU/R8zq74oDW072Fqn6tKPgA2aH+MhjRnu4nhf5j6LHVcDyTwrdpxIbRwKa1MaAu8Gve Pkgw== X-Forwarded-Encrypted: i=1; AJvYcCVmu9CzmKubkKqS09JOMWAJIRQFKLKhYweViODvA1Be0XAbaFkdwIk5epFeosjS7mzE22s5Kh6eXZcd5qNBAUifoKauNw== X-Gm-Message-State: AOJu0YwAE4yDlsVHkMUKWIKdEaQTbyjsFYl/k4WtFzp8kOby2z2wpunX KkxDnvjeOZQM+CZT0uPUS2NsNLlBIL0LYo9y9ve4lYc+muaf6jj0ERTK5igQJIE= X-Received: by 2002:a05:600c:1d08:b0:422:4fcd:d4b3 with SMTP id 5b1f17b1804b1-4247529f03cmr31522135e9.37.1718869387591; Thu, 20 Jun 2024 00:43:07 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0b6402sm15506785e9.10.2024.06.20.00.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:07 -0700 (PDT) From: Neil Armstrong Date: Thu, 20 Jun 2024 09:42:50 +0200 Subject: [PATCH v2 1/5] phy: meson-gxl-usb2: add set_mode callback MIME-Version: 1.0 Message-Id: <20240620-u-boot-usb-gxl-phy-set-mode-v2-1-b81c027bc02c@linaro.org> References: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> In-Reply-To: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1877; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=IWJf0JYlcNf5Di+OmZ8xUtR2HrzmkAk7v7H7DdmZDZE=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmc92FbQJ1hDAvd8TBFcIQMBelkib766wFy9HIvJ66 nkO2eV6JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnPdhQAKCRB33NvayMhJ0doHEA C2oIVpgGSx/ONK7UhrvNkc0MegEPcaanVPO/wYSfrXrYIxhMArRqWSOtV0Vh6b2rHiy8QSkLKfZP5i /dFe2lDHrl7sT6jmNzmui4ik6Km0PgWobAA0zuTiiy7Q+4cz02yFSwrQgxp0FD23T6VB6sPU8pmQWZ 54PuJLrD3J8lg1dLp5foE21MlPM0ihC2EttLwGFacBtSAmn1HNwXYWGqq02FTcppjTZ//PaFgRhliy T98IDIBoGbUjmYqLM3a1J/3MiZDDSfcKmC5Betwni2w7NkC093I0lDpmueOlR+dhWBWEH/c9yNPmMD 0PLbk0wtyKPLh5wcCDAvCP3PdDqA5EZvMfXZd4VhPAASF0JnbdDPgacSMj1e01Qcc67VAI1C5eczJd WWCbjHL4GOQ0JtqZNS4ATZJoWt+77PDTJtUBtrRPGNyAyjo2L/C9gSxMjZL8jQPRBEl+cu/3Rf+AC4 Iclo6R7hF88dIwMmnyNlAdWZgBoIkb15uC+PsU2rt7xDc87zqXorxdN+nkTQvMxuenK2d+WnJlXujw MVOd3gSoKm+Jtk4KCtZdwJxgJoUy87WUDXVX+uCSzRi9PdrkwaWt3zSvRuPma5L4hyuhSRapp0EmFy XteXzFtZUwKcl6SqFesbwkT8GdmoUtlmMUTlT2TceA9ufCwdxUQ0RkPho8ZQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Implement set_mode callback by calling the current public function, use a temporary function name that will be removed when the public phy_meson_gxl_usb2_set_mode is finally removed in a following change. Signed-off-by: Neil Armstrong Reviewed-by: Marek Vasut --- drivers/phy/meson-gxl-usb2.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c index 92c285103c..e051e66224 100644 --- a/drivers/phy/meson-gxl-usb2.c +++ b/drivers/phy/meson-gxl-usb2.c @@ -150,6 +150,28 @@ void phy_meson_gxl_usb2_set_mode(struct phy *phy, enum usb_dr_mode mode) phy_meson_gxl_usb2_reset(priv); } +static int _phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode) +{ + if (submode) + return -EOPNOTSUPP; + + switch (mode) { + case PHY_MODE_USB_DEVICE: + phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_PERIPHERAL); + break; + + case PHY_MODE_USB_HOST: + case PHY_MODE_USB_OTG: + phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST); + break; + + default: + return -EINVAL; + } + + return 0; +} + static int phy_meson_gxl_usb2_power_on(struct phy *phy) { struct udevice *dev = phy->dev; @@ -161,7 +183,7 @@ static int phy_meson_gxl_usb2_power_on(struct phy *phy) val &= ~U2P_R0_POWER_ON_RESET; regmap_write(priv->regmap, U2P_R0, val); - phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST); + _phy_meson_gxl_usb2_set_mode(phy, PHY_MODE_USB_HOST, 0); return 0; } @@ -183,6 +205,7 @@ static int phy_meson_gxl_usb2_power_off(struct phy *phy) struct phy_ops meson_gxl_usb2_phy_ops = { .power_on = phy_meson_gxl_usb2_power_on, .power_off = phy_meson_gxl_usb2_power_off, + .set_mode = _phy_meson_gxl_usb2_set_mode, }; int meson_gxl_usb2_phy_probe(struct udevice *dev) From patchwork Thu Jun 20 07:42:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805971 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp167159wrt; Thu, 20 Jun 2024 00:43:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUbDS75lE+8unMXtSfYdu3psgJUl8bnqmrgXcTmiP7hsmIVAmPXP1oPekGOQZas+pROJDyhGvZzGhfiiWOR7hnT X-Google-Smtp-Source: AGHT+IFjsZisemozZcJ6lIdo/vx4kRBN1urJz974ScMHy8NEB6QXivnjDqjJzRZqJni+89mvmk5L X-Received: by 2002:a17:907:2d88:b0:a6f:5723:fb11 with SMTP id a640c23a62f3a-a6fab77a5c9mr332007466b.58.1718869411408; Thu, 20 Jun 2024 00:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718869411; cv=none; d=google.com; s=arc-20160816; b=a5NnbcFqN20X1+fjKIo0JkrzZl6gpnhftYcW5jwq5QRbwxzzkTsr6S3XdJ1hDMcV8O D4vkb0R/djETdPXB/T9P51GHENsJuPNXDda1V0tdrj/VVDjADnQYplyyd1/PcSQpE4zL b39MJyjdJ0km3jPAxZqz/iMi7TBXs2EsQIiX2SP0PTHLlcJp8UVtixLpzXF8CRgqtAc7 XboIQNRHm+qwV5NI10HQTPuTt1IxxGQYUqvCjoOSCA9tv9OkqR5Ic5HTK0Hr8mgRyl9G oBkMauVUWT8TdfRc4VnHMaudl7sMlYkYKO+0jo7j1EaLPRZy7QfwJ8pgGWaLekijvoKM +gRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=3s6QvRaLgBM9BVS5oof8t32fnskrrrw/ilAd8VvZ3SI=; fh=NktPinskGi40WAEH3I3w2N36lh9XpfoYUwAKkJtgcV4=; b=mHAXWE9fFau1TwZxwI+9UP7TYpoDZf/NXhXBLm0O9tChVCWY9Wtz2vpuHIYjWj9hIG Kgfwt68E6xAu8zk/cEzxC4GMkyVggDPF+9lFl3ZhrLzrmvFUCuRab77wEfTASO5It353 KnYQ+lHqVFXlGlbVhU8QcfKzgf0v0KWpmkj2pvaqnIAXt+3TZdYkhwlWLMsCEdTeSo7u lXd9hR35pUfwnlqdSVtx45W1OlI5Ll1/VZUTJTS/w1RSV9k3WwD8UQ66h3Djd6N5gOZ3 8mLm2ECf7OwgeOPDwFCymDW9ABpCKhBvdYimEVIbOMmA4Fki5Jsim4GMZNUdpVjAXDcF QuiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="l/phVd9T"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f7f38b214si391950066b.262.2024.06.20.00.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:31 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="l/phVd9T"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7935F8834D; Thu, 20 Jun 2024 09:43:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="l/phVd9T"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6FCE987F3F; Thu, 20 Jun 2024 09:43:13 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 D65778813A for ; Thu, 20 Jun 2024 09:43:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42172ed3487so4815205e9.0 for ; Thu, 20 Jun 2024 00:43:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718869388; x=1719474188; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3s6QvRaLgBM9BVS5oof8t32fnskrrrw/ilAd8VvZ3SI=; b=l/phVd9TVNwDCvyzEnsnyKbbR96gjujOI9i/huJqz8ZSRquZ2FHHWyAU1OO+8wDxIZ HO4kvxuii5brBfojtuGJYTJ+ksyN7slisylz2iCGwiK5KGZXa2S2atIHLHgpFy+ROgeJ +//xyz7BjJ/5EgSREWhKe9PbMO9ACV4GuUSIcofII98xvra2WUW/8ieo88dssK/g6GJ9 oKlQsZ7uWYPhQH+7YDHpAD87pJ5sKJEyzo7zMTZSej9T/5vq90m/R0Shbd+97ZlSDrfZ SWq1yNvVdHbTNysHmaTWN28hqr2A5TLYNz3kdQqOVdzg6qQnzMcc6thoKvZqa+/NWwkc Iabw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718869388; x=1719474188; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3s6QvRaLgBM9BVS5oof8t32fnskrrrw/ilAd8VvZ3SI=; b=qp8DivrjPQMMk/OsfUfkYh3KSLUdLOkCyNSHOk1oR85MjVlxhpR57H3LwXYx8ghH9c 3OIlcKa12Kl2CWNTkCV99SsRH4j2ipB9FG/WitGnO/h3hLkj64xDJE78OqknrVU0PdEd H4tqlehiz0v5mOFZcLH0yrtvEwB5YmbPoge07PH3E0EzEtC7J3lHH5SKgc8nFX9b7Yw6 DywSJgGexvFyo1dm+meJ109aiM0LRDIno1YRYabij6GwIL6HwH1o/m6ErQzaUw3aPHU1 9EgSjMFKSc6WrmJwGt/uNm1zfgPh8xzmpB3DYNQmcDT9CjEmM0ooJqLfbippTwxjHcER 2DwQ== X-Forwarded-Encrypted: i=1; AJvYcCVUZyFdKt4HiWI+ZvXrHbDC2Hmv+1jqZ0MgxJ50DZFnTdhQ9hc3RJDN6x7IVVBRwhbzBroE9TA6t+/Mqedx8S6q4pRUwg== X-Gm-Message-State: AOJu0YxfytDMxSq4aumOqbDPRqWRx3M+xKtVhHaf0Ywzu819dtPSjDQz LAdVzW4HswVUgsIdSyi3sKJy/y0r4PK2JAs2d/cbhJG0xH7G4Ydq1Q4jjmizSJg= X-Received: by 2002:a05:600c:21a:b0:424:7bcf:2486 with SMTP id 5b1f17b1804b1-4247bcf275emr13205085e9.4.1718869388315; Thu, 20 Jun 2024 00:43:08 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0b6402sm15506785e9.10.2024.06.20.00.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:07 -0700 (PDT) From: Neil Armstrong Date: Thu, 20 Jun 2024 09:42:51 +0200 Subject: [PATCH v2 2/5] usb: dwc3: meson-gxl: switch to generic_phy_set_mode MIME-Version: 1.0 Message-Id: <20240620-u-boot-usb-gxl-phy-set-mode-v2-2-b81c027bc02c@linaro.org> References: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> In-Reply-To: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1732; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=GTrmp7WLhG6oe7Z7C9Uhs4G6Xkk3KHyHVOiiQerYuI0=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmc92G0/IZjZzjkdX/z7K2yMmOecfZgFnq1gjztS6f FRdL47KJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnPdhgAKCRB33NvayMhJ0R3+EA ClSEndbXm5rHM4EtWNSP2BlvSa6wWxqlCA8EykuPr7CfUhBMNeYZg1juvpnQhwzz0jo7ybKZ7Cchq0 V5T+Vw775CvMZTvIZpAF/y8TOI4vvZN+iBiOvaYiRrd2DQHN/ZFSs4tXbX9Id2Gd/6wxndXGv7Cy0m 5fnNcHNaFdXqn6Qq0dopmz9ctkcip0BVvrXrLHLS9XfJd6GIIfbMBusnDPgnN9AjR0dHwBKkqXxqgp XnX/a8POCU0RhDG9X6PcO09xa6k3HukUJ4ae1jKaYrvQuGl8/zewpJaempmwL7v4uQknh54CXUPpI4 UrgZbRoTgSw7OS2VbZ4mnRbES0tGRVPs1RfeclYK4iLwVCmUzw7pufq5JB58UxCwYR3Z2b4en3fnyh V4abYxiYco/bdilnAdH8E7HspC87weXOpoknt13eDnRyJ431PVGy8iUl4l8DklZq3NEHwS1JU8jhZo ugnQ80GXXXSAlcR175OwdxgZ9ifJE7TqnIqYCrGIKUX3MyaLMsOS4C6sV4mZrhPXFR9yehH+Ngfe+j Zn0bHpDaiib9/wXHjs4HSSCxouxa7eTixYRohJtWSYMx9qJol27HwtySSPDdkGen4ZrSH2ZYBKB2Qk F/Gx+5okayF7X2dkbal4Bmkbu4jx87VvjEPRtJchuXRUd+4V2rlO29fpN3Mg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Use the PHY set_mode call instead of calling directly in the PHY shared function. Signed-off-by: Neil Armstrong Reviewed-by: Marek Vasut --- drivers/usb/dwc3/dwc3-meson-gxl.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c index 3e693c5ff3..290ac03a37 100644 --- a/drivers/usb/dwc3/dwc3-meson-gxl.c +++ b/drivers/usb/dwc3/dwc3-meson-gxl.c @@ -158,9 +158,9 @@ static int dwc3_meson_gxl_usb2_init(struct dwc3_meson_gxl *priv) if (!priv->phys[i].dev) continue; - phy_meson_gxl_usb2_set_mode(&priv->phys[i], - (i == USB2_OTG_PHY) ? USB_DR_MODE_PERIPHERAL - : USB_DR_MODE_HOST); + generic_phy_set_mode(&priv->phys[i], + (i == USB2_OTG_PHY) ? PHY_MODE_USB_DEVICE + : PHY_MODE_USB_HOST, 0); } return 0; @@ -224,7 +224,9 @@ int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) #endif priv->otg_phy_mode = mode; - phy_meson_gxl_usb2_set_mode(&priv->phys[USB2_OTG_PHY], mode); + generic_phy_set_mode(&priv->phys[USB2_OTG_PHY], + mode == USB_DR_MODE_PERIPHERAL ? PHY_MODE_USB_DEVICE + : PHY_MODE_USB_HOST, 0); dwc3_meson_gxl_usb2_set_mode(priv, mode); @@ -361,8 +363,9 @@ static int dwc3_meson_gxl_probe(struct udevice *dev) } if (priv->phys[USB2_OTG_PHY].dev) - phy_meson_gxl_usb2_set_mode(&priv->phys[USB2_OTG_PHY], - priv->otg_phy_mode); + generic_phy_set_mode(&priv->phys[USB2_OTG_PHY], + priv->otg_phy_mode == USB_DR_MODE_PERIPHERAL ? PHY_MODE_USB_DEVICE + : PHY_MODE_USB_HOST, 0); dwc3_meson_gxl_usb2_set_mode(priv, priv->otg_phy_mode); From patchwork Thu Jun 20 07:42:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805972 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp167198wrt; Thu, 20 Jun 2024 00:43:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUWwMFpAo37fy072cj3WUsnQZWseQCyXa5ORPuHhe6I9q5JYM24sEAruKeEmKeA+v0ZTyGmvyGkN3T/ZZ/5pbCE X-Google-Smtp-Source: AGHT+IFR8oQh/nW+rLVwq1dDBV1rgQASIFswIZSk7riSc8pFPsLdPAdG3nYfuCkfCJa82k7lsKgD X-Received: by 2002:a17:907:7ba8:b0:a6c:6fac:f1ff with SMTP id a640c23a62f3a-a6fab60968fmr368893366b.12.1718869421509; Thu, 20 Jun 2024 00:43:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718869421; cv=none; d=google.com; s=arc-20160816; b=cJLK85RuLEkY8DXpN95xYR3fk0qCcGVHY6y+Z4qLbuLLMVGp0As0kzoHMy1+6LvtKr keleus9KTgoghW23eM4X0H2bLyw5A/FKy+9Cxy7SlYK48tQGaEKVJRv+TVtnA0U9u8j6 j14eXGrVjkuSAADhvPEk7uyE8QGYjegKNFl67wZIvXqdKWqHWqXtunTGV4X8jzSLkf6u PPM2NrkGzmFrH3HEwTergL8tKi1Y+fifOhUjdRlO39UTjUlFA0JMMqSTTMmzHMlzqoRn w1jfS7HhVxlfTYvtvDiia/HPjidrkqkDIgdsIaht7rfQn+/0MiEDMpLaQvuseQRwuNAL b/vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=X/iQ5rHKQ6Qq2bKKIszSJByGXybAQV0e6TYGSJ5WwuU=; fh=zDdj39lSGYSMKDV0KV1zWuhv/qaGB3Y6dW4pOyGLkA8=; b=RLGoD0a0Gj0XTCS+Aorby6ZMvJZuslSHvgn1+ne4oUQnm+BnwngDX2IRHiFPPCf3dj WBCDdrOyPiy/mBkFV9DmwsvuqA7x4UKHUCS7wmKKnrebw2myRaCrUj0ekOHUarAsFqrH 5lVq03W7fI8nzLrIg+gzizwVhkIPplB7UPzPaeuXUBKloEO1XwOtVEeWgSNVVBIMyNMA EhybjvjhK6noiXqux+m5rRsPtE//t+VJ5swXcaqJcsS7fp3kvE/HmuyQrnkFyA+RHwQa ySkUZ4oOJdpyBiQJceQIUWYBq+fxrRRhQn7uVbS2F4Z3rVvRLW48W0gYoNjYvNoTfCNM 1LAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yHMKjFrr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56d21907si698926666b.139.2024.06.20.00.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:41 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yHMKjFrr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DF7D787F3F; Thu, 20 Jun 2024 09:43:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="yHMKjFrr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 510ED88013; Thu, 20 Jun 2024 09:43:14 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 E979988370 for ; Thu, 20 Jun 2024 09:43:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4217d451f69so5818625e9.0 for ; Thu, 20 Jun 2024 00:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718869389; x=1719474189; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=X/iQ5rHKQ6Qq2bKKIszSJByGXybAQV0e6TYGSJ5WwuU=; b=yHMKjFrr+3Klhu8ny9nHLMv7EJq1aBECwRSE8GH0VbcGqOn1JZw0mqq4gSy190A5U5 uSJ+2sfhoJfJfVG/P5ty4Wc5CyQyAwqA0eQiz9ypaIBFpi3SbyudYOQafPtYqgbY/xke WYRuHv+LUrPe2Xg1HKF42/3f0f3FV95sBvjQvtOHSttV2XBSEk51qaYYU2exrqBhO5Dr w/DMV160YZm/f5sXKQLrZWO4mTY7XY2qhb0LxhY3OABdId7RJC9v++0P0HNaRnP/SQqk oMjouA9+1gqoxWanfgw2+nGjzeH5aPYTL5hLdlDOxhgDHEEfUZr24syzVvsBCs+s2usa s0BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718869389; x=1719474189; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X/iQ5rHKQ6Qq2bKKIszSJByGXybAQV0e6TYGSJ5WwuU=; b=rV4PVo957jRoDg8genKFuYI9hhpVlvKE507NXTEHbRy3QVFQlszbWHvaP+tx9LIrxJ EZMbzCJqtkmZ8LCxzyE1Yb/6NJWGRC0UdG52/68Sj8WUrMDVX1TTz48PUz4oK+Hpc9Bp e3gYSfWr8Rve5PtnpnnCL9ahk3JTE1ZwXFW5iAHCzldywWCLG+iX4J7556ub1O3unhAp fSYb7fq65niOdLKoKksdecwbM6QHkyPt01BjFsQEt/7O0biYrytkFrZ2EOjp8L0wQZYj ahIcn8Uzz4Pz2m6gJppVP0Icmo3IBYcatktMmGatgnc1ZyXjdKM+PJ5RCEj2GaoV6BL+ qsAw== X-Forwarded-Encrypted: i=1; AJvYcCVesTu1tTZC0YIInpMe0t0sngFk5pE1orDdUwzs3Wir3Kq07MgbevYWLG2z18KNqNSdeSazce62dwilt5/ahcfE+FBnTw== X-Gm-Message-State: AOJu0YyTcfWaDACP2cV+tyRidoQdiEY4ddfP0R/voiYti263R8MKM7OZ 9ZWyUQ7ewH9MdZfZO7/p0cDGS3U6+2m8R6Ua6s1AhSw7jO/3eCu+fsjzuq33zGw= X-Received: by 2002:a05:600c:4a9a:b0:422:720a:1be9 with SMTP id 5b1f17b1804b1-4247517f131mr34503125e9.20.1718869389066; Thu, 20 Jun 2024 00:43:09 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0b6402sm15506785e9.10.2024.06.20.00.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:08 -0700 (PDT) From: Neil Armstrong Date: Thu, 20 Jun 2024 09:42:52 +0200 Subject: [PATCH v2 3/5] phy: meson-gxl-usb2: remove phy_meson_gxl_usb2_set_mode MIME-Version: 1.0 Message-Id: <20240620-u-boot-usb-gxl-phy-set-mode-v2-3-b81c027bc02c@linaro.org> References: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> In-Reply-To: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3507; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=3hRKRk6rCcuBEMaskR4Fabd3ekP9rmERjxPgzCepr+I=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmc92GUd8gu/sa0iYjRPPVS5Ey43bKMiVGhhiH9hDp L05y3HqJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnPdhgAKCRB33NvayMhJ0XkXEA CL+GL4Vku+xMyV4xavRt4+2oiJZ9JmsvNgMkMt0nwjw35d+116gnjYX33hyT6XsMAYqnPY9JY0pRgL 4h+/0jPcsHVzos3sCf8jU6Pn5Wm74TdlkBVKT/E0fZOnaKN1VVOn7wDrObkZCrLoOWVmtkarRGI3hC JVbJNCdBLDEzGifCjRuRHZLSp+JzrQxKQI5W7kR+zVawMbElYHcscMhIkE4ySN+plpfY68PW0CUyb7 KrUspPk4j3FCI4YGL43r/jnsNYnJW48+emnAPVpvV+BRs4ey+3eXWcBNDJCbJmd31RDxeU943SdstZ oD7VlMCR6MlGuv6qfIIjjV9/VxDTi2YIlK/0yXPk9Hc9fKmBxy7oBN6sBUa56ZgUgvDPPBIRElYW4g PBun3XO5W0rYepiTmkfEf/YS/sUY6jgSeo778OCmxQ7ijYiGQz/7BDQeT91yO5gUHj/B8XjR52HDRS dw+NGK3iWWuMtE71b85zb2nS1e8AykLmmK5ZUt+a+V0/JTphL5ZeciqXGFDdMnhTOY5Ju3LbQobD5P QsVgBzOXdaOH2IEZPW1lfjm4wSE18EiJGwBhr27aZ6D+vOEP4utjLGFzSI00K2vlmIWwaedvyRfhRe qzRanpLNQ7v7hfJSAir+vl4wu5n3j5vdHTWEHRtWR9CmYFCCbK5gZ9vERWXw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Remove the public phy_meson_gxl_usb2_set_mode and move the implementation in the the set_mode callback. Signed-off-by: Neil Armstrong Reviewed-by: Marek Vasut --- arch/arm/include/asm/arch-meson/usb-gx.h | 3 --- drivers/phy/meson-gxl-usb2.c | 45 ++++++++++---------------------- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb-gx.h b/arch/arm/include/asm/arch-meson/usb-gx.h index 61f1809df9..966d401730 100644 --- a/arch/arm/include/asm/arch-meson/usb-gx.h +++ b/arch/arm/include/asm/arch-meson/usb-gx.h @@ -9,9 +9,6 @@ #include #include -/* TOFIX add set_mode to struct phy_ops */ -void phy_meson_gxl_usb2_set_mode(struct phy *phy, enum usb_dr_mode mode); - int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode); #endif diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c index e051e66224..140e936b47 100644 --- a/drivers/phy/meson-gxl-usb2.c +++ b/drivers/phy/meson-gxl-usb2.c @@ -19,8 +19,6 @@ #include #include -#include - #include #include @@ -121,54 +119,39 @@ static void phy_meson_gxl_usb2_reset(struct phy_meson_gxl_usb2_priv *priv) udelay(RESET_COMPLETE_TIME); } -void phy_meson_gxl_usb2_set_mode(struct phy *phy, enum usb_dr_mode mode) +static int phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode) { struct udevice *dev = phy->dev; struct phy_meson_gxl_usb2_priv *priv = dev_get_priv(dev); uint val; + if (submode) + return -EOPNOTSUPP; + regmap_read(priv->regmap, U2P_R0, &val); switch (mode) { - case USB_DR_MODE_UNKNOWN: - case USB_DR_MODE_HOST: - case USB_DR_MODE_OTG: - val |= U2P_R0_DM_PULLDOWN; - val |= U2P_R0_DP_PULLDOWN; - val &= ~U2P_R0_ID_PULLUP; - break; - - case USB_DR_MODE_PERIPHERAL: + case PHY_MODE_USB_DEVICE: val &= ~U2P_R0_DM_PULLDOWN; val &= ~U2P_R0_DP_PULLDOWN; val |= U2P_R0_ID_PULLUP; break; - } - - regmap_write(priv->regmap, U2P_R0, val); - - phy_meson_gxl_usb2_reset(priv); -} - -static int _phy_meson_gxl_usb2_set_mode(struct phy *phy, enum phy_mode mode, int submode) -{ - if (submode) - return -EOPNOTSUPP; - - switch (mode) { - case PHY_MODE_USB_DEVICE: - phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_PERIPHERAL); - break; case PHY_MODE_USB_HOST: case PHY_MODE_USB_OTG: - phy_meson_gxl_usb2_set_mode(phy, USB_DR_MODE_HOST); + val |= U2P_R0_DM_PULLDOWN; + val |= U2P_R0_DP_PULLDOWN; + val &= ~U2P_R0_ID_PULLUP; break; default: return -EINVAL; } + regmap_write(priv->regmap, U2P_R0, val); + + phy_meson_gxl_usb2_reset(priv); + return 0; } @@ -183,7 +166,7 @@ static int phy_meson_gxl_usb2_power_on(struct phy *phy) val &= ~U2P_R0_POWER_ON_RESET; regmap_write(priv->regmap, U2P_R0, val); - _phy_meson_gxl_usb2_set_mode(phy, PHY_MODE_USB_HOST, 0); + phy_meson_gxl_usb2_set_mode(phy, PHY_MODE_USB_HOST, 0); return 0; } @@ -205,7 +188,7 @@ static int phy_meson_gxl_usb2_power_off(struct phy *phy) struct phy_ops meson_gxl_usb2_phy_ops = { .power_on = phy_meson_gxl_usb2_power_on, .power_off = phy_meson_gxl_usb2_power_off, - .set_mode = _phy_meson_gxl_usb2_set_mode, + .set_mode = phy_meson_gxl_usb2_set_mode, }; int meson_gxl_usb2_phy_probe(struct udevice *dev) From patchwork Thu Jun 20 07:42:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805974 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp167253wrt; Thu, 20 Jun 2024 00:44:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU32vQPVhEl1MgH7rvQpkbil7u4YfPlCseC4DQycEjysXGLW1deQgit3i9njiAfWi0n32Sddrw4SB4E0f/LsYe0 X-Google-Smtp-Source: AGHT+IHEToa8PMxwGp6N/PKqEYe/Ak1Ub1KwqI275qBvCfN05rKDku5AMNUi2EuAB4YfMx5thHpT X-Received: by 2002:a17:906:2a04:b0:a6f:bc2:e579 with SMTP id a640c23a62f3a-a6fab61b4b1mr241387066b.30.1718869442374; Thu, 20 Jun 2024 00:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718869442; cv=none; d=google.com; s=arc-20160816; b=IejNyEy2JzPeb3ePke2fFBg4LVh0y3TpGf2s5dO50vlhdAzaml+OjeyzDLDeE/uk5G nEvD+rQrzODCc9pvq7Cj4uKfS7pobHkRWOy0hj1pNje2epsJXHFKG67q/q8AdaGk+Q8/ iOE11PWJAMbLDGLPc60vFTjbGl0tCzuCJUzBdDMkkn5uRiDRK1HNNLHoogpbX0EcBDda 7l2FivmkGikoyQlSw8QDbciyV3ouleeRF/GlP1gIqIw09D2ZhKH4oK6h+JM1sD/wZ8kM 4FlDlne2GO3cvXbo7VDBFtFGnlQmxv3tM44VxO4EhxCrsW50ETB5qYMBe/YjMRXm2gEO 2q+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=tQPN6Jt2rsPTvACxaljaQFZ6kE1AmkZWw/yLHFwcX74=; fh=BCcZA1JKZagElFMX7hYBEI7ngirGgze4Gw46TrQjADk=; b=w6Io8bO7X+MuD6TK50zZg0dpJMDLaw7R9N+KzxBj3QK5sLLleY8SgfVogf+EekIgC+ ys28iRe1wORBuPSM/GA5FfBHMfk44rB3dcmF/gMPvO402VLe/GB3RWjJqfIcpg9b0xfw UkcjMxDyorl/J3MAZZ8eLStw0HywhsKWi+chCOrXm/dRuT6kF4qqVdinvb9KH74K7D2W z6CHMS51zznSOJc2CVThTmYd/MpGxMEJDEpVtf9T/Inqg7+898LHx02Lb2oNOyecACb6 xzp2ffz/fU5ZkQ7VnNWFBVykUdYfgthbyxAzbl+DsJzVdgBiMdDRvUkZ1KbXc7Ry9Wk9 YTEg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kBOC0w4G; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56dd5dd9si695037166b.459.2024.06.20.00.44.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kBOC0w4G; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C440F88532; Thu, 20 Jun 2024 09:43:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="kBOC0w4G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E38B88126; Thu, 20 Jun 2024 09:43:15 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 4CCD9883D1 for ; Thu, 20 Jun 2024 09:43:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4217d451f69so5818655e9.0 for ; Thu, 20 Jun 2024 00:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718869390; x=1719474190; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=tQPN6Jt2rsPTvACxaljaQFZ6kE1AmkZWw/yLHFwcX74=; b=kBOC0w4G8ep84wUDlFHdHRTPeoGpQVOjSpBNPwpVmBoDblAZHqZ6RNQCj8ADJExONy vubt6zkK1BJhHs952cSAdyFB2a9VdGNoEYiTWAsnD38GLhqnhPVoXkvsWP66Hpt4Qg6G CN16JsBtiJbOQlYOsncivR20bLQdiwGEi6iWsdxCAQLFUx6TVaRnfRDkUYbca/8UIxFg QVADnZxH+3ewT34Exjgt859AbDoOgxa4EcjEiwt5MDJAMR7g8C8Kh5O/TiJGGS9tHhze Jx6Ekua7p7sMWwaxR120cNq177a+tRCX96gnpfbhH5DZlMZ/kN4lXrIFXZ8XIJb2p0VB 7peQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718869390; x=1719474190; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tQPN6Jt2rsPTvACxaljaQFZ6kE1AmkZWw/yLHFwcX74=; b=cFP8In0SEjDYPRMVPP1WmdxsdS2lZAtmFdAQ6+74ZzUjtPL8qGsaHnBtegrGP4G5q4 UpwJ8jCL7rfbWSAPD5TWqt+jaJY688USkwx9tvEV1JjrP8zghZAcJY+qcIZiCPVIe6o5 ympodleo7KJPvAk4M89zptpfp0J2TTtJKL1e6j4pHMio+KxAMpmGXITFODnlj5/KnQFQ TyBOQZ7xHBX2flkto5Yf440a7fvFZcc/uXUFNpi8itN18mi1HSqqIBzqKKT9PPxjVUgZ 9Umh1fIy9zinuI+PNm2qVQ1ab9N1Ua7CddLT8VbVi4hmoYJUBtu4fofx+KepLR3KXvfx nnAw== X-Forwarded-Encrypted: i=1; AJvYcCUbbdXk2o3yxbhf4fIY2CaFGlRLyNmtFUr3u49+uV3S3jeZRzBJ1Z/PcswvDgMzShfx/0bTq/7sD3tG0C90Nuyil63naA== X-Gm-Message-State: AOJu0YxMI2+vp4orhOPh+yw3LP+IL/opD5zRvvyUj7XV7YfE/13cyG7q u2hPDvqPZZrckM4UrA3SNmpGDqUxl0JeavQ0lU/qzMeL1auAGaG1syBFWpFD3ZQ= X-Received: by 2002:a05:600c:3587:b0:422:6e65:a4cb with SMTP id 5b1f17b1804b1-4247507865fmr35879575e9.3.1718869389791; Thu, 20 Jun 2024 00:43:09 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0b6402sm15506785e9.10.2024.06.20.00.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:09 -0700 (PDT) From: Neil Armstrong Date: Thu, 20 Jun 2024 09:42:53 +0200 Subject: [PATCH v2 4/5] usb: dwc3: meson-gxl: drop usb-gx.h and make dwc3_meson_gxl_force_mode static MIME-Version: 1.0 Message-Id: <20240620-u-boot-usb-gxl-phy-set-mode-v2-4-b81c027bc02c@linaro.org> References: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> In-Reply-To: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1663; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=DpgZRKTgku+ys6NjVBIfERJR/6XmLyfT3EDY9DcHj8U=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmc92G07oKuFEboJj68Jjm0C/wtJ1Ag9vmYVeZWVab ZikgUkGJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnPdhgAKCRB33NvayMhJ0SKWD/ 40OV74sIDmCJCVZaSeVpyn3Fu+Qe9yUZHcb6dHbv+gJQpzuFmrrvd4hBtkGLDxvdGxm3MkzL/LyhDL tIB/V8sM3/WR9G1coYQuUJia4Mer/VVnmBt2G9Op00idR70wWU9iq03EiciG/yvoAdOCvqhBFO/526 6u3YnEnIucZtNdbWjW78MXitoTvG0/MceN3diw6ZkZHd2Iceim4ze5vusYth9lWSJ7yT7UUW5sbUyj KASISbBsXO4K/v65L1K7TqflEFi6tkx9DnTBrjk7JUD0crKJIkiCluvkqYX0BwFI/94GMaE54Y8EWe ZPWBuTM5F9yB5h57v5hGPqU7dXjT7sGTSrrgEJj2Qh1eca1tB5nov6fwgW55mXuBiQCKpvGAxUpQIx f6y1paesd5J8+xTn72HugjcX2wqij187mcohwt7xmqtgtRO2r0anxYK1ewZ50CoWPMYgqDJzob1gxp mPYiScxjpZ1TGH6Wu1yHhUvrdVF73bN4Dm9aUzG6np6KF7SE0Sloh16hn77CmRQGy2fW3L5pdF08vm 2dC5UKLtqPOWN1oe9zSM7q6rxAacGsQ9zWpGonggHc/PmbBZcLbDy1LAn6yXeX/V9cPqyKAS/zoH7r hr3u5vhw/VEEaS8P3dkONXoFIFTI0EyGZvcvKcWB++07OrscE46NP2W23Cew== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Drop this useless usb-gx.h and now make dwc3_meson_gxl_force_mode static since only used in the dwc3-meson-gxl.c file. Signed-off-by: Neil Armstrong Reviewed-by: Marek Vasut --- arch/arm/include/asm/arch-meson/usb-gx.h | 14 -------------- drivers/usb/dwc3/dwc3-meson-gxl.c | 3 +-- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb-gx.h b/arch/arm/include/asm/arch-meson/usb-gx.h deleted file mode 100644 index 966d401730..0000000000 --- a/arch/arm/include/asm/arch-meson/usb-gx.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2019 BayLibre SAS - * Author: Neil Armstrong - */ -#ifndef _ARCH_MESON_USB_GX_H_ -#define _ARCH_MESON_USB_GX_H_ - -#include -#include - -int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode); - -#endif diff --git a/drivers/usb/dwc3/dwc3-meson-gxl.c b/drivers/usb/dwc3/dwc3-meson-gxl.c index 290ac03a37..5fb9b477ad 100644 --- a/drivers/usb/dwc3/dwc3-meson-gxl.c +++ b/drivers/usb/dwc3/dwc3-meson-gxl.c @@ -26,7 +26,6 @@ #include #include #include -#include /* USB Glue Control Registers */ @@ -193,7 +192,7 @@ static int dwc3_meson_gxl_usb_init(struct dwc3_meson_gxl *priv) return 0; } -int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) +static int dwc3_meson_gxl_force_mode(struct udevice *dev, enum usb_dr_mode mode) { struct dwc3_meson_gxl *priv = dev_get_plat(dev); From patchwork Thu Jun 20 07:42:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 805973 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp167227wrt; Thu, 20 Jun 2024 00:43:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVu3nZ4Tk0gST1K89EeVT/A9pkGkmDfrSBLpmgnthkMn9H1st6YbrOq+NfUnITCJOHTmkaUEpPtNMfYJmkJJPSA X-Google-Smtp-Source: AGHT+IEmMv3dYR7lHzm4dYqkY2qsXm3vKcbGT9wCE65s1oebyJ+aSXd+2L6kYB0CL2OW6yvn2Khq X-Received: by 2002:a17:907:cbc5:b0:a6f:996f:23ea with SMTP id a640c23a62f3a-a6fa4109cdfmr315341866b.15.1718869431519; Thu, 20 Jun 2024 00:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718869431; cv=none; d=google.com; s=arc-20160816; b=DktiQcLvPIn+PmAGzPPh19NQ/UxSKDIYmoIzQJmNOCNPYS3WwCuXwvWUYCOY0lnYuB EgfgcxjAhhsK22ruWVe+xsn03bIZApuWELDpcYsU8rR6Ej62cjejFDd096x4q/pYwJo8 LHoEnK7lGTPP7aPsawJ5NVKmjjoModS/ghFOG5aLeVJKe9P7yRL8dJnoe4raIdRG+QgC zHne3nl3B5cveHUMAglnb8S+kTqzBzsfcleMgPBOZ1PP+lNVfWpV2XTwFKSKTdonknvb KaXCVpumLCw6CUMxJNqWFk1EHnBCQsuqqyYnObca98hDoTtbpsWwbI0RHRJcc8EIbx1O WtKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:in-reply-to:references :message-id:content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=RTli4tgWHlPQpIu9XQZ3uNdUE/50JrdH1m+AlYJrngI=; fh=an5x1GKPNx5WRHMKi4Eqb7nVc5ScQ2G1Yx+8KMxMJpg=; b=d9hf+TM1Nd5CBnxN3Es6Xc9VXi+EUnglYTzJUPzFSoHErQU0OzAXYlY3aJT6zfwwT1 FhSaWB+Ma/vXxbxUuXHmw4aj089oe302xooggpN5cg+LuvOCSobCb8Ih7nILMG5NW9lO ZKzUb8jCCm+xJtS009q9rwHG62kO6jfc1dBx0edxFQW8ZzLtt9y6DPW8HAncMXiwN87E vHI2Z/xGqbOLUG6Adp3Y8UfZdUpAxAWfI7fYF4ucXfqajSW8kwBaBycqNHNuMgHxjLzI wdx9kM/pJxI6swuM0nIetPLjsdI+5+yyHisO16nFRwvDUck9s2C8xO3jmBWQ+kWWr8xq pKHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L7PLzVRc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56dd6e99si696313466b.487.2024.06.20.00.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:51 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L7PLzVRc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5D05887873; Thu, 20 Jun 2024 09:43:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="L7PLzVRc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 54C4387F3F; Thu, 20 Jun 2024 09:43:14 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 52595809A8 for ; Thu, 20 Jun 2024 09:43:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=neil.armstrong@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42108856c33so10329285e9.1 for ; Thu, 20 Jun 2024 00:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718869391; x=1719474191; darn=lists.denx.de; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=RTli4tgWHlPQpIu9XQZ3uNdUE/50JrdH1m+AlYJrngI=; b=L7PLzVRcB7DMKpQpTZu38+28d/bstcqZ8CfuxaEYGXRe98s8hP53bmMJletO5Z6sxL KVGUH11E4b10zleQAISlhxWswp2QrDVCZ1Qn6Fl94MC3V4UAxq3e3IX6QoRGCCP+J5m7 N5ebAt9QB7yMgFijecBYLEGHDj4popqAXg8iu75fNf4Ha8NikLUo6K1YSc+/DQ84wBV3 3UUSQGXIL8Cm8ZryLK7DNc8jO+7dQTKzuB5B6NEQTYzIp7qJZeqJn5P089z5z48uYQm0 AywYrRtWvl2oJptubQR+nLqjLaJ+G1JxAr1/DxZluc6T6MQ6l4hOFCxVIEomTH0lVgmg zg7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718869391; x=1719474191; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RTli4tgWHlPQpIu9XQZ3uNdUE/50JrdH1m+AlYJrngI=; b=GIaIWEJGU5Ato+FyaFy/xierRcxyuZF1rkwbMcu8wePLLREwZ3zCF7r+Vz9ItwZT9G y+Cflj7//btOjvOa9n3bYP8/MPDPKm3IDBPULMdUq+VbKxbc8kucv4nHCrT2VBy8JpFC NsHXOq/JFyO9qsf9PoHMIt+TL1ABTrTROTH4eKvjV9TECHTIhw+/nGxS5T+cnD5b1NMp YGJ+3lkiL9q9E6ahtepbMc3XTnKJnXWGanR1ryqjs8hsDwo227Ljqyqtd54jjYRGoB56 mGorZ10n2zop4ZH+Y+TFxRItalnOwyKDRwkGK+rG1zy4gMnNivBhhSHRi2T9vewwt1Mh HQ6Q== X-Forwarded-Encrypted: i=1; AJvYcCUgXkP1oDk+86ufDVYfCSvOmOs7p9Yyes2Hnz0qjoonMT4Ks7QWgZn4KjfClqKb2IJfyMSBSHpBlJFs6k5EdNENXwfyVg== X-Gm-Message-State: AOJu0YxqxG8Lcfk4DzFwhyMyzXmEvFWoGtOZuVMyB+XNkW2r5zUoYAtd H7pY28DmwUeFnQ7R5ljopQ4DdTHtafQGpwI3/TtlScphBNoFu58KIzjvhMf7zT0= X-Received: by 2002:a05:600c:3b28:b0:424:74e1:bc8a with SMTP id 5b1f17b1804b1-42474e1bd31mr44712415e9.4.1718869390492; Thu, 20 Jun 2024 00:43:10 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247d0b6402sm15506785e9.10.2024.06.20.00.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jun 2024 00:43:10 -0700 (PDT) From: Neil Armstrong Date: Thu, 20 Jun 2024 09:42:54 +0200 Subject: [PATCH v2 5/5] usb: dwc3: meson-g12a: drop usb.h and make dwc3_meson_g12a_force_mode static MIME-Version: 1.0 Message-Id: <20240620-u-boot-usb-gxl-phy-set-mode-v2-5-b81c027bc02c@linaro.org> References: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> In-Reply-To: <20240620-u-boot-usb-gxl-phy-set-mode-v2-0-b81c027bc02c@linaro.org> To: Tom Rini , Marek Vasut Cc: Mattijs Korpershoek , u-boot-amlogic@groups.io, u-boot@lists.denx.de, Neil Armstrong X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1436; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=PPsS7D8TEBBrAwE0wIAH2nzaqsk2E8ByOhmeHE8CZe0=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBmc92HfNlRi7QBrHfVN9m40l8RHlSxj7RxPLBLHp+k nYMdQTOJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZnPdhwAKCRB33NvayMhJ0dmXD/ 0VL4Y54gWzklgeBI4nP32u4eiXofOvQbtxpwI0eo0xQyh4bP4kr5wQi1hACNqGGyz/pwHAXEs50xoy kt62JnEQP9taPwJq5VIxsUqc+wMspggjlUNcIpFayuPXxOn2vrxCVtq/+rj4Xng3tN28B+siOxHUmE 82vf3+9CPXmIWMURcyCa0uwsYmPAcPAMr15y248FF0aFmE9b5bYNVmyT8ufMAEFh9l0mINN4p7Sdot XE+uZVjNWcKd3D7DPABAq2v2WQ78AlGq+1/qFzG0Mo8Zvfe1MnImQHvHbQ/OYBQpATRggcVktjbZZT dB+qeXq/mJuymPXYk+lCa5R6yBC598I17JfUNbgla1ngvN3XqHs7gzIVnAtC+a1iZAo59psHOApenb zWbKOOMkoLLTfrh8sbOP0vfcjnEsoKAJQAZV0jjV3MTkXJg8IAio571Pi5q8EljfpYaaHBwT6riZXW A646hu2KTGltgwDDbKWw4i/5htS03/CjhZJ99mzRWu6MRj00nhW3AfK1p+pYn/Ly+8ZOzOD2TKjEHb eIrMbGZKsV0gmeRDj6IWf+r0V5C1v/Z5b4Df+4bnaxh61X5tT6H3fqSOkgJrIFbIyxKyOWYhFdq2OB yEONSFEmGSUqgsU48bCiJrqNwUQQSAto8Rm4o6fpcCWY765TrJ+CPhNnZQbw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Drop this useless usb.h and now make dwc3_meson_g12a_force_mode static since only used in the dwc3-meson-g12a.c file. Signed-off-by: Neil Armstrong Reviewed-by: Marek Vasut --- arch/arm/include/asm/arch-meson/usb.h | 12 ------------ drivers/usb/dwc3/dwc3-meson-g12a.c | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/usb.h b/arch/arm/include/asm/arch-meson/usb.h deleted file mode 100644 index b794b5ce77..0000000000 --- a/arch/arm/include/asm/arch-meson/usb.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 BayLibre, SAS - * Author: Neil Armstrong - */ - -#ifndef __MESON_USB_H__ -#define __MESON_USB_H__ - -int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode); - -#endif /* __MESON_USB_H__ */ diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 21e4f637bb..41d15996e5 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -270,7 +270,7 @@ static int dwc3_meson_g12a_usb_init(struct dwc3_meson_g12a *priv) return 0; } -int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode) +static int dwc3_meson_g12a_force_mode(struct udevice *dev, enum usb_dr_mode mode) { struct dwc3_meson_g12a *priv = dev_get_plat(dev);