From patchwork Tue Feb 2 13:37:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 374632 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp226362jah; Tue, 2 Feb 2021 06:05:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+GO4KkXzfOXMhzSA3p2DLTTgq5BC89EGACz8GovvYjPsSMIynq4osmcJEAe3eam74utwu X-Received: by 2002:a17:906:c08e:: with SMTP id f14mr23369715ejz.388.1612274736680; Tue, 02 Feb 2021 06:05:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612274736; cv=none; d=google.com; s=arc-20160816; b=EtDdNDFAiQrhxONGVDQDjqj+ZSpvS6Zz2QsWqYHMSC0SDYWc3q2LMGlRbXsHKiOjMS fRC4fD8C+EyLPxVsRT4y1xvfxwrxMHm8rEFUyuFpB8AivV+SbRlwESKUOefF90tdfM7Y zhYp21g5w0g43VEajFl0pFur1lIJlLz/zWrtEEiCnnvo/D9WUdB66+nmXRmBBIv1iZd4 svlCDQ5IGDo07LxAqEBvUTkOuIPj/4SrMW90FTMvpT1D7mdA4Hj0ag6hrhE8FRmZFU+Y JVzAMhG+Cy0/B6Z56Lc7q6FnBet0nUZ+53mJIorqJzLQbxpqUfC1nPyv20mR2+Lm3PYQ 0nDA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WGUwXz+I6uSh+JsHkc6FY7FD7gGuNjCYc8pC2/C0T8c=; b=0kT/LINxfv2Oc5TDkUOD2K654JEHxPTqD/x3KoRMQ1yOZhkIWztpNmCJg9oBeAbzQ2 ydOLGRsgRw8DqOIuoT9a5wX25jbtzqYnMq+b7mJEg1rlpEsoaVLUkkgxCRPkoODAZbKN LxMMAn7ZXYs5uZdKF5cdZ/vRh8pnX6QCCAkea9kpx4jrzbNfc2OFAYOP7ZRxdJarubCo KoqIblEhFalGlG2a6YQc925dW4GTwvDqOm2Z0vSSNdXDz0+F3vZt8mkNBMKXpIqozXLu l2wkXtpYKM0hqlPaVNYlyPWUvJEJGssS+EYboUpnhHsiIia0FSVDS+0UyStsjSBgUwoZ vltw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MtWa3WJl; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e14si11905335ejk.542.2021.02.02.06.05.36; Tue, 02 Feb 2021 06:05:36 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=MtWa3WJl; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233825AbhBBOFY (ORCPT + 13 others); Tue, 2 Feb 2021 09:05:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:46344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233538AbhBBODU (ORCPT ); Tue, 2 Feb 2021 09:03:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 033EB6500B; Tue, 2 Feb 2021 13:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273691; bh=CJYqW0knAVr85WZdAYp8WiCBHY74LJYj+o+ipSz1bJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MtWa3WJlYM6LHr6MhPwn1VgHKySJsBgGQqvCJTVnIo1bjqsmxSuuXN56F5XK6uNZ7 yG6JUqPXwRGOmRdcJwuw6hX/HqzxTXgfeuwzwqBI1PdQZTetU1sqeUne2TVNO7U/24 grAGJNATrOQO3A9CWGN72XEfcpCI5Y73eQApIoHk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Sudeep Holla , Arnd Bergmann Subject: [PATCH 5.4 14/61] drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs Date: Tue, 2 Feb 2021 14:37:52 +0100 Message-Id: <20210202132947.072957616@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132946.480479453@linuxfoundation.org> References: <20210202132946.480479453@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Sudeep Holla commit caab13b4960416b9fee83169a758eb0f31e65109 upstream. 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 Cc: stable@vger.kernel.org #4.12+ Signed-off-by: Sudeep Holla Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20201211135846.1334322-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/soc/atmel/soc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/drivers/soc/atmel/soc.c +++ b/drivers/soc/atmel/soc.c @@ -264,8 +264,20 @@ struct soc_device * __init at91_soc_init 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;