Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2688916pxb; Mon, 31 Jan 2022 02:02:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSOBGhANmaVygReObM+w1pM8NfqP30lt2lk7yoHbJHrbEhF6a7XQU/8QVYZSwRF7ds3sRj X-Received: by 2002:a17:902:ecc9:: with SMTP id a9mr20293009plh.58.1643623335468; Mon, 31 Jan 2022 02:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643623335; cv=none; d=google.com; s=arc-20160816; b=rnVh+dPPP083R1BghgTrN45evDnDA17h6h5wEBtcMpAeT++rm2Sp9+axOlfmFy9mxu JkImggdT0gOJnGbq9tet4PDTy3eILtmFmy22byGnTbeDeT+037HabFeHLFDJe80fChfQ sSexa0wUFoL0qv+f7eVakbofBAbStouBMnUvanv/4JQJcqKemNijZpQVWOBmn8HZN4LN 4OMmXKe22UhTrFuCiw/Ry1h8YqEyKkZq25SlmTM94xFV395KMpEPMcXWvk46CagJO633 s6qbdZR32WYsx7yY2FXW9cIiF6W4gvFZZz6eJvRORbkBqypvfHhjMd4vcdj75+bQ1kCD pbDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=xL7JBkbRitQn1ZBPpR6QVzVT7WI1HHBxXORoOBLGmc0=; b=a0nrSRtKGMTcESgu+fWr95WC/4O46s466znHG0uEQ8w0cdnlmPNLcXmOluVAqRn8ce MRmGzoGoumFJVA6MClmKmrCgIV+zb86wZUMjw6nMfGAElaPd7V0Fdd0U0sBqj3MNkKeu 51tDQ+JHt21VzC1dhCP4+Qd51L5jZim9lPGeGCc8jdTBr7O9xYXGM22HSHkU5LdQ+BbJ sq2wiZFvqfIq0tMTVeujwlBaAEvcgXuFobdamLmpmqkopCyjFaJLHDkK7xnRFWgvCE0b wV1TWjtd0fk84U82Xc/zi0PBaB5S6j/yELiSK9fWyh6TMyEF8QPmx9/GMJRro2iP8/hE 32JA== 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 o3si14407464pfu.335.2022.01.31.02.01.54; Mon, 31 Jan 2022 02:02:15 -0800 (PST) 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 S1348334AbiA1MQ2 (ORCPT + 99 others); Fri, 28 Jan 2022 07:16:28 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:35996 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234483AbiA1MQ1 (ORCPT ); Fri, 28 Jan 2022 07:16:27 -0500 Received: from [10.28.39.106] (10.28.39.106) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 28 Jan 2022 20:16:26 +0800 Message-ID: Date: Fri, 28 Jan 2022 20:16:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH v2 1/2] mtd: rawnand: meson: discard the common MMC sub clock framework Content-Language: en-US To: Miquel Raynal CC: , Rob Herring , Richard Weinberger , Vignesh Raghavendra , Jerome Brunet , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Jianxin Pan , Victor Wan , XianWei Zhao , Kelvin Zhang , BiChao Zheng , YongHui Yu , , , , References: <20220128113237.39996-1-liang.yang@amlogic.com> <20220128113237.39996-2-liang.yang@amlogic.com> <20220128124036.25fe0539@xps13> From: Liang Yang In-Reply-To: <20220128124036.25fe0539@xps13> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.28.39.106] X-ClientProxiedBy: mail-sz.amlogic.com (10.28.11.5) To mail-sz.amlogic.com (10.28.11.5) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquel, Thanks for the review and quick response. On 2022/1/28 19:40, Miquel Raynal wrote: > [ EXTERNAL EMAIL ] > > Hi Liang, > > liang.yang@amlogic.com wrote on Fri, 28 Jan 2022 19:32:36 +0800: > >> EMMC and NAND has the same clock control register named 'SD_EMMC_CLOCK' which is > > have ok > >> defined in EMMC port internally. bit0~5 of 'SD_EMMC_CLOCK' is the divider and >> bit6~7 is the mux for fix pll and xtal. > >> Previously a common MMC sub clock framework is implemented and shared by EMMC and > > I believe you meant that this hasa already been contributed? I would > then rephrase with: > > A common MMC and NAND sub-clock has been implemented and can be used by > the eMMC and NAND controller (which are mutually exclusive anyway). > > Let's use this new clock. ok. thanks > >> NAND, but that is coupling the EMMC and NAND, although EMMC and NAND is mutually >> exclusive. >> >> Change-Id: Ibeb4c7ff886f5886aac4d6c664d7bbd1b1bcb997 > > No change Ids. ok. i will delete next version. > >> Signed-off-by: Liang Yang >> --- >> drivers/mtd/nand/raw/meson_nand.c | 161 +++++++++++++++++------------- >> 1 file changed, 89 insertions(+), 72 deletions(-) >> >> diff --git a/drivers/mtd/nand/raw/meson_nand.c b/drivers/mtd/nand/raw/meson_nand.c >> index ac3be92872d0..f6a3d5c2ea1c 100644 >> --- a/drivers/mtd/nand/raw/meson_nand.c >> +++ b/drivers/mtd/nand/raw/meson_nand.c >> @@ -2,7 +2,7 @@ >> /* >> * Amlogic Meson Nand Flash Controller Driver >> * >> - * Copyright (c) 2018 Amlogic, inc. >> + * Copyright (c) 2018-2021 Amlogic, inc. > > Please don't. > >> * Author: Liang Yang >> */ >> >> @@ -10,6 +10,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -19,6 +20,7 @@ >> #include >> #include >> #include >> +#include >> #include >> >> #define NFC_REG_CMD 0x00 >> @@ -104,6 +106,9 @@ >> >> #define PER_INFO_BYTE 8 >> >> +#define CLK_DIV_SHIFT 0 >> +#define CLK_DIV_WIDTH 6 >> + >> struct meson_nfc_nand_chip { >> struct list_head node; >> struct nand_chip nand; >> @@ -151,15 +156,17 @@ struct meson_nfc { >> struct nand_controller controller; >> struct clk *core_clk; >> struct clk *device_clk; >> - struct clk *phase_tx; >> - struct clk *phase_rx; >> + struct clk *nand_clk; >> + struct clk_divider nand_divider; >> >> unsigned long clk_rate; >> u32 bus_timing; >> >> struct device *dev; >> - void __iomem *reg_base; >> - struct regmap *reg_clk; >> + struct { >> + void __iomem *reg_base; >> + void __iomem *sd_emmc_clock; >> + } res; > > Please split your commit: first the mechanical changes, then the use of > the new area or something like that. > > Otherwise there are too many lines changed, I can't spot where it is > interesting. ok. i will split it next version. thanks. > > Thanks, > Miquèl > > .