From patchwork Tue Nov 28 13:37:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 747822 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp3833563wru; Tue, 28 Nov 2023 05:39:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8Lac8sVz5/ShMkycs82eVbeSFQiD2a2mhqopbSsNq1J3IxhczSMS6Jp9k3M6Qv6Kt4HAc X-Received: by 2002:ac8:7dcc:0:b0:423:8b9c:cfbc with SMTP id c12-20020ac87dcc000000b004238b9ccfbcmr20605534qte.8.1701178781668; Tue, 28 Nov 2023 05:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701178781; cv=none; d=google.com; s=arc-20160816; b=SwoQ2ntyrTmL4J8X+rzkEwOqqElON3w+ztbFWP1/o+Kk1N7sk9/RYeS6vlI4TNBc7h 86KlKoZY0Dlo7AgCjiz9BzmEKJrIY8mxXNtun2sLw0TZ8CT5wEI+/ilpJsWUV3nhXAhp z9cLYSv1ktO93dNatNCD5f62c6WWjV2pMImgVaTIn3tytF0RMGRcMpyyvT3ZF04CBjG4 W8RAks0gc28K03+qXlSHjiWP6nAF/VOET5R+SqQaCfNONer+O/66BhTBYQ7olkhS16h+ 8xTdf/0wfi4I3v6Xwkausw+/z9EnGshdNZ6IhKgl/A2ZIP2QlSK/4T1DJ1nxCWAwbiRY praw== 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:cc:to :from:dkim-signature; bh=qTMVhitieSJNZvrttwpbFm3rdYpSlAZIyeSRfKEX9cE=; fh=R1DZWSCtOOcpxfKmg0yS3ViW41SOHK39cw8w1UwMtV8=; b=PdnUR11LTyV98SMjfBCCYYbrXKdCLNgc5oyaHs2VLtEcc2aoKnXcFTcd9bE9MytYny l+RuRVqby6WfKeJ236EKp2JJ5J7LLk+9Fyap8m3gT7twtvW3cI6SJomYmEPaL8VcyN3n KLEcDrmMMes0fPXwR0gapSHaN9MU9j3FNgUG/R8ZeEtnZEoLArvlpCP/ieHpPtD+j92O ZQCSjbM377+/PcpLJSkXsGkdTWXbcdJnu6CTEB2e21eHY9KlYUM9Jb5fYG9OO/OSNh9J B+zfdiNpR2AXyRHdDs1FD2l5qHKa/DJH78FeRBg0h7jtKhwnO0SWKIVeRKzCbf1ixlHg Qz0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ArAKQ7vp; 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 21-20020ac85915000000b004236fe50bbdsi11302809qty.162.2023.11.28.05.39.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Nov 2023 05:39:41 -0800 (PST) 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=ArAKQ7vp; 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 1r7yI5-000211-4o; Tue, 28 Nov 2023 08:38:17 -0500 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 1r7yI3-0001zx-C9 for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:15 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r7yI1-00087X-Of for qemu-devel@nongnu.org; Tue, 28 Nov 2023 08:38:15 -0500 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a02d91ab199so749211066b.0 for ; Tue, 28 Nov 2023 05:38:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701178692; x=1701783492; 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=qTMVhitieSJNZvrttwpbFm3rdYpSlAZIyeSRfKEX9cE=; b=ArAKQ7vpO1RhuyIn3poB/u+rL+XcRgg/oFG/DjICEuEFQVxgaaRuzwF/XSHbc7g5hM ow/KoUFdKhpaiUGFxinahBA7Gie+ITN3Vnu5SUIfpMSz6xxsw/3iKAbRSz7xwKFs8EGM zSAFeatRMVqXyLg0Gr1CsZvbwXNhmZFxMoWJjjh3UxA8knv/OEfrxqw4RKCOPlBDM3hW hZmrjCpgBkRo7XkJ8wH1S+Ioni84l0uYmszDgVH1+h9v5JSvOitq+1UCTckiVo/4x4rq qZq+m8vkEXXupm6CD0enleGKHD26DHnddZrBfHVVFEYiDnH+lWCb5rwoqE8mrsHj5UCq Oedg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701178692; x=1701783492; 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=qTMVhitieSJNZvrttwpbFm3rdYpSlAZIyeSRfKEX9cE=; b=kL+SmDBUqlRdltqDV3wae8K6Nf3TihUuv4kzHICD8m0EAMbuFSbHG7i4rbteH7tsKp rpDTIBMX1QDys2StTLZ4Px88VOiBDHktb+N2zlf1qJJPJdlCl9XIHsDxa5qiUCtgdLEE r6e0N2JOkC2uy7GQTzdyapd5Ln+l1WThh29hBpMSN9RLE4NJ+BjivQoengjBTgCg0FcP nSgx0T0QXHqYWN3OP6oK0Hnq/m3owjTa+/lIbV65hcOJ77sGmPZcA5Xz59qI0IGsRyk+ Mf458kSKAqbn8PAoY3aiybObHs3tsgQUfAOdUTIIkbdpg5/xWAMAgRuyHqbDidOmPzuN njDg== X-Gm-Message-State: AOJu0YyWOoPULXTGVTPLTEEGLTHGnSXdg5+io/VvjUBju/I5MINWlqYH iStgY0Xi9WSJW/oIPqsDVLTH65jzBgl9cUHAFLA= X-Received: by 2002:a17:907:6d06:b0:9e5:2c72:9409 with SMTP id sa6-20020a1709076d0600b009e52c729409mr13673712ejc.43.1701178692301; Tue, 28 Nov 2023 05:38:12 -0800 (PST) Received: from m1x-phil.lan (crb44-h02-176-184-13-61.dsl.sta.abo.bbox.fr. [176.184.13.61]) by smtp.gmail.com with ESMTPSA id h18-20020a1709063b5200b009fdd2c6d042sm6955414ejf.148.2023.11.28.05.38.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 28 Nov 2023 05:38:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Michael Rolnik , BALATON Zoltan , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Jiaxun Yang Subject: [PULL 5/7] hw/audio/via-ac97: Route interrupts using via_isa_set_irq() Date: Tue, 28 Nov 2023 14:37:38 +0100 Message-ID: <20231128133740.64525-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231128133740.64525-1-philmd@linaro.org> References: <20231128133740.64525-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: BALATON Zoltan This device is a function of VIA south bridge and should allow setting interrupt routing within that chip. This is implemented in via_isa_set_irq(). Fixes: eb604411a78b82c468e2b8d81a9401eb8b9c7658 Signed-off-by: BALATON Zoltan Message-ID: <5329840e4be6dd8ae143d07cbfe61d8d2d106654.1701035944.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/audio/via-ac97.c | 8 ++++---- hw/isa/vt82c686.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/audio/via-ac97.c b/hw/audio/via-ac97.c index 30095a4c7a..4c127a1def 100644 --- a/hw/audio/via-ac97.c +++ b/hw/audio/via-ac97.c @@ -211,14 +211,14 @@ static void out_cb(void *opaque, int avail) AUD_set_active_out(s->vo, 0); } if (c->type & STAT_EOL) { - pci_set_irq(&s->dev, 1); + via_isa_set_irq(&s->dev, 0, 1); } } if (CLEN_IS_FLAG(c)) { c->stat |= STAT_FLAG; c->stat |= STAT_PAUSED; if (c->type & STAT_FLAG) { - pci_set_irq(&s->dev, 1); + via_isa_set_irq(&s->dev, 0, 1); } } if (CLEN_IS_STOP(c)) { @@ -305,13 +305,13 @@ static void sgd_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) if (val & STAT_EOL) { s->aur.stat &= ~(STAT_EOL | STAT_PAUSED); if (s->aur.type & STAT_EOL) { - pci_set_irq(&s->dev, 0); + via_isa_set_irq(&s->dev, 0, 0); } } if (val & STAT_FLAG) { s->aur.stat &= ~(STAT_FLAG | STAT_PAUSED); if (s->aur.type & STAT_FLAG) { - pci_set_irq(&s->dev, 0); + via_isa_set_irq(&s->dev, 0, 0); } } break; diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index a3eb6769fc..9c2333a277 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -622,6 +622,7 @@ void via_isa_set_irq(PCIDevice *d, int pin, int level) break; case 2: /* USB ports 0-1 */ case 3: /* USB ports 2-3 */ + case 5: /* AC97 audio */ max_irq = 14; break; }