From patchwork Tue Sep 22 15:30:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 7239761 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C1EAEBEEC1 for ; Tue, 22 Sep 2015 15:30:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01A8D2076F for ; Tue, 22 Sep 2015 15:30:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 09B8620764 for ; Tue, 22 Sep 2015 15:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755294AbbIVPac (ORCPT ); Tue, 22 Sep 2015 11:30:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60790 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752339AbbIVPab (ORCPT ); Tue, 22 Sep 2015 11:30:31 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id C71AFC0B2B7C; Tue, 22 Sep 2015 15:30:31 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-5-184.ams2.redhat.com [10.36.5.184]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8MFURes012447; Tue, 22 Sep 2015 11:30:30 -0400 From: Hans de Goede To: Chris Ball , Ulf Hansson Cc: Arend van Spriel , Maxime Ripard , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Hans de Goede Subject: [PATCH 1/3] mmc: Add mmc_is_io_op helper function Date: Tue, 22 Sep 2015 17:30:24 +0200 Message-Id: <1442935826-16758-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1442935826-16758-1-git-send-email-hdegoede@redhat.com> References: <1442935826-16758-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a helper function to check if an opcode is a sd-io-rw-* opcode. Signed-off-by: Hans de Goede --- drivers/mmc/core/sdio_ops.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/core/sdio_ops.h b/drivers/mmc/core/sdio_ops.h index 12a4d3a..5660c7f 100644 --- a/drivers/mmc/core/sdio_ops.h +++ b/drivers/mmc/core/sdio_ops.h @@ -12,6 +12,8 @@ #ifndef _MMC_SDIO_OPS_H #define _MMC_SDIO_OPS_H +#include + int mmc_send_io_op_cond(struct mmc_host *host, u32 ocr, u32 *rocr); int mmc_io_rw_direct(struct mmc_card *card, int write, unsigned fn, unsigned addr, u8 in, u8* out); @@ -19,5 +21,10 @@ int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn, unsigned addr, int incr_addr, u8 *buf, unsigned blocks, unsigned blksz); int sdio_reset(struct mmc_host *host); +static inline bool mmc_is_io_op(u32 opcode) +{ + return opcode == SD_IO_RW_DIRECT || opcode == SD_IO_RW_EXTENDED; +} + #endif