From patchwork Fri May 12 10:47:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joy Chakraborty X-Patchwork-Id: 13239118 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AFFAC77B7C for ; Fri, 12 May 2023 10:48:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239781AbjELKsV (ORCPT ); Fri, 12 May 2023 06:48:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240057AbjELKsU (ORCPT ); Fri, 12 May 2023 06:48:20 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B532D9 for ; Fri, 12 May 2023 03:47:53 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-55ffc3d2b63so94522977b3.2 for ; Fri, 12 May 2023 03:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683888472; x=1686480472; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:from:to:cc:subject:date:message-id:reply-to; bh=2hTpJTY/rULQPSOZNXcS/148DUgQ2+YfFfUxNW3uGcc=; b=NKZ9DJMSbrzKFRruLJXZDhVxtbnaHEbduW36u8MmXgWhDLEoWSdxfbM8/vhFZBPQpU RLo9qi7IR5o1WzDfJZzlHc4T+BwdqSJnd7Ue+J6qh1mPx1eSHZjjzCaO+8SqGqgt89qT YZd79CSqZyH/7f2gYFkNLQEdTz9dsqPFARBGL8DWIApcA0yY09cf68VS59ozhAIUFOyZ sRIBcO0yIvrBLS1KacnxsYnmkXRbOTHr742w/WlSCLQFUGskhP3MBYcm/nc0nnn+9K3T 3I9m8WoXSDYEXiq8f0j4M76MYxavR8XfB1gmZvtUpCVZXOacOIDeDNPKfDR/T2BZdPWQ D/5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683888472; x=1686480472; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2hTpJTY/rULQPSOZNXcS/148DUgQ2+YfFfUxNW3uGcc=; b=cPv9ujja1FixteqWDMc3rAiJh3eA0s/Z7vTtX0adYSVhXGA7bh1jEF9LpvO6ETmjbA +QO2LmuYdxQ8odl8PW67KhW2LwtPvxqVvIyJcaI49ifvnppYCdwDcIsgHJs/iwPHflsu hJ8lu8bAlaJlihRaJY3qJNVt1ZrmCEy/o4Am7xceoiBjBUcszBeCDiKXw2S3BBXDorOM 6euvPf16drPJqxMO/kvcVTqD3qqkBhWIXNAiEvHyjSMjeNcDoNjj+Ycvpubi+EZmRRyW R1isReT19UFT5mdISPWiMhzbKf0VvJncAQNdmkNKsU3WOSA87pELvFmTpspDrDKx2z3U ZLog== X-Gm-Message-State: AC+VfDzaxFLo3dI3Q5EIwadIZVeCPRS4LVKv+uwYkX2Flaa1ygI4SHCU kDpiaHR70mN1y3oSegIUwjP3RakFRRj4kQ== X-Google-Smtp-Source: ACHHUZ7KDuRZ0EiEc4tcmzANzVpo0BfydgpvG+XpD1Q8xiN1zT5M8pMk2mhtN7qHL6fKFwZgD9c0F0bWaBkSLQ== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a81:430b:0:b0:55d:9a6d:8ce5 with SMTP id q11-20020a81430b000000b0055d9a6d8ce5mr14862719ywa.1.1683888472089; Fri, 12 May 2023 03:47:52 -0700 (PDT) Date: Fri, 12 May 2023 10:47:42 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.40.1.606.ga4b1b128d6-goog Message-ID: <20230512104746.1797865-1-joychakr@google.com> Subject: [PATCH v11 0/3] spi: dw: DW SPI DMA Driver updates From: Joy Chakraborty To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, manugautam@google.com, Joy Chakraborty Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org 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 | 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() --- V7->V8 Changes : Minor commment updates in patch 4/5 --- V8->V9 Changes : Minor formatting changes in patch 5/5 --- V9->V10 Changes : Moving "return 0" at the end of dw_spi_dma_caps_init() from patch [4/5] to patch [3/5] to solve : spi-dw-dma.c: In function ‘dw_spi_dma_caps_init’: spi-dw-dma.c:100:1: control reaches end of non-void function [-Werror=return-type] --- V10->V11 : Resend patches [3/5] to [5/5] on top of : https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git --- Joy Chakraborty (3): 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 | 5 +++- drivers/spi/spi-dw-dma.c | 56 ++++++++++++++++++++++++++++++++------- drivers/spi/spi-dw.h | 1 + 3 files changed, 51 insertions(+), 11 deletions(-)