Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5872450imm; Mon, 23 Jul 2018 07:30:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbRVKVjUfyUaGI5N9t0+OfyIq4deRdXY8E36B2VGDiJu/C1ndWM09cCAV5LODFmOlspCH7 X-Received: by 2002:a62:1089:: with SMTP id 9-v6mr13224153pfq.30.1532356243115; Mon, 23 Jul 2018 07:30:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532356243; cv=none; d=google.com; s=arc-20160816; b=Qj+ByEAqRo/xhQ+NdU5njJbnVTWZD14o3+xtbSzGr6VUHKKX5VXTmH48zZnVTGTqvA h6mVy/WSEJ7+EFfCXSyLVBC/7Hrw6nJhZpxJbDlvq6ysdoE1GQcr5j7xjicHd2fy583x O7OCWDW72ix8JeojLMvkkrNUJ7Bo4Q41LhNT1Yr3KBJtn1KD3kVMrCF55UKmIomKejnv 8ZaaDtAzD0dM4UdM8jfiyg8LG6np8DDHjP9XtF1r1Zp/Gs7zK8SSCRsjnb3QKuqkd4AQ DJ5vq4NQTFdrWudMgHFjJyfqS/9+PgHw95DFguCUlbfqbz6gtOLF5Btmex8nkwrQmCTb yhSA== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=DdO8QhC4BnVOGnv4d/eedXC730eLy31hoAK9k3tnNxY=; b=uRwujLpLKjF67Dr11WB/Wm/3m6H8+IMC3W20QGDxbdxuD7v0Vu2hRsgvnyWV/0AbR0 MS4ez3BXYwxVbivp+qbbA4I65Sgpj9yk8aU7U4mkER1xhneilhUvYeE2vftpoh9rsPJW CqdKJL6ARzEaphhsqLx/NR8IrUC6Kr/VRqw+GDuTYUrUxhUemZvkNU2rPq6sSb43RiU3 rI3s9eFFq3JwWO7LXCwBjDc34z2L/C6xGJK1+B8bWBDZWNGJMZI2CMuYMjvFlTsmTgd6 Ezj1SjVOXQ2MLQPSTL6TQ1zOzNm5rGOw0sVMyyUiQC4D5eoZPF33B68GSyzvpScSYS/6 kAsQ== 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 b13-v6si8844265pgh.255.2018.07.23.07.30.28; Mon, 23 Jul 2018 07:30:43 -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 S2388551AbeGWPaL (ORCPT + 99 others); Mon, 23 Jul 2018 11:30:11 -0400 Received: from mail-sh2.amlogic.com ([58.32.228.45]:16317 "EHLO mail-sh2.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388197AbeGWPaK (ORCPT ); Mon, 23 Jul 2018 11:30:10 -0400 Received: from [192.168.90.67] (61.170.236.39) by mail-sh2.amlogic.com (10.18.11.6) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 23 Jul 2018 22:28:42 +0800 Subject: Re: [PATCH v2 1/3] clk: meson: add DT documentation for emmc clock controller To: Kevin Hilman 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> CC: , 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 , , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" , From: Yixun Lan Message-ID: <405ff057-a14e-f9eb-19e0-8d467dda35a1@amlogic.com> Date: Mon, 23 Jul 2018 22:28:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <7hbmay3ut6.fsf@baylibre.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [61.170.236.39] X-ClientProxiedBy: mail-sh2.amlogic.com (10.18.11.6) To mail-sh2.amlogic.com (10.18.11.6) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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