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=-9.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_BLACK, 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 E0624C433B4 for ; Mon, 10 May 2021 03:45:27 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 6E4636109F for ; Mon, 10 May 2021 03:45:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E4636109F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:Subject: From:References:Cc:To:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ipR+8wFij90wyHjeFg6hG1YuhsPfCKHJhBJ1Ae8o8go=; b=a0Qt+660mXfyC3ELsX89OLFt+ LSM0QTczUt0/6b9DUZbjq/RLapQOZIIvW4J3yE3r5k5+jL6mZE7ZFiWoB8W+MVg5u1KidlHvbFaIW Vis/2XGT401JuvAVG590R7kts2oquMfXxlFGGE7Fuq7ybBxT6IG2gKRPyKAA//HOz+/WLarHpZ+oB 5t6osAW0WjeOLDzs1WrFPil0nrUlQS/A1be1HdC4mP6qGh8ngnPtDEpgMcSOoXo5QlLzMeNq+pX3a c2oQ7EUV/8rgBE072TCBRcS096zBKy6G0nIOzwdj70jvn/GymsrZXVNJZ3PLGZtZztpMYZONrRtt6 t2eo0HkKQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfwog-00D1jz-68; Mon, 10 May 2021 03:42:47 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfwlh-00D0wt-Em for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 03:39:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:Subject:From:References :Cc:To:Sender:Reply-To:Content-ID:Content-Description; bh=IZUFszC6jE/mtDj0KCiCRll83jCHjDqxXjCZzLBuhwU=; b=rDNvfl/1YeZU2kpCIx8AmNHB37 WM6CFNETov6H7iW/47UmlpR6J3Qb9tLDbWy0tuf3iSAnR0N00vpjDCCbdVutMKU5+GZXU1dMLxeLV 9SAUG1Ngk7z2D16FdTme2APs3FRqP7hyJR6TbMJfk89gKsMV0UbofMqLec9+pa9sPfnhACV76QXYv KYOADJ7KnebhhfyTFmbpXH1aF6IBf5Aa6uAx+U4DSG9TkfDlY5KPDQdCKvpPkd2PZ1Kt1MYhwYEsc +t8EA00/WK8s4TS5Slj8n4OmZh7aCazl5I18yKB2CP/o8xJRpzN2IBfGO3H5K6mg5uRCws88hbcmS ic1jmCZQ==; Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfwle-008FJg-Sx for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 03:39:40 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 50D4917C4; Sun, 9 May 2021 23:39:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 09 May 2021 23:39:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= to:cc:references:from:subject:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=I ZUFszC6jE/mtDj0KCiCRll83jCHjDqxXjCZzLBuhwU=; b=lapYcN9ptLh86Cscs MMQRNm8UYK3+e08/ShU/GX1v1v9lBEMi3Cew5KOAhtIfOQHzebOdqVUJugyIayKt 1tV2H1om0IFFvBuH5WKWgZedJw//3R/PqD3g6fJJcgHjoYc3IxdbT22in1BM7/6u Q8+plX63zDvHKOr1ycqVQy+xB1cTyvt2jun1klGiP1y55PqsjannHnvb/dM6oKX+ G1j2OhwN65Z5xeeKRorHRGRdfQ0a6KZUaZsOYpeS3jimJ6x92FQyI3sLQDH1H1YN eoSacoJuDzJBmd8yYpvhq8E2pdT10ounLChSE7tbyfZ+rtDwIF+d+STSjWgd1JRv UaVkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=IZUFszC6jE/mtDj0KCiCRll83jCHjDqxXjCZzLBuh wU=; b=msGzqQU1RGw9+1Txytj0DVNTIs4+ucYxyiQh0ajyDCR1VVX2NNvk8AEsf SsoRqMAq79NEvpah5BMJz3COnMo0JtsUe8G7KWofRBP4OcLfG+asv0LFFLFb8NAB aT9VThGcrs777j2N5acJp9T1YH7jC78rKplrVcE+/4QfxL1I7ry+JyAbf6rqgYF9 tdAlHZ+Qa6IAh+bjilqKsw61jkuZB52g2cGuk3yjPdPZk8JmbcXAthkYzJg+MyAf wNsjhkvqQaf6Q7D4DUJlZ5wVkBmkKGO7Zv63kcf7YfCjFlu834Q2dvkMVyYVxfXH 4hIhHNZkzDvtSbcuPjxGTDyN2D8XQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegjedgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepvfhfhffukffffgggjggtgfesthekredttdefheenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepheejgefhudeffeetleeigefgheetveeiteeuffehhfffkeeuvdff veffveetudefnecukfhppeejtddrudefhedrudegkedrudehudenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgr nhgurdhorhhg X-ME-Proxy: Received: from [70.135.148.151] (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 May 2021 23:39:31 -0400 (EDT) To: Maxime Ripard Cc: Alessandro Zummo , Alexandre Belloni , Chen-Yu Tsai , Jernej Skrabec , linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org References: <20210419014549.26900-1-samuel@sholland.org> <20210430090206.lybmygrt636nysoc@gilmour> From: Samuel Holland Subject: Re: [PATCH] rtc: sun6i: Add NVMEM provider Message-ID: Date: Sun, 9 May 2021 22:39:30 -0500 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210430090206.lybmygrt636nysoc@gilmour> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210509_203938_978590_ED834C10 X-CRM114-Status: GOOD ( 20.24 ) 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 4/30/21 4:02 AM, Maxime Ripard wrote: > Hi, > > On Sun, Apr 18, 2021 at 08:45:49PM -0500, Samuel Holland wrote: >> The sun6i RTC provides 32 bytes of general-purpose data registers. >> They can be used to save data in the always-on RTC power domain. >> The registers are writable via 32-bit MMIO accesses only. >> >> Expose the region as a NVMEM provider so it can be used by userspace and >> other drivers. >> >> Signed-off-by: Samuel Holland > > As far as I understood, you want to use those registers to implement > super-standby? If so, while it makes sense for the kernel to be able to > be able to write to those registers, I guess it would be a bit unwise to > allow the userspace to access it? I want the user to be able to pass information to the bootloader (to select a boot device, e.g. reboot to FEL). I also want the user to be able to read data stored to these registers by system firmware (e.g. crust writes exception information there). It's not really related to standby. I would want to stack a nvmem-reboot-mode on top to give friendlier names to some of the numbers, but I don't see a problem with root having direct access to the registers. It's no different from /dev/nvram providing access to the PC CMOS RAM. Regards, Samuel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel