Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp309242rwr; Wed, 19 Apr 2023 22:53:40 -0700 (PDT) X-Google-Smtp-Source: AKy350YxGDCC1G/jxGplT6k0aM+Bk7JCaryPMjn08YmcM9qzG2doid0l1nzj7L1XVfRs7fKpDoC2 X-Received: by 2002:a17:902:ea0d:b0:19c:b11b:ffca with SMTP id s13-20020a170902ea0d00b0019cb11bffcamr579823plg.23.1681970019819; Wed, 19 Apr 2023 22:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681970019; cv=none; d=google.com; s=arc-20160816; b=YvBLFqpNvRtbwBkLjgEQfQSDfmwg9lua3S6bMF7PRZ1kv4Ir+isLVk7My9RYqIAkXi 6KJ0cauks+v3jVC3ZOCH5wIH850HrKQOT2uC43ARtH7ZHO6/d1+BFWge15S6sXWI85+Z TRoH232WlCSLxfYHX3QBJ1ZIDN9Y+EDpRSKNMgLgCIZ2gfKDOJZxKWUVu7m+qZzQF+og w07jNkFjAljTHa6fJLUF5Tcvi8JzlGqaZYU+nsbzv6D8GBTCP1aUPctwSt3CCoSI8ZEC wMPtPv6MckEaX2RT4GM0uIzhocrN3s9AC9Xto5ZTWB0PJ3UFo73OG240PaGvRbOUBChY Uvlg== 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:references :mime-version:in-reply-to:date:dkim-signature; bh=8xCBVt+yTzL9gm6ligFFQCFbRni90/tGiHt7eRsjBtY=; b=jAMNlsrbtxU/IuToBPyI5BFmKXFg9RkPtVH3j+DJcRDBgsdSTBeeyqXllz75c9OV43 p5/NgDeDzkYm5C7Pi2ibjrm/8iEzOYBw5Pi5XR9hZHudXoVZBPmYAypCX2r4KatdQU9p G3kRuA2339DLX7QSuVdqCNi33K0RcC3cPHycrPwScJDaTOyX5PVyiERWNsYj3Dp4s5X9 BRpYy1JiUTNp7DXfahQBxxYOnhe9kRz/4NFBkmzWV1gYqTlr55QKxqQnxgGKI6ekwd3g j6uSQYPuzS88oB/0dnhXRp2qwzo7gyE2RoLzbb3euFPA8e14KsWmSHdUg4z2/qZrD3zV 0KdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=GYjayEHT; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w11-20020a170902c78b00b001a6bc44b85csi882330pla.7.2023.04.19.22.53.26; Wed, 19 Apr 2023 22:53:39 -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=GYjayEHT; 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 S233809AbjDTFxE (ORCPT + 99 others); Thu, 20 Apr 2023 01:53:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233794AbjDTFxB (ORCPT ); Thu, 20 Apr 2023 01:53:01 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E599840EC for ; Wed, 19 Apr 2023 22:52:56 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id e63-20020a255042000000b00b953ca0cf4eso1384141ybb.12 for ; Wed, 19 Apr 2023 22:52:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681969976; x=1684561976; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=8xCBVt+yTzL9gm6ligFFQCFbRni90/tGiHt7eRsjBtY=; b=GYjayEHTH0DTFM7kLY9bVfMA2J7m/p62X4TtHqIrE81LrGEdzUtYqYo+3PqkGKe/PP xFKTLUmHAalIQMGpb5k7bntgsjNGP0pZPo4Na5+8sawig3szQDTNnx25Aq31dRhf41we m7XlLrEnhZfXFcS1Rwj1lnrvIoGm+j9yPTsQLQjZmDtx6mRbmAxSM2Pr+g3zYCQYPp2X MktbbEevw9lhMaNqnpy0Q4NgotUlEfww8ij7NuvbU2VHsEwHYKFhdpL/nipcBOvMGYwq SsQZO0hFLViLjndPQObcqY7+eZq9kXkjCRunkR5OxygH+N2I7Y9DYlohfTWdLtcRcvqx fcJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681969976; x=1684561976; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8xCBVt+yTzL9gm6ligFFQCFbRni90/tGiHt7eRsjBtY=; b=GDdQGwpHEY6rYeyt+m3YA9xLSUHDJDSTWy1XvP3V0my8hawBl6ahltzQ+zl8tqgLPm NMnyHyciwiXTRcmOcOMobr4C2Hix+ms3GhbUYrEKdeiYRxdHyjg6FoGCvlhY52/+aUP7 h4JZdxfQLUgC7o8JG/SLeHj0SiXMyUkGSJVjUJtYMvs7RPGs6BOOESZffBwX61N+8PPJ QrgfUJvIHCdTVNlyfzjdTgZ3S3Pr7H+HRBYpN6eJmcUOcQNuFtQAnBqMitibtVF8YP/P kjVzio7RKP40u03jPMELQguog91TeTFDYEIBYDhJG3E00qriBosSlu2xN8DSgbkMgPcJ 4c4A== X-Gm-Message-State: AAQBX9dDCF55aJaR0Hr1Q7dGT3hV66NKVDQpvN8KzElfX+pN2qYJ1PUy kX7zWvuRshWn/9YQjSwmae4mz8Wg9iekAA== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:6902:1241:b0:b92:238b:574a with SMTP id t1-20020a056902124100b00b92238b574amr1547530ybu.0.1681969976120; Wed, 19 Apr 2023 22:52:56 -0700 (PDT) Date: Thu, 20 Apr 2023 05:51:28 +0000 In-Reply-To: <20230420055131.2048959-1-joychakr@google.com> Mime-Version: 1.0 References: <20230420055131.2048959-1-joychakr@google.com> X-Mailer: git-send-email 2.40.0.634.g4ca3ef3211-goog Message-ID: <20230420055131.2048959-3-joychakr@google.com> Subject: [PATCH v8 2/5] spi: dw: Move dw_spi_can_dma() From: Joy Chakraborty To: Serge Semin , Mark Brown , Andy Shevchenko Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, manugautam@google.com, rohitner@google.com, Joy Chakraborty 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: X-Mailing-List: linux-kernel@vger.kernel.org Move dw_spi_can_dma() implementation below dw_spi_dma_convert_width() for handing compile dependency in future patches. Signed-off-by: Joy Chakraborty --- drivers/spi/spi-dw-dma.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-dw-dma.c b/drivers/spi/spi-dw-dma.c index c1b42cb59965..f19c092920a1 100644 --- a/drivers/spi/spi-dw-dma.c +++ b/drivers/spi/spi-dw-dma.c @@ -198,14 +198,6 @@ static irqreturn_t dw_spi_dma_transfer_handler(struct dw_spi *dws) return IRQ_HANDLED; } -static bool dw_spi_can_dma(struct spi_controller *master, - struct spi_device *spi, struct spi_transfer *xfer) -{ - struct dw_spi *dws = spi_controller_get_devdata(master); - - return xfer->len > dws->fifo_len; -} - static enum dma_slave_buswidth dw_spi_dma_convert_width(u8 n_bytes) { switch (n_bytes) { @@ -220,6 +212,14 @@ static enum dma_slave_buswidth dw_spi_dma_convert_width(u8 n_bytes) } } +static bool dw_spi_can_dma(struct spi_controller *master, + struct spi_device *spi, struct spi_transfer *xfer) +{ + struct dw_spi *dws = spi_controller_get_devdata(master); + + return xfer->len > dws->fifo_len; +} + static int dw_spi_dma_wait(struct dw_spi *dws, unsigned int len, u32 speed) { unsigned long long ms; -- 2.40.0.634.g4ca3ef3211-goog