From patchwork Mon Feb 20 11:51:10 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: 655083 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1349323wrc; Mon, 20 Feb 2023 03:52:53 -0800 (PST) X-Google-Smtp-Source: AK7set/TKtV4++OZw6hkZPtrRP3iEX4FhTKOxu5vdopDTbmeU7uPUtpSyGs4/1CLOx4UectpNHmn X-Received: by 2002:ad4:5c46:0:b0:56e:a630:2626 with SMTP id a6-20020ad45c46000000b0056ea6302626mr1448578qva.45.1676893973475; Mon, 20 Feb 2023 03:52:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676893973; cv=none; d=google.com; s=arc-20160816; b=PuR5ntYIdS0go0hmyxB0w4z5gSUmE9zIxKBEOeWx5tIgEamEDSAtfqSRSZ04NLsZzH 99lUxKKzXbXIZckvpQesydXrBlQ0iiV6pOg44kZ80+3f17qizpIZEelC1lXtPw7tAtUl N+QHMl0TNt5hM9Gq8VD11arQQYZVZ9RPnPOh/VdpgW5hi9xQ2fSnJ8pQZktgStRnTUYc I2Q5ElF2VFXqd2WTRHKtgPkCaUXYYKqJ4YxOEQJd23t++DW28olPPmJYRft3v4d8BvbV BizYJ3z3yIhx1GV9RlLG8kIUUxG66esHGqn9JbkE7SGluz9+dFlioh9+V8rNJw5UmdUC 8zUA== 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=czXwdqthQ5iacnX5do69zMxtKzZ1dl3WlnS0e9zwEDE=; b=fpDNi/WwkCy36vr1vXjV0MyafWnky3yt3kWbXGd0SMTCM44Kj4bYBK9ZiSmpa+TDCY vwHyXroaK2xrAN57oiZg4D5ObC4fHd45FFPIznSMsm5yRkDBlYXV03U1jMZd5+Q+xeiS 9YmV//kCNXknC2jIKu++DE01KnieRzqrIzQ9xYKtPva7TQJYIoTUAeaCV2EDujkf3V7V uaPyMqDEkZMaLyvmSIO1mBhJEaI7sLAIbaDbgdcqL6oTYiMpN1PYsmBZZyw0tTaoeeAF rIFz2cHzsuhvCEXW29781KWTynOT1neT+AlzaQwNco3c/VL4DEGT2FQSuLO+/nxt30rR 3PHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b2DjAQfn; 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 i3-20020a0cf483000000b0056e91fec1acsi628163qvm.293.2023.02.20.03.52.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 03:52:53 -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=b2DjAQfn; 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 1pU4hp-0001kb-Hk; Mon, 20 Feb 2023 06:51:41 -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 1pU4hn-0001jo-Vl for qemu-devel@nongnu.org; Mon, 20 Feb 2023 06:51:40 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU4hm-00056v-E0 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 06:51:39 -0500 Received: by mail-wr1-x429.google.com with SMTP id t15so968263wrz.7 for ; Mon, 20 Feb 2023 03:51:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=czXwdqthQ5iacnX5do69zMxtKzZ1dl3WlnS0e9zwEDE=; b=b2DjAQfnxzKe3h+ZHHA22LUFtI9mytzQYQysG0K7h+w9xmboePDKh2M9B1k2BOzEO0 YkSfC5cqUvU9v7E2F4BgcyG44uXVe+ZXvG4vVkZeB45t6fh19w9UXjevYSD8FIXZpfPY 78D22PzQQtESoOKHkIGF07q/UGkIzXrm86eB7k60m/4rJ8Td7esoRBHZ3ggtfUD//Tv3 n4B9evQhpc+NVdS70Wpyj4kcEiz+8nZspxzs3ZlaXbQL4AvkwP0onVIDGjtHJZInsMwO N0SOMAauxRXy9WUW5oEb2fxoJDiqjX+fXdpdFUTL92By/3RPk0pN63YJ2SzOPgesXs5T /SAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=czXwdqthQ5iacnX5do69zMxtKzZ1dl3WlnS0e9zwEDE=; b=eEz1ls+kLr+/mYGq1wyCCJUO7RlITorI9C3Z+JULZQm9kW9DorVCPaVfiTatXUG9rJ f/Qh+qQ8nuxNanPe9Ipk8u1tr//IOUy/D9Nye5VXs8ELzdp0YHY6zPwgUJ0KL7T58sSV jDz22AD0ldThqNUEt+DWG++KOo4JPbrly91zwa7txov0ynn5fT54AwGJ2lgIf255d9Ft CXNJlkigy2OMHp/gwh3tov6RHK4KRLcCMnKBNAuRbp7VRVROelVOdp0AjdEjOYK0SH2G IOHWb58/hF8CljruOrfelyFMARX203WqojKkrHdsKMuIRcR0LmRCCUsz6FSlDpGAZOHo RGlg== X-Gm-Message-State: AO0yUKVkx9MdDY8/6mbNuDcZRN9BUq3jTV/97Vk0ZrO4ljZS/h4k37ue i6dVdjbaNwb0aSr0fFUbc2FKNsH1GR9qo6Bv X-Received: by 2002:a05:6000:1c5:b0:2c5:941d:26b8 with SMTP id t5-20020a05600001c500b002c5941d26b8mr431674wrx.15.1676893896874; Mon, 20 Feb 2023 03:51:36 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l18-20020adfe9d2000000b002bfe08c566fsm2001141wrn.106.2023.02.20.03.51.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 03:51:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell , Markus Armbruster , Paolo Bonzini , Alistair Francis , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , "Edgar E. Iglesias" , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PATCH 4/8] hw/char/xilinx_uartlite: Expose XILINX_UARTLITE QOM type Date: Mon, 20 Feb 2023 12:51:10 +0100 Message-Id: <20230220115114.25237-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220115114.25237-1-philmd@linaro.org> References: <20230220115114.25237-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- hw/char/xilinx_uartlite.c | 4 +--- include/hw/char/xilinx_uartlite.h | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index 99b9a6f851..180bb97202 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" +#include "hw/char/xilinx_uartlite.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" @@ -53,9 +54,6 @@ #define CONTROL_RST_RX 0x02 #define CONTROL_IE 0x10 -#define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite" -OBJECT_DECLARE_SIMPLE_TYPE(XilinxUARTLite, XILINX_UARTLITE) - struct XilinxUARTLite { SysBusDevice parent_obj; diff --git a/include/hw/char/xilinx_uartlite.h b/include/hw/char/xilinx_uartlite.h index dd09c06801..753d3a453e 100644 --- a/include/hw/char/xilinx_uartlite.h +++ b/include/hw/char/xilinx_uartlite.h @@ -18,6 +18,10 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "qapi/error.h" +#include "qom/object.h" + +#define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite" +OBJECT_DECLARE_SIMPLE_TYPE(XilinxUARTLite, XILINX_UARTLITE) static inline DeviceState *xilinx_uartlite_create(hwaddr addr, qemu_irq irq, @@ -26,7 +30,7 @@ static inline DeviceState *xilinx_uartlite_create(hwaddr addr, DeviceState *dev; SysBusDevice *s; - dev = qdev_new("xlnx.xps-uartlite"); + dev = qdev_new(TYPE_XILINX_UARTLITE); s = SYS_BUS_DEVICE(dev); qdev_prop_set_chr(dev, "chardev", chr); sysbus_realize_and_unref(s, &error_fatal);