From patchwork Tue Feb 14 20:06:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 9572687 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 65DDC601E7 for ; Tue, 14 Feb 2017 20:07:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63D192840E for ; Tue, 14 Feb 2017 20:07:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5884428417; Tue, 14 Feb 2017 20:07:37 +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 0E5802840E for ; Tue, 14 Feb 2017 20:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754010AbdBNUHg (ORCPT ); Tue, 14 Feb 2017 15:07:36 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34187 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbdBNUHf (ORCPT ); Tue, 14 Feb 2017 15:07:35 -0500 Received: by mail-wr0-f196.google.com with SMTP id c4so3370410wrd.1 for ; Tue, 14 Feb 2017 12:07:35 -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=WYb3VYLYiQ1CQ6KOXxSLvJNzF2r//49bZzQEsP50OgE=; b=StT7KlEgsQTTsaUdMLybOQ8rCkC37iiHNs1Y7rPYR6jXncFG9btKuRqOhn94iWlVz1 mb2yV4E8VSlTD50VmVIUkaQkKcd+mkcYSOR7w5qtAJurLi6kX7cljfHxUh+agh6R0vsR o8XOE+iZERKnVPrjDKhXlDPN5GN7WzYI/lHgwSmbyNLtIIPdqXiKzEsaC0EdEIAew06L CeHaRdi1Y/VZd6y08SQ9bmcqUrHLOFS+hYIpiuENZKMrZmV3RnEjphVRuePxwA/fzMOO hRnZb1eF7BZr13va0dh1KaCN/KNvMqlLuF4nUBHmkzt6UPiF3s8bkkzcxR2GNGzRpJsH aj9w== 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=WYb3VYLYiQ1CQ6KOXxSLvJNzF2r//49bZzQEsP50OgE=; b=cRFaWWUZZLMrvYOxVIkcf9m0VodyVHzMAzvanqMJ3qdw4iY0qQJTjHeJCZ4t+iS6L6 NF9MtU2pYHu778ygGEACMWc0KmGoIdW5ZAQNOLdCpqsdzWmudvnm2XQLkQTb31sJvlNE Js/hrJa6aLXxZoHLGfHKv61sL5QgEuMCh1kHEsjA6T6FdzbYDvt/5T/A59PsJAueAivc L/MyrTpg1ucxTB5cdf+zPxj25+ve3NnaI/hMg3snYSQAxmQJ8l8hsu+Ipi/tynCrlwDz zUUAobaAh34ArhPmqX3SxWbjjb9fs8gsSoRw8+1PWeohY49l6wjBdPWchxZ6w5tsBiej 8Wzw== X-Gm-Message-State: AMke39lVY3bgwtI8JYQYwhGt6N1v8KjVySq/7/P5EFvFkmjEFYOj5W7X7HTm8qRi1UWBtQ== X-Received: by 10.223.150.183 with SMTP id u52mr26452077wrb.180.1487102854206; Tue, 14 Feb 2017 12:07:34 -0800 (PST) Received: from ?IPv6:2003:c6:ebdc:4000:9533:a20:55f1:fb4b? (p200300C6EBDC400095330A2055F1FB4B.dip0.t-ipconnect.de. [2003:c6:ebdc:4000:9533:a20:55f1:fb4b]) by smtp.googlemail.com with ESMTPSA id x25sm2070944wrx.27.2017.02.14.12.07.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Feb 2017 12:07:33 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 04/18] mmc: meson-gx: improve meson_mmc_start_cmd To: Ulf Hansson , Kevin Hilman References: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@gmail.com> Cc: Carlo Caione , "linux-mmc@vger.kernel.org" , linux-amlogic@lists.infradead.org Message-ID: Date: Tue, 14 Feb 2017 21:06:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <420b75a9-b8c2-b3d7-ae60-3ed8a5a18ead@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 Remove use of unneeded members cmd_arg and cmd_resp. Setting SD_EMMC_CMD_RSP is only needed if CMD_CFG_RESP_NUM is set, so don't write this register in all other cases. Signed-off-by: Heiner Kallweit --- drivers/mmc/host/meson-gx-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index ece38b44..630e0590 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -456,7 +456,6 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd) desc->cmd_cfg |= (cmd->opcode & CMD_CFG_CMD_INDEX_MASK) << CMD_CFG_CMD_INDEX_SHIFT; desc->cmd_cfg |= CMD_CFG_OWNER; /* owned by CPU */ - desc->cmd_arg = cmd->arg; /* Response */ if (cmd->flags & MMC_RSP_PRESENT) { @@ -464,7 +463,7 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd) if (cmd->flags & MMC_RSP_136) desc->cmd_cfg |= CMD_CFG_RESP_128; desc->cmd_cfg |= CMD_CFG_RESP_NUM; - desc->cmd_resp = 0; + writel(0, host->regs + SD_EMMC_CMD_RSP); if (!(cmd->flags & MMC_RSP_CRC)) desc->cmd_cfg |= CMD_CFG_RESP_NOCRC; @@ -540,9 +539,8 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd) desc->cmd_cfg |= CMD_CFG_END_OF_CHAIN; writel(desc->cmd_cfg, host->regs + SD_EMMC_CMD_CFG); writel(desc->cmd_data, host->regs + SD_EMMC_CMD_DAT); - writel(desc->cmd_resp, host->regs + SD_EMMC_CMD_RSP); wmb(); /* ensure descriptor is written before kicked */ - writel(desc->cmd_arg, host->regs + SD_EMMC_CMD_ARG); + writel(cmd->arg, host->regs + SD_EMMC_CMD_ARG); } static void meson_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)