From patchwork Tue Feb 22 14:58:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12755357 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6793C433EF for ; Tue, 22 Feb 2022 15:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6L+3NE5XC7euIVfkoZ57YxpGpITpueGe3s/x4WmOeBA=; b=k8XdGlBffVnGr6 9M2OBBIN1wXlGnjzX0vXlHPheeErOaIbR9OBizsboDf5oryHioPhcJ1E6FZrZ12gGEJZ1SyoT0CYf B84MnH7es0qFFNaHIX367N23fEdA7UpFWrZRHiK36u/SQ6a0Z03J8zh8CdWzDlNtHpxpuoTn+F3KN FkwdNeBdwPNo1v7NIPQLbJ6uuxhVCTpL3ORwG6u0vz/ZokxJtDTPCIIE7dfeFbGMQE4VnghDZ/yIb nWGVmgtsjlbIVh5re1Bix83lFX+jhUglAbX6+xaqqqqB7z6igonN23u5TOIJrdMFAFQn//YokTRVA x5xm2Be/9Hao1EI4u2HA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMWim-00A3D9-Pj; Tue, 22 Feb 2022 15:04:57 +0000 Received: from smtp-relay-internal-0.canonical.com ([185.125.188.122]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMWe2-00A0CR-Uq for linux-arm-kernel@lists.infradead.org; Tue, 22 Feb 2022 15:00:05 +0000 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 597073FCAC for ; Tue, 22 Feb 2022 15:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645542000; bh=Yp6ZDVV8RuEvdp6hHMI16oZzyQVBXO+fcxhml4rBHaw=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BmwGGZY42tqEi8oBgl/bMcGAEjD1MuLLYBOcqiF10enzL4UdOAQcaQ/zCuhOOjYcB Eu0ASHadoStARDT7C1PJmxXsQP5kxEa4rMa+lfaA4sxXP972vFZl+yA4ji0sJgtVug WSzbLHyjDQZ4XFv/CLW84ov8Yt2t+4+mZQlQogtyXeWio6HXmB6kIowKrUW6w+2G5T gBWnPPFo+eC+QmaEBddWnJr4NVIZygdDulZz8S5r/9lz5DoSqWb3OiZSnavBSe13Sx zOGLiVqzXSkr2xDpkhyQ7RrQvJa+VvFEF0TSQORxT1pW9S5Fj24KWZbAQtt1zmhrY9 crDHi0951lIvA== Received: by mail-ej1-f71.google.com with SMTP id sa7-20020a170906eda700b006d1b130d65bso1937978ejb.13 for ; Tue, 22 Feb 2022 07:00:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yp6ZDVV8RuEvdp6hHMI16oZzyQVBXO+fcxhml4rBHaw=; b=goDvJjMKgBKX9gSTIQkf6npc+CKoFDnYYBpE2im/aJL9Url2L/dUomwT45ylKZwze4 GZIVaD6USaaMWsIYq0krpFwH2UD7fljXnDnvrk21UWoqcbXbwkLd3ChW02kbnIypR2Xs 4Xdt4qHGLxWNteuy1NiK2YFNNjzkJk1T9dq+1jH3tjg5QePpxgKNZU6+9+vvUrzgn2oo 2pHokKbklNn4oT5mmwIKmuUAoMvC8jhW48yVfzeJq1/9rUnPuYN/ZEcu+yD7IhAbNeW2 HUur4oGaCLa2G/IGuFz286ga4lOK1UyAHokscYftpg/sw8MfpgqTQ+vOEEeUkeJY337Y rvPQ== X-Gm-Message-State: AOAM533RpD7kKzM5D00XzqOHhePDfW0wkK0M9rBmZAEIvCg0jlNlEM6b fki01GWaek+c+2kG4BIB6BI6927DnexgGQ3uTLhikvkIds+evdb9WERxp113vAgXOum9vHVoXbm YUCRzXV5MxkldEofZ2l96grCxS7ASTsLfBgg/xSki/Tto9IPFtJwI X-Received: by 2002:a17:906:8299:b0:6cf:3847:284b with SMTP id h25-20020a170906829900b006cf3847284bmr19368271ejx.682.1645541994351; Tue, 22 Feb 2022 06:59:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+ToxX03cNeq8vGzKfuUoRQ0zvi1K010zfig8ivZ8cYm8EVedSW9bVloWqWHnEbvwuSlDU2A== X-Received: by 2002:a17:906:8299:b0:6cf:3847:284b with SMTP id h25-20020a170906829900b006cf3847284bmr19368246ejx.682.1645541994125; Tue, 22 Feb 2022 06:59:54 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-181-108.adslplus.ch. [188.155.181.108]) by smtp.gmail.com with ESMTPSA id m2sm2467960ejb.20.2022.02.22.06.59.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 06:59:53 -0800 (PST) From: Krzysztof Kozlowski To: Alim Akhtar , Avri Altman , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Wei Xu , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , "James E.J. Bottomley" , "Martin K. Petersen" , Jan Kotas , Li Wei , Stanley Chu , Yaniv Gardi , linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 09/15] scsi: ufs: deprecate 'freq-table-hz' property Date: Tue, 22 Feb 2022 15:58:48 +0100 Message-Id: <20220222145854.358646-10-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222145854.358646-1-krzysztof.kozlowski@canonical.com> References: <20220222145854.358646-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220222_070003_171678_F5800E4A X-CRM114-Status: GOOD ( 15.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 'freq-table-hz' is not correct in DT schema, because '-hz' suffix defines uint32 type, not an array. Therefore deprecate 'freq-table-hz' and use 'freq-table' instead. Signed-off-by: Krzysztof Kozlowski --- drivers/scsi/ufs/ufshcd-pltfrm.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c index 87975d1a21c8..2b192477d158 100644 --- a/drivers/scsi/ufs/ufshcd-pltfrm.c +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c @@ -47,8 +47,9 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) if (cnt <= 0) goto out; - if (!of_get_property(np, "freq-table-hz", &len)) { - dev_info(dev, "freq-table-hz property not specified\n"); + if (!of_get_property(np, "freq-table", &len) || + !of_get_property(np, "freq-table-hz", &len)) { + dev_info(dev, "freq-table property not specified\n"); goto out; } @@ -57,7 +58,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) sz = len / sizeof(*clkfreq); if (sz != 2 * cnt) { - dev_err(dev, "%s len mismatch\n", "freq-table-hz"); + dev_err(dev, "%s len mismatch\n", "freq-table"); ret = -EINVAL; goto out; } @@ -69,12 +70,16 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) goto out; } - ret = of_property_read_u32_array(np, "freq-table-hz", + ret = of_property_read_u32_array(np, "freq-table", clkfreq, sz); if (ret && (ret != -EINVAL)) { - dev_err(dev, "%s: error reading array %d\n", - "freq-table-hz", ret); - return ret; + ret = of_property_read_u32_array(np, "freq-table-hz", + clkfreq, sz); + if (ret && (ret != -EINVAL)) { + dev_err(dev, "%s: error reading array %d\n", + "freq-table", ret); + return ret; + } } for (i = 0; i < sz; i += 2) { @@ -99,7 +104,7 @@ static int ufshcd_parse_clock_info(struct ufs_hba *hba) if (!strcmp(name, "ref_clk")) clki->keep_link_active = true; - dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table-hz", + dev_dbg(dev, "%s: min %u max %u name %s\n", "freq-table", clki->min_freq, clki->max_freq, clki->name); list_add_tail(&clki->list, &hba->clk_list_head); }