From nobody Sun Nov 24 09:38:13 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=1726056992; cv=none; d=zohomail.com; s=zohoarc; b=VZfoJNmNtMzeRZwG8Wp3E/0+5brT5aKOEGJd9QlANvVn3Pph/EFckfBr9WeOGUJVVh/z0UjdzuhNHgSHak0IaCMQFqp70dtXqGj03kLIHzjW4ISg2W/owLE1vhy8vOWLpc0XlqXlhVjyXjpmymXhNipZGYPE1E3I2islWnHZaRc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726056992; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=0CfTxtjQXBmzI0CDOG+LMdjpMnlfgUIKoZqJnL/i42k=; b=D9MR2o33d0bZtObtc0AvqCA3tP97sE63xU05aeBgTqayU254kAUCEPGUMk7xsJ8HkGFOv1fRQUeXXy8dgpEND7prq1GlPRgaw8EZOv6S7J4dp8cfnmEUuBrpRC81Qh/m87+3gwwY6Kvqo/AjJsYJtkN9HBnSuTL/I2B6PjUDh0U= 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 1726056992592498.29155595244526; Wed, 11 Sep 2024 05:16:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soMGY-0001ig-AR; Wed, 11 Sep 2024 08:16: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 1soMGO-0000jL-M3 for qemu-devel@nongnu.org; Wed, 11 Sep 2024 08:16:03 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1soMGM-0007Rv-Bh for qemu-devel@nongnu.org; Wed, 11 Sep 2024 08:16:00 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a8d0d0aea3cso673119266b.3 for ; Wed, 11 Sep 2024 05:15:57 -0700 (PDT) Received: from m1x-phil.lan ([176.187.196.107]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25d5dc74sm605433266b.208.2024.09.11.05.15.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Sep 2024 05:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726056956; x=1726661756; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0CfTxtjQXBmzI0CDOG+LMdjpMnlfgUIKoZqJnL/i42k=; b=Y93xIz3MmW7rkQglJRHmSR3Ln9rFAN/I8Hg1rR6nWwEmUK5d6Jm+skYsKrrcd4rLuD Sq4RDhO6jwIUtMfV7aHq/h6aiWSrdhkWjIWZ7JvIfsC98cPfwGPl5B8vN72+OMDSETqi 3VSAwWggIzJj96g6uEneo5eJiUnQ6vuazylGpnuPtU1y9kvPNuo1zkYjuBUBic1Ot3J+ mBdBYiyWxEO51w9bR83kHbRkDu97wzFZZZYZhLbdxDInfBOPCtIp43oGyrQPihdTprnm Q1aFQEKI7OzdM+zRRDSulXcqY7ssDz1yBScUL5PpAPCzxvVoD/whh4SJ1KAgEmx9xdn8 +GEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726056956; x=1726661756; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0CfTxtjQXBmzI0CDOG+LMdjpMnlfgUIKoZqJnL/i42k=; b=Z4mvpGCIXkPukvn9cxsWywrQ9T+0cGi6Tw/D6vCKQqTl8XZtW7YB5vZ7qiRp40N+cT t0G6xjEWBobkcRbTxr9opITSlC+Bno9atXOkHwPuk6pBWP7DFvPVEDjOOYafCSjXWOox I0vm1M98BEzL67mxaXeKY+4VheglHVX3bJNcfgyPGbp5+V6zMtm/o7x8P2q3V1/9fu5c cLhCS827w0fk6a58G9mc4iu/UTcnQpYXiFpWt7M02eP5de+ekv973nMlteVxSoDEi9ai WT9PC7/BxbYlqNKqcXfYjUrubDcpp/jSuWG9gHSmhNc4Mcy5nAdxgKE1KyQvnoEzejdH fdiA== X-Gm-Message-State: AOJu0YxQQPsRf4EPVzMz612tcDsFkovBDdW2/2VEnzzV+4ILPA3KVc1h fPivlYKTFtGmbgQbI55+ASSxs4/lYgLf/X2D0TmZ9fk46n4Oell5no/Gsz+Ij5G4VBlJdc2eOm1 e X-Google-Smtp-Source: AGHT+IEap6OxGFXEKh1xN9MbxWtP6JGbrVThJKoccc9I4zSR38jL+PaNm9eReF9wfD8nLJktTZ93Sw== X-Received: by 2002:a17:907:3f27:b0:a7a:b561:3575 with SMTP id a640c23a62f3a-a8ffae05028mr423537466b.56.1726056956293; Wed, 11 Sep 2024 05:15:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Richard Henderson , "Edgar E . Iglesias" Subject: [PULL 13/56] hw/intc: Remove TYPE_ETRAX_FS_PIC device Date: Wed, 11 Sep 2024 14:13:38 +0200 Message-ID: <20240911121422.52585-14-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121422.52585-1-philmd@linaro.org> References: <20240911121422.52585-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1726056993664116600 We just removed the single machine using it (axis-dev88). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Acked-by: Edgar E. Iglesias Message-ID: <20240904143603.52934-8-philmd@linaro.org> --- hw/intc/etraxfs_pic.c | 172 ------------------------------------------ hw/intc/meson.build | 1 - 2 files changed, 173 deletions(-) delete mode 100644 hw/intc/etraxfs_pic.c diff --git a/hw/intc/etraxfs_pic.c b/hw/intc/etraxfs_pic.c deleted file mode 100644 index bd37d1cca0..0000000000 --- a/hw/intc/etraxfs_pic.c +++ /dev/null @@ -1,172 +0,0 @@ -/* - * QEMU ETRAX Interrupt Controller. - * - * Copyright (c) 2008 Edgar E. Iglesias, Axis Communications AB. - * - * Permission is hereby granted, free of charge, to any person obtaining a= copy - * of this software and associated documentation files (the "Software"), t= o deal - * in the Software without restriction, including without limitation the r= ights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or se= ll - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included= in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS= OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OT= HER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING= FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN - * THE SOFTWARE. - */ - -#include "qemu/osdep.h" -#include "hw/sysbus.h" -#include "qemu/module.h" -#include "hw/irq.h" -#include "hw/qdev-properties.h" -#include "qom/object.h" - -#define D(x) - -#define R_RW_MASK 0 -#define R_R_VECT 1 -#define R_R_MASKED_VECT 2 -#define R_R_NMI 3 -#define R_R_GURU 4 -#define R_MAX 5 - -#define TYPE_ETRAX_FS_PIC "etraxfs-pic" -DECLARE_INSTANCE_CHECKER(struct etrax_pic, ETRAX_FS_PIC, - TYPE_ETRAX_FS_PIC) - -struct etrax_pic -{ - SysBusDevice parent_obj; - - MemoryRegion mmio; - qemu_irq parent_irq; - qemu_irq parent_nmi; - uint32_t regs[R_MAX]; -}; - -static void pic_update(struct etrax_pic *fs) -{ =20 - uint32_t vector =3D 0; - int i; - - fs->regs[R_R_MASKED_VECT] =3D fs->regs[R_R_VECT] & fs->regs[R_RW_MASK]; - - /* The ETRAX interrupt controller signals interrupts to the core - through an interrupt request wire and an irq vector bus. If=20 - multiple interrupts are simultaneously active it chooses vector=20 - 0x30 and lets the sw choose the priorities. */ - if (fs->regs[R_R_MASKED_VECT]) { - uint32_t mv =3D fs->regs[R_R_MASKED_VECT]; - for (i =3D 0; i < 31; i++) { - if (mv & 1) { - vector =3D 0x31 + i; - /* Check for multiple interrupts. */ - if (mv > 1) - vector =3D 0x30; - break; - } - mv >>=3D 1; - } - } - - qemu_set_irq(fs->parent_irq, vector); -} - -static uint64_t -pic_read(void *opaque, hwaddr addr, unsigned int size) -{ - struct etrax_pic *fs =3D opaque; - uint32_t rval; - - rval =3D fs->regs[addr >> 2]; - D(printf("%s %x=3D%x\n", __func__, addr, rval)); - return rval; -} - -static void pic_write(void *opaque, hwaddr addr, - uint64_t value, unsigned int size) -{ - struct etrax_pic *fs =3D opaque; - D(printf("%s addr=3D%x val=3D%x\n", __func__, addr, value)); - - if (addr =3D=3D R_RW_MASK) { - fs->regs[R_RW_MASK] =3D value; - pic_update(fs); - } -} - -static const MemoryRegionOps pic_ops =3D { - .read =3D pic_read, - .write =3D pic_write, - .endianness =3D DEVICE_NATIVE_ENDIAN, - .valid =3D { - .min_access_size =3D 4, - .max_access_size =3D 4 - } -}; - -static void nmi_handler(void *opaque, int irq, int level) -{ =20 - struct etrax_pic *fs =3D (void *)opaque; - uint32_t mask; - - mask =3D 1 << irq; - if (level) - fs->regs[R_R_NMI] |=3D mask; - else - fs->regs[R_R_NMI] &=3D ~mask; - - qemu_set_irq(fs->parent_nmi, !!fs->regs[R_R_NMI]); -} - -static void irq_handler(void *opaque, int irq, int level) -{ - struct etrax_pic *fs =3D (void *)opaque; - - if (irq >=3D 30) { - nmi_handler(opaque, irq, level); - return; - } - - irq -=3D 1; - fs->regs[R_R_VECT] &=3D ~(1 << irq); - fs->regs[R_R_VECT] |=3D (!!level << irq); - pic_update(fs); -} - -static void etraxfs_pic_init(Object *obj) -{ - DeviceState *dev =3D DEVICE(obj); - struct etrax_pic *s =3D ETRAX_FS_PIC(obj); - SysBusDevice *sbd =3D SYS_BUS_DEVICE(obj); - - qdev_init_gpio_in(dev, irq_handler, 32); - sysbus_init_irq(sbd, &s->parent_irq); - sysbus_init_irq(sbd, &s->parent_nmi); - - memory_region_init_io(&s->mmio, obj, &pic_ops, s, - "etraxfs-pic", R_MAX * 4); - sysbus_init_mmio(sbd, &s->mmio); -} - -static const TypeInfo etraxfs_pic_info =3D { - .name =3D TYPE_ETRAX_FS_PIC, - .parent =3D TYPE_SYS_BUS_DEVICE, - .instance_size =3D sizeof(struct etrax_pic), - .instance_init =3D etraxfs_pic_init, -}; - -static void etraxfs_pic_register_types(void) -{ - type_register_static(&etraxfs_pic_info); -} - -type_init(etraxfs_pic_register_types) diff --git a/hw/intc/meson.build b/hw/intc/meson.build index f4d81eb8e4..6bfdc4eb33 100644 --- a/hw/intc/meson.build +++ b/hw/intc/meson.build @@ -15,7 +15,6 @@ system_ss.add(when: 'CONFIG_ARM_GICV3_TCG', if_true: file= s( system_ss.add(when: 'CONFIG_ALLWINNER_A10_PIC', if_true: files('allwinner-= a10-pic.c')) system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_vic.c')) system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_intc.c')) -system_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_pic.c')) system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_gic.c', '= exynos4210_combiner.c')) system_ss.add(when: 'CONFIG_GOLDFISH_PIC', if_true: files('goldfish_pic.c'= )) system_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true: files('heathrow_pic.c'= )) --=20 2.45.2