Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4451474pxb; Tue, 10 Nov 2020 17:20:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF48LRhXvyOKS7UzJ9VSOvpTTIsoL0v3NvyZXjWlexM+uc5h3o+/CUNfwidx1f2XG0fxkr X-Received: by 2002:a05:6402:150d:: with SMTP id f13mr23632918edw.119.1605057656673; Tue, 10 Nov 2020 17:20:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605057656; cv=none; d=google.com; s=arc-20160816; b=EvcnIdRYrRQK3Kw5towYupp1VnbHPq06BVRnn98/A3HGKz0z9zOXpjjdccWr1zJ97c EX27oqwQFYKCMHtNgI6cdtLQ7smcGnD8seyP4EDvJbnuh6asI1liuY3i/DngAbmFmk5a wG3kyXzKxdhTEutsgrcUTumWRjfhjlSgpLvATkO+FBjx1CmGhkTZ+60o8aw3vD7tCHeB 5nf5TMkGTwPh3793GdCiyMH3EZfst8PBSE3kQo9M/iKH+n9rt44iaaOcgCw4srm0bw8i WjSvlt+rHry0ZhGV3lgRlvs/J3JebfPbBz3j7jiBEuRHnU9qdMh9BkZE5d5BKVsbjoTy uFyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iEcxOMp1NLOMF0Qi1vlqDEHmnss3NDqpNYlgo52Rbfc=; b=K+XE00tnuMD8Lp9AbDibOakatlaXamXw6Lfkwc6Hm6+/Tbz5tOPMBvcfsdWYQoTlhE AQRZcJd4zHHMlEg8a0cpsMQPzr0ZMRTjbmkFCLlITnSrxn2wvYEPi6j0nPwAeiZ696no 1oVm3lEHMv5Q30ewA1dhYYoMRn3u5tqgCy02t4aIK/wIvjB+jjsS2eCkKf9YW9piZXpU QpkfQYqFhPOB4VTo4ifCx7YidZC7lfuay5PWyEQ7RgOvjg1bGkPEIiwVRXle7VvFm08U OFrjjleptnMHJNvIoADs8exT+gXgZJMsdopK28fjyNWGV1BWGxEinn4YVaE5Qul201/E 8Epw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UAREEgI3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si356636edv.396.2020.11.10.17.20.28; Tue, 10 Nov 2020 17:20:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=UAREEgI3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733042AbgKKBRd (ORCPT + 99 others); Tue, 10 Nov 2020 20:17:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732372AbgKKBPb (ORCPT ); Tue, 10 Nov 2020 20:15:31 -0500 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 121BBC0613D3; Tue, 10 Nov 2020 17:15:31 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id b8so762975wrn.0; Tue, 10 Nov 2020 17:15:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iEcxOMp1NLOMF0Qi1vlqDEHmnss3NDqpNYlgo52Rbfc=; b=UAREEgI3cbyJi9cBfgE72sf74JOhJ7Wdt8SYY4CxrqamEkdkUDNcJTlqWcP6q5xbjM 8ymdLZVPvsJlnqsKX+p1yazwPe2yBwr4SAza4iBJbJBOHkVio84XinYiEBN7Vq+XgwdA AY1dEDhkfvi2NCl2ImCZEFqttMpQwny1Vg4yBF01SFndKI7F4l+eviHfnXkH9XFvd0Rn nGoR59IM0nGthDtQ5FaxsBuBXmU0yfa8/UrTyoxMWqpq34VrSNJ7EqoUWuRbxgyEoW2q QYoAniol5IRPFVZb0OZzB3XpShBM5F1MPYllf3aOJ7SLhVJKwO27Hwnhz3uDIih2ZLDK s9wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iEcxOMp1NLOMF0Qi1vlqDEHmnss3NDqpNYlgo52Rbfc=; b=d6DQnOSLBI7mKVc0tiuYNiUEct0Tt7LCvYO9RZvJWwP3j9SCR9pENYuXfVcGMFp13c 2UAVJMyuZrlPwxAHItxnWVAJRoatYBjS+ITbpg+dPYkgkc/5YnzO2egKBbkkvMW2m0jj r24o4cFSQOqjR3xDNPmqbrZFc3Qr2+/chnpMDITzkf6Nrbi2yV/deZLd1PM6jSfFz09m D+b+UI79IeBOMIhQA3ZOBObybyM+Jvg1pAk6ifErJ/Yw5eQTgWiGfY9w07G2rFUXypkU YWb9Hc+Jl1wOuWBVh8zNmck0zYi9N+2GZCE+WRLwyyBNmw6awCJfDxVPGjV155Q4i/ts W1Hw== X-Gm-Message-State: AOAM533l7O/eXpQ1Ae0vY8JtW4e3zz54IpT2q6GlSTdV8yznk95ldL7x ISpfDjQ7i4l+JAEyoCQkdVI= X-Received: by 2002:a5d:4f07:: with SMTP id c7mr28079897wru.296.1605057329868; Tue, 10 Nov 2020 17:15:29 -0800 (PST) Received: from localhost.localdomain (109-252-193-159.dynamic.spd-mgts.ru. [109.252.193.159]) by smtp.gmail.com with ESMTPSA id g131sm564329wma.35.2020.11.10.17.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 17:15:29 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Georgi Djakov , Rob Herring , Michael Turquette , Stephen Boyd , Peter De Schrijver , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Mikko Perttunen , Viresh Kumar , Peter Geis , Nicolas Chauvet , Krzysztof Kozlowski Cc: linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v8 12/26] memory: tegra124-emc: Continue probing if timings are missing in device-tree Date: Wed, 11 Nov 2020 04:14:42 +0300 Message-Id: <20201111011456.7875-13-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201111011456.7875-1-digetx@gmail.com> References: <20201111011456.7875-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org EMC driver will become mandatory after turning it into interconnect provider because interconnect users, like display controller driver, will fail to probe using newer device-trees that have interconnect properties. Thus make EMC driver to probe even if timings are missing in device-tree. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124-emc.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/memory/tegra/tegra124-emc.c b/drivers/memory/tegra/tegra124-emc.c index edfbf6d6d357..8fb8c1af25c9 100644 --- a/drivers/memory/tegra/tegra124-emc.c +++ b/drivers/memory/tegra/tegra124-emc.c @@ -1201,23 +1201,15 @@ static int tegra_emc_probe(struct platform_device *pdev) ram_code = tegra_read_ram_code(); np = tegra_emc_find_node_by_ram_code(pdev->dev.of_node, ram_code); - if (!np) { - dev_err(&pdev->dev, - "no memory timings for RAM code %u found in DT\n", - ram_code); - return -ENOENT; - } - - err = tegra_emc_load_timings_from_dt(emc, np); - of_node_put(np); - if (err) - return err; - - if (emc->num_timings == 0) { - dev_err(&pdev->dev, - "no memory timings for RAM code %u registered\n", - ram_code); - return -ENOENT; + if (np) { + err = tegra_emc_load_timings_from_dt(emc, np); + of_node_put(np); + if (err) + return err; + } else { + dev_info(&pdev->dev, + "no memory timings for RAM code %u found in DT\n", + ram_code); } err = emc_init(emc); -- 2.29.2