Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5855167imm; Mon, 23 Jul 2018 07:14:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfyOhuKfJyXexEQ2Zsn+cYqa5re/eQ9+Zr4y1McvrrSC9Rp9dO9Z+tHzx1y0gyjEWu2gyU9 X-Received: by 2002:a63:8c0b:: with SMTP id m11-v6mr12526055pgd.372.1532355246497; Mon, 23 Jul 2018 07:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532355246; cv=none; d=google.com; s=arc-20160816; b=fC/AQz0QuCB4IvHiV0A+KvVMC/OiPU8XYf+rppiGnw9HGxhuaFOUz4/gJ15sXSoQEr SS2diVWklDBl6J05DTnsO2p+/4YkhNBOdAlIOTtvE4B06vCICpa82zQrL+5TcA0qQ8j8 SoQPaFfKKIBvjpoWEEsyTnwqb3lHs2dAleQNeFT+XqkUqdIK/9CCW6ECxPce2GU0Hb4o n9Pyn4Ni9lJt6714biCKsjSkL8dsMyw8B99sR3+ekYa8+SN/k4vKzyZfjumIzHfUoEXS XG5H6n5FXQtzlvx3p5GzmOKvC6OEctRWKhSwgJxImCp2AVVDPh5liykx4PvNqCuuJ4iA X/LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1G7ddxHJ8/PU4LOWyN+LeWSOpqoudJeOD+wXTglXgoo=; b=EBMfJB7u3ML70C8aNj8TxdTY4h5FIgMs6Rhq4lJoPj6dB/uq5pVFN18DHGJCcMkTRq ZtUm40NoSh3491xMxZQqfQJL97JWtVQcX0Fk3LdjGpr+5RaX4HfcT7RmvJ8Z5PCVg5kh MtDkRyjpYR3z0xpy9rkX8nJaIRVfEACLu0sTpOxMZ0N5P5vzZS9ovOjVgvYYgEu5yg0D QeUSBTvF4rKczJ/VxbgfqSCSfvQeprFhIj1xgpjdpCMJSLqwpxaVn/Ge2wbgbD0xJ0pp eKhTUs0BQg8LNVoZZ/vA9A8scfWFx1m9DRVXjcs/UVmo3EH9yiFbpQ+xbzVXcx6y7GWY ymPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vWFDx1En; 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 x3-v6si8161666plb.478.2018.07.23.07.13.51; Mon, 23 Jul 2018 07:14:06 -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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vWFDx1En; 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 S2388248AbeGWPNv (ORCPT + 99 others); Mon, 23 Jul 2018 11:13:51 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:54723 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388102AbeGWPNu (ORCPT ); Mon, 23 Jul 2018 11:13:50 -0400 Received: by mail-it0-f67.google.com with SMTP id s7-v6so1676458itb.4 for ; Mon, 23 Jul 2018 07:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version; bh=1G7ddxHJ8/PU4LOWyN+LeWSOpqoudJeOD+wXTglXgoo=; b=vWFDx1En8I14s9ZmQGmKKKJr6cW3WgqCu9x4taMcFxMpU3RLi104DKlyovB7Iv5NPJ rJfH5SU5+r272zhO0B53Ir8WRMYoGsDq22SmTVtuZsVN47B2OukzR8dK/8jt19wojaVx CWYhX4dRoDviVxfxS2xcM6HfnzUaHO4FTWFUqx24pqLVx1PphtcPYTK9sl1WaIMvFjEz NvmyQeZCnjJrg0cnjHI1ZgtOMI9IuksEaA2KPqSBN2Z5AxcyiVKSbfouw2kEIyieb2Hn HVYI5EmcMspl1uWncTGMrPpaOYpgzYIiZAxPh2U0B1PPCp9mXrDff369k6s0Xsng0V2u //Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references:date :in-reply-to:message-id:user-agent:mime-version; bh=1G7ddxHJ8/PU4LOWyN+LeWSOpqoudJeOD+wXTglXgoo=; b=rYOjEeTiyglf0e37yU9kttaIRH4AFVbym91aLPv2FRQETTuboU58uSiwRR/Q2ED1yJ euEevG/DkSWY7OYrC8HUI6ujGh3X1HEl6/OQ1h+MGn6Y6i0xwsFgiZnfY1wiqY0q8/GQ JAndYp+zdhQTevOXiYzknCzdm2jH+ZYdpit+XTE7rnZwHsr4NYlnRGoleC7+oopV9Lou pJ6vJ0mrOaTqILYAeKpqX6ER3oe+HjkNCdWhQZnPced7xRT7PNszuUhdVcWjgigzA4Lp gml8ynQiDNm+osKsU5HcsLOT0ulvKMieG8Kn/kepvU1CnXTykQ9rqlYzUpyTAPUEBzCE jwag== X-Gm-Message-State: AOUpUlE1fMjXhyFF7LAkhqKA9A47CEzc2KSV1p6G9xy7a1tPokZSt+wG 4SFA+VDJQdv2lp0DHJz9fHMfsA== X-Received: by 2002:a24:1a43:: with SMTP id 64-v6mr10117658iti.131.1532355143110; Mon, 23 Jul 2018 07:12:23 -0700 (PDT) Received: from localhost (c-24-118-241-30.hsd1.mn.comcast.net. [24.118.241.30]) by smtp.googlemail.com with ESMTPSA id t64-v6sm7102670ita.13.2018.07.23.07.12.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 07:12:22 -0700 (PDT) From: Kevin Hilman To: Yixun Lan 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" , Subject: Re: [PATCH v2 1/3] clk: meson: add DT documentation for emmc clock controller Organization: BayLibre 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> Date: Mon, 23 Jul 2018 09:12:21 -0500 In-Reply-To: <8bf565d3-dbfd-e06d-7076-ba78d7a2e766@amlogic.com> (Yixun Lan's message of "Fri, 13 Jul 2018 09:55:32 +0800") Message-ID: <7hbmay3ut6.fsf@baylibre.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Phase 2: - convert MMC driver to use new mmc-clk provider - update MMC users in DT and bindings Kevin