From nobody Sun Nov 24 11:04:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1725379988; cv=none; d=zohomail.com; s=zohoarc; b=FoS70lKj+j5aEIKXPEKgR42WyM4bIHPT0LdL1Lrt9/mWbiXxs8iT0jW8g0ac9CVg4/L4Ui2kMuem2Lwb1kL1R2DOJ7kZfIohjvuvrHfyy3elHTgjArM+14XHQBR3EuuNli6YnEM4+UKV3wCvjIT3eG5f8GZPcZ15e5fb3gM3ww8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725379988; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=IBK9++lIy858o9BthLOcMzwPW6V+cbfDg3AQGuNzNcc=; b=T4aRl4l/pKyGMh/e0vsnoQ6GbZtCsCLp076qLC130knlgtn87mYT1EIyDTr6TbocQiqxAM8jEPhl6OAiRJxazdOZzwqdg5z/OxuBLTcn/ez+3aPlYo/lfGpMFCXoJ8OiO45d0biXsm9xk+9RlOnV2W/NsCaqaqZgENPWEWrT3nQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1725379988010154.69140236170688; Tue, 3 Sep 2024 09:13:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slW5e-0001mo-IW; Tue, 03 Sep 2024 12:09:10 -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 ) id 1slW5U-0000r5-JI for qemu-devel@nongnu.org; Tue, 03 Sep 2024 12:09:00 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1slW5S-0002wM-8x for qemu-devel@nongnu.org; Tue, 03 Sep 2024 12:09:00 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42c7a384b18so26510525e9.0 for ; Tue, 03 Sep 2024 09:08:57 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42bb6df1066sm175123065e9.18.2024.09.03.09.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 09:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725379737; x=1725984537; 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=IBK9++lIy858o9BthLOcMzwPW6V+cbfDg3AQGuNzNcc=; b=bjSavRnshSYnAfN3nC0375JCL/icIHQwCE4mWDi0Ad46/dlS3vn/13W8V2zmdbs8L0 QUht5t6VLLXJgI7MDQkzmlKzoB64K3khgm43ZSWSAz9v9rRU4sJDSczlkvuXzBh9mVyd D4ZGW3KimYckpdpO2W7af2f/RuvYv/Mofyrqn4BOuBHcCn653LsqGoJVZZ8+CZIICLlu GZqZqFqDLeOTtpsPwaogY/24sYhggZho/723x/SeEXDcxdD3J25CUmwTa8cbv7Mwq4OD LFHX0vPcac8XvhZbYBWkQjtIYqum1qGgdFyLSMvh4yvDRDTwE0D/eVhIg0xVDG0Cmrl0 4XjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725379737; x=1725984537; 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=IBK9++lIy858o9BthLOcMzwPW6V+cbfDg3AQGuNzNcc=; b=ejVC+Y/WfbgbuK+JwJL+GxnkA0BKOlbfrglhkEcfSFdeZzFi1zXKfNx1IwKkGi5M2L EwxEOFQk5wxwfYTnSd7qksgOhbV2OWuDMnaO9OyZiua7cqhUyp+LEtdzQnfcc9zC6TLn rUA3OvJGyihXoytlljS14TEXlqUFX5qjCXAR6SlKyPvHo61daItICtPzA1dhtmgP71c5 4qploqrhxTUQsQQDwOC4hI650pBeOuig/8tFvfjb5vjm5WoKi9pLXAHt2sP2GgkQANyQ cFw0xt6XmzS8Q8gkc6S7uDan+sWL6qI9yVlZ00gBGjmchDPefnT+/h/c58tb5MbRQ+be mvgw== X-Forwarded-Encrypted: i=1; AJvYcCWWRlCAw/vQ6tZZ8c4pAgMIr1Wo7KOnq3wQpBnI69cidPqwrAZ1UXoULVb3A2opxTUFWRdsdxFjHSPj@nongnu.org X-Gm-Message-State: AOJu0YxEqp2nwpwIM+tPTHPtPnFHND2P3MNOX/adoTCFYvGBwpzKWSIP 1znDIfOs41EyR36R7qdltCfKHpWXZbzOsnzbpdTGuy0+b5lmRf/0q7a1N3owkHsBNhepXzYpJaL 9 X-Google-Smtp-Source: AGHT+IEFJXz0VkiDn5nAPBOs/bojJU+xAE30jrZQ/1R9d2JUZGO10RpC6sQ1LLuNfixnvDI6fk1eVg== X-Received: by 2002:a05:600c:154d:b0:429:cc03:6450 with SMTP id 5b1f17b1804b1-42bd731ee10mr90000435e9.7.1725379736719; Tue, 03 Sep 2024 09:08:56 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH for-9.2 41/53] hw/sd: Remove omap2_mmc device Date: Tue, 3 Sep 2024 17:07:39 +0100 Message-Id: <20240903160751.4100218-42-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903160751.4100218-1-peter.maydell@linaro.org> References: <20240903160751.4100218-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1725379990045116600 Content-Type: text/plain; charset="utf-8" Remove the OMAP2 specific code from omap_mmc.c. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/arm/omap.h | 5 ---- hw/sd/omap_mmc.c | 63 ------------------------------------------- 2 files changed, 68 deletions(-) diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 67bb83dff5d..b0bd1e6f540 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -797,12 +797,7 @@ struct omap_mmc_s *omap_mmc_init(hwaddr base, MemoryRegion *sysmem, BlockBackend *blk, qemu_irq irq, qemu_irq dma[], omap_clk clk); -struct omap_mmc_s *omap2_mmc_init(struct omap_target_agent_s *ta, - BlockBackend *blk, qemu_irq irq, qemu_irq dma[], - omap_clk fclk, omap_clk iclk); void omap_mmc_reset(struct omap_mmc_s *s); -void omap_mmc_handlers(struct omap_mmc_s *s, qemu_irq ro, qemu_irq cover); -void omap_mmc_enable(struct omap_mmc_s *s, int enable); =20 /* omap_i2c.c */ I2CBus *omap_i2c_bus(DeviceState *omap_i2c); diff --git a/hw/sd/omap_mmc.c b/hw/sd/omap_mmc.c index edd3cf2a1eb..91e9a3f1c6a 100644 --- a/hw/sd/omap_mmc.c +++ b/hw/sd/omap_mmc.c @@ -573,24 +573,6 @@ static const MemoryRegionOps omap_mmc_ops =3D { .endianness =3D DEVICE_NATIVE_ENDIAN, }; =20 -static void omap_mmc_cover_cb(void *opaque, int line, int level) -{ - struct omap_mmc_s *host =3D opaque; - - if (!host->cdet_state && level) { - host->status |=3D 0x0002; - omap_mmc_interrupts_update(host); - if (host->cdet_wakeup) { - /* TODO: Assert wake-up */ - } - } - - if (host->cdet_state !=3D level) { - qemu_set_irq(host->coverswitch, level); - host->cdet_state =3D level; - } -} - struct omap_mmc_s *omap_mmc_init(hwaddr base, MemoryRegion *sysmem, BlockBackend *blk, @@ -617,48 +599,3 @@ struct omap_mmc_s *omap_mmc_init(hwaddr base, =20 return s; } - -struct omap_mmc_s *omap2_mmc_init(struct omap_target_agent_s *ta, - BlockBackend *blk, qemu_irq irq, qemu_irq dma[], - omap_clk fclk, omap_clk iclk) -{ - struct omap_mmc_s *s =3D g_new0(struct omap_mmc_s, 1); - - s->irq =3D irq; - s->dma =3D dma; - s->clk =3D fclk; - s->lines =3D 4; - s->rev =3D 2; - - memory_region_init_io(&s->iomem, NULL, &omap_mmc_ops, s, "omap.mmc", - omap_l4_region_size(ta, 0)); - omap_l4_attach(ta, 0, &s->iomem); - - /* Instantiate the storage */ - s->card =3D sd_init(blk, false); - if (s->card =3D=3D NULL) { - exit(1); - } - - s->cdet =3D qemu_allocate_irq(omap_mmc_cover_cb, s, 0); - sd_set_cb(s->card, NULL, s->cdet); - - omap_mmc_reset(s); - - return s; -} - -void omap_mmc_handlers(struct omap_mmc_s *s, qemu_irq ro, qemu_irq cover) -{ - if (s->cdet) { - sd_set_cb(s->card, ro, s->cdet); - s->coverswitch =3D cover; - qemu_set_irq(cover, s->cdet_state); - } else - sd_set_cb(s->card, ro, cover); -} - -void omap_mmc_enable(struct omap_mmc_s *s, int enable) -{ - sd_enable(s->card, enable); -} --=20 2.34.1