Message ID | 20230420055131.2048959-1-joychakr@google.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp102981vqo; Wed, 19 Apr 2023 23:02:36 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4PkpZFX4eHA6cspbWx5+1F7B7OPvR9NLSGtX+ssTmmcOT8iNxArzfKBnXd4tLOyBCx+gc X-Received: by 2002:a05:6602:22da:b0:763:5a15:5b0c with SMTP id e26-20020a05660222da00b007635a155b0cmr716744ioe.6.1681970556272; Wed, 19 Apr 2023 23:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681970556; cv=none; d=google.com; s=arc-20160816; b=HdNR8kkRb1vaNQNM+ak9vANeirvP1wMNiKFirOpJ/b0Apmff0VehgaRiphcyUVJl+1 ucHGvdELoJtimXZFnlln/Ky0buVWoLtOhMrMtOTXf9mEj4AL2+DnEf6ErQhI3gg8crNF Rt0SzuIhxnMyq89XmQJAbyEnd61LhpgGLeXbwZsJ5XEaPegz7npF79p06SOInBfZwwkP y7NRjf3jRubGrMHPOnALA3WVKFllIyCl2ARQ2DRcvWUjbOMuRb7BrU+edhKfqr+DDgK8 JZxRR8GH6MItfWajD6nj7XjdmJWnF9POekVoAcREvvIHXwTHJPvZEhPZYQFD9aidEEoY xh4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=iXfqf/s6wp49MzEwFPmcAfC7YjXY3gto73Qxf5qzVro=; b=z2youUBhkv/eAOCMx1hXr6xbilcaniODU+RqzKUiltF2fS9dOxRXewOFhxtFsAPjPw qbcf4Ic5jZ/lxTVGzrXxIjF1g4ETM61Y8GPPLgvF1DJYowcs2uNP+6dmwkwuewJlVhGr /5tvc5EQpCV5vLEBm2cxlGRtnuxQSAdGdwjibFWOTeZxBa0poAP13waMa9K+ZqPJ/JxO +7VQZG0i8noYLfrA0wM5HopteH4Ya8h9x2SPpGRdp3qSfgC5yOAsCd9mgILMuz648FZB Wyn40rHSksBBYr+NBcPWDrF5fEyPogkBT7ZTbZA4vwhi3BEc3lJDuculaDenUTvnYJeL 1q9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=cqve1P3A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a5d88c5000000b00760d2af1113si866046iol.146.2023.04.19.23.02.22; Wed, 19 Apr 2023 23:02:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=cqve1P3A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbjDTFwv (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Thu, 20 Apr 2023 01:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjDTFwt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Apr 2023 01:52:49 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1DA13C2F for <linux-kernel@vger.kernel.org>; Wed, 19 Apr 2023 22:52:47 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-555e3d8696dso14488717b3.16 for <linux-kernel@vger.kernel.org>; Wed, 19 Apr 2023 22:52:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681969967; x=1684561967; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=iXfqf/s6wp49MzEwFPmcAfC7YjXY3gto73Qxf5qzVro=; b=cqve1P3Ahn/GSvJK6t9IllTKZkwqUuyZJls+LqYhkOnlYr9snTo/+ut+nNUOZXEEYd ZlWNhu3oRoZrLYNdn3320ZRB+Uo3XXiudmgt4AzyRippiVsy5tv1XHx4G9H0gX8wkIyw 9LCT24e/0uzH+dU4wlMCxcrQwX6c+szqS2qqt6eE8UOflUC/zfbriabDWt7YsxhNgRLV h9QaWNtE09dPTVkyi6O6ecWHxRJgTN/wXmoCOwmg2LpDbXqk8cMKO2Xy28NCUX+B/tyn TFJW5kdpdtmU8G/zlR0zbuDIQiCyN4zCIhaCP3vcZWWhjDVBzHBY5VrkiAPbmhNvcN5m ykUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681969967; x=1684561967; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iXfqf/s6wp49MzEwFPmcAfC7YjXY3gto73Qxf5qzVro=; b=LCfW7+TAoZSvn532+LMJ/poxESyfBGUPkViAqMC9GozPz0gevNzdztmZWJpZihzmy3 GroKn/2FJyKAg1PgeZw35qX5dHstkozK3ZuFCMkXsGnZYqze44Ko7Mk7DAFIZU3JC23q w0OUxy6da2W/XyKm94dBRKp+qmwqCshdybBB/LRa15RR0PpQPVRVuUCBNjnhmVyKp1VH UnRii2B4HeTbtM2L9Alpm6Hin4GaqWybhRCOj+7Sn6a09UNLRvWoQXWaQ0AwPODM5pzB VB4+7lAbFQ99srY5jdfSoIiphRyI0C4QiAFXiRPTWFGaFztyePg3otMZN9fVqsbIbhOp Vevg== X-Gm-Message-State: AAQBX9dI8J1rQAukIamYuwvraTkvvBBdI7ZHTmhBvL4jKV5HplHACSFu KBr5kZxA5TWNjCgmWf3w4D0oLrFZ5Sy9jw== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a25:d653:0:b0:b95:ecc5:5796 with SMTP id n80-20020a25d653000000b00b95ecc55796mr208873ybg.12.1681969967117; Wed, 19 Apr 2023 22:52:47 -0700 (PDT) Date: Thu, 20 Apr 2023 05:51:26 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog Message-ID: <20230420055131.2048959-1-joychakr@google.com> Subject: [PATCH v8 0/5] spi: dw: DW SPI DMA Driver updates From: Joy Chakraborty <joychakr@google.com> To: Serge Semin <fancer.lancer@gmail.com>, Mark Brown <broonie@kernel.org>, Andy Shevchenko <andriy.shevchenko@intel.com> Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, manugautam@google.com, rohitner@google.com, Joy Chakraborty <joychakr@google.com> Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763673957677712047?= X-GMAIL-MSGID: =?utf-8?q?1763673957677712047?= |
Series |
spi: dw: DW SPI DMA Driver updates
|
|
Message
Joy Chakraborty
April 20, 2023, 5:51 a.m. UTC
This Patch series adds support for 32 bits per word trasfers using DMA and some defensive checks around dma controller capabilities. --- V1 Changes : Add support for AxSize=4 bytes to support 32bits/word. --- V1->V2 Changes : Add dma capability check to make sure address widths are supported. --- V2->V3 Changes : Split changes , add DMA direction check and other cosmetic chnages. --- V3->V4 Changes : Fix Sparce Warning | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202303270715.w9sMJhIh-lkp@intel.com/ --- V4->V5 Changes : Preserve reverse xmas Tree order, move direction check before initalisation of further capabilities, remove zero initialisations, remove error OR'ing. --- V5->V6 Changes : -Remove case of n_bytes=3 using 4_bytes buswidth -Avoid forward decaration -Break capability check patch into 2 -round n_bytes to power of 2 ( Bug Fix) -Add more explanation in commit text. --- V6->V7 Changes : Remove extra spaces, refer to functions in commit as func() --- Joy Chakraborty (5): spi: dw: Add 32 bpw support to SPI DW DMA driver spi: dw: Move dw_spi_can_dma() spi: dw: Add DMA directional capability check spi: dw: Add DMA address widths capability check spi: dw: Round of n_bytes to power of 2 drivers/spi/spi-dw-core.c | 2 +- drivers/spi/spi-dw-dma.c | 76 +++++++++++++++++++++++++++++---------- drivers/spi/spi-dw.h | 1 + 3 files changed, 60 insertions(+), 19 deletions(-)
Comments
On Thu, Apr 20, 2023 at 05:51:26AM +0000, Joy Chakraborty wrote: > This Patch series adds support for 32 bits per word trasfers using DMA > and some defensive checks around dma controller capabilities. The series looks good to me except a small nitpick described in the patch 5. Just a note for future patchset it's preferable to have the fixes-patches placed at the head of the series thus it would minimize a possible to catch merge-conflicts on the patches backporting. In case of your fixes patch it won't be relevant since the change is independent from the rest of the series updates. So feel free to add the tags: Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Tested-by: Serge Semin <fancer.lancer@gmail.com> * tested on Baikal-T1 based system with DW SPI-looped back interface transferring a chunk of data with DFS:8,12,16. Note before moving further we'll need to wait for @Andy response. -Serge(y) > --- > V1 Changes : Add support for AxSize=4 bytes to support 32bits/word. > --- > V1->V2 Changes : Add dma capability check to make sure address widths > are supported. > --- > V2->V3 Changes : Split changes , add DMA direction check and other > cosmetic chnages. > --- > V3->V4 Changes : Fix Sparce Warning > | Reported-by: kernel test robot <lkp@intel.com> > | Link: https://lore.kernel.org/oe-kbuild-all/202303270715.w9sMJhIh-lkp@intel.com/ > --- > V4->V5 Changes : Preserve reverse xmas Tree order, move direction > check before initalisation of further capabilities, remove zero > initialisations, remove error OR'ing. > --- > V5->V6 Changes : > -Remove case of n_bytes=3 using 4_bytes buswidth > -Avoid forward decaration > -Break capability check patch into 2 > -round n_bytes to power of 2 ( Bug Fix) > -Add more explanation in commit text. > --- > V6->V7 Changes : Remove extra spaces, refer to functions in commit as > func() > --- > > Joy Chakraborty (5): > spi: dw: Add 32 bpw support to SPI DW DMA driver > spi: dw: Move dw_spi_can_dma() > spi: dw: Add DMA directional capability check > spi: dw: Add DMA address widths capability check > spi: dw: Round of n_bytes to power of 2 > > drivers/spi/spi-dw-core.c | 2 +- > drivers/spi/spi-dw-dma.c | 76 +++++++++++++++++++++++++++++---------- > drivers/spi/spi-dw.h | 1 + > 3 files changed, 60 insertions(+), 19 deletions(-) > > -- > 2.40.0.634.g4ca3ef3211-goog >