Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5297772imu; Tue, 13 Nov 2018 04:30:28 -0800 (PST) X-Google-Smtp-Source: AJdET5fkdRNKAOsj25Vpc2g16BBVdlHKILvteAd+xiz5Xmy0I3k12VbG/DlS7QuRamFVhCYoulha X-Received: by 2002:a62:da54:: with SMTP id w20-v6mr4965521pfl.106.1542112228036; Tue, 13 Nov 2018 04:30:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542112228; cv=none; d=google.com; s=arc-20160816; b=MHRCoOhThaA457QNlRY6Z7snskYCAr3ZY8qq6Y6/mG2dBrkWlKZOTbQkrdEDxf/UbS Zofa/t6wai0OTDWkWFocuTjGoG5kalIMP0nbe+G4Sxap4fltDCRkp7BeNdXPZWr70yUt wpmXqFd/8plWOWH08Jjh/YNd8RtLNa5kPD21TbxCZVFPN/4/vHtD4CPOzL1b1itfZP7U +Cs20qLvdmEN16AGRwWFQKNkEwn2Byp6mn8vAWRoaqYupaoeqeWFb/dzuRIpzv4Sp9mV IV5pyhsEtCByFqz1evZVR82xuhp8D9HG05tDIU5OGQS5mUrsThEaBq6ncKc/mkUFrR+E xRyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to:date; bh=CAIqEQ9I54Yl50p+oqp6yDKp7kP4Wm2wA4VWuVAY30I=; b=zADN0VtCBwJMjLcC1DsptZ7zblY8xhdDMI/oUY8JCUekPy3yn4fu0mUhyJ9hkILH6n OcqfTnIFOuA6vS6wj+G3NKsg4Bf/3i7gs634Cnm1oKAMfrTb9nsVVxGYJR3wyoLRcct8 hTPR4O7OcMErfBAXaiV07Z+ImwgMj5jXSGSg14ZMGZ6MrzQnPNTVToO4aN94SVB772Df FJrVWS/Kx518bUiU5FVz5URgVksQhY6tYjOZPiXYRNyHMn4uJIyy9nroPrwg9M7GNJ3L Y9SVQPJalhXDbbYfASx99JQCMc4dQCzIz9fJ7MlY7F1LQ9jwCj34AkRNtE9uzd7ZRUUt QCWQ== 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 c2-v6si20970509plb.123.2018.11.13.04.30.12; Tue, 13 Nov 2018 04:30:28 -0800 (PST) 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 S1733232AbeKMWZz convert rfc822-to-8bit (ORCPT + 99 others); Tue, 13 Nov 2018 17:25:55 -0500 Received: from hermes.aosc.io ([199.195.250.187]:37216 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732743AbeKMWZz (ORCPT ); Tue, 13 Nov 2018 17:25:55 -0500 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 67033A2847; Tue, 13 Nov 2018 12:27:56 +0000 (UTC) Date: Tue, 13 Nov 2018 20:27:50 +0800 In-Reply-To: <20181113055053.78352-31-sashal@kernel.org> References: <20181113055053.78352-1-sashal@kernel.org> <20181113055053.78352-31-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH AUTOSEL 4.18 31/39] clk: sunxi-ng: sun50i: h6: Add 2x fixed post-divider to MMC module clocks To: Sasha Levin , stable@vger.kernel.org, linux-kernel@vger.kernel.org CC: Maxime Ripard , linux-clk@vger.kernel.org From: Icenowy Zheng Message-ID: <19C4C784-F94E-49D0-883C-12C49EF2676A@aosc.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2018年11月13日 GMT+08:00 下午1:50:45, Sasha Levin 写到: >From: Icenowy Zheng > >[ Upstream commit c2ff8383cc33c2d9c169e4daf1e37a434c3bb420 ] > >On the H6, the MMC module clocks are fixed in the new timing mode, >i.e. they do not have a bit to select the mode. These clocks have >a 2x divider somewhere between the clock and the MMC module. > >To be consistent with other SoCs supporting the new timing mode, >we model the 2x divider as a fixed post-divider on the MMC module >clocks. > >This patch adds the post-dividers to the MMC clocks, following the >approach on A64. > >Fixes: 524353ea480b ("clk: sunxi-ng: add support for the Allwinner H6 >CCU") >Signed-off-by: Icenowy Zheng >Signed-off-by: Maxime Ripard >Signed-off-by: Sasha Levin Please don't select this, it needs some fixes in MMC driver. >--- > drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 43 +++++++++++++++------------- > 1 file changed, 23 insertions(+), 20 deletions(-) > >diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c >b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c >index bdbfe78fe133..3d60f7978506 100644 >--- a/drivers/clk/sunxi-ng/ccu-sun50i-h6.c >+++ b/drivers/clk/sunxi-ng/ccu-sun50i-h6.c >@@ -408,26 +408,29 @@ static SUNXI_CCU_GATE(bus_nand_clk, "bus-nand", >"ahb3", 0x82c, BIT(0), 0); > >static const char * const mmc_parents[] = { "osc24M", "pll-periph0-2x", > "pll-periph1-2x" }; >-static SUNXI_CCU_MP_WITH_MUX_GATE(mmc0_clk, "mmc0", mmc_parents, >0x830, >- 0, 4, /* M */ >- 8, 2, /* N */ >- 24, 3, /* mux */ >- BIT(31),/* gate */ >- 0); >- >-static SUNXI_CCU_MP_WITH_MUX_GATE(mmc1_clk, "mmc1", mmc_parents, >0x834, >- 0, 4, /* M */ >- 8, 2, /* N */ >- 24, 3, /* mux */ >- BIT(31),/* gate */ >- 0); >- >-static SUNXI_CCU_MP_WITH_MUX_GATE(mmc2_clk, "mmc2", mmc_parents, >0x838, >- 0, 4, /* M */ >- 8, 2, /* N */ >- 24, 3, /* mux */ >- BIT(31),/* gate */ >- 0); >+static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc0_clk, "mmc0", >mmc_parents, 0x830, >+ 0, 4, /* M */ >+ 8, 2, /* N */ >+ 24, 3, /* mux */ >+ BIT(31), /* gate */ >+ 2, /* post-div */ >+ 0); >+ >+static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1", >mmc_parents, 0x834, >+ 0, 4, /* M */ >+ 8, 2, /* N */ >+ 24, 3, /* mux */ >+ BIT(31), /* gate */ >+ 2, /* post-div */ >+ 0); >+ >+static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", >mmc_parents, 0x838, >+ 0, 4, /* M */ >+ 8, 2, /* N */ >+ 24, 3, /* mux */ >+ BIT(31), /* gate */ >+ 2, /* post-div */ >+ 0); > >static SUNXI_CCU_GATE(bus_mmc0_clk, "bus-mmc0", "ahb3", 0x84c, BIT(0), >0); >static SUNXI_CCU_GATE(bus_mmc1_clk, "bus-mmc1", "ahb3", 0x84c, BIT(1), >0);