Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp416962pxu; Fri, 11 Dec 2020 05:35:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6USSOQF5aAe3XB7sCnHjQM0Jsgxx3OfMBlWXQYNiiIUXPOM9CHoYAZlNjM94NrWqv6RTf X-Received: by 2002:a17:906:5213:: with SMTP id g19mr7216078ejm.383.1607693729066; Fri, 11 Dec 2020 05:35:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607693729; cv=none; d=google.com; s=arc-20160816; b=XMHbl+Xp7E+22XzvTHjJzB6jRP6LL0xxJS9QGKK04BcWSaDvbFm7eWtkXN/aKiQpjn soMjCKMsWDxphr7G5cPNJd4A9MTizTOP58FXldB8ZykkMB76PbPoCriqBGAerMWM12bm 4zzrdDnrWad7C3uW1ynNImPXoNk4batmZqeOfkKsqVjjYzedNa/KRp41GFNRItwueTTb bbSRqDG5QEsy5BAYhiL17uiFgpXTgNZQxe5VhuLAMCI//Fnd3lc+5LNwR9DfQKmSWi4r G7/yPc0tKM7S2E2DamYwS5zDA4MdgQQhBbHI6S6HYHLHzLXuzqnQCNoOAiWRmfmzYxK9 NI7w== 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 :message-id:date:subject:cc:to:from; bh=c1PzqQVG4sQVf+niyDglogRU+wL7Y/P2zzpWYiPbFTs=; b=SeClDl6ZXE2awEFHEpEcLJGIJ/XrGhI7XRHgDTZjaPvquziHSfUfxL84GeqQo2Iovy t6NDgrPbMuRlgYDYxU7sXRg5/HtnbeuLyNZCd8k4V7cxLP1GDU7FoQJRRPsKtbQVbgUb gcAnnYH9XlgDf6tTkvlcGHHI+rzEgLePPbpRlgpHZHP0hSmz3eUN9aHloD6yD8jfk0NZ mpFv/BySGdfnTLQbXJ1QpYjNQucYcwZKXnupsIxs3vZ6C3sxzzSAFvTDHlTisSNbaNL4 sUp5msWncEotgc1gdS56tu0rPZUje/NYbnnjMagYm3JhFG+npax9AmOQshxYhdH4ozyM OTmQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r3si4864193edy.595.2020.12.11.05.35.06; Fri, 11 Dec 2020 05:35: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728234AbgLKKdD (ORCPT + 99 others); Fri, 11 Dec 2020 05:33:03 -0500 Received: from foss.arm.com ([217.140.110.172]:48276 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbgLKKci (ORCPT ); Fri, 11 Dec 2020 05:32:38 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0ADB330E; Fri, 11 Dec 2020 02:31:53 -0800 (PST) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 18ECF3F68F; Fri, 11 Dec 2020 02:31:51 -0800 (PST) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches Subject: [PATCH] drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs Date: Fri, 11 Dec 2020 10:31:43 +0000 Message-Id: <20201211103143.1332302-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since at91_soc_init is called unconditionally from atmel_soc_device_init, we get the following warning on all non AT91 SoCs: " AT91: Could not find identification node" Fix the same by filtering with allowed AT91 SoC list. Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Sudeep Holla --- drivers/soc/atmel/soc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/soc/atmel/soc.c b/drivers/soc/atmel/soc.c index c4472b68b7c2..ba9fc07cd91c 100644 --- a/drivers/soc/atmel/soc.c +++ b/drivers/soc/atmel/soc.c @@ -271,8 +271,19 @@ struct soc_device * __init at91_soc_init(const struct at91_soc *socs) return soc_dev; } +static const struct of_device_id at91_soc_allowed_list[] __initconst = { + { .compatible = "atmel,at91rm9200", }, + { .compatible = "atmel,at91sam9260", }, + { .compatible = "atmel,sama5d2", }, +}; + static int __init atmel_soc_device_init(void) { + struct device_node *np = of_find_node_by_path("/"); + + if (!of_match_node(at91_soc_allowed_list, np)) + return 0; + at91_soc_init(socs); return 0; -- 2.25.1