From nobody Tue Feb 10 10:20:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571858726; cv=none; d=zoho.com; s=zohoarc; b=FLHkujhviDvtGMwpoFkf2DRZ2Wnj/a6Y316K0gDfdux54PtXiUXsbBLZZfF0g+qHy8Q0nzb7wHz5/U36C465pqmsZfZVZuUolRpgESsM0oxSq6Np52cFQ2YoEQ1Ib0sRdI88/tW+4StxaUejG5FG9g3/CcmZ6WgAfxL14feSXyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571858726; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zfAfvfn2NYgPOsG/TtKLv7pUl16aLJ11n4/0NbxENhs=; b=AkrUkisRaD33Y9wAnqdYzJf4Yl4mNuQOh4IqVeogdYfGIqHUjtyVAp9DUR1ZyWTfWobGJbuv7NOn4SnUSpKqnqcJnokSgy6OpWICKSAyEDvlUh44qTHWiyEB1C516nlbOk3oFE+rZsPrciU6kba77wVIaqyYujc0fC43eNTKyf0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571858726258506.8858870910742; Wed, 23 Oct 2019 12:25:26 -0700 (PDT) Received: from localhost ([::1]:44922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNMG4-0000Hb-Pg for importer@patchew.org; Wed, 23 Oct 2019 15:25:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59352) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNKWN-0004bn-KP for qemu-devel@nongnu.org; Wed, 23 Oct 2019 13:34:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNKWM-000213-Gs for qemu-devel@nongnu.org; Wed, 23 Oct 2019 13:34:07 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:46173 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNKWM-0001zx-Bz for qemu-devel@nongnu.org; Wed, 23 Oct 2019 13:34:06 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-205-bP8vp91vPQeRl637whQmtw-1; Wed, 23 Oct 2019 13:33:59 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F7B6107AD34; Wed, 23 Oct 2019 17:33:57 +0000 (UTC) Received: from localhost (ovpn-112-21.ams2.redhat.com [10.36.112.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id E832D6012D; Wed, 23 Oct 2019 17:33:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571852041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zfAfvfn2NYgPOsG/TtKLv7pUl16aLJ11n4/0NbxENhs=; b=Vr626uTbIcpI0FEbhC1N7HaO2oCapaWKWWzKEh8jsccF8mDcbWvUo49ZD+CLqtJpL0UUea YEyCW24yC183I6ClVBwrCplEkXlNlvRtcUYLlKenMxvgb54r8kXkHJoOIgdwUVLFWpbOu3 u0hvUXiL7t7mXD9qp4IDprzD6kFnqbA= From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Subject: [PATCH v3 15/33] serial-mm: add endianness property Date: Wed, 23 Oct 2019 19:31:36 +0200 Message-Id: <20191023173154.30051-16-marcandre.lureau@redhat.com> In-Reply-To: <20191023173154.30051-1-marcandre.lureau@redhat.com> References: <20191023173154.30051-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: bP8vp91vPQeRl637whQmtw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , Peter Maydell , "Michael S. Tsirkin" , Jason Wang , Mark Cave-Ayland , KONRAD Frederic , "Edgar E. Iglesias" , Paul Burton , Aleksandar Rikalo , Magnus Damm , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Artyom Tarasenko , Eduardo Habkost , Fabien Chouteau , qemu-arm@nongnu.org, Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-ppc@nongnu.org, Aleksandar Markovic , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add a qdev property for endianness, so memory region setup can be done in realize. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/char/serial.c | 2 ++ include/hw/char/serial.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index c28cfc94fd..2f7667c30c 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -1081,6 +1081,7 @@ SerialMM *serial_mm_init(MemoryRegion *address_space, qdev_prop_set_uint32(DEVICE(s), "baudbase", baudbase); qdev_prop_set_chr(DEVICE(s), "chardev", chr); qdev_prop_set_int32(DEVICE(s), "instance-id", base); + qdev_prop_set_uint8(DEVICE(s), "endianness", end); =20 qdev_init_nofail(DEVICE(s)); qdev_init_nofail(DEVICE(self)); @@ -1102,6 +1103,7 @@ static void serial_mm_instance_init(Object *o) =20 static Property serial_mm_properties[] =3D { DEFINE_PROP_UINT8("regshift", SerialMM, regshift, 0), + DEFINE_PROP_UINT8("endianness", SerialMM, endianness, DEVICE_NATIVE_EN= DIAN), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index 759c85976d..2d0802a909 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -86,6 +86,7 @@ typedef struct SerialMM { SerialState serial; =20 uint8_t regshift; + uint8_t endianness; } SerialMM; =20 extern const VMStateDescription vmstate_serial; --=20 2.23.0.606.g08da6496b6