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=-7.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLACK autolearn=no 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 08390C433ED for ; Mon, 10 May 2021 08:02:36 +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 4AF1461430 for ; Mon, 10 May 2021 08:02:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4AF1461430 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com 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: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=yXF9lQfacJexkEpq4nMT7P0j+4uvL5PWueYUgGesabk=; b=IpwYwF3c6rQmLM+6mlmuSDq4b O3usHlp0gF/d9oMpjZbX6r75KRAVllWZo1YK/3Ji+z6m29HsHBevE1QCRlE1NW3MarCv7qTe1KSXv /QyykfCjYdflQlXTtVsZUjlbNfu3ygIXbL/X+gZMOtLJv0rx0/ey6SfloGUmCu26rSVJeocm0aLyP g7AIYNu4egQxCfJfpMuZROAuVvErZyE0xK3daiIHSI03L2c846SQaW+0b1jhg4o0+lsWqgfM1JjkE 9Uo68pf8zOPjRrBAnkvbrSail6emd3ceH0wKbS4XOGgoRuvCgztKDjOclv3ypkXz0RLCCtFo18E9g Txvn6xUCg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg0qc-00Da9X-Mc; Mon, 10 May 2021 08:01:03 +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 1lg0qZ-00Da8z-RX for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 08:00:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nj/vcEvCCIk1yKyzfaUV6QzG70q+rCypi+Lrq169A18=; b=GsE1pfSeX5slPhRF4vDvjyVIUc UDUdAN9r3ZO6cqit4630OdjC0ZdP8iZdH1cuvU04gtwFMBJ6WmbzAvRU4Tw9S8GLLBaRXpEq5dWZn /Ji2GChEoeKCb7KO/p3msbtI6LETe093rTDWQ+dvkE/H6KMdkeIGiF+1qJOm91aY44BMwCnZDIaDn eM3sLJvUTWB4JwulbERXeqgw/kTwBkFwFKeEzx6JSZnqd9LqnolmWmxghY87K2bhmI3eGzAj2q4Px /r/BzLqgPvIh8HG3QBqaiicqXrL5588KFFjf2YJyvy3DazfZ3b0deIulZ+HB2HFmihPytKYOIiC+f O5fAqubw==; Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg0qW-008OTL-SP for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 08:00:58 +0000 X-Originating-IP: 90.65.108.55 Received: from localhost (lfbn-lyo-1-1676-55.w90-65.abo.wanadoo.fr [90.65.108.55]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 3890C240006; Mon, 10 May 2021 08:00:46 +0000 (UTC) Date: Mon, 10 May 2021 10:00:46 +0200 From: Alexandre Belloni To: Samuel Holland Cc: Maxime Ripard , Alessandro Zummo , 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 Subject: Re: [PATCH] rtc: sun6i: Add NVMEM provider Message-ID: References: <20210419014549.26900-1-samuel@sholland.org> <20210430090206.lybmygrt636nysoc@gilmour> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_010057_074583_23E473B5 X-CRM114-Status: GOOD ( 24.45 ) 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 09/05/2021 22:39:30-0500, Samuel Holland wrote: > 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. > (which is deprecated in favor of nvmem) -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel