Received: by 10.213.65.68 with SMTP id h4csp860466imn; Wed, 14 Mar 2018 02:13:35 -0700 (PDT) X-Google-Smtp-Source: AG47ELsFWt62hojvEZmXhgzuEGVADb7/N9xdcqYH199XkLFuPt/AfdamvQEDtcAK+unG4lAs3obW X-Received: by 2002:a17:902:566:: with SMTP id 93-v6mr3283517plf.327.1521018815590; Wed, 14 Mar 2018 02:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521018815; cv=none; d=google.com; s=arc-20160816; b=a8b70GooCGjISSFmbN6MK3FjOaj7VsYJZ90fG1kFHo+nNS2t24DcLHAL73nOqyPLpg HR8OzmpEO0N+ETVwFR2HZASGdhq3PO3Cz7sFevZDxMaY/4vmYBQOZYCmz3t4w4/Qc7WJ /GfxvuJVYaqIzCiBwgXD14dEGDMiq3/NMu7w+HGW03i+p3AIcFISuPtvOIeTTHmrWTlP G5l1SO1+I214tdnfaDt6tB+smjUg5WvA56rwDNwDvVhAuwN9C3oWLlDXt1bOsoAcm5AZ /Ie6OVcBw+Zh1+jxqAaRkwgmqqYDL/027Tfj8fM6HuIfWZvFM2zAwXGAFxCcWo12Wi75 lA+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=afGbrdN6W5neon9/vlMAk3TCjl8M5hK9Vs1Sl84kvjE=; b=EBJgq9HsP9ybw9cvAzmTD3/rs9mJA0fiR3hPHDR86pE0QUKe5AjuaJ6dk+Cy+nvbdB ioI0adzBVhhzQ1ZUz9Tn+R9J+Qv/WlQv7Y79riIYA6kEWagVKZM6yMNJ9AzHaE9o/Pvq c/UQNnKsK2la85dHoEg1maq1xbtCvTmGjWIJ14CATaDUAci+lxDvFXRHemaTJR+cbpB0 7pGFHodRkvSrJp9iATkDT8h0og+6t7V3AO5zqhk4wZuLLicyJO5+O1uAkWk4KiYxP2Mx c47tUcmDbPXWtoWxhg9TUlqB/goF9Ac+O2saNDQNreJzYP5VOgvGCRerAsA3SWmRR1Tw hyrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si1745729pff.80.2018.03.14.02.13.21; Wed, 14 Mar 2018 02:13:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751871AbeCNJMK (ORCPT + 99 others); Wed, 14 Mar 2018 05:12:10 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:59861 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbeCNJMJ (ORCPT ); Wed, 14 Mar 2018 05:12:09 -0400 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1ew2S4-0003VO-8L; Wed, 14 Mar 2018 10:12:04 +0100 Message-ID: <1521018722.4490.1.camel@pengutronix.de> Subject: Re: [PATCH 0/2] Introduce STM32MP1 Reset driver From: Philipp Zabel To: gabriel.fernandez@st.com, Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre Torgue Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gabriel.fernandez.st@gmail.com, Loic PALLARDY , benjamin GAIGNARD , Michael Turquette , sboyd@kernel.org Date: Wed, 14 Mar 2018 10:12:02 +0100 In-Reply-To: <1520958859-27911-1-git-send-email-gabriel.fernandez@st.com> References: <1520958859-27911-1-git-send-email-gabriel.fernandez@st.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Gabriel, On Tue, 2018-03-13 at 17:34 +0100, gabriel.fernandez@st.com wrote: > From: Gabriel Fernandez > > This patch-set enables the reset of STM32MP1. > It uses the reset simple driver by introducing the clear register offset > parameter. > STM32MP1 reset IP has a register to assert by writing '1' and another > register to de-assert by writing '1'. > The offset between this two registers is '0x4'. I worry a bit about feature creep in the simple-reset driver. Your patch on its own is simple enough, and I'm not opposed to add a SET/CLR feature on principle, but there are a few issues: The RESET_SIMPLE Kconfig description currently says:   "This enables a simple reset controller driver for reset lines that    that can be asserted and deasserted by toggling bits in a contiguous,    exclusive register space." That would have to be extended to mention SET/CLR register pairs as an alternative. What about status (reset_simple_status)? Can current reset line status be read back from the SET register, as is currently tried? If not, is there a way to read current reset line status back at all? The data->lock spinlock is only needed to protect the read-modify-write cycle on a toggle register, for separate SET/CLR register access the locking is not necessary. At this point, it may or may not be easier to add a custom reset driver. Either way you go, this is missing binding documentation for the st,stm32mp1-rcc compatible in Documentation/devicetree/bindings/reset. > The patch 'dt-bindings: reset: add STM32MP1 resets' could be squashed > with the patch: > 'dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings' > commit 3830681d354f > > Gabriel Fernandez (2): > dt-bindings: reset: add STM32MP1 resets > reset: simple: Enable stm32mp1 reset driver > > drivers/reset/reset-simple.c | 27 +++++-- > drivers/reset/reset-simple.h | 1 + > include/dt-bindings/reset/stm32mp1-resets.h | 108 ++++++++++++++++++++++++++++ > 3 files changed, 130 insertions(+), 6 deletions(-) > create mode 100644 include/dt-bindings/reset/stm32mp1-resets.h regards Philipp