From patchwork Mon Apr 6 11:43:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 185217 Delivered-To: patches@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp3552614ilr; Mon, 6 Apr 2020 04:43:44 -0700 (PDT) X-Received: by 2002:a2e:b0eb:: with SMTP id h11mr12277554ljl.85.1586173424727; Mon, 06 Apr 2020 04:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586173424; cv=none; d=google.com; s=arc-20160816; b=vvKm9MtCk60P719zWhFFlk1qdbuPnOp47hj1KJHBgI66xhSiqDILiMw6QswZIlNKlw 3Zise8839bz0ieW8vdSbVqBLla8SiuWfGlHrOs3lqpZQAIOXKsOQdGf1fiD0kekMHmxb z2DW4AKEIv0Jxf6UmUeUXXHDB0Cf5pnD1k9146Gh8Eg8Xp7uUVlpze8/TLvOwVXNtkP+ b6wA2iLBXplNteZxtP/m6BFRoOIbcMB+PlG6aSSwzUgxlI8uOQsWyPZgNlK8bcdFK/A4 mm5yItACwbE89egBIZO2IfcBnYzDB2ilbrhCVFoMynv+GG8vAlHllvvIyugYr/P1Ud7J uNlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=+rDLzUevramGwgT1ja8IcYx/VVAorK0hGjIaFXoByyQ=; b=h6Ja4ylPrLh+e9g9bAvj6fUt3IpsSXxSroHH7u2TKnqPpc62aW7XjzZYI9MVZD5pDY RhQMc3AXZtlbNNW2Qsf3FsZhjMWNC6URT8XIMbYrQ1w1+5Z3xCGzOizHAVfVfAdfoXhR nLTy1K46AMyYDCB3h4whnMSOgQF9+Tq0aS0Na/Fga13XemrXbqzP6UxoWB6brz9x5x7X TbKjen6P02LOsFpvJ++bPIz2PrSuEtZy6tdTk70zEP7Yn8fKg7K9FEArAuNgUHx3Jr0L Ap/D0+7j0HPnGgmRTTf6a5f/VPBdKzr0e5idW8LPHaz/EyTlZCWB2EyTPzwU8VxzJPr6 lfzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YWZSUjDb; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d30sor5836999lfq.6.2020.04.06.04.43.44 for (Google Transport Security); Mon, 06 Apr 2020 04:43:44 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YWZSUjDb; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+rDLzUevramGwgT1ja8IcYx/VVAorK0hGjIaFXoByyQ=; b=YWZSUjDb8korgV4OE6/BogHH4jCKPO9q4FwciJSasVCNbjVB9RyDUITYVprQbsQUOa JyP1QUXUMu8o3OrynIFkOQ/AHq+cTX/VI5Bwbub17YIUtmtvGB5DecIn6J4B/m0p9Am5 3xsARwH+CPlxPZGDNKLgNl/gbmhrwXVAZuS7w1Y4A/GemZ8+1LAQzMZXP9R1b5auRdSE Div5K+Zpl6EooToW4XiSan3ATGMuHkXZ5QVogNq2UFw+7Mt1/8Qo/RCsap5mApGw3nv8 EamKYbXE369ck8jxcgaiavogI/H3iIAQX8N1g15zaPz+ecQY7y0zQnP2MwqTLkwGUOy4 1BkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+rDLzUevramGwgT1ja8IcYx/VVAorK0hGjIaFXoByyQ=; b=JRVEItugfttkJMnqgxPlJCM8viIpHVLEQ25qqXDTtrlyJYPbLOdItHfqT/HswjVJXt i8K28mSJL0Q2xlba7LRbKMEjfjme2VbFbBv8tESTCJH9ExIukNlrS11NmmE1KrjhQT6c pH4k3PI6ZC3HKzbyEY/gK5z6XdLFOaQ/9oCJFeedr6RSMBG1i/5Qx5EBAEd/BullQM7x 3zoDKLiN74wvbiXXk6CLbqAEK1/zeG+m0ncV9Zi2AKkuted5ChLXzbOyOm51LsKXdqja ZRRpD3FK7Xi6ZclOw1oAF0KgQ7sjCgcsNsnKKdpj+mBfx6KJD8L7Z1oNh4F2YQbiUozU RMjQ== X-Gm-Message-State: AGi0PuYEQnBmFWg2op1OCnwLEWmGFff80cY00inFg2u5NkUv65b1OJfp HVqC1Gw2a758FZC9uRKbTRpZ9dOb X-Google-Smtp-Source: APiQypJfaJlMtPDK610vq7golIjlVgbmCThjzLIZjbSF6Y1OY4T6+VrxtX2hOmLv6iMcGl1c+eud/w== X-Received: by 2002:a19:5217:: with SMTP id m23mr9208431lfb.202.1586173424274; Mon, 06 Apr 2020 04:43:44 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id x29sm8336021lfn.64.2020.04.06.04.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2020 04:43:43 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Manuel Lauss Subject: [PATCH] mmc: au1xmmc: Drop redundant code in au1xmmc_send_command() Date: Mon, 6 Apr 2020 13:43:37 +0200 Message-Id: <20200406114337.8802-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 The in-parameter "wait" is always set to 0 by the caller, hence just drop it and its corresponding code. Signed-off-by: Ulf Hansson --- drivers/mmc/host/au1xmmc.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) -- 2.20.1 Acked-by: Manuel Lauss diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c index 8823680ca42c..9bb1910268ca 100644 --- a/drivers/mmc/host/au1xmmc.c +++ b/drivers/mmc/host/au1xmmc.c @@ -259,7 +259,7 @@ static void au1xmmc_tasklet_finish(unsigned long param) au1xmmc_finish_request(host); } -static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, +static int au1xmmc_send_command(struct au1xmmc_host *host, struct mmc_command *cmd, struct mmc_data *data) { u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); @@ -302,9 +302,6 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, __raw_writel(cmd->arg, HOST_CMDARG(host)); wmb(); /* drain writebuffer */ - if (wait) - IRQ_OFF(host, SD_CONFIG_CR); - __raw_writel((mmccmd | SD_CMD_GO), HOST_CMD(host)); wmb(); /* drain writebuffer */ @@ -312,19 +309,6 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, while (__raw_readl(HOST_CMD(host)) & SD_CMD_GO) /* nop */; - /* Wait for the command to come back */ - if (wait) { - u32 status = __raw_readl(HOST_STATUS(host)); - - while (!(status & SD_STATUS_CR)) - status = __raw_readl(HOST_STATUS(host)); - - /* Clear the CR status */ - __raw_writel(SD_STATUS_CR, HOST_STATUS(host)); - - IRQ_ON(host, SD_CONFIG_CR); - } - return 0; } @@ -711,7 +695,7 @@ static void au1xmmc_request(struct mmc_host* mmc, struct mmc_request* mrq) } if (!ret) - ret = au1xmmc_send_command(host, 0, mrq->cmd, mrq->data); + ret = au1xmmc_send_command(host, mrq->cmd, mrq->data); if (ret) { mrq->cmd->error = ret;