From patchwork Thu Apr 9 12:54:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 185319 Delivered-To: patches@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp1765483ilr; Thu, 9 Apr 2020 05:54:27 -0700 (PDT) X-Received: by 2002:a19:f806:: with SMTP id a6mr1797059lff.201.1586436867651; Thu, 09 Apr 2020 05:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586436867; cv=none; d=google.com; s=arc-20160816; b=CaOdB1vkg8qwEoW9KCR0Xoq83IKVsJpTVgshSCtxFPf782bolZCvuoQS8FT+FNCPsC wxnjphzD/eAUv3LGPX4OcfncjwT4UZTDP7qSWrUDEIG3vfUVgRccncNByru0l1rviPV4 pSghqT5FtXuyr4xj07gBtfiNLSQ1LpnMDzzX71X1WCRFVwQRkf0xl5WeILrEsnihkvNX DfWDxUNSBYSkW59D1f2jfNo4aXIz+zNOvpx5WhzqxbrUgj6RgW8krRC4oxyzgCx2KzeZ uiTLMDjlkDH2aRvqnbQ+ADsAOs4m9Z1RpkBnubFEpoS8Klbm+k+7Gj2wSwAKQV7qdbG8 xTVw== 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=AQ/aQRH3LCE5gpQTa4UpjP+P8PdojvoToFQt58CO2SQ=; b=v2+iKALkajQbde6o5sdrh45PhjwLKEzGm6+p2oevOTZLaFNt4FyNcCJI3svKHuo0RN Co6Ooq+z0QuyvCbK91/SLfhsfXSg+P9Iqpw/G/J4PRaNBmLXGa9oCA/mAl/qmpt9fbGp 060zfgg4TQKmQ59NNXnwNmj3ztOOzLaetlPcVpra9Pe1pmu93d/i9n/LbZp9L0OZ2XMf nHzLiX0DgSwX0xDpwPXx9EKbJ8BUJaJdhr1dH30tHkYnDbKY1a2TS6NPja7/ngxGQB0o pIHItvGRfgllJuUYKGCn/r9xPEdifoFA91EWf9g2QuVbySJ7wFLWNxBenOHis7f5AWe3 YuUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DyL+LdxQ; 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 i8sor7075134ljj.22.2020.04.09.05.54.27 for (Google Transport Security); Thu, 09 Apr 2020 05:54:27 -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=DyL+LdxQ; 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=AQ/aQRH3LCE5gpQTa4UpjP+P8PdojvoToFQt58CO2SQ=; b=DyL+LdxQXdgjX6UF4nai/ilp4Qau4QxLusGPk7R3RPojNh6jNU8+4bC8E4TG7YMEwM BAUPLzWfVtYStWvFfeazmvCjhVYQjex1PsNBToC7IxE4PZNUjVtL0ymjo7RxG0F2rHze SOGR/yZAR2vywMlqAJfZl2Zqd6X9IQuP4rXuKFcXriJHd9ONnIkCyM7BHcIBveIVttW+ 98tbrUWMMCcEayRcE36xrCHdgNQNa3VCJXZygIKe7H06mET/Qc/BkcIctfxez8E4gbUC 9PQD9LGz7B43m9NzxlWCZrRk3UuJdLXUr/6GbLxDGd3a8p7DYsBmo03IYxlOkG8jJmdL 21ag== 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=AQ/aQRH3LCE5gpQTa4UpjP+P8PdojvoToFQt58CO2SQ=; b=FMHmgbCnewDMnufqIl1oT8rwBsiD33wuxwyP8DMzDdz4U+OS7C/tDGLzSNsoaVm970 I6gbaXOGj/iNdMpT67xOWRW+yl/8tpzBEqsY82xKeYG1Kp7tEf2YrNyRwgYIsWFN8m1N YhOgQfZoqd92tjsRw2ApfzeegXDAmp+80qN9ch4QUc6Fy1+D5xWsLPyevc/rBHSprBOJ xZPDHkO4U31jzaogBCzajHTZTS3gduHrFqSJNAYfi123BSIYGPW1wMEAbyZu/7ygWpkM h07s3g+w3D3DRFVJzGMRPRMgJ0RjP8BrSlFy5MBpG96OBaQ42NPoc8hdwT3v7n76EUK+ /jsw== X-Gm-Message-State: AGi0PuZCbU07FvxLdOOZx/TPv954+Ud1rSxTHLuo7AGyBDNWx8ub8+to sXTHc1UOjvH529omV+QG2f0AAeCT X-Google-Smtp-Source: APiQypJnaS7moxjWVcXv3vfdEFDpuEw+zgSDhGoiD6Rct8JNwZt8v07tNN2uUaIByWsfgn3pRXHZoQ== X-Received: by 2002:a2e:a412:: with SMTP id p18mr8440329ljn.39.1586436867261; Thu, 09 Apr 2020 05:54:27 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-98-128-181-131.NA.cust.bahnhof.se. [98.128.181.131]) by smtp.gmail.com with ESMTPSA id x67sm690205lfa.76.2020.04.09.05.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 05:54:26 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Pierre Ossman Subject: [PATCH] mmc: wbsd: Replace hardcoded command numbers with existing defines Date: Thu, 9 Apr 2020 14:54:22 +0200 Message-Id: <20200409125422.21842-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Signed-off-by: Ulf Hansson --- drivers/mmc/host/wbsd.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) -- 2.20.1 diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c index 740179f42cf2..67f917d6ecd3 100644 --- a/drivers/mmc/host/wbsd.c +++ b/drivers/mmc/host/wbsd.c @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include @@ -770,22 +772,22 @@ static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq) * interrupts. */ switch (cmd->opcode) { - case 11: - case 17: - case 18: - case 20: - case 24: - case 25: - case 26: - case 27: - case 30: - case 42: - case 56: + case SD_SWITCH_VOLTAGE: + case MMC_READ_SINGLE_BLOCK: + case MMC_READ_MULTIPLE_BLOCK: + case MMC_WRITE_DAT_UNTIL_STOP: + case MMC_WRITE_BLOCK: + case MMC_WRITE_MULTIPLE_BLOCK: + case MMC_PROGRAM_CID: + case MMC_PROGRAM_CSD: + case MMC_SEND_WRITE_PROT: + case MMC_LOCK_UNLOCK: + case MMC_GEN_CMD: break; /* ACMDs. We don't keep track of state, so we just treat them * like any other command. */ - case 51: + case SD_APP_SEND_SCR: break; default: