Re: [PATCH RFC 2/2] serial: 8250: Add PRUSS UART driver

Judith Mendez
2025-05-13T00:06:50Z

Hi Andy,

On 5/9/25 6:43 AM, Andy Shevchenko wrote:
> On Thu, May 08, 2025 at 05:09:03PM -0500, Judith Mendez wrote:
>> On 5/2/25 4:50 AM, Andy Shevchenko wrote:
>>> On Wed, Apr 30, 2025 at 07:31:13PM -0500, Judith Mendez wrote:

...
>>>> + /* Old custom speed handling */
>>>> + if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST) {
>>>> + quot = port->custom_divisor & UART_DIV_MAX;
>>>> + if (port->custom_divisor & (1 << 16))
>>>> + *frac = PRUSS_UART_MDR_13X_MODE;
>>>> + else
>>>> + *frac = PRUSS_UART_MDR_16X_MODE;
>>>> +
>>>> + return quot;
>>>> + }
>>>
>>> Why?! Please, try to avoid adding more drivers with this ugly hack.
>>
>> My understanding is that this is not a hack, for 38400 we need to pass
>> as custom baud. What is the alternative here?
>
> BOTHER. The 38400 is a hack, you lie to the stakeholders that you are at 38.4,
> while in real life it means anything.
>
>> I see other drivers are doing this as well, will look into this further
>> but not sure if there is a better solution for this.
>
> BOTHER is the solution. Not perfect, but the existing one.

Thanks for the hint, I have removed the hack from the driver and will be
sending v1. thanks.

~ Judith