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 X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable 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 B7850C433DB for ; Mon, 18 Jan 2021 16:51:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EDCB222BB for ; Mon, 18 Jan 2021 16:51:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393608AbhARQvg (ORCPT ); Mon, 18 Jan 2021 11:51:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393588AbhARQvD (ORCPT ); Mon, 18 Jan 2021 11:51:03 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E27DFC061575 for ; Mon, 18 Jan 2021 08:50:22 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id 7so9869403wrz.0 for ; Mon, 18 Jan 2021 08:50:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=M9bVC0D29PiLP3SooWshnzjodDmaOHzWL9fgwIDTFtE=; b=NrUZFBbOrp+MV6hCesD9V21DcHAX2TDzjSa4H5fIA2WP7yuAHlHnHVgsuqfj9/Ar4B xhm/DSf/WJys9Z+rHzrtvDRGvpeN7gAadWoywSUrKmyGjNsAu8032PWZAkoJ67pkQaQX CCm4IZ6+7tb8VapRAjoc07ZZgXEte6nRi3xkK2mfMxqhP7b2C3WxXJhXSnN7z7q3mmPl uc7quskK2T8hBe4SyJglQAzk8zyBlTbbIx7mjG6DQT5zMff7GAhfPaWcczVbYA2MpQRo tRJStZBla6/xWEO0wwWfsi9jIbfsbJBVlE9WO+Su+tIX4JoGaLC7XX7jhlCw0yzw1ue9 sGOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=M9bVC0D29PiLP3SooWshnzjodDmaOHzWL9fgwIDTFtE=; b=e5mEq7owb2024bFQawXsTTDNt2PN5izfzcGEu9mLwa6Q6HLQhcVFFivKTG+oQNMagB klV3GSuWXtYPsvzlYQbaRh+KojbmSyEEWoT0ZRGkhTFWP1cfhjTBU9HSP9/aIPLa91qw btXmYw1Lj8BCgxqM2Sg4w9UB1UJ96/9K4smCFQgyWFTHydTr2K8ZHGSjnbQfn4ivCGvA J+loA0hZY264GcUF1TA7oUglcgARRcixQt72Rn/Czdma7pDgLoNstYiipXkCalnpa1AD gyCzXZ/riDSSzMLofxa4W0sIXgkieg+rPhXDeczecSW/PmUfU3+91Il3kwbT+cNNn5Q1 TQQA== X-Gm-Message-State: AOAM530vHa5I99bGBeZhG+Adix17Iz9LIaBhXUaBQJMDydlH2EV9fyl2 pa9zohxbC93Gjzid5uv0NFpUSA== X-Google-Smtp-Source: ABdhPJw2g9byjlOuPcRSObz4o40FaDhPEf7OhIi+GNChZIesXRE+MPNBuJiYipRn8nsrRLQdNDN3LQ== X-Received: by 2002:adf:c387:: with SMTP id p7mr358073wrf.95.1610988621672; Mon, 18 Jan 2021 08:50:21 -0800 (PST) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id v14sm28797342wru.8.2021.01.18.08.50.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 08:50:21 -0800 (PST) Subject: Re: [PATCH v3 0/5] Expose RPi4's bootloader configuration To: Nicolas Saenz Julienne , linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, robh+dt@kernel.org, bcm-kernel-feedback-list@broadcom.com, tim.gover@raspberrypi.com, phil@raspberrypi.com References: <20210112142342.7290-1-nsaenzjulienne@suse.de> From: Srinivas Kandagatla Message-ID: Date: Mon, 18 Jan 2021 16:50:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210112142342.7290-1-nsaenzjulienne@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/01/2021 14:23, Nicolas Saenz Julienne wrote: > Soon to be released versions of RPi4's firmware will take of care > passing their bootloader's configuration[1] to the OS by copying it into > memory and creating a reserved memory node in the board's DT. By > modeling this reserved memory node as an nvmem device using > 'nvmem-rmem', which this series introduces, user-space applications will > be able to query this information through nvmem's sysfs interface. > > An alternative approach, less nice IMO, would be to create a > platform-specific 'soc' driver. > > Regards, > Nicolas > > [1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md > > --- > > Changes since v2: > - Fix DT bingins > > Changes since v1: > - Avoid the reserved-memory indirection by integrating the nvmem driver > into the reserved memory node. > > Nicolas Saenz Julienne (5): > dt-bindings: nvmem: Add bindings for rmem driver > nvmem: Add driver to expose reserved memory as nvmem > ARM: dts: bcm2711: Add reserved memory template to hold firmware > configuration > arm64: defconfig: Enable nvmem's rmem driver > ARM: multi_v7_defconfig: Enable nvmem's rmem driver > Thanks Applied (1/5) and (2/5), rest of patches should go via arm-soc tree! --srini > .../devicetree/bindings/nvmem/rmem.yaml | 49 ++++++++++ > arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 ++++ > arch/arm/configs/multi_v7_defconfig | 1 + > arch/arm64/configs/defconfig | 1 + > drivers/nvmem/Kconfig | 8 ++ > drivers/nvmem/Makefile | 2 + > drivers/nvmem/rmem.c | 97 +++++++++++++++++++ > drivers/of/platform.c | 1 + > 8 files changed, 176 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/rmem.yaml > create mode 100644 drivers/nvmem/rmem.c > 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 X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, 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 3416FC433DB for ; Mon, 18 Jan 2021 16:51:48 +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 EE654222BB for ; Mon, 18 Jan 2021 16:51:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EE654222BB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=mJ3BX5JljpYVaQWXfcJXI53pCLeE03cRkhEvs4k6Lj4=; b=XODRBEPZxjBZaYKZrl854SawX b17VZZAGybiO6VSDqtCNF7BR1+pZOMxa8qTSV3KARafqAdIGvMoYNqEz4qtyw8mEZCDhJsbfYc65f A8MVe399Zn4KnEaf4787Ob90ZlXlvxiKx2U77ZUh9dH3RR2sWStmeTBWpRd62iEdsKOw5gFZHG48i OjgUsODdXOEfysyA3tmup5Z3+3JOxSi+ObfHAi/UZO8R9O34ihqaP8OIit2bpIXesC/J7Yh/eJTKU seL4doLHhC+JrOHVau1efPwYTanNojYtZCf6qH40bOv44hW27OvN7i5Ff4cnIxjPJycLrQdoeCRw6 /MX1OyYkw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1Xja-0007P8-GB; Mon, 18 Jan 2021 16:50:30 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1XjU-0007Ng-QB for linux-arm-kernel@lists.infradead.org; Mon, 18 Jan 2021 16:50:27 +0000 Received: by mail-wr1-x436.google.com with SMTP id a12so17091727wrv.8 for ; Mon, 18 Jan 2021 08:50:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=M9bVC0D29PiLP3SooWshnzjodDmaOHzWL9fgwIDTFtE=; b=NrUZFBbOrp+MV6hCesD9V21DcHAX2TDzjSa4H5fIA2WP7yuAHlHnHVgsuqfj9/Ar4B xhm/DSf/WJys9Z+rHzrtvDRGvpeN7gAadWoywSUrKmyGjNsAu8032PWZAkoJ67pkQaQX CCm4IZ6+7tb8VapRAjoc07ZZgXEte6nRi3xkK2mfMxqhP7b2C3WxXJhXSnN7z7q3mmPl uc7quskK2T8hBe4SyJglQAzk8zyBlTbbIx7mjG6DQT5zMff7GAhfPaWcczVbYA2MpQRo tRJStZBla6/xWEO0wwWfsi9jIbfsbJBVlE9WO+Su+tIX4JoGaLC7XX7jhlCw0yzw1ue9 sGOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=M9bVC0D29PiLP3SooWshnzjodDmaOHzWL9fgwIDTFtE=; b=P0rcrJpU6ES7xBCVKSbsSBHtxEsvDG/t3S6AlKnGAOQGNraw8W2ekURdUQhzfj5kop 7uKkWDZ9SzwacSMy2PUukq/5PSVOLOhY+NCpaskrOfvdCoUk4t1EHSWejOwpxHTrmoch Kt1/NIkM6pY/Sqo00YwiC+VJWQ27LPKHJIUeVmYK7A9XVTtHnmVQDif47MprLY8OJ4Ml N5QbrJGfE81k+pJ+84KWVgxX0dMosYLbjmxHHnMvzovnmdVZZP7AtXTSmXpkSzPWVXc/ 9Ma9rOo0siVm05eu9QUIAAw0nu66XaCSv+tfImX0fKktY+FRkOH7hVGFGlX7D5cDN+3c IhyA== X-Gm-Message-State: AOAM533QpQlHE35jznwO1tItjjmUIQ5oJ9B9hqTEw7sF38fkrQSU2LlZ p3hu47+BJeWiUboV+y0GLS//7Q== X-Google-Smtp-Source: ABdhPJw2g9byjlOuPcRSObz4o40FaDhPEf7OhIi+GNChZIesXRE+MPNBuJiYipRn8nsrRLQdNDN3LQ== X-Received: by 2002:adf:c387:: with SMTP id p7mr358073wrf.95.1610988621672; Mon, 18 Jan 2021 08:50:21 -0800 (PST) Received: from [192.168.86.34] (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.googlemail.com with ESMTPSA id v14sm28797342wru.8.2021.01.18.08.50.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jan 2021 08:50:21 -0800 (PST) Subject: Re: [PATCH v3 0/5] Expose RPi4's bootloader configuration To: Nicolas Saenz Julienne , linux-kernel@vger.kernel.org References: <20210112142342.7290-1-nsaenzjulienne@suse.de> From: Srinivas Kandagatla Message-ID: Date: Mon, 18 Jan 2021 16:50:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210112142342.7290-1-nsaenzjulienne@suse.de> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210118_115024_927817_266E7915 X-CRM114-Status: GOOD ( 18.30 ) 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: devicetree@vger.kernel.org, tim.gover@raspberrypi.com, catalin.marinas@arm.com, linux@armlinux.org.uk, robh+dt@kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, will@kernel.org, phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org 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 On 12/01/2021 14:23, Nicolas Saenz Julienne wrote: > Soon to be released versions of RPi4's firmware will take of care > passing their bootloader's configuration[1] to the OS by copying it into > memory and creating a reserved memory node in the board's DT. By > modeling this reserved memory node as an nvmem device using > 'nvmem-rmem', which this series introduces, user-space applications will > be able to query this information through nvmem's sysfs interface. > > An alternative approach, less nice IMO, would be to create a > platform-specific 'soc' driver. > > Regards, > Nicolas > > [1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md > > --- > > Changes since v2: > - Fix DT bingins > > Changes since v1: > - Avoid the reserved-memory indirection by integrating the nvmem driver > into the reserved memory node. > > Nicolas Saenz Julienne (5): > dt-bindings: nvmem: Add bindings for rmem driver > nvmem: Add driver to expose reserved memory as nvmem > ARM: dts: bcm2711: Add reserved memory template to hold firmware > configuration > arm64: defconfig: Enable nvmem's rmem driver > ARM: multi_v7_defconfig: Enable nvmem's rmem driver > Thanks Applied (1/5) and (2/5), rest of patches should go via arm-soc tree! --srini > .../devicetree/bindings/nvmem/rmem.yaml | 49 ++++++++++ > arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 ++++ > arch/arm/configs/multi_v7_defconfig | 1 + > arch/arm64/configs/defconfig | 1 + > drivers/nvmem/Kconfig | 8 ++ > drivers/nvmem/Makefile | 2 + > drivers/nvmem/rmem.c | 97 +++++++++++++++++++ > drivers/of/platform.c | 1 + > 8 files changed, 176 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/rmem.yaml > create mode 100644 drivers/nvmem/rmem.c > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel