From patchwork Tue Jan 31 20:58:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9548501 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 CD2EB60415 for ; Tue, 31 Jan 2017 21:06:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCED3280B0 for ; Tue, 31 Jan 2017 21:06:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B003D2838D; Tue, 31 Jan 2017 21:06:53 +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 6345F280B0 for ; Tue, 31 Jan 2017 21:06:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750967AbdAaVGo (ORCPT ); Tue, 31 Jan 2017 16:06:44 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34554 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751060AbdAaVGn (ORCPT ); Tue, 31 Jan 2017 16:06:43 -0500 Received: by mail-wm0-f68.google.com with SMTP id c85so943259wmi.1 for ; Tue, 31 Jan 2017 13:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:references:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=NwQwD32zkf9KViZZ1gXm8ojPiOWJSzoc1bpp4KDYySA=; b=WZv+X+yEq/E1abnSmptmdZ3EQzHM13fUXWAm5nnkr3utHh9E5RLdRlvd4iP0LjjVMW 7y8vy367v1oU83bofTnga38+Wmz+HmYSvKQp1GoEntAqgc0PvcaDzGoYzckJ8fNLu+B8 YqsRcE16IUg9u05Z9ftxap8AEaxy04uKX431oKPfczgsblwV57whTc43dvw49XbmDgJS YOn6r1Uj/Ag5xu/BtqOtdCMQLatmb4hnrnSxGD5JqTi6nVUcylNsep399+HpLR4Fmh/g g17xsN/KxqoYRiyroZ/3W/x3CKBMlijQFeCVGJoDKYcSzITGS+3HzCCIoNNQG9xnKWxw Z7gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=NwQwD32zkf9KViZZ1gXm8ojPiOWJSzoc1bpp4KDYySA=; b=XnqoVjSvzEPM3W3Depxl3F2RntNZepoXw4RvzyHn7U3JklYpx4QfLNpoFU2Ue3IM2S Hp9aTMK6r/PICX14P1QDrJGTdn7MYy/n3S4NWo4gCiBpgujeKMzAxkqo4FZMm9pKgZbn MzWMFpAGAp6Jn4/jfWcOPrP+1K0RCYQ2+Hv9PM2+2VxeWXBEs7WLfHV0Vts0ZRsm1sxL axbckaMv45Mz4FTsTQPqNcJvhkp91zfcHriLv0tj0eGb0uPv5lC/bx2KYz4XRgWHKM/1 7x/AI1mW7v6a+kPriOGNC9PiDdIMrU7bXH4TyGaRGrnNqZ29ikI7NmWOPzVb1k7VM7+X Tppw== X-Gm-Message-State: AIkVDXIULXYMFqGNskZBwS4x4V5yzj/mtJ4ZQ12rhz69E4wGen6xcepTC8az1Xlz4QTPzA== X-Received: by 10.223.130.118 with SMTP id 109mr29999070wrb.10.1485896359808; Tue, 31 Jan 2017 12:59:19 -0800 (PST) Received: from ?IPv6:2003:c6:ebc5:6c00:bc31:e1d5:58cd:f318? (p200300C6EBC56C00BC31E1D558CDF318.dip0.t-ipconnect.de. [2003:c6:ebc5:6c00:bc31:e1d5:58cd:f318]) by smtp.googlemail.com with ESMTPSA id 198sm25862861wmn.11.2017.01.31.12.59.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Jan 2017 12:59:19 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 5/9] mmc: meson-gx: improve interrupt handling To: Ulf Hansson References: <24e8bf35-50ce-270d-c0aa-12bb90d2e3d8@gmail.com> Cc: Carlo Caione , Kevin Hilman , linux-mmc@vger.kernel.org Message-ID: <81408534-1752-8cc0-b130-d274c5225d72@gmail.com> Date: Tue, 31 Jan 2017 21:58:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <24e8bf35-50ce-270d-c0aa-12bb90d2e3d8@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 Disabling and immediately re-enabling interrupts in meson_mmc_request doesn't provide a benefit. Instead enable interrupts in probe already. And disable interrupts in remove, this was missing so far. Signed-off-by: Heiner Kallweit --- drivers/mmc/host/meson-gx-mmc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 4ce4c640..0fba23d2 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -546,11 +546,6 @@ static void meson_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) /* Stop execution */ writel(0, host->regs + SD_EMMC_START); - /* clear, ack, enable all interrupts */ - writel(0, host->regs + SD_EMMC_IRQ_EN); - writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS); - writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN); - host->mrq = mrq; if (mrq->sbc) @@ -777,8 +772,8 @@ static int meson_mmc_probe(struct platform_device *pdev) writel(0, host->regs + SD_EMMC_START); /* clear, ack, enable all interrupts */ - writel(0, host->regs + SD_EMMC_IRQ_EN); writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS); + writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN); ret = devm_request_threaded_irq(&pdev->dev, host->irq, meson_mmc_irq, meson_mmc_irq_thread, @@ -816,6 +811,9 @@ static int meson_mmc_remove(struct platform_device *pdev) if (WARN_ON(!host)) return 0; + /* disable interrupts */ + writel(0, host->regs + SD_EMMC_IRQ_EN); + if (host->bounce_buf) dma_free_coherent(host->dev, host->bounce_buf_size, host->bounce_buf, host->bounce_dma_addr);