From patchwork Mon Dec 7 07:29:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 339156 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2584605jai; Sun, 6 Dec 2020 23:30:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLHNOATIE6BrJLZDX3wqnrQtruQCZ9FqcJo8bgyvRB6Hr85LhLglQOs3ZNDAWaFp8dbPDU X-Received: by 2002:a17:906:c83b:: with SMTP id dd27mr18013393ejb.356.1607326253804; Sun, 06 Dec 2020 23:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607326253; cv=none; d=google.com; s=arc-20160816; b=0n2x9CKUcJIeYgjnnPVa3ZxUmtfKdVnQfjmPwzqoiZkBqV008yle81CNULeI3nShgq n72t3ornonzYsdQfScoXRhsvtpUuthNBVssflKqWs3G+IgIorq9ctzVairchdbQMAEjn Ts1MGtVmF2sTURf21ttTtVKmMnEfrVQhthV3rKIOFlr3AIxLC8ExrGx0pGBVEI1be4cH XSnPpV5YEQNKCkxuNFqV9oHJpaz75cxVGWYV38WWBaCmxRUGCjn/6zqdIHOgcIXfurbs YvK/QutLFDGGnp4Y1Z2x93gkpUu1BwpEyT7thlZHmvDkr7GODQ6xvD1kkHqrfDplrTju tLyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=ReHrsg4zRLZ/ldZndSJEbKiFyBueDHzsfOqDV6x944w=; b=IBuOGxSP1PE6OB7njpEPjNw4THnr05sr9oYvcnMgbvsC8t0zPeDiP8ckewYscNoVc0 xVLfYUOeqoy76G3ROMDIXnBQMMkJrPcUu40e6ece9A1PJcqMJQHtDxU5arcvL4ZfQRMj QdLj9Q+k/McAwIP3m6AtBKrmBq9qZg7zjIv2bbqYEXQFq36R/rd21Qq6/P8RDb1rGuAG 7pydX77jx+XpzhY2YBN2NTbiT9vYmpLQWnKqggkFlutjYZg6ZIDRx4ro6w+Nd76CDXVA +K+jd6AsqG584ubsIrHN4gZFI+Ut63Uh/3efy4qB2aeXs2kVvbe/US9YpkqU9H/J/lk8 IKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=g0CrSE2g; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si7766605edi.14.2020.12.06.23.30.53; Sun, 06 Dec 2020 23:30:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=g0CrSE2g; spf=pass (google.com: domain of linux-samsung-soc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726102AbgLGHab (ORCPT + 4 others); Mon, 7 Dec 2020 02:30:31 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:44834 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbgLGHab (ORCPT ); Mon, 7 Dec 2020 02:30:31 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20201207072939euoutp017399c1757f40702a052effc278977298~OXqT-wYf02701127011euoutp01J for ; Mon, 7 Dec 2020 07:29:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20201207072939euoutp017399c1757f40702a052effc278977298~OXqT-wYf02701127011euoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1607326179; bh=ReHrsg4zRLZ/ldZndSJEbKiFyBueDHzsfOqDV6x944w=; h=From:To:Cc:Subject:Date:References:From; b=g0CrSE2gr1UF3scerOe4FTC1E6xdQDn0R5M3LPk54lVXSV97ozzG4aRGHeXBi1UBN EyZKrbY+GR5jrDUOOH0lvvzyusCvP3wOLdoPeqe01L65UVoMndzFh9vMVZXD1o8i/2 2VW8Jk302vOoE8DucJi718W7JTw4Uqm3kbM6op40= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20201207072939eucas1p1020ce9229e2f32b19788613c115cc7c8~OXqTve3pO2277922779eucas1p12; Mon, 7 Dec 2020 07:29:39 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 1D.A0.45488.3E9DDCF5; Mon, 7 Dec 2020 07:29:39 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20201207072939eucas1p1029a121730bbc0f3e120c607ec5e3002~OXqTXCeTa1988419884eucas1p1v; Mon, 7 Dec 2020 07:29:39 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201207072939eusmtrp1fdf06a1b5dcc11821872441acf80a6a8~OXqTWaIvA1366113661eusmtrp1J; Mon, 7 Dec 2020 07:29:39 +0000 (GMT) X-AuditID: cbfec7f5-c77ff7000000b1b0-39-5fcdd9e30531 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 78.A7.16282.2E9DDCF5; Mon, 7 Dec 2020 07:29:39 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201207072938eusmtip1fcdaef0f97e5b22e34118f49994a933d~OXqS-PrVb2615526155eusmtip14; Mon, 7 Dec 2020 07:29:38 +0000 (GMT) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH] soc: samsung: asv: don't defer early on not-supported SoCs Date: Mon, 7 Dec 2020 08:29:28 +0100 Message-Id: <20201207072928.20010-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAIsWRmVeSWpSXmKPExsWy7djP87qPb56NN3jVI22xccZ6Vovz5zew W8w4v4/JYu2Ru+wW7U9fMjuwemxa1cnm0bdlFaPH501yAcxRXDYpqTmZZalF+nYJXBktP1cz FZzhrHi2dBd7A+M39i5GTg4JAROJdY+XMXcxcnEICaxglNh4fAcThPOFUeLZ9uNQzmdGibuH OtlgWp6ubGKDSCxnlGj4fokZrmXd+aWsIFVsAoYSXW+7wDpEBFQlPrctYAcpYhbYzSix++Mc FpCEsIC3xO8Z78FsFqCiGVf3gTXzCthKTO/vglonL7F6wwGwDRIC99gldk5ZwQSRcJF4tBgk AWILS7w6vgXqJRmJ05N7WCAamhklHp5byw7h9DBKXG6awQhRZS1x59wvoBUcQDdpSqzfpQ8R dpRY9A3kOg4gm0/ixltBkDAzkDlp23RmiDCvREebEES1msSs4+vg1h68cAnqHA+J2Zuvgt0v JBArceruSpYJjHKzEHYtYGRcxSieWlqcm55abJyXWq5XnJhbXJqXrpecn7uJERjpp/8d/7qD ccWrj3qHGJk4GA8xSnAwK4nwqkmdjRfiTUmsrEotyo8vKs1JLT7EKM3BoiTOu2vrmnghgfTE ktTs1NSC1CKYLBMHp1QD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v7BWvN++dcO05zp6SUx8r23RZ0Y648o iXIv97tc/MPv/dJ7j88embL/svqMCPY0022Vcsc/FVVf6qk5Y2ST/SH2H+dhywme88L6XV1e sKxu/BD8/8PVxdydhtdbytUSQ732P2NIamYTrfp6ersl04wLsiKdG+8u4Q1IffnvY+QJjyVd DbumPs9QLrz4Rk381VfTSy/n8agrSDfv/Dg77m28EktxRqKhFnNRcSIAboN3vrgCAAA= X-CMS-MailID: 20201207072939eucas1p1029a121730bbc0f3e120c607ec5e3002 X-Msg-Generator: CA X-RootMTR: 20201207072939eucas1p1029a121730bbc0f3e120c607ec5e3002 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20201207072939eucas1p1029a121730bbc0f3e120c607ec5e3002 References: Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Check if the SoC is really supported before gathering the needed resources. This fixes endless deffered probe on some SoCs other than Exynos5422 (like Exynos5410). Signed-off-by: Marek Szyprowski --- drivers/soc/samsung/exynos-asv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/soc/samsung/exynos-asv.c b/drivers/soc/samsung/exynos-asv.c index 8abf4dfaa5c5..f653e3533f0f 100644 --- a/drivers/soc/samsung/exynos-asv.c +++ b/drivers/soc/samsung/exynos-asv.c @@ -119,11 +119,6 @@ static int exynos_asv_probe(struct platform_device *pdev) u32 product_id = 0; int ret, i; - cpu_dev = get_cpu_device(0); - ret = dev_pm_opp_get_opp_count(cpu_dev); - if (ret < 0) - return -EPROBE_DEFER; - asv = devm_kzalloc(&pdev->dev, sizeof(*asv), GFP_KERNEL); if (!asv) return -ENOMEM; @@ -144,6 +139,11 @@ static int exynos_asv_probe(struct platform_device *pdev) return -ENODEV; } + cpu_dev = get_cpu_device(0); + ret = dev_pm_opp_get_opp_count(cpu_dev); + if (ret < 0) + return -EPROBE_DEFER; + ret = of_property_read_u32(pdev->dev.of_node, "samsung,asv-bin", &asv->of_bin); if (ret < 0)