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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4B7FDC77B73 for ; Mon, 22 May 2023 06:06:22 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q0ygB-00084Y-77; Mon, 22 May 2023 02:05:59 -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 1q0yg9-00082k-Ae for qemu-devel@nongnu.org; Mon, 22 May 2023 02:05:57 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q0yg6-00026p-NL for qemu-devel@nongnu.org; Mon, 22 May 2023 02:05:57 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f42ba32e24so35023625e9.3 for ; Sun, 21 May 2023 23:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684735553; x=1687327553; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NXgJy8c5g6MPyHjNu9RSgx4PXQ+UTK626UsedlhezkQ=; b=jKfXul5YJIBY7lm67QP+IDB5SV3dQiRW7Z3ntEsymQq5a/JS+qYKriS9XRoBthO/vS P+85gAkwjvUtsEIbs594kCDPq6ByZNvMoZ35ASHmj6+D7Up78nUuVpp35Ba4ns9uvwii /arQZr3KUqZw94Hnxa2UgkNPXM3/GulVvluSZeiskUeaUZ0V5aiLR0S7l8ywZZy8pcXs 88WoxkwuB/5hWLTQKT//2Bc70y84pyPoXjD4sdlQ+S7as4yRgXMsVrHWagJWefX0t4ED PdceyTWNVKLamICZ51O95RtAoLAOCrfJACHgTBkNKKbQQTGbwU6vBIz2PnFlXUYHl3j3 2A1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684735553; x=1687327553; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NXgJy8c5g6MPyHjNu9RSgx4PXQ+UTK626UsedlhezkQ=; b=i7G5m60trSNJSc+aXjXUAFbLxrKcyD1Kur/rrM4mQONNdEugKN9d5fDMy3C9iC5AY4 TaWMTDuFEhrhFIwsHKFiM3raIaXfcS8lcTe68s55rkMVKvMRPHs8NjGCydxXjpQQv2uA OgmNmKW2DZqw6GHfwS4FkHbKD2cZOzPww7NPKVPnRwIQlmlPfDYB6IRZEza3Lvql4DBg NQ3KasFiEESftlWQU/Rwx/Ht7djlDHYtwQ2D0gL65o2XV0rpKU1oPbP0c4pp7Vh+4goT P6UIULVAzdlxJ1U0O9sSOKom8f6e77cP584m9dYzpm2RQgn5DAd9QCb5Vov5uNqt9SdP UddQ== X-Gm-Message-State: AC+VfDw5J0LSM7CXmhmGJeGWp13RqLerDOLETtQF5VkYaHn7iSfRQ7Ah Wb562D/gOgefnJit6ShD/4LQjg== X-Google-Smtp-Source: ACHHUZ7M+d+vYV1pwynGt8mkSD7oGvpUVsBNnDfTCh73z9kcWS2ILdE4jDMqW9N9gRGQrHk9jeAHXg== X-Received: by 2002:a7b:cbc1:0:b0:3f5:aa2:288b with SMTP id n1-20020a7bcbc1000000b003f50aa2288bmr6190355wmi.0.1684735553036; Sun, 21 May 2023 23:05:53 -0700 (PDT) Received: from [192.168.69.115] ([176.176.153.164]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c378500b003f42314832fsm7098482wmr.18.2023.05.21.23.05.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 May 2023 23:05:52 -0700 (PDT) Message-ID: Date: Mon, 22 May 2023 08:05:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v2 4/6] hw/char/parallel: Export ParallelState Content-Language: en-US To: Bernhard Beschow , qemu-devel@nongnu.org Cc: Michael Tokarev , Laurent Vivier , Marcel Apfelbaum , qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?Q?Herv=c3=a9_Poussineau?= , "Michael S. Tsirkin" , Paolo Bonzini , Eduardo Habkost , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Richard Henderson , qemu-ppc@nongnu.org, Peter Maydell , Mark Cave-Ayland References: <20230521123049.312349-1-shentey@gmail.com> <20230521123049.312349-5-shentey@gmail.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= In-Reply-To: <20230521123049.312349-5-shentey@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 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, NICE_REPLY_A=-0.098, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 21/5/23 14:30, Bernhard Beschow wrote: > Exporting ParallelState is a precondition for exporing TYPE_ISA_PARALLEL. > > Suggested-by: Mark Cave-Ayland Missing your S-o-b. > --- > include/hw/char/parallel.h | 44 ++++++++++++++++++++++++++++++++++++++ > hw/char/parallel.c | 42 ------------------------------------ > 2 files changed, 44 insertions(+), 42 deletions(-) > > diff --git a/include/hw/char/parallel.h b/include/hw/char/parallel.h > index 0a23c0f57e..2d4907c1fe 100644 > --- a/include/hw/char/parallel.h > +++ b/include/hw/char/parallel.h > @@ -1,9 +1,53 @@ > #ifndef HW_PARALLEL_H > #define HW_PARALLEL_H > > +#include "exec/ioport.h" > +#include "exec/memory.h" > #include "hw/isa/isa.h" > +#include "hw/irq.h" > +#include "chardev/char-fe.h" > #include "chardev/char.h" > > +/* > + * These are the definitions for the Printer Status Register > + */ > +#define PARA_STS_BUSY 0x80 /* Busy complement */ > +#define PARA_STS_ACK 0x40 /* Acknowledge */ > +#define PARA_STS_PAPER 0x20 /* Out of paper */ > +#define PARA_STS_ONLINE 0x10 /* Online */ > +#define PARA_STS_ERROR 0x08 /* Error complement */ > +#define PARA_STS_TMOUT 0x01 /* EPP timeout */ > + > +/* > + * These are the definitions for the Printer Control Register > + */ > +#define PARA_CTR_DIR 0x20 /* Direction (1=read, 0=write) */ > +#define PARA_CTR_INTEN 0x10 /* IRQ Enable */ > +#define PARA_CTR_SELECT 0x08 /* Select In complement */ > +#define PARA_CTR_INIT 0x04 /* Initialize Printer complement */ > +#define PARA_CTR_AUTOLF 0x02 /* Auto linefeed complement */ > +#define PARA_CTR_STROBE 0x01 /* Strobe complement */ > + > +#define PARA_CTR_SIGNAL (PARA_CTR_SELECT | PARA_CTR_INIT | PARA_CTR_AUTOLF \ > + | PARA_CTR_STROBE) Can't we keep these register definitions local to the implementation?