Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3111563lqt; Tue, 23 Apr 2024 10:32:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1svY9LjI/V1IS5WwhrIMG8uSa8Xlzd1ae30Fcr5bcdfLBKdZzXJ2IemAIRIAYeEXp7pQ95C7DUmRTvE9OSmcd3Xu/ScpU/Fovf8aKUw== X-Google-Smtp-Source: AGHT+IHEe+8sDbwwSSMt6mMFt/T4c+pKHvSFbOrc9w6gCMyBX/cbka2yA+nL2FJye/uQ+BNaz+2Y X-Received: by 2002:a05:6a21:614:b0:1a3:6f13:b11b with SMTP id ll20-20020a056a21061400b001a36f13b11bmr175667pzb.4.1713893577609; Tue, 23 Apr 2024 10:32:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713893577; cv=pass; d=google.com; s=arc-20160816; b=QK+S4pzM8xNjPLHkpcScLrntnqAlxLwAQz4X17Cvk99G0n0fIlzqvQcSLB0ky3xNQQ qi+E/QVwBr+sZJlf4LD7iViyNe2CcoyOFvo+loeAtoh1On2IiklZ1cGWcpDuRlHaXi74 baxP0izemlvPPeAwWw6sd4iLyZDY3z+/q1gQF6mk7eaxGtPh+NV9ufPMdPWwI3ruNas5 adsR+lIqtgGkydhVVNduQYkj+M9A95BUUJM8ZXuyJpi5ZIQAyCMGmJqUPyCg+10z1EgI WmISFZD5PldJrGfwNeXEeIgky4tXjTMjloTFR2rM5Q7sUsDRfvCxdY7ADzGSJ8LMURu0 MEtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=+vUhDKXPklUQaoMg57UftZpfsFphPLc1NzgX6Dyq6FE=; fh=je4LUnCfhF0jZHpTUgOrZMfP0KObcedklun3Mu/QeYI=; b=q6YJM6y6VlOYAhvyiwQezseuAUca6Nj4t+PJfJqR2U6NrU6OH7Opj5jEurzkyjr0sQ deaUtLXsaXs0IaYd9f9zE4G1TiU7XTIUYDiKZDzB0Z18sJFyIkloXTc6ejfud7mPGMyl 5nb8oUQmdShoIh8GAOTxLQ8o4ZSPuS8zfo0TNO8wdJOvVgAwt5wAL2mXYjlPNAEoZai+ mcdWMM+ZfZdzJs9+NUOEFycgYLMCAoNNfG+hGf9OHIfKnWCnbGm1a/SAxZX23FOsA3UK lFXPBBYZCzV902lV/fATaqWExBEfJOReT94IG65jKfnvTnqyLu8TCai1w6XoUKCkkWae hJng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a2AwiqQp; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-155637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c25-20020a62e819000000b006ecf6ce1e4esi9541368pfi.230.2024.04.23.10.32.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 10:32:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a2AwiqQp; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-155637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CE555B2892A for ; Tue, 23 Apr 2024 17:09:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 400F8142E84; Tue, 23 Apr 2024 17:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a2AwiqQp" Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A74E213E881 for ; Tue, 23 Apr 2024 17:06:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713891993; cv=none; b=lvvjS52v1hZPv8Akz7AYsLnVl3HFldj3AQyHJOF1jqFwNxrse5hoDAAm0MmL/+iAV53O/kkDdC6o0xYRuYZAZdgaoUB68H8J2VIBmIbEXqarScVIl/lC4O4QhviBnxJ/QyxVcXd8XZ/e6fuu6EQmstY02w7M66yqk2tBfTjEdbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713891993; c=relaxed/simple; bh=sIOXqiDrtk7tVpNIzIRp+8xksjez3NhoyVTs37tN5UU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qbE6fFunoWa9nQSO8fLfDf5gg9oOyL43ttqsCVnLVWbRpt0iEmE4YbO6Hk49iocJXUw105Qf4UUqZiIM/LsLx+3cKmJs2XpE/EaRbuRnE+A7zqJT7orBaI7MMTV/nWiDoLCyeDc7+W3eu3w95lOTD6Vta+fceWQUkd9rCVSw5Js= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=a2AwiqQp; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-516ef30b16eso7344820e87.3 for ; Tue, 23 Apr 2024 10:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713891988; x=1714496788; darn=vger.kernel.org; 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=+vUhDKXPklUQaoMg57UftZpfsFphPLc1NzgX6Dyq6FE=; b=a2AwiqQpzn6OdcrD5e8vP5lXdNcda/0sBjh3qLshqiCsawPCRM7VoxZXfoWgdhh+hk z8nsy8fpG1veknYJ8ENz9F6SxJTMnhpX/I6KUcnYJXSZsZlBeBwl6KMblHiTbaSWpKot 5WZWa7WN5hHnbVfdwJz/69JR/2D3FAjh67qhgbqKBSPWGao/CnsBX32jGN/FgmDneqrH 2vM47ZXCHcQ1DrMnhB7fyeN3eFPeKfVg628VJNiKRtN0AThENwsf4gcWda7GQKcWzD/6 4Uio+aNZfZeK6JY7XEK9LAeJU9MXO2CCCs1/b8SeG+Ph0opYsm7N/jBh8qNiTZiFICig 5yBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713891988; x=1714496788; 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=+vUhDKXPklUQaoMg57UftZpfsFphPLc1NzgX6Dyq6FE=; b=Gys6Taky4Z23HcUzdTl4TYVbhPwRIyd0kuQ3+7TtMewUsUl8ww+lGu60gUGMluTzxk +3rEPQrgQdhWYPKoEmkLqlx9JmmVytq1JM50mmZN+XohAI9YBl937SORLbhnD9D6NJp7 C3Qa94LfahKdKYxpYWlFl3Y5LZHc34NLtomG+wP9bTRiycJhL+srp77mmnkhgEem/v8U Be49lW62BBXB9AoZeILNhMWEUaNNWhr/mCIlX3Jd/6Udzd7hKqxpG90nwrIG8jUxrwUS b0YC1oy6V2rO5sBOd9ouuZHSCC5DFXZXcMSBtEKaKTAHVxMRfKuCjI+iSzaFmZibmy5T qUww== X-Forwarded-Encrypted: i=1; AJvYcCUHCbhv9y9R2yi6W4pKuyf4Ua5Clhw1LWu2fYNA4IbupIrcxmvotF1Z60c+4MCNcAqkC3OBCQdKSIW372YY/alU8SeegyE1vce8E3Z7 X-Gm-Message-State: AOJu0YzOsS3IhElTX9DcaWjJge+QZBRwfRHoCOQYSnzcTvEHHCWEBf9q 3jSBDsOBQ7tYY45fyDzUI3x+jISIIc9gz5/lLzLqQ9G1v2ApgG1GEs3+vtErx+0= X-Received: by 2002:a05:6512:1385:b0:51b:3572:a9a1 with SMTP id fc5-20020a056512138500b0051b3572a9a1mr158584lfb.5.1713891987251; Tue, 23 Apr 2024 10:06:27 -0700 (PDT) Received: from puffmais.c.googlers.com (8.239.204.35.bc.googleusercontent.com. [35.204.239.8]) by smtp.gmail.com with ESMTPSA id t22-20020a1709063e5600b00a5209dc79c1sm7351624eji.146.2024.04.23.10.06.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 10:06:26 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 23 Apr 2024 18:06:07 +0100 Subject: [PATCH 5/7] phy: exynos5-usbdrd: uniform order of register bit macros Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240423-usb-phy-gs101-v1-5-ebdcb3ac174d@linaro.org> References: <20240423-usb-phy-gs101-v1-0-ebdcb3ac174d@linaro.org> In-Reply-To: <20240423-usb-phy-gs101-v1-0-ebdcb3ac174d@linaro.org> To: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Peter Griffin , Marek Szyprowski , Sylwester Nawrocki , Alim Akhtar , Sam Protsenko Cc: Krzysztof Kozlowski , Tudor Ambarus , Will McVicker , Roy Luo , kernel-team@android.com, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.12.4 Most of the macros are ordered high -> low, but there are some outliers. Order them all uniformly from high to low. This will allow adding additional register (field) definitions in a consistent way. While at it, also remove some extra empty lines to group register bit field definitions together with the relevant register. This makes the registers easier to distinguish visually. No functional change. Signed-off-by: André Draszik --- drivers/phy/samsung/phy-exynos5-usbdrd.c | 44 +++++++++++--------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/drivers/phy/samsung/phy-exynos5-usbdrd.c b/drivers/phy/samsung/phy-exynos5-usbdrd.c index 0f9078689856..88b03bb67fff 100644 --- a/drivers/phy/samsung/phy-exynos5-usbdrd.c +++ b/drivers/phy/samsung/phy-exynos5-usbdrd.c @@ -35,13 +35,11 @@ /* Exynos5: USB 3.0 DRD PHY registers */ #define EXYNOS5_DRD_LINKSYSTEM 0x04 - +#define LINKSYSTEM_XHCI_VERSION_CONTROL BIT(27) #define LINKSYSTEM_FLADJ_MASK (0x3f << 1) #define LINKSYSTEM_FLADJ(_x) ((_x) << 1) -#define LINKSYSTEM_XHCI_VERSION_CONTROL BIT(27) #define EXYNOS5_DRD_PHYUTMI 0x08 - #define PHYUTMI_OTGDISABLE BIT(6) #define PHYUTMI_FORCESUSPEND BIT(1) #define PHYUTMI_FORCESLEEP BIT(0) @@ -49,40 +47,31 @@ #define EXYNOS5_DRD_PHYPIPE 0x0c #define EXYNOS5_DRD_PHYCLKRST 0x10 - #define PHYCLKRST_EN_UTMISUSPEND BIT(31) - #define PHYCLKRST_SSC_REFCLKSEL_MASK (0xff << 23) #define PHYCLKRST_SSC_REFCLKSEL(_x) ((_x) << 23) - #define PHYCLKRST_SSC_RANGE_MASK (0x03 << 21) #define PHYCLKRST_SSC_RANGE(_x) ((_x) << 21) - #define PHYCLKRST_SSC_EN BIT(20) #define PHYCLKRST_REF_SSP_EN BIT(19) #define PHYCLKRST_REF_CLKDIV2 BIT(18) - #define PHYCLKRST_MPLL_MULTIPLIER_MASK (0x7f << 11) #define PHYCLKRST_MPLL_MULTIPLIER_100MHZ_REF (0x19 << 11) #define PHYCLKRST_MPLL_MULTIPLIER_50M_REF (0x32 << 11) #define PHYCLKRST_MPLL_MULTIPLIER_24MHZ_REF (0x68 << 11) #define PHYCLKRST_MPLL_MULTIPLIER_20MHZ_REF (0x7d << 11) #define PHYCLKRST_MPLL_MULTIPLIER_19200KHZ_REF (0x02 << 11) - -#define PHYCLKRST_FSEL_UTMI_MASK (0x7 << 5) #define PHYCLKRST_FSEL_PIPE_MASK (0x7 << 8) +#define PHYCLKRST_FSEL_UTMI_MASK (0x7 << 5) #define PHYCLKRST_FSEL(_x) ((_x) << 5) #define PHYCLKRST_FSEL_PAD_100MHZ (0x27 << 5) #define PHYCLKRST_FSEL_PAD_24MHZ (0x2a << 5) #define PHYCLKRST_FSEL_PAD_20MHZ (0x31 << 5) #define PHYCLKRST_FSEL_PAD_19_2MHZ (0x38 << 5) - #define PHYCLKRST_RETENABLEN BIT(4) - #define PHYCLKRST_REFCLKSEL_MASK (0x03 << 2) #define PHYCLKRST_REFCLKSEL_PAD_REFCLK (0x2 << 2) #define PHYCLKRST_REFCLKSEL_EXT_REFCLK (0x3 << 2) - #define PHYCLKRST_PORTRESET BIT(1) #define PHYCLKRST_COMMONONN BIT(0) @@ -100,30 +89,27 @@ #define PHYREG1_CR_ACK BIT(0) #define EXYNOS5_DRD_PHYPARAM0 0x1c - #define PHYPARAM0_REF_USE_PAD BIT(31) #define PHYPARAM0_REF_LOSLEVEL_MASK (0x1f << 26) #define PHYPARAM0_REF_LOSLEVEL (0x9 << 26) #define EXYNOS5_DRD_PHYPARAM1 0x20 - #define PHYPARAM1_PCS_TXDEEMPH_MASK (0x1f << 0) #define PHYPARAM1_PCS_TXDEEMPH (0x1c) #define EXYNOS5_DRD_PHYTERM 0x24 #define EXYNOS5_DRD_PHYTEST 0x28 - #define PHYTEST_POWERDOWN_SSP BIT(3) #define PHYTEST_POWERDOWN_HSP BIT(2) #define EXYNOS5_DRD_PHYADP 0x2c #define EXYNOS5_DRD_PHYUTMICLKSEL 0x30 - #define PHYUTMICLKSEL_UTMI_CLKSEL BIT(2) #define EXYNOS5_DRD_PHYRESUME 0x34 + #define EXYNOS5_DRD_LINKPORT 0x44 /* USB 3.0 DRD PHY SS Function Control Reg; accessed by CR_PORT */ @@ -147,31 +133,31 @@ /* Exynos850: USB DRD PHY registers */ #define EXYNOS850_DRD_LINKCTRL 0x04 -#define LINKCTRL_BUS_FILTER_BYPASS(_x) ((_x) << 4) #define LINKCTRL_FORCE_QACT BIT(8) +#define LINKCTRL_BUS_FILTER_BYPASS(_x) ((_x) << 4) #define EXYNOS850_DRD_CLKRST 0x20 -#define CLKRST_LINK_SW_RST BIT(0) -#define CLKRST_PORT_RST BIT(1) #define CLKRST_PHY_SW_RST BIT(3) +#define CLKRST_PORT_RST BIT(1) +#define CLKRST_LINK_SW_RST BIT(0) #define EXYNOS850_DRD_SSPPLLCTL 0x30 #define SSPPLLCTL_FSEL GENMASK(2, 0) #define EXYNOS850_DRD_UTMI 0x50 -#define UTMI_FORCE_SLEEP BIT(0) -#define UTMI_FORCE_SUSPEND BIT(1) -#define UTMI_DM_PULLDOWN BIT(2) -#define UTMI_DP_PULLDOWN BIT(3) -#define UTMI_FORCE_BVALID BIT(4) #define UTMI_FORCE_VBUSVALID BIT(5) +#define UTMI_FORCE_BVALID BIT(4) +#define UTMI_DP_PULLDOWN BIT(3) +#define UTMI_DM_PULLDOWN BIT(2) +#define UTMI_FORCE_SUSPEND BIT(1) +#define UTMI_FORCE_SLEEP BIT(0) #define EXYNOS850_DRD_HSP 0x54 -#define HSP_COMMONONN BIT(8) -#define HSP_EN_UTMISUSPEND BIT(9) -#define HSP_VBUSVLDEXT BIT(12) -#define HSP_VBUSVLDEXTSEL BIT(13) #define HSP_FSV_OUT_EN BIT(24) +#define HSP_VBUSVLDEXTSEL BIT(13) +#define HSP_VBUSVLDEXT BIT(12) +#define HSP_EN_UTMISUSPEND BIT(9) +#define HSP_COMMONONN BIT(8) #define EXYNOS850_DRD_HSP_TEST 0x5c #define HSP_TEST_SIDDQ BIT(24) -- 2.44.0.769.g3c40516874-goog