Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp744554pxu; Thu, 3 Dec 2020 11:29:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIyCApYHmH3OGgbGEoMKShJt1rnBBTziPewJ0bY2iGBR6LF6P4tydEPTKjzWUSZ7xgtMAq X-Received: by 2002:a17:906:660b:: with SMTP id b11mr3941580ejp.190.1607023769518; Thu, 03 Dec 2020 11:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607023769; cv=none; d=google.com; s=arc-20160816; b=Pfyl/tPUVwNsQDIj38aG3qZaNe7R1BT5OYvxbG53ZxbpunAVd3/3wFHOH9M2j4JJMn QkHN4SO/gPv1AcNoHQNoczVeytnANkscwdm6wJ2a36iZEcDTPeBZSTuzkPEEmy/Sd1ez qdvRuxoNAw9u9yVF7DPHGm3xlKsVNFys0tLWezRVCvnmwySqC2a5IqoUnUzk9+7iOa6L jJIWPAR+FUaU/PU2b/x3afHId0mRh0eu846L/p6K/pGrexHz7mExS87RdWnvFE//mUe4 xb2aCY2xlvHltctcOrMoJSR9Kq3FRZo+ywcxe3SOPItut2VRz/AHOAT8ZyDeDAnLEYql UvSg== 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=ZOxJw1c6/P8WI9jjmhXd0K1ybzRXz9fKS+6MluSEawnsoI130vIgzK026AX4nx1rlq o91viNcgszb7P9j3tZ08a4jVx6zxgvPin/anmY/TsxYf5ZBSEXlKfHNsL6LNgomyMmEo ASdmE37EtMDamu//tArYBAIUZWL97hFZbYKnkhkJ5rvMc8vYdu4QPvH0VoZXCfdRKkK8 7O07h3AUKIJKhSpF77ElRbx7s0WLDQqEiGAgpnYFB4fnvp1Qfj1FkyDLbV+Gv0UbfN7T CC2DC+VuL3zORnBAuVXdHN5sUK/ywA40gkJcIgtzCmfdtEVCgEZm86QaJMApzfLLXsoO ugXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QEWd41Cn; 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 p19si1493345edm.117.2020.12.03.11.29.06; Thu, 03 Dec 2020 11:29:29 -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=QEWd41Cn; 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 S1731736AbgLCT0h (ORCPT + 99 others); Thu, 3 Dec 2020 14:26:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387713AbgLCT0U (ORCPT ); Thu, 3 Dec 2020 14:26:20 -0500 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D1D0C061A54; Thu, 3 Dec 2020 11:24:58 -0800 (PST) Received: by mail-lf1-x143.google.com with SMTP id t6so4352325lfl.13; Thu, 03 Dec 2020 11:24:58 -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=QEWd41CnpBZr+s2jfgx+kjdr+OCukSXqV2r6K1UXFHqwAs5EIFN5R7KspcuRNSy1Pl Y6+/hiCvJPOJmAFhOz9DwZYDavZsbvhL656T5Z6obbmbOGaORouwra6oEYcyd0Gq0xhR 8pdKrbho6alWI7XE3EFZAqMoIWu1OPm/qHbZRoCPKdbr8SOjqM/lL0ghe4fYhXMzFzac WbqI2BUkTP3Ms6EqSbIenuBwfYqpyBC2EvbWX+99aWAnOyms6PnO2CiaoPzV+a7FGJgg JgXZUpmVY4kncmdqMOTxAEMaU/2bhKnfXrQgEdbs9zQXLl7+TnQQw7J1QfYAlbgz4JRi fyHw== 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=te5IHCNOoiX+e9BSKJsXCWL5I5KnzNQpiHHbnykTI77daGVpy4FC3nsLPCOxVnSa94 Hu43lX+g7f6D273yITZbkuD4Ll30DO1LZgWsTuyHsjXRcGWrGKhq2QyZ4s6v+R5T1q6g d2QkDgHZbwh1rI+B4UbCErrnWzemLQG7QgfLL91EwIhCi0Mo98muuDm2t0jQqctHv+X6 /4jfRH+oQVCOl5fRCGzxZ2KkHgIy4MXVLjU4KF2q/UhsWLsQ/AU2UPc0wJbBHKKEvGf6 sPmmOd/i7hjjYmTnpaO+CwG7oUM84F63p/YuNqtkHQ1/VdNbUmVMX8H4dIhCQQerPCKr uMTQ== X-Gm-Message-State: AOAM530OcOZgHsSHpoeWcV0NudSQWsv9r6GNCey0hRUmhb6r2OH+ns4A oS4Y8YYqYV+WNxEGtVX+5sU= X-Received: by 2002:ac2:53af:: with SMTP id j15mr1956530lfh.256.1607023497187; Thu, 03 Dec 2020 11:24:57 -0800 (PST) Received: from localhost.localdomain (109-252-192-53.dynamic.spd-mgts.ru. [109.252.192.53]) by smtp.gmail.com with ESMTPSA id z7sm861932lfq.50.2020.12.03.11.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2020 11:24:56 -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, devicetree@vger.kernel.org Subject: [PATCH v11 05/10] memory: tegra124-emc: Continue probing if timings are missing in device-tree Date: Thu, 3 Dec 2020 22:24:34 +0300 Message-Id: <20201203192439.16177-6-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201203192439.16177-1-digetx@gmail.com> References: <20201203192439.16177-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