From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4FC7C433ED for ; Fri, 30 Apr 2021 22:24:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 46F6561423 for ; Fri, 30 Apr 2021 22:24:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46F6561423 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcbYo-0003n6-95 for qemu-devel@archiver.kernel.org; Fri, 30 Apr 2021 18:24:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcbY9-0003Fv-MX for qemu-devel@nongnu.org; Fri, 30 Apr 2021 18:23:53 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:35384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcbY7-0005ds-UM for qemu-devel@nongnu.org; Fri, 30 Apr 2021 18:23:53 -0400 Received: by mail-wm1-x335.google.com with SMTP id j3-20020a05600c4843b02901484662c4ebso735107wmo.0 for ; Fri, 30 Apr 2021 15:23:51 -0700 (PDT) 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=U+20hUiagOV8D+dhZIu/lGuSxoJFQH5E6+upCy4ag+4=; b=DUDhqmD8zgoZstFcUG323aqCjVEIQhrsA0NCP2lyR7DyAuW4KySlkcgETz2B7uuAiA uwbL166GuBUwP69XZG/foYWjGb+NV1bCglt64Q4Qrj+EbYFCd642R8Nsu3OpJqqFG8OR OKilsSSSTPcpDbcKnOr+YS80Y3bVu33dm8ib6ht5C7Wwhtb/5ldpcBTLC13VP+FOnnih RuGCrSmF2+3ApyyWqtNn+Ssd7xFMh9dmmJZzFY50ug7RzcwHUlDMaHQb+ASn4tg6vs2k 32OQlZv0QQEQXzDqA6Uh4riGtJc+EyaS6OcRb1Kq7LtDtasKja2SHeL6lxy4Y6gCeh9e GabA== 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=U+20hUiagOV8D+dhZIu/lGuSxoJFQH5E6+upCy4ag+4=; b=Kwg6u9ltWiChQzRZ2E+RbA4jezlyWizFVEiI9FPld8ARw72f5w7E9It90yLhvIxqD2 KnIn4fvVoQQeT4o+tp9WzoTxLRXv9x2LT63GIJTnfY4bw+PSuKJDh1KGk+8NGCNfEx9I oLYyBcf1/4PzS9wS82SsptzYAEUZOxSWAU0GxWMwyoR6N008fXVjTxB5n3/RpU4sb9Et NIN6cYU/d8RDO/enfBt0kzJHEZwq0XPfjTH8g56XHfKvEplNQzWarnzG3ufnAkwy8UIj sC9PjwoCk5dD3sDlGm1TwyhNK8WCt+Z5Z8yCUXEW8be7yexJNKooERTZ5fecS+s1B4no KvNg== X-Gm-Message-State: AOAM532+sysBqAw7gk7UFHW3S73iSLTii9Yxq8XNBx0KAzDnigRZbGzX Jxoq+Qy5XJbGZ58cBP62id8mDw== X-Google-Smtp-Source: ABdhPJwvngFjlLgNo2u5aWQ8NaGdYg1i3KuUBeajC7aBAjgsEnXHs06eJBJ8Z5OoxNlFxM188j3s7w== X-Received: by 2002:a05:600c:b4c:: with SMTP id k12mr18949797wmr.186.1619821430395; Fri, 30 Apr 2021 15:23:50 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id p18sm3719208wrs.68.2021.04.30.15.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Apr 2021 15:23:49 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH] hw/sd/omap_mmc: Use device_cold_reset() instead of device_legacy_reset() Date: Fri, 30 Apr 2021 23:23:48 +0100 Message-Id: <20210430222348.8514-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The omap_mmc_reset() function resets its SD card via device_legacy_reset(). We know that the SD card does not have a qbus of its own, so the new device_cold_reset() function (which resets both the device and its child buses) is equivalent here to device_legacy_reset() and we can just switch to the new API. Signed-off-by: Peter Maydell --- cc'ing Markus who was interested in conversions away from the legacy API. As warned, the conversion patch itself is not very interesting as the difficulty is all in confirming that the device being reset has no qbuses... hw/sd/omap_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c index 1f946908fe1..b67def63813 100644 --- a/hw/sd/omap_mmc.c +++ b/hw/sd/omap_mmc.c @@ -318,7 +318,7 @@ void omap_mmc_reset(struct omap_mmc_s *host) * into any bus, and we must reset it manually. When omap_mmc is * QOMified this must move into the QOM reset function. */ - device_legacy_reset(DEVICE(host->card)); + device_cold_reset(DEVICE(host->card)); } static uint64_t omap_mmc_read(void *opaque, hwaddr offset, -- 2.20.1