[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 3/4] xen/arm: pl011: Use correct accessors
- To: Michal Orzel <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Tue, 13 Jun 2023 02:59:40 +0000
- Accept-language: zh-CN, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y3uBn8S0Esx4+dT0ProAKDdgpAMgBMpc3eeOF3cyeJI=; b=kA8TgJhSLIA4duiwK3h/TBQTjiu/uVFlWGUd9qUpH6zq3OuNH0Et3kjb3guCdmfXdng2mFjTjfQHFz7eJtLDwG6OUJGtjeyvPKX9vI+sfZLpyUhyG/02Z1vmNvn3H3gKWt7nsnXE0qQ9Sz++vH3daPBmcjOLhNXhK4itBHIZ7dN/7oH0hh9y97UdVVStlzlvi/eJeiOfKvUcIGkxYeDJIQb/F2NNGzmLw/aMcdsWvAGBDIvWEEwFpMXrt3qXsy7SQ3cO6hIQ3y9miBhykse7Ldcsg6HQOIfqdIEH1UASHwVRWWQoAD3gLvTSNQreQptpH/tQojsbPLSiBGbRXr2fiw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ITCv4ph7hq6QWpl6rz8WnOT/bo9desOV2UGz96G6vTOBNOVLqIauCsSRezePRvZuveXOXLfRsr3LZ/CdSXDugCm/XKQ9O0OVm7Tcs2oHo92ydNd8J5jjUHNBHBek9OfNLzlWkhCq6hbE0K/0qiZnFD2tT14Fr0+d30M6me3AZNGLn+1alegd8varvXQ1JheQc8+hjILIY4klkrl5TmiTUc2D2ei8i455MxM0lncoS9qtM/StSMOcNFYT89QZ/gXwIWkwOpK9PIn87/bzB4NATTyivZxHdBckqat9Ta98xGe5nHUeZGG3bI2AmVeyRzDIbqRRAakx30Lc1Lzya2GTGQ==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 13 Jun 2023 03:00:03 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZmSJrAg4IoVREJkadpE/KogPaxK+IAcpw
- Thread-topic: [PATCH 3/4] xen/arm: pl011: Use correct accessors
Hi Michal,
> -----Original Message-----
> Subject: [PATCH 3/4] xen/arm: pl011: Use correct accessors
>
> At the moment, we use 32-bit only accessors (i.e. readl/writel) to match
> the SBSA v2.x requirement. This should not be the default case for normal
> PL011 where accesses shall be 8/16-bit (max register size is 16-bit).
> There are however implementations of this UART that can only handle 32-bit
> MMIO. This is advertised by dt property "reg-io-width" set to 4.
>
> Introduce new struct pl011 member mmio32 and replace pl011_{read/write}
> macros with static inline helpers that use 32-bit or 16-bit accessors
> (largest-common not to end up using different ones depending on the actual
> register size) according to mmio32 value. By default this property is set
> to false, unless:
> - reg-io-width is specified with value 4,
> - SBSA UART is in use.
>
> For now, no changes done for ACPI due to lack of testing possibilities
> (i.e. current behavior maintained resulting in 32-bit accesses).
>
> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
I've tested this patch on top of today's staging on FVP arm32 and arm64 and
confirm this patch will not break existing functionality. So:
Tested-by: Henry Wang <Henry.Wang@xxxxxxx>
Kind regards,
Henry
|