From patchwork Wed Jan 3 18:07:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 855138 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="D9FZmLAJ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zBfPK0r4hz9s7n for ; Thu, 4 Jan 2018 05:20:37 +1100 (AEDT) Received: from localhost ([::1]:60147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWneV-0001pr-45 for incoming@patchwork.ozlabs.org; Wed, 03 Jan 2018 13:20:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWnT4-0000Zv-JO for qemu-devel@nongnu.org; Wed, 03 Jan 2018 13:08:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWnT3-00074W-Na for qemu-devel@nongnu.org; Wed, 03 Jan 2018 13:08:46 -0500 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:43629) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWnT3-00074O-J4 for qemu-devel@nongnu.org; Wed, 03 Jan 2018 13:08:45 -0500 Received: by mail-qk0-x241.google.com with SMTP id j137so2559348qke.10 for ; Wed, 03 Jan 2018 10:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7RBZRI3MDdPANvgFVhjDGcaIdhIZ90GFRdEqMYmMAPQ=; b=D9FZmLAJ2zV/yUhMH/rQT7pb9M+9DHKDUe5n+kTao21RWrqzaBqTZeEtFrqb/xyNOt uZFtvz9izMH02Mvrnbzmo+5eU9McJwgghfBNMDq7en/EW+RqBbuesMp+4aOaVeTgsW9A Z6x3U+/m0qGcF6ZRs4aHUausqo3xPEyNfHyZomgr5kctVG9fhpALoZfM5xB+BVOX35RS YptoE588D0bmbbUot5LFq/YuYJruArPWFKWshmH8KHzXXERAwe9p1h0j+EFOc9c3vUIy +BSVRunTVmcLn/cD6Wsgy7tRmUiJcfh/Qfl3uK3irR/KQ1ye/DNl5lNGw6IlTrwGJtyi KPKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7RBZRI3MDdPANvgFVhjDGcaIdhIZ90GFRdEqMYmMAPQ=; b=IKIO2peEgu9Hqyjm54SeYKZ6K+iIO4D4HklYVLWp1C4nrqjxDrgzDvhIMiy+fT9zCj ISVQisGhLJKaQuYOxZ3+nJ3KE5S+IHP+joxWFHvzu9Ou0r7/VPguvoQN03FfRlOJJoeO vHcCy6VmghEeyq2gFczkDGNXt7oetF7F1rRTZ6NaChmw1/8KX4jGdKMYS0Dg0G/yfMLI Yt/rvULCGfD03pjr0n0XffZ6xFCaNPMb9rfYMPfgc3mFPHw+x2cltb+rXkTkB6smWatw wTYdkJxmI6MnEW06aoF+SeZWRvRE+DyuRMR0/38Qxv2wGoEMklLOBKzdfLSEiZzZL/Ck zHbg== X-Gm-Message-State: AKGB3mLZFd00n+caT0Fhw4SftqxGclMvhxcvcKtWHhnXdA+8VlrpvOuV sOU0XiTETcZxHl/QKLWfnHM= X-Google-Smtp-Source: ACJfBotjEg8YOAjRp/phEOqCfNiDB+oJQtX0ptB7QIHUBcbZJb9v8WFr3OMeciFmbn554IEP5DkGGA== X-Received: by 10.55.128.129 with SMTP id b123mr2826384qkd.1.1515002925167; Wed, 03 Jan 2018 10:08:45 -0800 (PST) Received: from x1.lan ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id 46sm914901qtx.65.2018.01.03.10.08.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 10:08:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Alistair Francis Date: Wed, 3 Jan 2018 15:07:59 -0300 Message-Id: <20180103180805.18140-12-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180103180805.18140-1-f4bug@amsat.org> References: <20180103180805.18140-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::241 Subject: [Qemu-devel] [PATCH v5 11/17] sdhci: move MASK_TRNMOD with other SDHC_TRN* defines in "sd-internal.h" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Edgar E . Iglesias" , Peter Maydell , Fam Zheng , Eduardo Habkost , Andrey Smirnov , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sdhci-internal.h | 1 + hw/sd/sdhci.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h index 248fd027f9..e941bc2386 100644 --- a/hw/sd/sdhci-internal.h +++ b/hw/sd/sdhci-internal.h @@ -43,6 +43,7 @@ #define SDHC_TRNS_ACMD12 0x0004 #define SDHC_TRNS_READ 0x0010 #define SDHC_TRNS_MULTI 0x0020 +#define SDHC_TRNMOD_MASK 0x0037 /* R/W Command Register 0x0 */ #define SDHC_CMDREG 0x0E diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index de9c4e5a83..ede51d7e45 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -98,7 +98,6 @@ (SDHC_CAPAB_BASECLKFREQ << 8) | (SDHC_CAPAB_TOUNIT << 7) | \ (SDHC_CAPAB_TOCLKFREQ)) -#define MASK_TRNMOD 0x0037 #define MASKED_WRITE(reg, mask, val) (reg = (reg & (mask)) | (val)) static uint8_t sdhci_slotint(SDHCIState *s) @@ -1035,7 +1034,7 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size) if (!(s->capareg & SDHC_CAN_DO_DMA)) { value &= ~SDHC_TRNS_DMA; } - MASKED_WRITE(s->trnmod, mask, value & MASK_TRNMOD); + MASKED_WRITE(s->trnmod, mask, value & SDHC_TRNMOD_MASK); MASKED_WRITE(s->cmdreg, mask >> 16, value >> 16); /* Writing to the upper byte of CMDREG triggers SD command generation */