From patchwork Fri Oct 27 14:39:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 738688 Delivered-To: patch@linaro.org Received: by 2002:a5d:5101:0:b0:32d:baff:b0ca with SMTP id s1csp474012wrt; Fri, 27 Oct 2023 07:44:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVO3cn/+cGtvshnNVVpL64agdi8MfnVBOSeony1QsJgvnrzjNmCstKYp8G4KZdZkfQFrTg X-Received: by 2002:ac8:5f4d:0:b0:410:87a:be98 with SMTP id y13-20020ac85f4d000000b00410087abe98mr3278133qta.20.1698417882024; Fri, 27 Oct 2023 07:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698417882; cv=none; d=google.com; s=arc-20160816; b=KyCXIoQriozep/+Ptf1vpv3kaVUlx6qrwMx8S81MwO17/SEs4kEYOzb4wdzg8JLQes xIWLiLYtIvL9TnkDL9HsnA2bVB99l7KqYdtW7CbJ63fuFtiUEWo51DCdY8SUVUScogWt slK2tok+UXE8OGZtd6L4WwBluqXjoRC96OifSFr2Gm03hnMgaqUrPmDpV6qpo9w7sGx3 hrm5m0aNSungaJKn2Mco9B4cNI7AepBE5B7Xtle39rE6gvuBHZPl+kpjgyC/H1wnyJOS LCuzaIpEnoAeY7E29fpKNQY+F5234NpW5f/KTfyRl4vg8XLM5rVPaIdQ0G6S9YtrRDi6 ok6g== 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=UAIcFE1AWWGCfMMgeYKVUiHoLIBp/JRpwlxRycBVAB0=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=ksh7ii8QqoNKiNHuBd0uHxO3HACwGsT2LX6B8cFFUUXBcDukOoKufuzCc/Gk/UP7gL r28pTJtiyO5JW1efY808vY/E31gBs0IDXvjOVhGecQCe1BGRPW6jzmYmoEuao1kULDgY 1KTLx6+iF5YAbaWwKrCf976WttxFDnzbfleQbBqCPfSdXmDNscs8mZfd2blB3lQxOqhx goR5TztdUlJBhd+os5eE0QU5olfWodd4mlCeOhMmbo71vd97IfCgyfpASvgt2IdeYsyV St/Cldf3m4Q5rxbbqIQeitERMUvauLvqm+nElcpGushQssCVHIXswpvCxlwNaaNrrEBX ti6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JjVkiWpy; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o20-20020ac87c54000000b0040306253e31si782694qtv.416.2023.10.27.07.44.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Oct 2023 07:44:42 -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=JjVkiWpy; 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 ) id 1qwO0W-0007US-ON; Fri, 27 Oct 2023 10:40:16 -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 1qwO0I-0007LN-5V for qemu-devel@nongnu.org; Fri, 27 Oct 2023 10:40:02 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwO0D-0008Ad-5G for qemu-devel@nongnu.org; Fri, 27 Oct 2023 10:40:01 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-32d9effe314so1475451f8f.3 for ; Fri, 27 Oct 2023 07:39:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698417595; x=1699022395; 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=UAIcFE1AWWGCfMMgeYKVUiHoLIBp/JRpwlxRycBVAB0=; b=JjVkiWpysoVI1kCaHOCrveKYkCtVrxm27BY1NX+iqTraD/RH3nASBWVGDXLJGbM3rh 0A+SOOykdxvDgVIyr/l7RuB0x0gv2D4aVEP70+AjjppAD4pK52DwOu6NMiEr/GONzXpt kNa0o4nPG4UY9i0SJFqvhNP8Le+bLzhgQFYKvui8j0DHr+XyfLKQsHljg8Z1B2oivTev pQnxumcP6ZZe61EForscSGsFaAHojA+OJaGsfTTdvinlEsJV8ehdG095SdxnFW/uhS45 2m+rIRoAIqmu5evo33iTqtaAXsmZcN8xMcclRPdk5ahsIxQtYe8rzs/pLBo8jTicjVva /TRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698417595; x=1699022395; 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=UAIcFE1AWWGCfMMgeYKVUiHoLIBp/JRpwlxRycBVAB0=; b=Htsl5R64GEFJ3BQ19/iuvc6wXrkH1N7vrHsqNLkvJhinzKQ77F9ZKWtzu6qTackDqP BsDr+XFnz4YfmOCNiySHST2xGuEu9yg9uenEMzWrPrPLwDSlaMx93zWsvcGUYkdlURtV agWjrZqJHvW/Q6nSTHcIRWltwCOTZWskv19btJ7+a4OCgdOq8X/yhCQo0nbhU0wkSlYc 875dBHVggKFasjyVaY9NxQCM5fLhj8TtcSgCwLbWwjM8ICv8DWO23tu0eK8SDMlOReIq OeQ6+xx82zZ1QWgw52ZedrvLPf2h39yttg5Ul859rFKw401/3/0IAQ9c1kf5YLPCPrjR 7YHQ== X-Gm-Message-State: AOJu0YxToLJ+Du3HoYXDhPr0pVLRkeNAXNMl+e0WeaCws+AnjmLTyy81 6ugZbf2I/7tJrGN+T+6TDk/uXjKB/wJWua1VJ6E= X-Received: by 2002:adf:f645:0:b0:32d:84c7:2f56 with SMTP id x5-20020adff645000000b0032d84c72f56mr1958002wrp.21.1698417595670; Fri, 27 Oct 2023 07:39:55 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e2-20020a5d5002000000b0031c6581d55esm1874123wrt.91.2023.10.27.07.39.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 07:39:55 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 24/41] hw/pcmcia/pxa2xx: Inline pxa2xx_pcmcia_init() Date: Fri, 27 Oct 2023 15:39:25 +0100 Message-Id: <20231027143942.3413881-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027143942.3413881-1-peter.maydell@linaro.org> References: <20231027143942.3413881-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20231020130331.50048-6-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/arm/pxa.h | 2 -- hw/arm/pxa2xx.c | 12 ++++++++---- hw/pcmcia/pxa2xx.c | 10 ---------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h index 54eb895e42a..4c6caee1134 100644 --- a/include/hw/arm/pxa.h +++ b/include/hw/arm/pxa.h @@ -100,8 +100,6 @@ void pxa2xx_mmci_handlers(PXA2xxMMCIState *s, qemu_irq readonly, #define TYPE_PXA2XX_PCMCIA "pxa2xx-pcmcia" OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxPCMCIAState, PXA2XX_PCMCIA) -PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem, - hwaddr base); int pxa2xx_pcmcia_attach(void *opaque, PCMCIACardState *card); int pxa2xx_pcmcia_detach(void *opaque); void pxa2xx_pcmcia_set_irq_cb(void *opaque, qemu_irq irq, qemu_irq cd_irq); diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 07d5dd8691f..601ddd87666 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -2205,8 +2205,10 @@ PXA2xxState *pxa270_init(unsigned int sdram_size, const char *cpu_type) sysbus_create_simple("sysbus-ohci", 0x4c000000, qdev_get_gpio_in(s->pic, PXA2XX_PIC_USBH1)); - s->pcmcia[0] = pxa2xx_pcmcia_init(address_space, 0x20000000); - s->pcmcia[1] = pxa2xx_pcmcia_init(address_space, 0x30000000); + s->pcmcia[0] = PXA2XX_PCMCIA(sysbus_create_simple(TYPE_PXA2XX_PCMCIA, + 0x20000000, NULL)); + s->pcmcia[1] = PXA2XX_PCMCIA(sysbus_create_simple(TYPE_PXA2XX_PCMCIA, + 0x30000000, NULL)); sysbus_create_simple(TYPE_PXA2XX_RTC, 0x40900000, qdev_get_gpio_in(s->pic, PXA2XX_PIC_RTCALARM)); @@ -2338,8 +2340,10 @@ PXA2xxState *pxa255_init(unsigned int sdram_size) s->ssp[i] = (SSIBus *)qdev_get_child_bus(dev, "ssi"); } - s->pcmcia[0] = pxa2xx_pcmcia_init(address_space, 0x20000000); - s->pcmcia[1] = pxa2xx_pcmcia_init(address_space, 0x30000000); + s->pcmcia[0] = PXA2XX_PCMCIA(sysbus_create_simple(TYPE_PXA2XX_PCMCIA, + 0x20000000, NULL)); + s->pcmcia[1] = PXA2XX_PCMCIA(sysbus_create_simple(TYPE_PXA2XX_PCMCIA, + 0x30000000, NULL)); sysbus_create_simple(TYPE_PXA2XX_RTC, 0x40900000, qdev_get_gpio_in(s->pic, PXA2XX_PIC_RTCALARM)); diff --git a/hw/pcmcia/pxa2xx.c b/hw/pcmcia/pxa2xx.c index 3d512a292c7..e3111fdf1a1 100644 --- a/hw/pcmcia/pxa2xx.c +++ b/hw/pcmcia/pxa2xx.c @@ -138,16 +138,6 @@ static void pxa2xx_pcmcia_set_irq(void *opaque, int line, int level) qemu_set_irq(s->irq, level); } -PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem, - hwaddr base) -{ - DeviceState *dev; - - dev = sysbus_create_simple(TYPE_PXA2XX_PCMCIA, base, NULL); - - return PXA2XX_PCMCIA(dev); -} - static void pxa2xx_pcmcia_initfn(Object *obj) { SysBusDevice *sbd = SYS_BUS_DEVICE(obj);