From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68CACC433F5 for ; Wed, 8 Dec 2021 12:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4l6tKUYRsdFJeuIl0W3Va7EPJIBXtHpKzACyZWZFNVQ=; b=15233In6VD7Rvq JjvjE96zITFKo+t+7nNvV16cCo4kfoKtdG5Ez+6CoP5NcZU85myhtk1r94UOwvXQcJgql2NV0uQix e6z5cNVeAM623EHAcdx7w71eY3f11xiAzhJ7RhW7oqeDQw9z54uJa1pZZtlomm7s5g9uVrKKZw10n sLne+ut4mRzVUBdraVVRn25/9BeCQratobfMhXH/8EK0ceylQ651GbDI7QiCzeSMW+zoGLcuc5IU5 KLjr2DN3J/BL34+tybwv22BSCPIdHHTW6RfzK9CPoIBd1dP/0bBHn3oqRW26sfi/ahVvddOdohtgx fyRE2OnZoc9RNOn7qvNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1muw5n-00CVaH-Fz; Wed, 08 Dec 2021 12:30:39 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1muw5j-00CVZH-Bn for linux-arm-kernel@lists.infradead.org; Wed, 08 Dec 2021 12:30:37 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 614FACE1FCB; Wed, 8 Dec 2021 12:30:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97DA3C00446; Wed, 8 Dec 2021 12:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638966630; bh=RyybNb14tsCoWC9bKTMtoSeo+XhvC/N4HUVCjdkZRio=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P3WFpnn4Cc/PMeXrvukkdIpKbQHPNc2zVZF714YytHRCyQApWLpzpizLt1Sk8/39X 9lQM1tA0ykyFgAQLVDYqdz1Ku8zLb2c78+s5NBgtzDdMvpjRNCC5JVAfSKyK2j+yp9 lxK+uYu9svAN8hOKUDursJ9kbEI+sreEOyyG5yd0X7msGapC0/V3maScUroj5WHrtG 0fbIeZKyQj/7eY37dMi4hCld4bqLMFXYu1vV6QgmRV/UIAHt3MuQuSytfZxWw+LaDB n486lQrodKPAMcEhTdBvXd6Aht/bRUE7ZhATUmZjRMcSJdFd4tCjMVahiZTjhjSfjT 2jBWLPcJySclw== Date: Wed, 8 Dec 2021 20:30:24 +0800 From: Shawn Guo To: Stephan Gerhold Cc: Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Jonathan =?iso-8859-1?Q?Neusch=E4fer?= , Sebastian Reichel , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan , Arnd Bergmann Subject: Re: [PATCH] soc: imx: Register SoC device only on i.MX boards Message-ID: <20211208123024.GI4216@dragon> References: <20211206113828.42523-1-stephan@gerhold.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211206113828.42523-1-stephan@gerhold.net> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211208_043035_790749_A97079C0 X-CRM114-Status: GOOD ( 16.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Dec 06, 2021 at 12:38:28PM +0100, Stephan Gerhold wrote: > At the moment, using the ARM32 multi_v7_defconfig always results in two > SoCs being exposed in sysfs. This is wrong, as far as I'm aware the > Qualcomm DragonBoard 410c does not actually make use of a i.MX SoC. :) > > qcom-db410c:/sys/devices/soc0$ grep . * > family:Freescale i.MX > machine:Qualcomm Technologies, Inc. APQ 8016 SBC > revision:0.0 > serial_number:0000000000000000 > soc_id:Unknown > > qcom-db410c:/sys/devices/soc1$ grep . * > family:Snapdragon > machine:APQ8016 > ... > > This happens because imx_soc_device_init() registers the soc device > unconditionally, even when running on devices that do not make use of i.MX. > Arnd already reported this more than a year ago and even suggested a fix > similar to this commit, but for some reason it was never submitted. > > Fix it by checking if the "__mxc_cpu_type" variable was actually > initialized by earlier platform code. On devices without i.MX it will > simply stay 0. > > Cc: Peng Fan > Fixes: d2199b34871b ("ARM: imx: use device_initcall for imx_soc_device_init") > Reported-by: Arnd Bergmann > Link: https://lore.kernel.org/r/CAK8P3a0hxO1TmK6oOMQ70AHSWJnP_CAq57YMOutrxkSYNjFeuw@mail.gmail.com/ > Signed-off-by: Stephan Gerhold Applied, thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel