From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yixun Lan Subject: Re: [PATCH v2 1/3] clk: meson: add DT documentation for emmc clock controller Date: Mon, 23 Jul 2018 22:28:36 +0800 Message-ID: <405ff057-a14e-f9eb-19e0-8d467dda35a1@amlogic.com> References: <20180710163658.6175-1-yixun.lan@amlogic.com> <20180710163658.6175-2-yixun.lan@amlogic.com> <20180711194346.GA32414@rob-hp-laptop> <5442a2e8-eb49-2aa8-e53e-8db88cd0bd58@amlogic.com> <8bf565d3-dbfd-e06d-7076-ba78d7a2e766@amlogic.com> <7hbmay3ut6.fsf@baylibre.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <7hbmay3ut6.fsf@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org To: Kevin Hilman Cc: yixun.lan@amlogic.com, Rob Herring , Jerome Brunet , Neil Armstrong , Carlo Caione , Michael Turquette , Stephen Boyd , =?UTF-8?Q?Miqu=c3=a8l_Raynal?= , Boris Brezillon , Martin Blumenstingl , Liang Yang , Qiufang Dai , Jian Hu , linux-clk , linux-amlogic@lists.infradead.org, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" de List-Id: devicetree@vger.kernel.org HI Kevin On 07/23/2018 10:12 PM, Kevin Hilman wrote: > Yixun Lan writes: > > [...] > >>> >>>> Second, we might like to convert eMMC driver to also use mmc-clkc model. >>> >>> IMO, this should be done as part of merging this series. Otherwise, we >>> have duplicated code for the same thing. >> >> IMO, I'd leave this out of this series, since this patch series is quite >> complete as itself. Although, the downside is code duplication. >> >> Still, I need to hear Jerome, or Kevin's option, to see if or how we >> should proceed the eMMC's clock conversion. >> >> I could think of three option myself >> 1) don't do the conversion, downside is code duplication, upside is NO >> DT change, no compatibility issue >> 2) add a syscon node into eMMC DT node, then only convert clock part >> into this mmc-clkc model, while still leave other eMMC register access >> as the usual iomap way (still no race condition) >> 3) convert all eMMC register access by using regmap interface. >> >> both 2) and 3) need to update the DT. >> >> and probably 2) is a compromise way, and 1) is also OK, 3) is probably >> the worst way due to dramatically change (I think this was already >> rejected in the previous discussion) > > Because the devices (NAND and eMMC_C) are mutually exclusive, taking the > step-by-step approach is fine (and preferred) by me. > > Phase 1: > - add new mmc-clk provider > - add NAND driver using new mmc-clk provider > - boards using NAND should ensure emmc_c is disabled in DT > > This allows us to not touch the MMC driver or existing upstream > bindings. Yes, this means there is duplicate code in the MMC driver and > the new mmc-clk provider, but that can be removed in the next phase. > Great, the approach to address this issue is reasonable. We'd like to focus on phase 1 first, thanks > Phase 2: > - convert MMC driver to use new mmc-clk provider > - update MMC users in DT and bindings > Ok. Yixun