Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2876964imu; Fri, 18 Jan 2019 00:33:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN4W5dwHXgbUC+sjq5DL9sajuVEfgpjOmB5CIZ0jPRULm7EPj1pj4UT/F6iZUT5MjVpDy9kz X-Received: by 2002:a63:a30a:: with SMTP id s10mr15728177pge.234.1547800412842; Fri, 18 Jan 2019 00:33:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547800412; cv=none; d=google.com; s=arc-20160816; b=weiJSpmSV+9qV9SZZyh53pLeXOitPm7xEyopbxXyNLmqF75xtQ/76dnumT06HCVFna LQIqB0ruOlnTCU3Wy3odRa83ugIhd04o07myWOoaZ7jy8To6X30oHh1VGsTF/kvIuCm2 9PAr7PH/XmbTHCwIbKLrq4z8pMs7BYfw20CO95Dnv7qRpXGlyWIFUOS8+GAoJ5BDrGzM Zd/cWzkpUqp1hkdmLhzevl/lKOXgNolK5ApSKwwxew9kC7ZCthWGjsZHSWtcNkQcwIel WDdyeQP4zp5LhuiFkBQ6vlE8oGLAMWZ2KeTTMN3eeaSRYvoBRqceGATJQlwi5d5nb+xI 5z2g== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=jmic0qGQa00Od4Yu84gjG797Azdz01h4rU7dZ+ox1zE=; b=WlJnLYH/poUfDuA0xQnYg74IYnSPNemm13naxhK3o6IZwl0/oJhYUS2NVauO/o8uxC +py/F14PDUaF1o6ggN5yvxoWpzrltnJfJRFt/d9BRbPnIKu2RYLtXiy6CAeLGGHnvSwd MkF1dt6W7k2dCVFeg8HF3UbQk3OLGZDBPsDq6ACD8ihMo7OEwc/vj4222okeQNMwJxho qJG93jTe0xfghEm5gtK/wh3ECQmgpKFMKzMIbfkRY4Gqbeqi5dnQr247wlzRJ1nLoRIK l/m56CHeE+nvr0adqrRUEKt4awXRnMLsJcLohYWBEXoKO2OICZMmFBucIoL5uhVKqtrS uP9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l7e694dC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si2577274plj.129.2019.01.18.00.33.14; Fri, 18 Jan 2019 00:33:32 -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; dkim=pass header.i=@kernel.org header.s=default header.b=l7e694dC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727403AbfARIbb (ORCPT + 99 others); Fri, 18 Jan 2019 03:31:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:46468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbfARIba (ORCPT ); Fri, 18 Jan 2019 03:31:30 -0500 Received: from bbrezillon (91-160-177-164.subs.proxad.net [91.160.177.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C208220823; Fri, 18 Jan 2019 08:31:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547800290; bh=j4wJkOh8VBMuO7q7T8A8LmO1ycPaKYrAP1xJRrV6BI0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=l7e694dChsW66HRP6c7dVMlfNHym6zFg3coasB6CzNx+pXtx+nwo0NkkyGuKfZedB iLsYf+A5qKaL1Cb2K4AKhpx7n4u2QT8Cp6PbJv1IHwDfVvTuBWFVXrnx4QmvWigx9F fXoln2l/FdqaSNQcEIunaBM+jc3OTdbepd7ZCmh0= Date: Fri, 18 Jan 2019 09:31:16 +0100 From: Boris Brezillon To: Paul Cercueil Cc: David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Rob Herring , Mark Rutland , Ralf Baechle , Paul Burton , James Hogan , Miquel Raynal , Harvey Hunt , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH 6/8] mtd: rawnand: jz4780-bch: Don't set clock rate in driver Message-ID: <20190118093116.5f62efa5@bbrezillon> In-Reply-To: <20190118010634.27399-6-paul@crapouillou.net> References: <20190118010634.27399-1-paul@crapouillou.net> <20190118010634.27399-6-paul@crapouillou.net> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Jan 2019 22:06:32 -0300 Paul Cercueil wrote: > This should be done in devicetree. Besides, it prevents us from > supporting other SoCs which don't use the same clock frequency for the > BCH hardware. As I said earlier, I disagree with this statement, plus, you're breaking backward compat with existing DTs when doing that. > > Signed-off-by: Paul Cercueil > --- > drivers/mtd/nand/raw/jz4780_bch.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/mtd/nand/raw/jz4780_bch.c b/drivers/mtd/nand/raw/jz4780_bch.c > index 7e4e5e627603..161d3821e1c4 100644 > --- a/drivers/mtd/nand/raw/jz4780_bch.c > +++ b/drivers/mtd/nand/raw/jz4780_bch.c > @@ -57,8 +57,6 @@ > #define BCH_BHINT_UNCOR BIT(1) > #define BCH_BHINT_ERR BIT(0) > > -#define BCH_CLK_RATE (200 * 1000 * 1000) > - > /* Timeout for BCH calculation/correction. */ > #define BCH_TIMEOUT_US 100000 > > @@ -348,8 +346,6 @@ static int jz4780_bch_probe(struct platform_device *pdev) > return PTR_ERR(bch->clk); > } > > - clk_set_rate(bch->clk, BCH_CLK_RATE); > - > mutex_init(&bch->lock); > > bch->dev = dev;