[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] ns16550: add support for polling mode when device tree is used



On Tue, 2023-07-18 at 15:23 +0100, Julien Grall wrote:
> 
> 
> On 18/07/2023 15:13, Oleksii Kurochko wrote:
> > RISC-V doesn't support interrupts for the time being, so it would
> > be nice to
> > have polling mode.
> > 
> > The patch assumes that polling mode will be used if there is no
> > interrupt
> > property 
> 
> As I asked in v1, please explain that this is allowed by the binding
> and 
> provide a link for others to verify.
According to 4.2.2 National Semiconductor 16450/16550 Compatible UART
Requirements from The Devicetree Specification v0.4
( https://www.devicetree.org/specifications/ ) interrupts property
should always present.

So if interrupt property doesn't present in serial node then it should
return -EINVAL:
    res = platform_get_irq(dev, 0);
    if ( res < 0 )
    {
        printk("ns16550: Unable to retrieve the IRQ\n");
        return -EINVAL;
    }

> 
> > or the interrupt is equal to some unused UART interrupt number (
> > look
> > at the definition of NO_IRQ_POLL in ns16550.c ).
> 
> Nack. If you want to use polling mode and yet have an interrupts 
> property then you should provide the information differently. This
> would 
> either be via the command line or an extra property in the DT node.
> 
> If the latter, it would need to be standardized first.
What does it mean 'standardized'? Do you mean that it should updated
The Devicetree Specification?

I am not sure that I know the process of standardization of such stuff
could you please give me any pointers?

It looks like it will be faster to pass it via the command line as
standardization can consume some time...

~ Oleksii



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.