Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp458288ybz; Fri, 24 Apr 2020 03:29:39 -0700 (PDT) X-Google-Smtp-Source: APiQypJjgyPUkTqkUlH/ETp9VhPhb3aePtwY72agpgFqe6o32X+v5vaxQXawk+/pW5KQcNiYdxvJ X-Received: by 2002:a05:6402:333:: with SMTP id q19mr6732385edw.186.1587724178932; Fri, 24 Apr 2020 03:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587724178; cv=none; d=google.com; s=arc-20160816; b=ju02LgTNMAkGAwSSNVlDPDIQOZ4XUXL7fkwxAw0CrHypBARaDSqFgMy/Rp0auZNtfX bP7mRv0v+idcaYXGBfzqaz+92u3V17YlWAuyTQxZBuQjW7XvtTIweXm/SF5ki1AVs5kL ccegRhujj0RnUbOHn0YJtbdCmAqPP/yYqxKiFTM/HKzyVF0Vtw+UiWl5GpANB87yHwzt IFmGC3bJTqLZenaqo0P9aiH25fqB17tK8Ku1dPHZRNTstFv/xi4NylTnQn77MXsj1bff 3mabCh/pwj3XeSNkkFmAy+zNC8Q4UX0hG+Zuw6gATymZqR0PN+65Svw0YcrAL78OV8mQ m5Kg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=NU9gNIrXb8j0lnXgytIA59G8QFr9LqjWag+ettzm2Mk=; b=b8HEu26wezwkvGkVUZlxgr2yJQlgj8JGR6nC1vike+P0zr87smJiDQlEY9QIKtD0lo 1XxqRt06sEG/mOKBp4IxVBfR/D0tbDiJh8spVmQd56KD2FJVwaDTRvfMprMD/GDHd838 ElvUaZUv23PNxck0tw9rhf+1Hj0QZ97fitXUfY2IvipfjZxfE+q440Xwt9n0z/J2vt/c uqwZDzP8KCgTfup3To63EG5ZAKaM2iTRbiYRaxAS+D9kGL1us4RHNlxp3ryuDOHCwloV BA5WMtqzYAgVAADYMjzgAxcGsKWWT8Y3BozC9Oj14EoZr/rNNwkVIzpLFGl8Ge6lS60Y OCiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si2523193ejs.56.2020.04.24.03.29.15; Fri, 24 Apr 2020 03:29:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbgDXK1v (ORCPT + 99 others); Fri, 24 Apr 2020 06:27:51 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:56651 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbgDXK1v (ORCPT ); Fri, 24 Apr 2020 06:27:51 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 497r383075z1r3dY; Fri, 24 Apr 2020 12:27:48 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 497r381DwHz1qr4s; Fri, 24 Apr 2020 12:27:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id dolzM1ggvfB3; Fri, 24 Apr 2020 12:27:45 +0200 (CEST) X-Auth-Info: sKNCq0LDWdPK1vCn4vD4jzbxqTdPHMFIWhlETY4t0i0= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 24 Apr 2020 12:27:45 +0200 (CEST) Subject: Re: [PATCH v2 02/12] mfd: stm32-fmc2: add STM32 FMC2 controller driver To: Lee Jones , Christophe Kerello Cc: miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, robh+dt@kernel.org, mark.rutland@arm.com, tony@atomide.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, devicetree@vger.kernel.org, Geert Uytterhoeven References: <1586966256-29548-1-git-send-email-christophe.kerello@st.com> <1586966256-29548-3-git-send-email-christophe.kerello@st.com> <20200424074517.GN3612@dell> From: Marek Vasut Message-ID: <8b625f1c-9ded-c07a-a20e-8cd44c1ca46d@denx.de> Date: Fri, 24 Apr 2020 12:27:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200424074517.GN3612@dell> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/24/20 9:45 AM, Lee Jones wrote: > On Wed, 15 Apr 2020, Christophe Kerello wrote: > >> The driver adds the support for the STMicroelectronics FMC2 controller >> found on STM32MP SOCs. >> >> The FMC2 functional block makes the interface with: synchronous and >> asynchronous static memories (such as PSNOR, PSRAM or other >> memory-mapped peripherals) and NAND flash memories. >> >> Signed-off-by: Christophe Kerello >> --- >> Changes in v2: >> - remove ops from stm32_fmc2 structure >> - add 2 APIs to manage FMC2 enable/disable >> - add 2 APIs to manage FMC2 NWAIT shared signal >> >> drivers/mfd/Kconfig | 12 +++ >> drivers/mfd/Makefile | 1 + >> drivers/mfd/stm32-fmc2.c | 136 +++++++++++++++++++++++++ >> include/linux/mfd/stm32-fmc2.h | 225 +++++++++++++++++++++++++++++++++++++++++ >> 4 files changed, 374 insertions(+) >> create mode 100644 drivers/mfd/stm32-fmc2.c >> create mode 100644 include/linux/mfd/stm32-fmc2.h >> >> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig >> index 2b20329..5260582 100644 >> --- a/drivers/mfd/Kconfig >> +++ b/drivers/mfd/Kconfig >> @@ -1922,6 +1922,18 @@ config MFD_ROHM_BD71828 >> Also included is a Coulomb counter, a real-time clock (RTC), and >> a 32.768 kHz clock gate. >> >> +config MFD_STM32_FMC2 >> + tristate "Support for FMC2 controllers on STM32MP SoCs" >> + depends on MACH_STM32MP157 || COMPILE_TEST >> + select MFD_CORE >> + select REGMAP >> + select REGMAP_MMIO >> + help >> + Select this option to enable STM32 FMC2 driver used for FMC2 External >> + Bus Interface controller and FMC2 NAND flash controller. This driver >> + provides core support for the STM32 FMC2 controllers, in order to use >> + the actual functionality of the device other drivers must be enabled. > > Not sure how many times I have to say this before people stop > attempting to pass these kinds of relationships off as MFDs: > > A memory device and its bus is not an MFD. In a similar vain to the > thousands of USB, I2C, SPI, PCI and the like devices that aren't MFDs > either. > > Please find another way to associate your device with its bus. This FMC2 is however an IP which can either operate external devices (like ethernet chip on this parallel bus) or external flashes (like NOR and NAND chips). Can you provide a suggestion how this should be handled, if not as MFD? It seems to me, that this is a Multi-Function Device . If this discussion is a recurring topic, is there some documentation which explains how such devices should be handled ? Thank you