Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp463336pxu; Fri, 11 Dec 2020 06:36:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIABVhewtDbIL5NhKWG1ODa1ooW+ITUn/tle34TgEBCpLHT5pNhB5oZOF5U6QsSTz9bP3X X-Received: by 2002:aa7:c7d8:: with SMTP id o24mr12317467eds.328.1607697381415; Fri, 11 Dec 2020 06:36:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607697381; cv=none; d=google.com; s=arc-20160816; b=d6+UeLKJN1GyN9+S64w2c1nnY41TLRz1PFyWjPXWPh7oltkMaHAXKotUFeRbkBITj/ zpzXrHyTGRl4nPKmQDj2LTNstcnXZoM+ieTJ/oqskh4FYl++EVzR80xIgQYl/lZqoWIC SiNTkY0gFCDwuEM8rC/a5WPI24b9tXx7QEDFu+W+ickZirBGoqIG9U7e4z6IFI+EUE+N NMID1p+t3+agAEvHbS7lze6T54b9CtkLDf6vC5vmlerII0p+3arZMEtuBFJzct77+R92 gwLrhTJ7jEInRkcul7Lk2rbfSBV0Q+YOC7jFzz6uZPqUoy4lsY5vw30oMW5vQVet3x7z V5cQ== 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=3jfeWBAfD417j8rwcL8op7DVI6iso24RjGRJhRX0lMk=; b=fmadV5Ui6WcUvAVQQIYTcHFpxWFKGqKXtIPOZjSr2r2kbvmwz9b90x4MnDuNp5qTbh 9kagbiqWfT9WV94hzBt94wMqik7TuZm5VG+Lh5koV0bcHhGvXRVMHqrckUhmWs0Xtg5z 2vWXcdVLy44IpRtlDa59SEr0NDrPft3AAgOvYXeOb/xA9hJo6i9I3AeGKsazHZIu7cyl TlmAtQYmVf/IpegeRm7WrZrMZAzcDtdDF5q/BUQxzY/PXS0g/6emTYfUnWfmI1z5AK90 +vui7qnn2KLrNWiv6snFPJkOYAEUmC5Q2D7tEZWr1A3HEysHL6DKDdrNP920fGrZS7SB U4jw== 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 g2si4493312eji.656.2020.12.11.06.35.58; Fri, 11 Dec 2020 06:36:21 -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 S2394973AbgLKOAX (ORCPT + 99 others); Fri, 11 Dec 2020 09:00:23 -0500 Received: from foss.arm.com ([217.140.110.172]:58832 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394306AbgLKN7s (ORCPT ); Fri, 11 Dec 2020 08:59:48 -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 E50D41FB; Fri, 11 Dec 2020 05:58:59 -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 0B4343F68F; Fri, 11 Dec 2020 05:58:58 -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 v2] drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs Date: Fri, 11 Dec 2020 13:58:46 +0000 Message-Id: <20201211135846.1334322-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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) v1->v2: - Updated the allowed list as suggested by Alexandre diff --git a/drivers/soc/atmel/soc.c b/drivers/soc/atmel/soc.c index 55a1f57a4d8c..2dc86728b132 100644 --- a/drivers/soc/atmel/soc.c +++ b/drivers/soc/atmel/soc.c @@ -265,8 +265,20 @@ 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,at91sam9", }, + { .compatible = "atmel,sama5", }, + { .compatible = "atmel,samv7", } +}; + 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