From patchwork Tue Feb 2 13:38:47 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: 374638 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp410679jah; Tue, 2 Feb 2021 09:34:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLNwNzjAH1lcuKmF4oY9TdraOKyAIrNuOAjufWhIK7AISTacj4dwwECPwd6Qlc5nmgG57N X-Received: by 2002:a50:9d4d:: with SMTP id j13mr25123edk.83.1612287241825; Tue, 02 Feb 2021 09:34:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612287241; cv=none; d=google.com; s=arc-20160816; b=W1eRHRF1dOER7lH/cqn263fcRRpNePePjmoxxh48M/b55O/FEL0PJVcGd5bYvqp5zj fwtuxg3HUqFs4I7YrOUoQbB1KOL7KAbwxSYEVbpCp+AtKnymv4QBk1plSgicRp0Xl7w8 PcXJjalsT1cGzGTHRvQQcp3w1dtkmJ5Z+uxigjcl4Dxb5YxPF31Q/gVOFdDEc0JynHZs YLdlsUAM4SU8wzK1JvL4X4OCqOljkcTE8SDDLGCoQnjXOOObOBOkEs0p+gz0UP1qtfVP MQ3Yd8wXXu2wC4c9BlY48nzGyKchyid4c/M47x77TaaBEhkTutsd79sZHUmnH1qKDvr2 OoUw== 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=6yJgWUYpVz9LOS3ZhOBFIUVv1N9S8THkaRNe92tShX8=; b=I4vLWMDAycRTRU54D84Fzxl9swe8ZfeDPkyWZnkcCmVetDoOCyazjiUjpJc4WNyVqq h2FkdE4PvnNk/yuceGk4aHoE1weY6MwKTpai+K54z+6LkL1iICVPUdvreVcF4QAZ9yHb V1mdoMjJCumHdyXuhiB/3auh9pDAKSEz35rxW7EZMmvq6UfkPpZzKV8FZjaaq5w2Mmb0 iYVbB0MXmPWgmijmytB8tE4XH1MJEDJNNPvL9gk8aayReASatUmO+6Ik9XMaBZJYcQi4 nEFRB05eqAnQJnH227EhUNVz6KwUrNlk9BkoLaZY4A0mUx5WtM3TVrC2eSubit8fKQGL IDGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ufcr13bF; 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 bs1si14679066edb.443.2021.02.02.09.34.01; Tue, 02 Feb 2021 09:34:01 -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=Ufcr13bF; 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 S237479AbhBBRct (ORCPT + 13 others); Tue, 2 Feb 2021 12:32:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:49908 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234171AbhBBOMq (ORCPT ); Tue, 2 Feb 2021 09:12:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F106A64FAC; Tue, 2 Feb 2021 13:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612273929; bh=f0rqqsDn9ZVAcUMNUuw8eTBZRMwS8ufs+LrEAllPbLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ufcr13bFm+qUXww6JGvq+RfnsIrY6Jaf9cITiBWQJ9Mr91Usg6qFqBVbHgh5PAJjy 8HD2MqoCXaPid+jYZT32j4SBaHzNJkdcvh+fk54b92SNnaCQT1hb0Hho38aiqSFxiy wI4YDLYU28Ofa2YhGU7OR+2yZJDcdCnYS5y2/oes= 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 4.14 06/30] drivers: soc: atmel: Avoid calling at91_soc_init on non AT91 SoCs Date: Tue, 2 Feb 2021 14:38:47 +0100 Message-Id: <20210202132942.390970110@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210202132942.138623851@linuxfoundation.org> References: <20210202132942.138623851@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 @@ -246,8 +246,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;