Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp653402img; Fri, 22 Mar 2019 06:00:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0mG/1MPKWbBVKBfv//3FieojibH+YNAxzOGJ/t+Zd+aO7hj+aPf0uV7JIqaev6wYKPxkM X-Received: by 2002:a65:64cc:: with SMTP id t12mr9052243pgv.438.1553259650193; Fri, 22 Mar 2019 06:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553259650; cv=none; d=google.com; s=arc-20160816; b=EWMnkEH0VdrrHLcM88PyrKjGRNPiuWmM/tEGZu+GrvcbE421Aj9TuCgmPdyPIFL2BE CmVXlA2s06VJ2LW+cvV5MgjdnumFRiNWrEkVjsK9KzTLGSaj/q49+2pmhjtGxkwnRy8N YQ3y9v1apyr7qhtkpQVM3cz15Y6cbLmn1x0kYZUxgy6dPGd14b+8K2H6znPh2Kao/366 e5Q1aGnG/xWpEOP0ogL7JlaENjq4++Sf728RGpP1ULEo0dN29HB0844ulZjNjHsLNGLI R6MoVp2g/hfR0HUOinCsLhQ/EBv85qItUty69CKMJNlHsFPRAN2GFLPamHSCYfNRn4qt 3TCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vMpX0HaL5vvC5cbRjVPNzJCMGBy+P/0e2MyAFc68qSA=; b=UoM/jdc+eLli+9XJNRU8qUFMFj1vrLJu+np5K42sjT9qSIv2TizkQfwR7nOCGzQK06 APdQkCZz1Wkl9q4aIgd7n12Fyj3n0kHJUcmEg+ld+Uw6cxsX89aUoVOkwYtMIj4gYRbw nPDhi4i8RiMA0IHHBvOtpxXwThala+a27pyGWYPIpoilPhvEo+n9A0bo0rBYciT0MY8B xMICMBMlkdowyy+OUt3ZBQQXFyefsSjpD8GSz+DGDXSZ2VXjEIT7+zWEYTiXDVgi2pkS yB1DqkRjKhj72aS3xT3nP1RiWNVDxhvftfWgMLs0wF2MpHKV/mT9yIaJP+PnwagUvpgu ktaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wJjyY4wf; 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 32si7010710plb.278.2019.03.22.06.00.32; Fri, 22 Mar 2019 06:00:50 -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=@kernel.org header.s=default header.b=wJjyY4wf; 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 S1732530AbfCVM7x (ORCPT + 99 others); Fri, 22 Mar 2019 08:59:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:57570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731794AbfCVM7q (ORCPT ); Fri, 22 Mar 2019 08:59:46 -0400 Received: from localhost (unknown [106.201.33.144]) (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 1ECD4213F2; Fri, 22 Mar 2019 12:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553259585; bh=hYtwuCFhnuQj0X2x7mwLXKB81zPD2nZFA25itFEFtKA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wJjyY4wfOD1YdkihjMq2OGa5KRvI5z6frn6qcUOWDEc8WJqr1oeucQxRxBuzGpGXV P3vsl8D7SVh6gOEOhbXMur33oOCZrglmKo6NoAPLa0q0MQY2dtRQ+JsgYJAeElMo0a EHIRBX8vHq+bnHIGsTyTASR9D48MFdstOvvS1M7M= Date: Fri, 22 Mar 2019 18:29:40 +0530 From: Vinod Koul To: Jernej =?utf-8?Q?=C5=A0krabec?= Cc: maxime.ripard@bootlin.com, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com, dan.j.williams@intel.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH 2/6] dmaengine: sun6i: Add a quirk for additional mbus clock Message-ID: <20190322125940.GE5348@vkoul-mobl> References: <20190307165829.9086-1-jernej.skrabec@siol.net> <20190307165829.9086-3-jernej.skrabec@siol.net> <20190316110753.GH5348@vkoul-mobl> <2451376.qVWA8nfu3q@jernej-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2451376.qVWA8nfu3q@jernej-laptop> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16-03-19, 12:23, Jernej Škrabec wrote: > Hi! > > Dne sobota, 16. marec 2019 ob 12:07:53 CET je Vinod Koul napisal(a): > > On 07-03-19, 17:58, Jernej Skrabec wrote: > > > H6 DMA controller needs additional mbus clock to be enabled. > > > > > > Add a quirk for it and handle it accordingly. > > > > > > Signed-off-by: Jernej Skrabec > > > --- > > > > > > drivers/dma/sun6i-dma.c | 23 ++++++++++++++++++++++- > > > 1 file changed, 22 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c > > > index 0cd13f17fc11..761555080325 100644 > > > --- a/drivers/dma/sun6i-dma.c > > > +++ b/drivers/dma/sun6i-dma.c > > > @@ -129,6 +129,7 @@ struct sun6i_dma_config { > > > > > > u32 dst_burst_lengths; > > > u32 src_addr_widths; > > > u32 dst_addr_widths; > > > > > > + bool mbus_clk; > > > > > > }; > > > > > > /* > > > > > > @@ -182,6 +183,7 @@ struct sun6i_dma_dev { > > > > > > struct dma_device slave; > > > void __iomem *base; > > > struct clk *clk; > > > > > > + struct clk *clk_mbus; > > > > So rather than have mbus_clk and then a ptr, why not use the ptr and use > > NULL value to check for..? > > > > I'm not sure what you mean here. clk_mbus will hold a reference to a clock > retrieved by devm_clk_get() so it has to be "struct clk *". > > What I'm missing here? IIRC there were two variable one clk ptr and one an integer to mark presence, you may be able to skip variable and use ptr.. -- ~Vinod