[{"id":1769940,"web_url":"http://patchwork.ozlabs.org/comment/1769940/","msgid":"<20170918075732.wptp75sh3ovhdukp@flea.lan>","list_archive_url":null,"date":"2017-09-18T07:57:32","subject":"Re: [PATCH v2 01/10] dmaengine: sun6i: Correct setting of clock\n\tautogating register for A83T/H3","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"Hi,\n\nOn Sun, Sep 17, 2017 at 05:19:47AM +0200, Stefan Brüns wrote:\n> The H83T uses a compatible string different from the A23, but requires\n> the same clock autogating register setting.\n> \n> The H3 also requires setting the clock autogating register, but has\n> the register at a different offset.\n> \n> Add three suitable callbacks for the existing controller generations\n> and set it in the controller config structure.\n> \n> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>\n> ---\n>  drivers/dma/sun6i-dma.c | 31 ++++++++++++++++++++++++++-----\n>  1 file changed, 26 insertions(+), 5 deletions(-)\n> \n> diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c\n> index bcd496edc70f..45bcd5271d94 100644\n> --- a/drivers/dma/sun6i-dma.c\n> +++ b/drivers/dma/sun6i-dma.c\n> @@ -48,6 +48,9 @@\n>  #define SUN8I_DMA_GATE\t\t0x20\n>  #define SUN8I_DMA_GATE_ENABLE\t0x4\n>  \n> +#define SUNXI_H3_SECURE_REG\t\t0x20\n> +#define SUNXI_H3_DMA_GATE\t\t0x28\n> +#define SUNXI_H3_DMA_GATE_ENABLE\t0x4\n>  /*\n>   * Channels specific registers\n>   */\n> @@ -111,7 +114,7 @@ struct sun6i_dma_config {\n>  \t * however these SoCs really have and need this bit, as seen in the\n>  \t * BSP kernel source code.\n>  \t */\n> -\tbool gate_needed;\n> +\tvoid (*clock_autogate_enable)();\n>  };\n>  \n>  /*\n> @@ -267,6 +270,20 @@ static inline s8 convert_buswidth(enum dma_slave_buswidth addr_width)\n>  \treturn addr_width >> 1;\n>  }\n>  \n> +static void sun6i_enable_clock_autogate_noop(struct sun6i_dma_dev *sdev)\n> +{\n> +}\n\nI guess instead of that one, we could just test for the pointer and\nnot call the function if it's NULL?\n\nLooks good otherwise, once fixed, you have\nAcked-by: Maxime Ripard <maxime.ripard@free-electrons.com>\n\nMaxime","headers":{"Return-Path":"<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming-imx@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-imx@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org\n\theader.b=\"JX0lKQfg\"; dkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xwdfN0zKsz9s7G\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 17:58:04 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dtqwK-0004Dl-Ic; Mon, 18 Sep 2017 07:58:00 +0000","from mail.free-electrons.com ([62.4.15.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dtqwE-000477-OI for linux-arm-kernel@lists.infradead.org;\n\tMon, 18 Sep 2017 07:57:57 +0000","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 0556120A2E; Mon, 18 Sep 2017 09:57:33 +0200 (CEST)","from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id CA19020A1A;\n\tMon, 18 Sep 2017 09:57:32 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc:\n\tList-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:\n\tIn-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=Z2BDqXy060TpVE1mkgOC45IreFNTLY50zTWRQVlssWU=;\n\tb=JX0lKQfgw7PR6BCeJAjgwGSEj\n\t1CWMp5qt0TI7BbNgg4sgDducpXHDvkF2wLIluY9QOXEyu//j+GUhzgvFP+yp+r85drJK0OPfUIhbE\n\thAQS+gAnzSz2yO3KYoucKzEA1dDvmx41ykJkwNdhu/XkdtoWHVbIXN+oAmdlRvX8x5Ju3tiDN2o51\n\t9XnjlwJ55Mx5yuVy2iWHWMwnBTMiYY9vYzLxDYfnd4CpXjzCrtRJCEQ/CmLxusOwYDIW4xwGF9Yo8\n\tez3qlOXUtF7byEpxswg3sXnEIQ2Kn/eE9sWgLrP3bC6PAuucVY5BtaEOggoCIwft2PE1qFYOkHPN7\n\tngwMJm2zw==;","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT\n\tshortcircuit=ham autolearn=disabled version=3.4.0","Date":"Mon, 18 Sep 2017 09:57:32 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Stefan =?iso-8859-1?q?Br=FCns?= <stefan.bruens@rwth-aachen.de>","Subject":"Re: [PATCH v2 01/10] dmaengine: sun6i: Correct setting of clock\n\tautogating register for A83T/H3","Message-ID":"<20170918075732.wptp75sh3ovhdukp@flea.lan>","References":"<20170917031956.28010-1-stefan.bruens@rwth-aachen.de>\n\t<20170917031956.28010-2-stefan.bruens@rwth-aachen.de>","MIME-Version":"1.0","In-Reply-To":"<20170917031956.28010-2-stefan.bruens@rwth-aachen.de>","User-Agent":"NeoMutt/20170714 (1.8.3)","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170918_005755_184241_B6AA5793 ","X-CRM114-Status":"GOOD (  19.01  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-arm-kernel@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-arm-kernel/>","List-Post":"<mailto:linux-arm-kernel@lists.infradead.org>","List-Help":"<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>","Cc":"devicetree@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>,\n\tAndre Przywara <andre.przywara@arm.com>, linux-kernel@vger.kernel.org,\n\tCode Kipper <codekipper@gmail.com>, linux-sunxi@googlegroups.com,\n\tRob Herring <robh+dt@kernel.org>, dmaengine@vger.kernel.org,\n\tChen-Yu Tsai <wens@csie.org>, linux-arm-kernel@lists.infradead.org","Content-Type":"multipart/mixed;\n\tboundary=\"===============2242555142244410155==\"","Sender":"\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>","Errors-To":"linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org","List-Id":"linux-imx-kernel.lists.patchwork.ozlabs.org"}}]