|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/arm: debug-pl011.inc: Use macros instead of hardcoded values
On 16/11/2022 08:05, Michal Orzel wrote: On 16/11/2022 00:10, Julien Grall wrote:Hi Michal, On 24/10/2022 11:05, Michal Orzel wrote:Make use of the macros defined in asm/pl011-uart.h instead of hardcoding the values. Also, take the opportunity to fix the file extension in a top-level comment. No functional change intended. Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>With one comment below: Acked-by: Julien Grall <jgrall@xxxxxxxxxx> I am fine with either prerequisite or a follow-up to define a macro and use it in both arm32/arm64. As for the macro itself, because 8n1 only requires setting bits for WLEN (1 stop bit and no parity are 0 by default), we can do the following in pl011-uart.h: #define WLEN_8 0x60 I think it would be clearer and easier to check the spec if the value is (_AC(0x3, U) << 5). and use it in the pl011-debug files (+ there is a question whether we should define WLEN_7-5 for completeness). I would not define WLEN_7-5. That said, I wonder if we really need to set the baud rate & co here? AFAICT the runtime driver never touch them. The reasoning is the firmware is responsible to configure the serial. Therefore, I would consider to drop the code (setting UARTCR might still be necessary). Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |