From patchwork Thu Mar 23 21:20:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9642073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 07EB9602D6 for ; Thu, 23 Mar 2017 21:27:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA8062833B for ; Thu, 23 Mar 2017 21:27:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB2ED2846B; Thu, 23 Mar 2017 21:27:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A4D42833B for ; Thu, 23 Mar 2017 21:27:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751349AbdCWV1i (ORCPT ); Thu, 23 Mar 2017 17:27:38 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34239 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbdCWV1h (ORCPT ); Thu, 23 Mar 2017 17:27:37 -0400 Received: by mail-wm0-f66.google.com with SMTP id u132so1817546wmg.1 for ; Thu, 23 Mar 2017 14:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=5hIdQ3Owoc60UAumO+XuxkHUHR1q8NNB6GFlK+iPsQQ=; b=BFdCGTHdRrKlu208L8FsoZveywMdktIH4leFsRWvOEHlUdwkKyqzDuTntFbA3rtm97 BSBWCNB7pQAlFy2Q9HphCXUi//G7KwGBdWZoLU6cDDM0QVoVVPgWjzjctU5EJ3885JHE 6ihs3yP76odXyBzzjv9tS1br473cIjU3lp62qiS7JDyZlMZBiOnDyvRoq8pncNaHkHzO R0uRXZxmtAYOLMHw8/qjE6AmyF7Zay7bGeYf5UN0cMoFvHgSzVRkSBhvOPLzrRNTW7t9 pna/6S7S1kH5mAtr2hKkq1d1tyb9kVwIClhi0hFPar0ffpPKmTfXHSXwcYDwyS0UvsyG Y+hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=5hIdQ3Owoc60UAumO+XuxkHUHR1q8NNB6GFlK+iPsQQ=; b=Df5x88i/lm5bq/Gb7rKe2LANv3dZdQm5ptg0EDzc4h4euRqyJuspUV4huMrq2FUamG +1aBVeWfIvhrs2HUIt5shLbn+s+T85hUuo0HflmJnHEBpzzVncFY7dx3jU/kLEU4xWSN 2lh+Hx7/8fvj5uCeACSNcych/1KN9aGnWStfIzKaoXNQ/Ni8n2hPeDk9+e1/U/8QWQZH Psl/QhFcT7+d9kv1jfIIqsiybnqwpyDV8LgQYG2y19NC5BApS0189fty3evdfboJ9wvM jrFfaqAZ2P4G1p14C0wgHjdUso6biZVUE27BVyziHdp3ZVBv1gNgN5ifHPVZxaZ0yvHI FWjg== X-Gm-Message-State: AFeK/H1bK2e6K4NIvVXSWEMPauG1F69sGSK1IW6YbGPggmgjOYEtMUb3KGOAA+sOKsZ+ug== X-Received: by 10.28.158.87 with SMTP id h84mr14991503wme.4.1490304455967; Thu, 23 Mar 2017 14:27:35 -0700 (PDT) Received: from ?IPv6:2003:c6:ebdc:4000:7465:efb3:5dc7:eda3? (p200300C6EBDC40007465EFB35DC7EDA3.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:7465:efb3:5dc7:eda3]) by smtp.googlemail.com with ESMTPSA id 60sm273062wrg.60.2017.03.23.14.27.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Mar 2017 14:27:35 -0700 (PDT) Subject: [PATCH 1/2] mmc: core: add mmc_get_dma_dir To: Ulf Hansson References: <44d784c1-ab30-db59-9037-db8c87935b43@gmail.com> Cc: "linux-mmc@vger.kernel.org" From: Heiner Kallweit Message-ID: <1dbd7d7c-3f0a-20b1-b7c3-22872cf9341d@gmail.com> Date: Thu, 23 Mar 2017 22:20:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <44d784c1-ab30-db59-9037-db8c87935b43@gmail.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add function for determining DMA direction to core. Signed-off-by: Heiner Kallweit --- include/linux/mmc/host.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 83f1c4a9..21385ac0 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -17,6 +17,7 @@ #include #include #include +#include struct mmc_ios { unsigned int clock; /* clock rate */ @@ -499,6 +500,11 @@ static inline bool mmc_can_retune(struct mmc_host *host) return host->can_retune == 1; } +static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data) +{ + return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE; +} + int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); int mmc_abort_tuning(struct mmc_host *host, u32 opcode);