From patchwork Wed Sep 28 23:09:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1031AC32771 for ; Wed, 28 Sep 2022 23:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232938AbiI1XKa (ORCPT ); Wed, 28 Sep 2022 19:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234253AbiI1XKV (ORCPT ); Wed, 28 Sep 2022 19:10:21 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 293B3186D3 for ; Wed, 28 Sep 2022 16:10:20 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id k10so22571268lfm.4 for ; Wed, 28 Sep 2022 16:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=pGT763Ruuj1rRpQ5GP5KiZ/2Tu//UxTgarC85JTTSvY=; b=NAiVgohJYXoSq1Rk+IPUues5TnQU+fkoJ57Zj+/Ssh5abLT4TxRNQncb8tzMkqTg6N r4whax2KDu//QcbvRzMjgvtuoLhGBD3kXf0fy09Ve1CDBclW2XIQYg/2O2CZmSk20G9j RuQRbVA2QeGmLvjzGIrntZHLz05hjKoUFmbCl1HReer5hyNOxQGfHZEMW+rkRjUvGUlD tSOP4u1ZQEflDbjA9bEJ4IPckFf6PTe9bzEN3CtDGYszUGkX1Ua79mg48ECATQmvsGBk cF3WstoCQpR0SFh/ds1zAIcy5nkqhmv1U3fzbCrAoYypNj73KoGZ2BLotQIK67NvcSMl cGGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=pGT763Ruuj1rRpQ5GP5KiZ/2Tu//UxTgarC85JTTSvY=; b=DL+32eSXKsZfHQzH3ghEsqB9OWXJ8XM9ld1sXElIIO0qIxdYTYU97Pc4vzJ2u2dksr rGo/20EIwUVYRRtJLztCZqq1ITISoAJWfeSuVhDlywO1C6pRUha4pf6aQZG+BECllYg7 n9vqLi8z1u7OKFqooPs160zpa8BPPfSmtUUwoYNn92amAMhDsZNjqALDEEP88bN+ie98 1FJLZvftjB3/CEw/h25+flj7SKFZ92JRcxzH4gniJGA6BJChO6sy3o98hMwMCWzGJ4qN iRCcwdH6AsxidD8dEdyJX2MHPgIVm853N+cjg4QP/PEyvew1MzvC3m/mBQ3TgvkY5NwN NC5Q== X-Gm-Message-State: ACrzQf0b15pdhhjhBfcipUoyjywC4SocBY7hQc6cPc6I3REV2EuJu4Nr EITwmlaalOTHgJjXNW//J4u4ew== X-Google-Smtp-Source: AMsMyM6xq/f0k7XGHDfsNpgbaa6xiOL7J5ZVdWD3/ZUKaZEVqiwrO2ck2qTcgR2Po/drVeKbXX/6mA== X-Received: by 2002:a05:6512:39c3:b0:49f:dee8:c100 with SMTP id k3-20020a05651239c300b0049fdee8c100mr134986lfu.168.1664406618525; Wed, 28 Sep 2022 16:10:18 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:18 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , Johan Hovold Subject: [PATCH 03/18] phy: qcom-qmp-pcie-msm8996: clean up power-down handling Date: Thu, 29 Sep 2022 02:09:59 +0300 Message-Id: <20220928231014.455201-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Johan Hovold This driver uses v2 registers only so drop the unnecessary POWER_DOWN_CONTROL override. Note that this register is already hard-coded when powering on the PHY. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index 461f0b5d464a..a5ebd77d5905 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -91,7 +91,6 @@ enum qphy_reg_layout { QPHY_SW_RESET, QPHY_START_CTRL, QPHY_PCS_STATUS, - QPHY_PCS_POWER_DOWN_CONTROL, /* Keep last to ensure regs_layout arrays are properly initialized */ QPHY_LAYOUT_SIZE }; @@ -591,13 +590,8 @@ static int qmp_pcie_msm8996_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, + cfg->pwrdn_ctrl); return 0; } From patchwork Wed Sep 28 23:10:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610131 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC34CC6FA82 for ; Wed, 28 Sep 2022 23:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233739AbiI1XKc (ORCPT ); Wed, 28 Sep 2022 19:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233134AbiI1XKW (ORCPT ); Wed, 28 Sep 2022 19:10:22 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17BB32A95F for ; Wed, 28 Sep 2022 16:10:20 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id a8so22520584lff.13 for ; Wed, 28 Sep 2022 16:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ZjxL8JpqOHRf8ei/lLU7w0LbF8sHURWW068haj65LQI=; b=BEFT7v8K9Bg0MxWasSUH0TmrXxEmqJZsGIaW0cNQxNckfDaV754Ck1/wJOUgLBdnC+ PMP9vbdQt6bGW1WlHj94qzHSCuWFswKTinNoI3nXAmLpdeq9fwTSGNA8sRYxLX3fcFy+ o4LYs19tEl4GuC0VobovD9PZBBO7Z+mtV0R5o0NqzGs83cr+G9NNiiSb3Er0NdhMTk2p kf6U7kbKEVK9g3+FkV4xhzTGz0dPK3kz1N7Y4BPm1AjBIOGEQ3DKa04A/b513fGI8z3I JSGl49FIHTEUjkaCqXUEJWDmzB5bnVPNo+hIndzsNaocYcjEQEQIsfrHWZYx/z7KYmt+ nPXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ZjxL8JpqOHRf8ei/lLU7w0LbF8sHURWW068haj65LQI=; b=gUh1LnV0KMXOdku0dcCcNQBwCnovMfhri2ogPDb7qk17Nh5gT0QAiiQ5UWPoQFVC58 627TFLPFaLmNg8xEMjx9XAyDwvKgddpP43vSosK4y1XvSFuR5pLCsZ0Y6fq0IPNMD6uO IyFJqnTItU8lEUNiFK6iRvvAAlzi5ktyL9wALWz0jX08rZivPw8fZb/80x9/JfiX+lOL a7+rQWv+SY7sAlnrHXC3pFmeyT8oIejJf6qZ4JD2a7Lis1XfvOMg5PUP3Fq6OUl8nM5r ohiLxaJ0zpy2pgluEtJGa11054/RV44FSTtNFs9pOiQ4Kq/MfABzIjsIFCXtLFxYBLdq M4vg== X-Gm-Message-State: ACrzQf16ZGkGRqRXLIumAWQBplKCCuU1bvSE6a53INM1A4bQU5UJRXwR ko0hQNEjW5t7J6r5lpzUCbfZOQ== X-Google-Smtp-Source: AMsMyM4NdRvm4xr7ZI4GnHs6jRWy5XWglseDufrHYmKdy8F5VUdPauguGjg8r/Vm/bx/i7sgwoPHWA== X-Received: by 2002:ac2:5e3c:0:b0:49c:9cc3:a530 with SMTP id o28-20020ac25e3c000000b0049c9cc3a530mr121587lfg.486.1664406619262; Wed, 28 Sep 2022 16:10:19 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:18 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , Johan Hovold Subject: [PATCH 04/18] phy: qcom-qmp-combo: clean up power-down handling Date: Thu, 29 Sep 2022 02:10:00 +0300 Message-Id: <20220928231014.455201-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Johan Hovold Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v3) offset during power on and power off. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 9807c4d935cd..c30af34d7f65 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -121,6 +121,7 @@ static const unsigned int qmp_v3_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_SW_RESET] = 0x00, [QPHY_START_CTRL] = 0x08, [QPHY_PCS_STATUS] = 0x174, + [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = 0x0d8, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = 0x0dc, [QPHY_PCS_LFPS_RXTERM_IRQ_STATUS] = 0x170, @@ -1994,13 +1995,8 @@ static int qmp_combo_com_init(struct qmp_phy *qphy) qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03); qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET); - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) - qphy_setbits(pcs, - cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - else - qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); + qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); mutex_unlock(&qmp->phy_mutex); @@ -2153,13 +2149,8 @@ static int qmp_combo_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); } return 0; From patchwork Wed Sep 28 23:10:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610132 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E38B8C6FA99 for ; Wed, 28 Sep 2022 23:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233775AbiI1XKa (ORCPT ); Wed, 28 Sep 2022 19:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233733AbiI1XKZ (ORCPT ); Wed, 28 Sep 2022 19:10:25 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CFE03CBC2 for ; Wed, 28 Sep 2022 16:10:22 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id c7so15880492ljm.12 for ; Wed, 28 Sep 2022 16:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=MTZUhUnge8vicYCCEwsZVv1DWIlqH6ajZVbgoBJ9ax4=; b=jY+22saXJRFVs73re6xtnOYOoV3oYbPElwS2aPyVo6vabjNCElooITCRiImP1WGHzs TWbWtX518rGCbZUGNpb9YSI9H3UDNau3Fzgw38Holq3BHjyQlH45f4k6suvSoZOKyH0Q QXHZ5SoQVrX2w+nIawBzD/jjJqpeAyj52JypDBqY2RLEbetAfPlFHM1j4ku6FT/vRT5c 2jKdHgfIVCJAVBWr0cB1xAzG4D01PPzLgiSjIBplVIRxJCm++Nvjsmv4BSflfZ/v7ag2 IkC8qUJdZmcCMdZgR4FzqMSxgH/BbYVq2nHF9ZtHzRNjyLMeuAomkn6QqnlUsZYGoq2V Rc8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=MTZUhUnge8vicYCCEwsZVv1DWIlqH6ajZVbgoBJ9ax4=; b=34Ed3t6rLijSB5vHTzrKZ4bVzzA6EPt/9Bb0e2VFK+BSpxeCxuJ2u9AEVyTEfYlB7z Duw3aAIBrWIv+waFpfatCDeKRDmRXKoF6EXnlKMR+5yL0dXp2YMTeOcu2QFt5Ce7prIT urrNKA0+NSotvwPj1BhWz3LsyzSQOvkOK3GxmmFf4eW6FTv/jUdGg/kbJJ4P6GRTnTn9 qWD46PkLXRi8epRqFU8HYwgFChSBMgUQpqnCb/Azu5uMYkVVhpTInDTBFvRZM8w0ub02 EWEWMCwd51phrFDzVapiwf+1favQ63O3eYRRvdZ3IrXaa7HGpOZm2lzsx/2Y+GOrPsI7 wxag== X-Gm-Message-State: ACrzQf3e0CBEKVdCIj0X+VT530/mPnx/xy7hgBwCGFlqCIayGDF9Z91Z Z1DLXSDNtFT4XobHIwJyHjMv2Q== X-Google-Smtp-Source: AMsMyM4eLo9SMZG7WJNQQ/BByEEW0p/4U7V+U/HSaay4mmNtYgcu0xlKhKBVJCKB5ZI11ucCBMcuIg== X-Received: by 2002:a05:651c:2397:b0:26d:b451:787d with SMTP id bk23-20020a05651c239700b0026db451787dmr55384ljb.83.1664406620097; Wed, 28 Sep 2022 16:10:20 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:19 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold , Johan Hovold Subject: [PATCH 05/18] phy: qcom-qmp-ufs: clean up power-down handling Date: Thu, 29 Sep 2022 02:10:01 +0300 Message-Id: <20220928231014.455201-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Johan Hovold Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v4) offset during power on and power off. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index c08d34ad1313..738ec1e49ec6 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -89,22 +89,26 @@ enum qphy_reg_layout { static const unsigned int msm8996_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_START_CTRL] = 0x00, [QPHY_PCS_READY_STATUS] = 0x168, + [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, }; static const unsigned int sdm845_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_START_CTRL] = 0x00, [QPHY_PCS_READY_STATUS] = 0x160, + [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, }; static const unsigned int sm6115_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_START_CTRL] = 0x00, [QPHY_PCS_READY_STATUS] = 0x168, + [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, }; static const unsigned int sm8150_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_START_CTRL] = QPHY_V4_PCS_UFS_PHY_START, [QPHY_PCS_READY_STATUS] = QPHY_V4_PCS_UFS_READY_STATUS, [QPHY_SW_RESET] = QPHY_V4_PCS_UFS_SW_RESET, + [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V4_PCS_UFS_POWER_DOWN_CONTROL, }; static const struct qmp_phy_init_tbl msm8996_ufs_serdes_tbl[] = { @@ -856,13 +860,8 @@ static int qmp_ufs_com_init(struct qmp_phy *qphy) if (ret) goto err_disable_regulators; - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) - qphy_setbits(pcs, - cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - else - qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); + qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); return 0; @@ -996,13 +995,8 @@ static int qmp_ufs_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); return 0; } From patchwork Wed Sep 28 23:10:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CCC0C04A95 for ; Wed, 28 Sep 2022 23:10:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233683AbiI1XKf (ORCPT ); Wed, 28 Sep 2022 19:10:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbiI1XKZ (ORCPT ); Wed, 28 Sep 2022 19:10:25 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC7B340E2D for ; Wed, 28 Sep 2022 16:10:23 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id j24so15930269lja.4 for ; Wed, 28 Sep 2022 16:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=RzM6oG5KE0UQHyUy9DXhvNhkfU1/HJx9u02ula3G0dk=; b=Zg/jexQa/2/TUCTMu6s+YkSBISFsIoiTJYlNORWF8Vrpezv8Wzwl1U8U/AM3iO4m9J eK2L4260K6vadnRBPngwNm9z/bMq8PEwBkbH7sIY6sfWcwG6TNQmE4ylOt/U9UFIP+S5 fDUsCpGSlbaNcqRc1cBqNoJBCmOfmPd/TN9zhqjNAaOTUejOtrolgWlahtcyUkuQw91Q SB3vYN4yOr6EXpR3MJdWp3hK/IeoFYxekfqW6F4/31v6UKTH57/FKd7s1Xyl608+Xelb zSX1eDa/VydSPvTUkxEXIkDBoNBzm0JmbWTyBn94Nr5X6UyOkbWxVtjWW+Ze31dCwVwD 5e/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=RzM6oG5KE0UQHyUy9DXhvNhkfU1/HJx9u02ula3G0dk=; b=VNq0GhoPbw7zWYyiZe8hj+NMzb7fa8D4haanBH4XqEaucIf96UsQKvkltgEcwBtbBD Hv7/d6cEHpqwK0UTW0IjxzIDunP4GcZNivTFpyO15bOrvRFEnWMwsBAqO69uZnZzc3Cb hE8heG6uZOfppvo+LsJQxtXzNISTyElA5LfxrfnE2VASpuH3BA9n6F+nC7QTBlxi82Ed GliY71TKMd5YpCGq2T9utth1Y/1bJDlqbjvLejcABtMMnArttu7/ujal3eZLnHkmpmSY 6QeoYczRNZy6M7gwL/74/ZHpbXTFzGdtWh5kZfhH/aPT2QKAdvF2E5/uA705OJZP8YM7 qeQg== X-Gm-Message-State: ACrzQf0wvvSyMGWzz+6UU/UjQGoAEzn3oicHb+f0igRj+cBGJLbdh4eQ LB0nl81HCLSzVrRLOIrScxtxiw== X-Google-Smtp-Source: AMsMyM4z50TVRzfN3Fp7111dX49lquGVhigTtPSJZDmAPonJ47iUSFuUFv/CXfWYzG2gpfFujhSBfA== X-Received: by 2002:a2e:a54c:0:b0:26c:50c6:75c1 with SMTP id e12-20020a2ea54c000000b0026c50c675c1mr57651ljn.408.1664406622241; Wed, 28 Sep 2022 16:10:22 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:21 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold Subject: [PATCH 08/18] phy: qcom-qmp-pcie: rename regs layout arrays Date: Thu, 29 Sep 2022 02:10:04 +0300 Message-Id: <20220928231014.455201-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Rename regs layouts to follow the QMP PHY version. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 35 ++++++++++-------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index c68815be8d4d..688d9eb78a82 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -86,21 +86,14 @@ enum qphy_reg_layout { QPHY_LAYOUT_SIZE }; -static const unsigned int ipq_pciephy_gen3_regs_layout[QPHY_LAYOUT_SIZE] = { - [QPHY_SW_RESET] = QPHY_V4_PCS_SW_RESET, - [QPHY_START_CTRL] = QPHY_V4_PCS_START_CONTROL, - [QPHY_PCS_STATUS] = QPHY_V4_PCS_PCS_STATUS1, - [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V4_PCS_POWER_DOWN_CONTROL, -}; - -static const unsigned int pciephy_regs_layout[QPHY_LAYOUT_SIZE] = { +static const unsigned int pciephy_v2_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_SW_RESET] = QPHY_V2_PCS_SW_RESET, [QPHY_START_CTRL] = QPHY_V2_PCS_START_CONTROL, [QPHY_PCS_STATUS] = QPHY_V2_PCS_PCI_PCS_STATUS, [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V2_PCS_POWER_DOWN_CONTROL, }; -static const unsigned int sdm845_qmp_pciephy_regs_layout[QPHY_LAYOUT_SIZE] = { +static const unsigned int pciephy_v3_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_SW_RESET] = QPHY_V3_PCS_SW_RESET, [QPHY_START_CTRL] = QPHY_V3_PCS_START_CONTROL, [QPHY_PCS_STATUS] = QPHY_V3_PCS_PCS_STATUS, @@ -114,7 +107,7 @@ static const unsigned int sdm845_qhp_pciephy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, }; -static const unsigned int sm8250_pcie_regs_layout[QPHY_LAYOUT_SIZE] = { +static const unsigned int pciephy_v4_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_SW_RESET] = QPHY_V4_PCS_SW_RESET, [QPHY_START_CTRL] = QPHY_V4_PCS_START_CONTROL, [QPHY_PCS_STATUS] = QPHY_V4_PCS_PCS_STATUS1, @@ -1467,7 +1460,7 @@ static const struct qmp_phy_cfg ipq8074_pciephy_cfg = { .num_resets = ARRAY_SIZE(ipq8074_pciephy_reset_l), .vreg_list = NULL, .num_vregs = 0, - .regs = pciephy_regs_layout, + .regs = pciephy_v2_regs_layout, .start_ctrl = SERDES_START | PCS_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1495,7 +1488,7 @@ static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = { .num_resets = ARRAY_SIZE(ipq8074_pciephy_reset_l), .vreg_list = NULL, .num_vregs = 0, - .regs = ipq_pciephy_gen3_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = SERDES_START | PCS_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1526,7 +1519,7 @@ static const struct qmp_phy_cfg ipq6018_pciephy_cfg = { .num_resets = ARRAY_SIZE(ipq8074_pciephy_reset_l), .vreg_list = NULL, .num_vregs = 0, - .regs = ipq_pciephy_gen3_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = SERDES_START | PCS_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1555,7 +1548,7 @@ static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = { .num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sdm845_qmp_pciephy_regs_layout, + .regs = pciephy_v3_regs_layout, .start_ctrl = PCS_START | SERDES_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1621,7 +1614,7 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = { .num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8250_pcie_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = PCS_START | SERDES_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1659,7 +1652,7 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = { .num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8250_pcie_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = PCS_START | SERDES_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1687,7 +1680,7 @@ static const struct qmp_phy_cfg msm8998_pciephy_cfg = { .num_resets = ARRAY_SIZE(ipq8074_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = pciephy_regs_layout, + .regs = pciephy_v3_regs_layout, .start_ctrl = SERDES_START | PCS_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1713,7 +1706,7 @@ static const struct qmp_phy_cfg sc8180x_pciephy_cfg = { .num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8250_pcie_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = PCS_START | SERDES_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1742,7 +1735,7 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = { .num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8250_pcie_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = PCS_START | SERDES_START, .pwrdn_ctrl = SW_PWRDN, @@ -1772,7 +1765,7 @@ static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = { .num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8250_pcie_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = SERDES_START | PCS_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, @@ -1802,7 +1795,7 @@ static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = { .num_resets = ARRAY_SIZE(sdm845_pciephy_reset_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8250_pcie_regs_layout, + .regs = pciephy_v4_regs_layout, .start_ctrl = SERDES_START | PCS_START, .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, From patchwork Wed Sep 28 23:10:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70F38C32771 for ; Wed, 28 Sep 2022 23:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232511AbiI1XKi (ORCPT ); Wed, 28 Sep 2022 19:10:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233894AbiI1XK1 (ORCPT ); Wed, 28 Sep 2022 19:10:27 -0400 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D55B3E744 for ; Wed, 28 Sep 2022 16:10:26 -0700 (PDT) Received: by mail-lj1-x234.google.com with SMTP id g20so15915533ljg.7 for ; Wed, 28 Sep 2022 16:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ToJBL2tH33Cym3hzvn/YFz4wd+xYafmsyQurLLHni98=; b=L/Ch/vGH1j3bvLAnF8YiWz+8Pk4tQNjqUbA/6VJ0PEO/Xz0mvh+f+B+AQ9DUYi2pk3 4rxzoBQvLPDmPOjOq4TPjigOwR+8E4ZS1eradRfVqRgQkn39PXt9/Mx1BMR4CPf883Yg N50ZixhVqIKte6tNbhYxIw8mR+i+FF1ljTGD8AgLDQOfJCax5G33INHQaNgge6fLqot3 kx6J/EMdIRCK1lahNkF22VaNrDtWHkDbsEoy0f6w0yAQbvDtv5q7aB6bsAIYZVy0V0xO JlXuRorrjXhGkVJqmZ7J/5eWFaLD0DFKzaXfexTI3nBFV7StzC501QzeIf3YUZSNtyBi areg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ToJBL2tH33Cym3hzvn/YFz4wd+xYafmsyQurLLHni98=; b=oaBUCwPSSqUoaoMWKnroh+CkKNiksaxN9vBEtapT6XXRphZXW066E3Aw5bxd9QOcgC coCTbIkXqSNsNTy7DTw51KxvslREK2SAyHOkvBru+CN8mWzB3eo+KimQFxEp0zuTploq +bDrZ9fFUJiu7Gz+YCCURiLzzY+W82nC+BCTHuzBgfaA3qaCsSe/vzkOQj7tFQhV0wEl 9/WO+Ha4oOH7sZoRpyZtmj57Ez0fRxrvsqx0hQSc4W0gL0rNGv0vcir3UYsObCIYnA2J nrTc2lEoVSmRsNgJ7Yg3B6Vu3LakGMa1xVk1wQ0ZzBOf9y1du+p8UH7yf1/OKwBs0J3K ov+Q== X-Gm-Message-State: ACrzQf2acF8nOJJO5OVssFr2/eSiyZetKDVeCK+tLjpa3wJMfqo+qKHu CA8BScTpl4D0AY0n1FtIAocnJA== X-Google-Smtp-Source: AMsMyM4uU2xRw9njee6LWaEasFm5fJJLjPBwobjLOZjMWNaywWcrnz9fH90E/FKLJFpsvBX7LLCarg== X-Received: by 2002:a2e:3a19:0:b0:26a:a3b3:3430 with SMTP id h25-20020a2e3a19000000b0026aa3b33430mr53355lja.247.1664406624403; Wed, 28 Sep 2022 16:10:24 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:24 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold Subject: [PATCH 11/18] phy: qcom-qmp-ufs: rename regs layout arrays Date: Thu, 29 Sep 2022 02:10:07 +0300 Message-Id: <20220928231014.455201-12-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Rename regs layouts to follow the QMP PHY version. Signed-off-by: Dmitry Baryshkov --- .../phy/qualcomm/phy-qcom-qmp-pcs-ufs-v5.h | 4 +++ drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 31 ++++++++++--------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v5.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v5.h index bcca23493b7e..43255e8bf038 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v5.h +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-ufs-v5.h @@ -8,6 +8,9 @@ #define QCOM_PHY_QMP_PCS_UFS_V5_H_ /* Only for QMP V5 PHY - UFS PCS registers */ +#define QPHY_V5_PCS_UFS_PHY_START 0x000 +#define QPHY_V5_PCS_UFS_POWER_DOWN_CONTROL 0x004 +#define QPHY_V5_PCS_UFS_SW_RESET 0x008 #define QPHY_V5_PCS_UFS_TIMER_20US_CORECLK_STEPS_MSB 0x00c #define QPHY_V5_PCS_UFS_TIMER_20US_CORECLK_STEPS_LSB 0x010 #define QPHY_V5_PCS_UFS_PLL_CNTL 0x02c @@ -21,6 +24,7 @@ #define QPHY_V5_PCS_UFS_RX_SIGDET_CTRL2 0x158 #define QPHY_V5_PCS_UFS_TX_PWM_GEAR_BAND 0x160 #define QPHY_V5_PCS_UFS_TX_HS_GEAR_BAND 0x168 +#define QPHY_V5_PCS_UFS_READY_STATUS 0x180 #define QPHY_V5_PCS_UFS_TX_MID_TERM_CTRL1 0x1d8 #define QPHY_V5_PCS_UFS_MULTI_LANE_CTRL1 0x1e0 diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 72cae70d0507..593173167b8a 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -86,31 +86,32 @@ enum qphy_reg_layout { QPHY_LAYOUT_SIZE }; -static const unsigned int msm8996_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { +static const unsigned int ufsphy_v2_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_START_CTRL] = QPHY_V2_PCS_UFS_PHY_START, [QPHY_PCS_READY_STATUS] = QPHY_V2_PCS_UFS_READY_STATUS, [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V2_PCS_UFS_POWER_DOWN_CONTROL, }; -static const unsigned int sdm845_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { +static const unsigned int ufsphy_v3_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_START_CTRL] = QPHY_V3_PCS_UFS_PHY_START, [QPHY_PCS_READY_STATUS] = QPHY_V3_PCS_UFS_READY_STATUS, [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V3_PCS_UFS_POWER_DOWN_CONTROL, }; -static const unsigned int sm6115_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { - [QPHY_START_CTRL] = QPHY_V2_PCS_UFS_PHY_START, - [QPHY_PCS_READY_STATUS] = QPHY_V2_PCS_UFS_READY_STATUS, - [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V2_PCS_UFS_POWER_DOWN_CONTROL, -}; - -static const unsigned int sm8150_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] = { +static const unsigned int ufsphy_v4_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_START_CTRL] = QPHY_V4_PCS_UFS_PHY_START, [QPHY_PCS_READY_STATUS] = QPHY_V4_PCS_UFS_READY_STATUS, [QPHY_SW_RESET] = QPHY_V4_PCS_UFS_SW_RESET, [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V4_PCS_UFS_POWER_DOWN_CONTROL, }; +static const unsigned int ufsphy_v5_regs_layout[QPHY_LAYOUT_SIZE] = { + [QPHY_START_CTRL] = QPHY_V5_PCS_UFS_PHY_START, + [QPHY_PCS_READY_STATUS] = QPHY_V5_PCS_UFS_READY_STATUS, + [QPHY_SW_RESET] = QPHY_V5_PCS_UFS_SW_RESET, + [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V5_PCS_UFS_POWER_DOWN_CONTROL, +}; + static const struct qmp_phy_init_tbl msm8996_ufs_serdes_tbl[] = { QMP_PHY_INIT_CFG(QSERDES_COM_CMN_CONFIG, 0x0e), QMP_PHY_INIT_CFG(QSERDES_COM_SYSCLK_EN_SEL, 0xd7), @@ -677,7 +678,7 @@ static const struct qmp_phy_cfg msm8996_ufs_cfg = { .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = msm8996_ufsphy_regs_layout, + .regs = ufsphy_v2_regs_layout, .start_ctrl = SERDES_START, .pwrdn_ctrl = SW_PWRDN, @@ -701,7 +702,7 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = { .num_clks = ARRAY_SIZE(sdm845_ufs_phy_clk_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sdm845_ufsphy_regs_layout, + .regs = ufsphy_v3_regs_layout, .start_ctrl = SERDES_START, .pwrdn_ctrl = SW_PWRDN, @@ -725,7 +726,7 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = { .num_clks = ARRAY_SIZE(sdm845_ufs_phy_clk_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm6115_ufsphy_regs_layout, + .regs = ufsphy_v2_regs_layout, .start_ctrl = SERDES_START, .pwrdn_ctrl = SW_PWRDN, @@ -748,7 +749,7 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = { .num_clks = ARRAY_SIZE(sdm845_ufs_phy_clk_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8150_ufsphy_regs_layout, + .regs = ufsphy_v4_regs_layout, .start_ctrl = SERDES_START, .pwrdn_ctrl = SW_PWRDN, @@ -770,7 +771,7 @@ static const struct qmp_phy_cfg sm8350_ufsphy_cfg = { .num_clks = ARRAY_SIZE(sdm845_ufs_phy_clk_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8150_ufsphy_regs_layout, + .regs = ufsphy_v5_regs_layout, .start_ctrl = SERDES_START, .pwrdn_ctrl = SW_PWRDN, @@ -792,7 +793,7 @@ static const struct qmp_phy_cfg sm8450_ufsphy_cfg = { .num_clks = ARRAY_SIZE(sm8450_ufs_phy_clk_l), .vreg_list = qmp_phy_vreg_l, .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), - .regs = sm8150_ufsphy_regs_layout, + .regs = ufsphy_v5_regs_layout, .start_ctrl = SERDES_START, .pwrdn_ctrl = SW_PWRDN, From patchwork Wed Sep 28 23:10:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610128 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38C24C6FA82 for ; Wed, 28 Sep 2022 23:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233805AbiI1XKh (ORCPT ); Wed, 28 Sep 2022 19:10:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232511AbiI1XK1 (ORCPT ); Wed, 28 Sep 2022 19:10:27 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC6C447BA9 for ; Wed, 28 Sep 2022 16:10:25 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id a8so22520849lff.13 for ; Wed, 28 Sep 2022 16:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=VAKC0xhD9A/vbD1jCZpQDa2lUX76J4j0ycJCoRe8Fdo=; b=Ik72d0BFtpAjooyK1kS9/n+yLxjD/AaHJzIAVWUu5L6oNj4NmSTeVxOlUQ7MLZmNhn Kv55WADv19CSbdzt7v8jvwq72F2OR8lfP40He2kKwiuCp8Hu3cedmqz/LDESBQ5qcZz1 pz7ULYhDcqDrBj5e47tb8IQmj5x1RCPGlLjZBmli0YH0dyN1kgKvNS/7FjVvhukASPh4 Enlc6OUw7BW+f7kQ8HeqeR3JgRLWiAqN8QQlhtQfHVUf+D8z1afAc3ZljMvhTm58ONTw FsWWvK4moQcRNy7CefeSr7I6+dAMlysJJkYrkbPDCxiiqhnkd17WJkXiOhofzMOw++0n mMQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=VAKC0xhD9A/vbD1jCZpQDa2lUX76J4j0ycJCoRe8Fdo=; b=boZ1UVXagq8F3VTslK5+FV1qAKYbMbYyiQIJFVYKukzkNzVaBZpbLXPe29QucI9PuC T2YJ2ZnYknFDxfUBcU/cb29QvdSe9UJtiIue09TAMvK3JsADtOM/+Lp7CAn8MiWMuV1c 0vN+o8x8TZZT/DGAioQuaoizGgxobmhXAUivC/M/A30x0sZHdGT0xFJkL9BcJFCjJ/y+ Dfwy97YtHPZskz61SofcHJJmG/umqltHDqMk9IBkZuepwahtaHbUavSL2WH+7LJbYLtp 5hYfBYdF3yBANzkq+ISaG5FKNiSAby9ELk+yPXdzRRlGketNe3289KM476S9Uvts4RzM +vgA== X-Gm-Message-State: ACrzQf2iKFT8RQqryM4UeS84LJvE+Jv/1TrbkNe9yG6y3lG2qWRbNZ+O 35iqU1T/i8hOm4VyF4x31KrJOg== X-Google-Smtp-Source: AMsMyM4sKWjTHuMt0ScOHq9OPO5gNi7CzTFn1lD+zq9sw8hERqK2ZhFDu49ENH1U8pChutdlgeOPYg== X-Received: by 2002:a05:6512:308f:b0:49a:5a59:aa25 with SMTP id z15-20020a056512308f00b0049a5a59aa25mr118781lfd.44.1664406625151; Wed, 28 Sep 2022 16:10:25 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:24 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold Subject: [PATCH 12/18] phy: qcom-qmp-usb: remove QPHY_PCS_LFPS_RXTERM_IRQ_STATUS reg Date: Thu, 29 Sep 2022 02:10:08 +0300 Message-Id: <20220928231014.455201-13-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The QPHY_PCS_LFPS_RXTERM_IRQ_STATUS register is not used, remove it from register layout. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h | 1 + drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h index 431e9148b8d0..c7e8e2a28e6e 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v2.h @@ -28,6 +28,7 @@ #define QPHY_V2_PCS_FLL_CNT_VAL_L 0x0c8 #define QPHY_V2_PCS_FLL_CNT_VAL_H_TOL 0x0cc #define QPHY_V2_PCS_FLL_MAN_CODE 0x0d0 +#define QPHY_V2_PCS_LFPS_RXTERM_IRQ_STATUS 0x178 #define QPHY_V2_PCS_PLL_LOCK_CHK_DLY_TIME_AUXCLK_LSB 0x1a8 #define QPHY_V2_PCS_OSC_DTCT_ACTIONS 0x1ac #define QPHY_V2_PCS_RX_SIGDET_LVL 0x1d8 diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 866955a36315..43b7ad2c9479 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -56,9 +56,6 @@ /* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */ #define IRQ_CLEAR BIT(0) -/* QPHY_PCS_LFPS_RXTERM_IRQ_STATUS register bits */ -#define RCVR_DETECT BIT(0) - /* QPHY_V3_PCS_MISC_CLAMP_ENABLE register bits */ #define CLAMP_EN BIT(0) /* enables i/o clamp_n */ @@ -111,7 +108,6 @@ enum qphy_reg_layout { QPHY_PCS_STATUS, QPHY_PCS_AUTONOMOUS_MODE_CTRL, QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR, - QPHY_PCS_LFPS_RXTERM_IRQ_STATUS, QPHY_PCS_POWER_DOWN_CONTROL, /* PCS_MISC registers */ QPHY_PCS_MISC_TYPEC_CTRL, @@ -125,7 +121,6 @@ static const unsigned int usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_PCS_STATUS] = 0x17c, [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = 0x0d4, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = 0x0d8, - [QPHY_PCS_LFPS_RXTERM_IRQ_STATUS] = 0x178, [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, }; @@ -135,7 +130,6 @@ static const unsigned int qmp_v3_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_PCS_STATUS] = 0x174, [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = 0x0d8, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = 0x0dc, - [QPHY_PCS_LFPS_RXTERM_IRQ_STATUS] = 0x170, [QPHY_PCS_POWER_DOWN_CONTROL] = 0x04, }; From patchwork Wed Sep 28 23:10:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610127 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A661C32771 for ; Wed, 28 Sep 2022 23:10:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234014AbiI1XKl (ORCPT ); Wed, 28 Sep 2022 19:10:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234105AbiI1XKd (ORCPT ); Wed, 28 Sep 2022 19:10:33 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1AFC40E2D for ; Wed, 28 Sep 2022 16:10:31 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id d42so22659084lfv.0 for ; Wed, 28 Sep 2022 16:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=4WYMXtDG8vwSmmDzKjiS8Vfwi7MpTHhnmDtgJ0kUazk=; b=F5HxpY2UAf5W5atXt2Xce4Y4AKKtZMx0rU4pPfO6hexZlMcuuV6KEXM21yi2IrJhRu sJXmVgQ2+7+blb0gD+LNJMzyzuS5OrvytzeyMSY+KC7oUZEImQhXFcO22EuXUHreAhw9 fIs9Jy5YGjbT3bt+TxvDUebezE6796v7S8NkVNfG/PBYWfp/ikEfzXmqhOMFpOQMmO0H F3+gB8EOAZo40A020JPAlT9OLlOKDI+4NpZmLEK91NyERc3KV+UawLlwNPOvr50Ovnsk jH4qPIw7H9w4oVIZPYY04t+QQeKg6hU1zKQXV5awy0NhS0ff8QCVSRB067FA/ickjWMi vB+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=4WYMXtDG8vwSmmDzKjiS8Vfwi7MpTHhnmDtgJ0kUazk=; b=FFQ+bfMn2R7ShSGj7wfLNzesiZgJnrLU6ad//O2L4rsnVSWylnWEu7BqzmrGZVVFz4 hiKMecAZHKUON0O6B/FBoNcu7vwjvAOCpLcvqLRdPZOK6jzKB1mAkCg2uZpDVS7BRgOJ DO1K5vAbO+jiZyij2g3+DH6BEL5oPXzst0mS7WJE/tYxGDxAi4a/vLZiLxqJK3vkuce6 d8tZwWYi2VLWL1/9UYFHrV8WaLyHaQ4JHRHYDcQwwe3SR80wYfappOLGO4IO5sPSGcnm GfJLfYIpayNC4dY91nVzAzV1DYNrh9LCIlyLZYY3tenKR3R5No8Ks04tQS/LlwbV9zY2 dg3w== X-Gm-Message-State: ACrzQf2QTaIhOaiFveN8olqHDKZLzgVKQ8xaEgo7OTrqCVmJe5W9o3NE 6PzOGj0cmRfKJyD6kT15uzhUMQ== X-Google-Smtp-Source: AMsMyM548qJJ4CEz7gtfgNPXPo4Thxq/shXv6RNqT3q8vpLVwsWiAuaajRjAw6/aC0l1WXja9/e1cA== X-Received: by 2002:a05:6512:78e:b0:49a:d9ae:3051 with SMTP id x14-20020a056512078e00b0049ad9ae3051mr108370lfr.203.1664406627340; Wed, 28 Sep 2022 16:10:27 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:27 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold Subject: [PATCH 15/18] phy: qcom-qmp-pcie-msm8996: rework regs layout arrays Date: Thu, 29 Sep 2022 02:10:11 +0300 Message-Id: <20220928231014.455201-16-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use symbolic names for the values inside reg layout arrays. New register names are added following the PCS register layout that is used by the particular PHY. Note: ipq8074 tables appear to use a mixture of v2 and v3 registers. This might need additional fixes. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index a5ebd77d5905..9a05c9f9e5b2 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -100,9 +100,9 @@ static const unsigned int pciephy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_COM_POWER_DOWN_CONTROL] = 0x404, [QPHY_COM_START_CONTROL] = 0x408, [QPHY_COM_PCS_READY_STATUS] = 0x448, - [QPHY_SW_RESET] = 0x00, - [QPHY_START_CTRL] = 0x08, - [QPHY_PCS_STATUS] = 0x174, + [QPHY_SW_RESET] = QPHY_V2_PCS_SW_RESET, + [QPHY_START_CTRL] = QPHY_V2_PCS_START_CONTROL, + [QPHY_PCS_STATUS] = QPHY_V2_PCS_PCI_PCS_STATUS, }; static const struct qmp_phy_init_tbl msm8996_pcie_serdes_tbl[] = { From patchwork Wed Sep 28 23:10:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 610126 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42F34C04A95 for ; Wed, 28 Sep 2022 23:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234023AbiI1XKn (ORCPT ); Wed, 28 Sep 2022 19:10:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234253AbiI1XKf (ORCPT ); Wed, 28 Sep 2022 19:10:35 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2ECE4C60A for ; Wed, 28 Sep 2022 16:10:32 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id a8so22521143lff.13 for ; Wed, 28 Sep 2022 16:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=bBleQqpHTorXjkfdMp9ADhfccQLxPaCPN1KQqTkgy1s=; b=Q7HJObxn1LBEh0NWEishjQdgx9kVPgzOyR167X72itC8hBeLjFngX6q2LdZ2B1NS0F v8SjyhRTLm8S8YLtjPYSgBj4idpE7xiX1P81C/ZfBoubWFMAFvLLGqUzwYcsb3/H5FrJ oLzJ2xmcH333phHqb2DmOHgFCCA3B7jTPLWrPjs2uNzuGWRe2NMYTeZtFKxOJbyxgkZQ 99EK5xlVJOounnNlrxNGHQZ02o1PG7ulTJF3KVHI4eomoqWEWYCT9u7iPyGOUpLbLJfA kdaGXVRaTWlr/5ayGCV4n4mmVtnUny2O7WeYinxjot4O1LDPWCKPmIlv+1h/sMfz7KxD btWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=bBleQqpHTorXjkfdMp9ADhfccQLxPaCPN1KQqTkgy1s=; b=sOx+HhRL+HLttu1yrDugMh97saLOqsbry5j5yxmIyxi+LI6eM6tvVKicsTdUCgsoGe 5+gUTZmF33ZPPOOv79/o+WQi+nusYnVcYiPsHKKVvREGqQHbQiEXky/rrkjwsCdNjU7/ jEpTDVsAgjuM4Z6CBl81AVjZKsOCzeSFJ5OcTILsdOMhBBvnGojvgP1U34ZSadM0Jg7y pN1hi/UWj63EL9CZ4raCXKSRaubXs5VE0Hk6IQUCpVQh8d4HvmW9m42vuuk+tiHOEuX5 1eALZR379/h9BU/dlc09gYgS+MEcU5kth5XNoLeEYuPeRG0AWNCEzjuJptKzaDx+tUvs iWfA== X-Gm-Message-State: ACrzQf3OL6GJxGbPefklBmwq4Pty6f95Cw7fUkNkknMl0/bRGfo+mnVi SwMRS4CTir9zu7b27A66C6nLgg== X-Google-Smtp-Source: AMsMyM7J6q1FxgW51WqE1zvLRf3Qszwqpbf7aqsoKaQ6fhfMZwl4J6AfjhAJVr/y8xuL0bV59oZSxA== X-Received: by 2002:ac2:5317:0:b0:4a1:abe3:93c3 with SMTP id c23-20020ac25317000000b004a1abe393c3mr102174lfh.527.1664406632336; Wed, 28 Sep 2022 16:10:32 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id o16-20020ac24950000000b0049d5733fb3fsm597587lfi.212.2022.09.28.16.10.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 16:10:31 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I Cc: Philipp Zabel , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, Johan Hovold Subject: [PATCH 18/18] phy: qcom-qmp: move type-specific headers to particular driver Date: Thu, 29 Sep 2022 02:10:14 +0300 Message-Id: <20220928231014.455201-19-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> References: <20220928231014.455201-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Remove QMP PHY type-specific headers inclusion from the common header and move them to the specific PHY drivers to cleanup the namespaces used by different drivers. Signed-off-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 3 +++ drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 6 ++++++ drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 4 ++++ drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 3 +++ drivers/phy/qualcomm/phy-qcom-qmp.h | 14 -------------- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 7cc53765b300..924588c09a19 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -23,6 +23,9 @@ #include #include "phy-qcom-qmp.h" +#include "phy-qcom-qmp-pcs-misc-v3.h" +#include "phy-qcom-qmp-pcs-usb-v4.h" +#include "phy-qcom-qmp-pcs-usb-v5.h" /* QPHY_SW_RESET bit */ #define SW_RESET BIT(0) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 688d9eb78a82..73fd5af50c85 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -23,6 +23,12 @@ #include #include "phy-qcom-qmp.h" +#include "phy-qcom-qmp-pcs-misc-v3.h" +#include "phy-qcom-qmp-pcs-pcie-v4.h" +#include "phy-qcom-qmp-pcs-pcie-v4_20.h" +#include "phy-qcom-qmp-pcs-pcie-v5.h" +#include "phy-qcom-qmp-pcs-pcie-v5_20.h" +#include "phy-qcom-qmp-pcie-qhp.h" /* QPHY_SW_RESET bit */ #define SW_RESET BIT(0) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 593173167b8a..709b3e511bcb 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -23,6 +23,10 @@ #include #include "phy-qcom-qmp.h" +#include "phy-qcom-qmp-pcs-ufs-v2.h" +#include "phy-qcom-qmp-pcs-ufs-v3.h" +#include "phy-qcom-qmp-pcs-ufs-v4.h" +#include "phy-qcom-qmp-pcs-ufs-v5.h" /* QPHY_SW_RESET bit */ #define SW_RESET BIT(0) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 1d1cfcfd7c52..e3273afe7920 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -23,6 +23,9 @@ #include #include "phy-qcom-qmp.h" +#include "phy-qcom-qmp-pcs-misc-v3.h" +#include "phy-qcom-qmp-pcs-usb-v4.h" +#include "phy-qcom-qmp-pcs-usb-v5.h" /* QPHY_SW_RESET bit */ #define SW_RESET BIT(0) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.h b/drivers/phy/qualcomm/phy-qcom-qmp.h index e6f327acbf19..08a3eccaeadc 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.h +++ b/drivers/phy/qualcomm/phy-qcom-qmp.h @@ -24,28 +24,14 @@ #include "phy-qcom-qmp-qserdes-pll.h" #include "phy-qcom-qmp-pcs-v2.h" -#include "phy-qcom-qmp-pcs-ufs-v2.h" #include "phy-qcom-qmp-pcs-v3.h" -#include "phy-qcom-qmp-pcs-misc-v3.h" -#include "phy-qcom-qmp-pcs-ufs-v3.h" #include "phy-qcom-qmp-pcs-v4.h" -#include "phy-qcom-qmp-pcs-pcie-v4.h" -#include "phy-qcom-qmp-pcs-usb-v4.h" -#include "phy-qcom-qmp-pcs-ufs-v4.h" #include "phy-qcom-qmp-pcs-v4_20.h" -#include "phy-qcom-qmp-pcs-pcie-v4_20.h" #include "phy-qcom-qmp-pcs-v5.h" -#include "phy-qcom-qmp-pcs-pcie-v5.h" -#include "phy-qcom-qmp-pcs-usb-v5.h" -#include "phy-qcom-qmp-pcs-ufs-v5.h" - -#include "phy-qcom-qmp-pcs-pcie-v5_20.h" - -#include "phy-qcom-qmp-pcie-qhp.h" /* Only for QMP V3 & V4 PHY - DP COM registers */ #define QPHY_V3_DP_COM_PHY_MODE_CTRL 0x00