[PATCH v3 2/2] serial: 8250_dw: Use a fixed CPR value for UltraRISC DP1000 UART

Andy Shevchenko andriy.shevchenko at linux.intel.com
Wed Apr 22 01:45:38 PDT 2026


On Wed, Apr 22, 2026 at 08:57:56AM +0800, Jia Wang wrote:
> On 2026-04-21 15:18 +0300, Ilpo Järvinen wrote:
> > On Tue, 21 Apr 2026, Jia Wang wrote:

...

> > > +static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
> > > +	.usr_reg = DW_UART_USR,
> > > +	.cpr_value = 0x00022022,
> > 
> > Please construct the cpr_value by ORing DW_UART_CPR_* defines together.
> > For fields, FIELD_PREP_CONST() may be useful.
> > 
> > In order to be able to use the DW_UART_CPR_* defines, they need to be 
> > moved into 8250_dwlib.h (I'd move all DW_UART register defines in a 
> > preparatory patch).
> > 
> > I know the existing Renesas' .cpr_value doesn't follow this convention but 
> > that could be converted as well (in another patch, or leave the Renesas 
> > entry conversion to me if you don't want to do that).
> 
> Thanks for the review.
> 
> Just to confirm: since you mentioned that the preparatory patch moving
> the DW_UART register defines is already in place, I don't need to move
> them again, correct?
> 
> I will update my patch to use the DW_UART_CPR_* macros and
> FIELD_PREP_CONST() accordingly, and I’m happy to add a separate patch in
> the next revision to convert the Renesas .cpr_value as well.

My understanding that you want to send a patch series of 3 patches:
- moving DW_UART_CPR_* values from C-file to h-file
- modify existing Renesas case
- add support for your HW (this patch in updated form)

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-riscv mailing list