Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751592AbcLEIwd (ORCPT ); Mon, 5 Dec 2016 03:52:33 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33179 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204AbcLEIw0 (ORCPT ); Mon, 5 Dec 2016 03:52:26 -0500 Date: Mon, 5 Dec 2016 09:52:20 +0100 From: Corentin Labbe To: Ryder Lee Cc: Herbert Xu , "David S. Miller" , Matthias Brugger , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sean Wang , Roy Luo Subject: Re: [PATCH v1 1/2] Add crypto driver support for some MediaTek chips Message-ID: <20161205085220.GA333@Red> References: <1480921284-45827-1-git-send-email-ryder.lee@mediatek.com> <1480921284-45827-2-git-send-email-ryder.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1480921284-45827-2-git-send-email-ryder.lee@mediatek.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1040 Lines: 41 Hello I have two minor comment. On Mon, Dec 05, 2016 at 03:01:23PM +0800, Ryder Lee wrote: > This adds support for the MediaTek hardware accelerator on > mt7623/mt2701/mt8521p SoC. > > This driver currently implement: > - SHA1 and SHA2 family(HMAC) hash alogrithms. There is a typo for algorithms. [...] > +/** > + * struct mtk_desc - DMA descriptor > + * @hdr: the descriptor control header > + * @buf: DMA address of input buffer segment > + * @ct: DMA address of command token that control operation flow > + * @ct_hdr: the command token control header > + * @tag: the user-defined field > + * @tfm: DMA address of transform state > + * @bound: align descriptors offset boundary > + * > + * Structure passed to the crypto engine to describe where source > + * data needs to be fetched and how it needs to be processed. > + */ > +struct mtk_desc { > + u32 hdr; > + u32 buf; > + u32 ct; > + u32 ct_hdr; > + u32 tag; > + u32 tfm; > + u32 bound[2]; > +}; Do you have tested this descriptor with BE/LE kernel ? Regards Corentin Labbe