Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2496814pxb; Thu, 3 Feb 2022 07:53:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlwMmisd/46vfZ96djhtNDRMDpeCEfjUTxS2hd71e37IdnPbkUrxXnlg7sDnLpL1/XwAZS X-Received: by 2002:a17:907:82a3:: with SMTP id mr35mr30513088ejc.455.1643903605169; Thu, 03 Feb 2022 07:53:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643903605; cv=none; d=google.com; s=arc-20160816; b=puqfBf1BVCP5FTV/Lldk5f6NluOnJzrz7d4s1HqwwaqR6fZjvY839NJS1RZNE+rP3F 0TmbUfsFlIPu4Xe7gKR8GNl3HuTXqls7F4eOrNqHdcFrEUHpqW05MsBSHJmCDzE5Gsc5 cHGt0fZHeecucdFnX1GFOaywGPgPLApEzrjlXLgaFIvM32xy8w0NntqM4B59LtE2ZqIZ Stbf1Swxmi6OU0ygmeqvzPEbmVVUQs1FJmZIu3mjpU8k5/b+1pP6/prlVOQDffnxtfiQ 4vOQpHtjLVgTPru8gSdJlbjoHbez/frNFRiY0B7zJXLq1Ok5RM66CsA0igQktW9Ti5GS Wzcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=f9WjsEImzs4/wXQs95rQ2PrMPR+hf7i8K5ER1ZQOizI=; b=mGGyqtQBVWxjsMv+kvsfUe1sgkUacs9a/MDZZXEu7nfkSl1QDNEShtXkW8f/g4tzKB BJCofNJ1B/3ZHXepQ7AOzzwd+QSsLrfixtx/8cvu8RUO5jY1lMKpt1y21AjoPAjjWNnc r9ei4g2IVeSXOsAMuybTNkVG/2K+6ys+y5JjZ9sH7zfFlXgLeENOTc9ZhRFEc9Y+TUVn pW4tUe10DQJKrfBb0ZM/t/dEXMYCguHvASYfuW9D7yrgRzryFXzTwG/NFuqHK4NoP2k/ JSMAjvLZrQeGNMKd4pQBDRFZJwaoMRpqB2xCDRbiqq/beUw8D2zu5xtYeD2GZFbn/qZC JAxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho15si13566307ejc.291.2022.02.03.07.53.00; Thu, 03 Feb 2022 07:53:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238601AbiBBNhC (ORCPT + 99 others); Wed, 2 Feb 2022 08:37:02 -0500 Received: from mail-ua1-f51.google.com ([209.85.222.51]:37462 "EHLO mail-ua1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230331AbiBBNhA (ORCPT ); Wed, 2 Feb 2022 08:37:00 -0500 Received: by mail-ua1-f51.google.com with SMTP id b16so19158373uaq.4; Wed, 02 Feb 2022 05:37:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=f9WjsEImzs4/wXQs95rQ2PrMPR+hf7i8K5ER1ZQOizI=; b=5JF/44PmBRRVGECNoyo3gAP4oPUftTmVi6CvKXWIM7P65Tjg9vaYprtzsec5wxpJxK 79fnqShxglsZ8/l0Z2vAeSP3YchoR4WXWhS4bLsSx97o6QaBIqg8/nE+0DEYaDuz6ruS nhARhqYaqBY402eOu2kEKmQEvWGG3D5Dcw2RxbW1ZqUaB7/jJp0ToCY7XZEUmHbFuErq huj7z5UJgryw+RFIsSLIAYIToXT7tF/uPiEIJDk3I+aJ9WMuUbuyGYvJGBO9CEW+Y2vG 5HugZhqMCwxDeT9asExCahxVXLO0EVVyvqsg81DICpqGinZgBbbtTn2KkzNIYD1lCBYu 2cFw== X-Gm-Message-State: AOAM532BjvVa+WqB85nFSq0zNbxFtZRqw66siGxM9J2G8cBiDaJCmSOc hL1Us+VMqx79G48j4TYFqzP+vU9qz+6zew== X-Received: by 2002:a9f:2c0a:: with SMTP id r10mr12215040uaj.89.1643809019411; Wed, 02 Feb 2022 05:36:59 -0800 (PST) Received: from mail-ua1-f52.google.com (mail-ua1-f52.google.com. [209.85.222.52]) by smtp.gmail.com with ESMTPSA id l67sm2276645vkh.9.2022.02.02.05.36.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Feb 2022 05:36:59 -0800 (PST) Received: by mail-ua1-f52.google.com with SMTP id c36so19068316uae.13; Wed, 02 Feb 2022 05:36:58 -0800 (PST) X-Received: by 2002:a67:c198:: with SMTP id h24mr12215393vsj.5.1643809018705; Wed, 02 Feb 2022 05:36:58 -0800 (PST) MIME-Version: 1.0 References: <20220121014117.21248-1-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: Geert Uytterhoeven Date: Wed, 2 Feb 2022 14:36:47 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] soc: renesas: Add support for reading product revision for RZ/G2L family To: Biju Das Cc: Prabhakar Mahadev Lad , Magnus Damm , Linux-Renesas , Linux Kernel Mailing List , Prabhakar Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Biju, On Wed, Feb 2, 2022 at 12:20 PM Biju Das wrote: > > Subject: Re: [PATCH v2] soc: renesas: Add support for reading product > > revision for RZ/G2L family > > On Wed, Feb 2, 2022 at 10:51 AM Biju Das > > wrote: > > > > Subject: Re: [PATCH v2] soc: renesas: Add support for reading > > > > product revision for RZ/G2L family On Fri, Jan 21, 2022 at 2:41 AM > > > > Lad Prabhakar wrote: > > > > > From: Biju Das As per RZ/G2L HW > > > > > manual (Rev.1.00 Sep, 2021) DEV_ID [31:28] indicates product > > > > > revision. Use this information to populate the revision info for > > > > > RZ/G2L family. > > > > > > > > > > Signed-off-by: Biju Das > > > > > Signed-off-by: Lad Prabhakar > > > > > > > > > > > > --- a/drivers/soc/renesas/renesas-soc.c > > > > > +++ b/drivers/soc/renesas/renesas-soc.c > > > > > @@ -405,41 +417,38 @@ static int __init renesas_soc_init(void) > > > > > > > > > > eshi = ((product >> 4) & 0x0f) + 1; > > > > > eslo = product & 0xf; > > > > > + soc_dev_attr->revision = > > > > > + kasprintf(GFP_KERNEL, > > > > "ES%u.%u", > > > > > + eshi, > > eslo); > > > > > + } else if (id == &id_rzg2l) { > > > > > + eshi = ((product >> 28) & 0x0f); > > > > > + soc_dev_attr->revision = > > > > > + kasprintf(GFP_KERNEL, > > > > "Rev %u", > > > > > + eshi); > > > > > > > > Would you mind if I would drop the "Rev " while applying? > > > > > > Kernel reports the below message after dropping Rev. Is it OK? > > > > > > [ 0.018297] Detected Renesas RZ/G2L r9a07g044 1 > > > > That's indeed not so nice... > > > > Either we have to add it back, or do something like: > > This is much better. > > [ 0.003427] Detected Renesas RZ/G2L r9a07g044 Rev 1 > root@smarc-rzg2l:~# for i in machine family soc_id revision; do echo -n "$i: ";cat /sys/devices/soc0/$i; done > machine: Renesas SMARC EVK based on r9a07g044l2 > family: RZ/G2L > soc_id: r9a07g044 > revision: 1 > root@smarc-rzg2l:~# > > > > > - pr_info("Detected Renesas %s %s %s\n", soc_dev_attr->family, > > - soc_dev_attr->soc_id, soc_dev_attr->revision ?: ""); > > + pr_info("Detected Renesas %s %s%s%s\n", soc_dev_attr->family, > > + soc_dev_attr->soc_id, soc_dev_attr->revision ? " Rev " : > > "", > > + soc_dev_attr->revision ?: ""); > > > > Will you post this change or Do you want me to send the patch? > > Please let me know. I'll send a patch, to be folded in to the original. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds