Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07044C3E8C5 for ; Fri, 27 Nov 2020 17:14:16 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F9D322242 for ; Fri, 27 Nov 2020 17:14:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lLtoZ31H"; dkim=temperror (0-bit key) header.d=phytec.de header.i=@phytec.de header.b="HEvzATYD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F9D322242 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LM6iGPY6cXZMAwejmleXYEBLIUkzBjOWDEZcjMnp2qw=; b=lLtoZ31HXztdu2jdaaxMCl4QX vCBF0vLrXhk+tv6Z239FiH8stUDe/hnehUfGVkfKNaLflSvU/0O9XgHbzNLA3qN5oNO6y1fsWnKCz ruttTfJcBa46Ns0aTXz9vg1nba2q8lRzfcAIYr216epSoe79G24h/BIaNH79inFP80T7PM/nVP0At mh38/JHn4+199NQv8f+UfrmcHTmzlu0XWDdN/6C+6F0ph2mXYVV2kH9c4+QkAvYkVjbu1j14qEnTK XnliGIanmJDXlO0wfjA0MXPw8IA9Ilh3d3IEnFcPNNBxpLfZBiey4L+Ac5onm/UuMlPup49MRIB5F w5qvdpvpg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kihIR-0006rE-Jn; Fri, 27 Nov 2020 17:12:35 +0000 Received: from mickerik.phytec.de ([195.145.39.210]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kihIO-0006qm-Jj for linux-arm-kernel@lists.infradead.org; Fri, 27 Nov 2020 17:12:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=phytec.de; s=a1; c=relaxed/simple; q=dns/txt; i=@phytec.de; t=1606497150; x=1609089150; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GewN5m3XrZ2ZetVmg36L1WckKChMqwfz6sUV7KwfQdo=; b=HEvzATYDzFJYx6bIwLtcX+PADSnwRqUOGt4rKdUT83WMfQoiVMzQYIju3JwO4ERJ pSbvHBRL1/qgF9ISoZwffRTOK6VuyHakBdgjJ0D3mVY+znmv5Houpsr2JkAXDzJ5 m3bwPvfqsghR/lHd+AG6iLs3RDkHc91yAQ9BR7IUW4A=; X-AuditID: c39127d2-6dfff70000001abf-44-5fc1337e4570 Received: from Florix.phytec.de (florix.phytec.de [172.16.0.118]) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id 0F.07.06847.E7331CF5; Fri, 27 Nov 2020 18:12:30 +0100 (CET) Received: from [172.16.22.107] (172.16.0.116) by Florix.phytec.de (172.16.0.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Fri, 27 Nov 2020 18:12:29 +0100 Subject: Re: [PATCH] ARM: mach-imx: set system_serial from ocotp registers To: Arnd Bergmann References: <1606404505-133200-1-git-send-email-r.karszniewicz@phytec.de> From: Robert Karszniewicz Message-ID: Date: Fri, 27 Nov 2020 18:12:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [172.16.0.116] X-ClientProxiedBy: Berlix.phytec.de (172.16.0.117) To Florix.phytec.de (172.16.0.118) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsWyRoChTLfO+GC8weJ5fBYLP+xgstg+M9ni 76Rj7BbbtmxitXgxJ8Di4VV/i1VTd7JYbHp8jdWi69dKZotDU/cyWvxY9YXV4tvqDWwWf7dv YrF4sUXc4uHtmywO/B6Xr11k9vj9axKjx85Zd9k9Nq3qZPPYvKTeY+O7HUwe/X8NPJ5uPMEU wBHFZZOSmpNZllqkb5fAldF2bQdbwSK+ijPd4g2Md7i7GDk5JARMJCYefs7WxcjFISSwg1Hi yrwXjBDOA0aJ2/MPMIJUCQt4SZy6s5kVxBYRUJa4/m0OWJxZYBWrxIRrMhANExgl7rVtYQdJ sAGN3d18ixnE5hWwkZj7YDkbiM0ioCrxaP8UsLioQIREa18nVI2gxMmZT1hAbE6BQIk7r/6x QSywkJg5/zzUMnGJW0/mM0HY8hLb384B6xUCmnm67TUTxDsKEnN/T2SGsMMlbh9dyzqBUXgW khWzkIydhWTsLCRjFzCyrGIUys1Mzk4tyszWK8ioLElN1ktJ3cQIjNLDE9Uv7WDsm+NxiJGJ g/EQowQHs5IIbwbHwXgh3pTEyqrUovz4otKc1OJDjNIcLErivBt4S8KEBNITS1KzU1MLUotg skwcnFINjH52k9VuBioe+d6d+/FfqE3bL7XzerrnH+3sXW7H7WzrKj59wed3LzUfpHzsecpz 4c6Tl7f19vh6L56zsFxk8fQ5a8SOMz5YnvZNY6cun7nv+yNtiy5xmTiGlC3MLhY6uuvWa/fn FVy+3Nl8O9jPvDvw3Jtz0ZXF0048Wc+x3GOixrzO9mWeEbOUWIozEg21mIuKEwHV7gSEwAIA AA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201127_121232_896084_3C992C56 X-CRM114-Status: GOOD ( 20.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sven Van Asbroeck , Peng Fan , Ahmad Fatoum , Anson Huang , Arnd Bergmann , Yunus Bas , Shawn Guo , Sascha Hauer , Stefan Riedmueller , Russell King , Stefan Christ , NXP Linux Team , Pengutronix Kernel Team , Stefan Lengfeld , Rouven Czerwinski , Fabio Estevam , Linux ARM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Arnd and Stefan, On 11/26/20 8:35 PM, Arnd Bergmann wrote: > On Thu, Nov 26, 2020 at 4:28 PM Robert Karszniewicz > wrote: >> >> From: Stefan Christ >> >> The i.MX6 fuses have two 32 bit registers (OCOTP_CFG0 and OCOTP_CFG1) >> that contain an 64 bit unique id. Use them to setup the system serial, >> which can be seen in '/proc/cpuinfo'. >> >> Signed-off-by: Stefan Christ >> Signed-off-by: Yunus Bas >> Cc: Stefan Lengfeld >> Signed-off-by: Robert Karszniewicz >> --- >> Hello, >> >> I've noticed that arch/arm/mach-imx/ocotp.c duplicates functionality of >> drivers/soc/imx/soc-imx.c . Should this be resolved? > > I think it would be best to just have drivers/soc/imx/soc-imx.c > and not add another one. In particular, the serial number is > not normally exposed through system_serial_low/system_serial_high > these days, but rather the architecture-independent soc device. I've done a bit more research and I think I understand better now. In the same vein, our patch "[PATCH 1/2] ARM: mach-imx: imx6ul: Print SOC revision on boot and set system_rev"[1] should drop the line where system_rev is set, and only imx_print_silicon_rev() should be kept? And the second patch in that series should be dropped, too. Thank you for your replies, the both of you. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2020-November/620524.html > Looking at that driver though, I see it still has a bug in that > it creates a bogus soc_device on most (non-imx) machines. > I think there was a fix a while ago, but it never got merged. Just interested; Is there somewhere I can read more about that bug/fix? Regards, Robert _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel