From patchwork Tue Jul 9 20:04:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 2825432 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 574939F9CF for ; Tue, 9 Jul 2013 20:04:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28FF120165 for ; Tue, 9 Jul 2013 20:04:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F69C2015F for ; Tue, 9 Jul 2013 20:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752768Ab3GIUEs (ORCPT ); Tue, 9 Jul 2013 16:04:48 -0400 Received: from mail-ye0-f202.google.com ([209.85.213.202]:61734 "EHLO mail-ye0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627Ab3GIUEs (ORCPT ); Tue, 9 Jul 2013 16:04:48 -0400 Received: by mail-ye0-f202.google.com with SMTP id r11so527181yen.5 for ; Tue, 09 Jul 2013 13:04:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=H0knzeTmO+yCZtZ0ZUtHwcyjsaDE/WmoesmJexoJlsc=; b=BAa0HPeH1vWIJtXrWuYwlXOzkNarGT41m4M6/sjB8BRz4j971Z+Wpw7qTgstYglBQg CBdLdgZu8d3IGf5lF1fhu6viql920Ryn0pCg8uDION0/6if8gFePOdAb9hV/J5IoyvLg q6/zqpjEm6BdVzatodvKBiE6qWb5iaRkpC2JIazypVhuoKLdkfawYoR7sf4gRwydf5JQ RADpBIhEHRl2Ak1/VXxOdaAejhQto7Mr0XZiGOQgRCqq07Cjlmaz6oOGstvcSJtOtRNL 8VjGqXPyoIeBfqgjp5Vs5wRfW+J2S3+C92Rda5zDRzCUx+G28gFcBmUel6WwRrqEL3he zAhw== X-Received: by 10.236.133.19 with SMTP id p19mr15390539yhi.54.1373400287496; Tue, 09 Jul 2013 13:04:47 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id t25si14183173yhg.6.2013.07.09.13.04.47 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Tue, 09 Jul 2013 13:04:47 -0700 (PDT) Received: from tictac.mtv.corp.google.com (tictac.mtv.corp.google.com [172.22.162.34]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 51BDC31C243; Tue, 9 Jul 2013 13:04:47 -0700 (PDT) Received: by tictac.mtv.corp.google.com (Postfix, from userid 121310) id E0D1780928; Tue, 9 Jul 2013 13:04:46 -0700 (PDT) From: Doug Anderson To: Chris Ball Cc: Markos Chandras , Jaehoon Chung , Seungwon Jeon , James Hogan , Grant Grundler , Alim Akhtar , Abhilash Kesavan , Tomasz Figa , Doug Anderson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: dw_mmc: Handle DW_MCI_QUIRK_IDMAC_DTO properly Date: Tue, 9 Jul 2013 13:04:40 -0700 Message-Id: <1373400280-7408-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 1.8.3 X-Gm-Message-State: ALoCoQlLbMlIArLPPwgwKAcMNKiXguUrJ8mFggPXPQvxLtX4YMUVyCHWn4MObW1fFrXg+9EmeIkRomzaahB+/P5ymk6ETgBLSh1P1EZqraqYUuth4J1TMetJiWCnMoN6cq8BdTGtPPEtdba2xIgLF85NfoTyQRpY7N/h58Gyg5sk2P5YcDQYLiLAbXQIQJxkwOs5JwSeVQZKBXvIUP8H3vZ4oeh+oAXAaQ== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 In (1fb5f68 mmc: dw_mmc: Don't loop when handling an interrupt), the code for handling DW_MCI_QUIRK_IDMAC_DTO became dead code. Move it to where it ought to live. Found by code inspection and compile-tested only--I don't know of any boards that need DW_MCI_QUIRK_IDMAC_DTO. Signed-off-by: Doug Anderson Acked-by: Seungwon Jeon --- drivers/mmc/host/dw_mmc.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index bc3a1bc..cdc0940 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1595,18 +1595,17 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id) pending = mci_readl(host, MINTSTS); /* read-only mask reg */ - if (pending) { - - /* - * DTO fix - version 2.10a and below, and only if internal DMA - * is configured. - */ - if (host->quirks & DW_MCI_QUIRK_IDMAC_DTO) { - if (!pending && - ((mci_readl(host, STATUS) >> 17) & 0x1fff)) - pending |= SDMMC_INT_DATA_OVER; - } + /* + * DTO fix - version 2.10a and below, and only if internal DMA + * is configured. + */ + if (host->quirks & DW_MCI_QUIRK_IDMAC_DTO) { + if (!pending && + ((mci_readl(host, STATUS) >> 17) & 0x1fff)) + pending |= SDMMC_INT_DATA_OVER; + } + if (pending) { if (pending & DW_MCI_CMD_ERROR_FLAGS) { mci_writel(host, RINTSTS, DW_MCI_CMD_ERROR_FLAGS); host->cmd_status = pending;