Message ID | 20240628070216.92609-87-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fe0a:0:b0:362:4979:7f74 with SMTP id n10csp226669wrr; Fri, 28 Jun 2024 00:19:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwkIycFT4ybIknQKx26GNpMeQHwThYimn1y55ispsKpKDca2olQIgmMI5VB2Fixwfc7A5XpS1HMWH1giIICpZ5 X-Google-Smtp-Source: AGHT+IEt7ZRCjpuV1fyGbSgtVs0BeGcISGSYBUuvrB5QofWeIoYCz4FUSjt6khL+SrgvmpuSKwVt X-Received: by 2002:a05:620a:430d:b0:792:c2e7:6b41 with SMTP id af79cd13be357-79be6d47712mr1834347785a.22.1719559183538; Fri, 28 Jun 2024 00:19:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719559183; cv=none; d=google.com; s=arc-20160816; b=Fo65+vsJLoGY5gcEzBTQ0yXL39dLl4HMEX0c962JXdrabXEzYa8mkxcL4I5yf+/YCQ Mdf1hNrzDVD9neIkjFiLGCMTZH6H3ftXtFGjyzn3s8opAmujPo8MAfazE/fESDnCOXIF 2ebCMTL2oJNhtJoDTefO/grIIxvuDRjlCm2oSF5onrgDpGLakUtSVnilQWu46MSEcw+l nuv6M5HE0mU4Ew8LWG825lPX5fdsPQp93zjUVoaTlbOlgGxkNDFfDvT1rjZ2V+y+seLY hQ8WtKSPjI9G4BoQxQ5pT6vzEST0Vvg6GBAQbSvRktA+Z9mNlijtvFtLO0hXUfeOIzL6 pM9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=z9Lv5oRHhagfJkOeTGJdPKagMg6fgJmQOzE+waR1EWA=; fh=Vqz0ILX7NeXJwCG5xiS+Wtk94IhOmAmLtOfN3kRbil4=; b=JDjVg0azVFoFIPHgJAKf1y8ah958xqRZdTYnZm/zKu/1FuKZheh6PWU4FGS9ChPgik YVBy5LkDhrrqSmiyVAHmgZcUHmvfPLK/tAJ2CRypRstfoi9vV8LH/kBL41BZMvj2jnkV Rl/0f5Me8QQLOEZExdTVB7dE816IwKk9dI11N8+KF+TazhNA0mDxXUJZ10b5XSm506on YLBzwOQ1j3Caq4z2AJuUsnt104UMNm25jG5YqHZqVhjd7L42StVFccZMbX5hn+TnWJWe Mw/hJ1Loa1Ezjh204H/hODzc82gF7MgO/smkKkC21ZZrEPIvFx3JBE4HsYxo+4dh2jmE VYaA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T98JedF6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-79d69260ddcsi124604085a.37.2024.06.28.00.19.43 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Jun 2024 00:19:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T98JedF6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1sN5ks-0001ra-Bn; Fri, 28 Jun 2024 03:10:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1sN5kq-0001oC-BF for qemu-devel@nongnu.org; Fri, 28 Jun 2024 03:10:44 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1sN5ko-0004qP-L7 for qemu-devel@nongnu.org; Fri, 28 Jun 2024 03:10:43 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-425680b1d3aso1788715e9.2 for <qemu-devel@nongnu.org>; Fri, 28 Jun 2024 00:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719558640; x=1720163440; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=z9Lv5oRHhagfJkOeTGJdPKagMg6fgJmQOzE+waR1EWA=; b=T98JedF6nwFPQAHKVNQ+26D8R7WkAIvDVxJpEdBL4Idg2vTwQsCJpMwawmmxNnZxHH YMwsM8+e02MWUvH1kI9l4m7+lSntnX1NVraQzQ0SJR6GCGLgLGyJv3y3z6SfORJHvyCG yzvMlfB6f9BtQ7XAvT86oDVTZ0SPfJl0Q2XBs7pkP5M95z0mJm5PPOO3yxh5L+4ePM6Y n7FNd45i77zsqePHYzRNQlVyk9S/kW++Pz331pkBaEYL6ldyFqlXORV6exPHOYao7v0p aULwE15PUXzLWffk0jcd5TKqLduhsE9KXj++GGzlotggdDdt4Xp5ddJXPe/sWFCQRMW6 rd1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719558640; x=1720163440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z9Lv5oRHhagfJkOeTGJdPKagMg6fgJmQOzE+waR1EWA=; b=gWGxqyxACSWK6cpCPMosEGGDFe4oxC2AXOjn80o8Nk0yD47nUEXyktCx1kUfthUuQU 4xZY37JthHTKzdSEZ+iW+NMPNT7sI3WdwAIrIWrkszYfHU/IjVgYj2DbnxYnrJtVlcD2 KZNwwOpiAryr0VZ1XOFLXjyDwasggSWoupi4N+OPJXtsZRQ+G+pWGEtMFimGih2Umc/1 voJxxkTgiIIx0lGR1vLwgjT+xHEavh8hpiBioa1qT4eoskeTD+DsKXqr6lyQCnDyUVmo 7aJqSGjOw0Vw9Ae1jMBJX98zKtAbxE/aXs36DQxnM/muUBlNrjHf7xrZRvvECds6LorH d0kw== X-Gm-Message-State: AOJu0YxUBylwzXSnxfMlpq0gf8kP3o9lerp+ugFoA4MSIklhvNG5+LZF 0VvxR1lWzMEb0wEIOZoTo3GYEbWOllRV5JlaDA/WOszkLZi8qZZaB1uFHXIyFCZvnUOUB/1M+4o y4hQ= X-Received: by 2002:a05:600c:484f:b0:424:ac60:3a1 with SMTP id 5b1f17b1804b1-424ac6005afmr59414605e9.20.1719558640648; Fri, 28 Jun 2024 00:10:40 -0700 (PDT) Received: from m1x-phil.lan (cho94-h02-176-184-4-239.dsl.sta.abo.bbox.fr. [176.184.4.239]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4256b0642acsm21930665e9.25.2024.06.28.00.10.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 28 Jun 2024 00:10:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org> Subject: [RFC PATCH v42 86/98] hw/sd/sdcard: Add emmc_cmd_SEND_OP_COND handler (CMD1) Date: Fri, 28 Jun 2024 09:02:02 +0200 Message-ID: <20240628070216.92609-87-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240628070216.92609-1-philmd@linaro.org> References: <20240628070216.92609-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
hw/sd/sdcard: Add eMMC support
|
expand
|
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index c6e5c93acb..2dc0209482 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1190,6 +1190,12 @@ static sd_rsp_type_t spi_cmd_SEND_OP_COND(SDState *sd, SDRequest req) return sd_r1; } +static sd_rsp_type_t emmc_cmd_SEND_OP_COND(SDState *sd, SDRequest req) +{ + sd_ocr_powerup(sd); + return sd->state == sd_idle_state ? sd_r3 : sd_r0; +} + /* CMD2 */ static sd_rsp_type_t sd_cmd_ALL_SEND_CID(SDState *sd, SDRequest req) { @@ -2398,6 +2404,7 @@ static const SDProto sd_proto_emmc = { .name = "eMMC", .cmd = { [0] = {0, sd_bc, "GO_IDLE_STATE", sd_cmd_GO_IDLE_STATE}, + [1] = {0, sd_bcr, "SEND_OP_COND", emmc_cmd_SEND_OP_COND}, [2] = {0, sd_bcr, "ALL_SEND_CID", sd_cmd_ALL_SEND_CID}, [3] = {0, sd_ac, "SET_RELATIVE_ADDR", emmc_cmd_SET_RELATIVE_ADDR}, [4] = {0, sd_bc, "SEND_DSR", sd_cmd_unimplemented},