RE: [PATCH] tty: serial: samsung_tty: support more than 4 uart ports

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

 



> Subject: Re: [PATCH] tty: serial: samsung_tty: support more than 4 uart
> ports
> 
> On Mon, Jun 27, 2022 at 12:33:51PM +0200, Krzysztof Kozlowski wrote:
> > On 27/06/2022 09:15, Chanho Park wrote:
> > > Regarding Exynos Auto v9 SoC, it supports uarts up to 12. However,
> > > the maximum number of the ports has been derived from
> > > CONFIG_SERIAL_SAMSUNG_UARTS and tightly coupled with the config for
> > > previous Samsung SoCs such as s3c24xx and s3c64xx. To overcome this
> > > limitation, this changes the usage of the definition to UART_NR
> > > which is widely used from other serial drivers. This also defines
> > > the value to 12 only for ARM64 SoCs to not affect the change to
> previous arm32 SoCs.
> > > Instead of enumerating all the ports as predefined arrays, this
> > > introduces s3c24xx_serial_init_port_default that is initializing the
> > > structure as default value.
> > > Regarding the ports which are greater than 4 will be initialized as
> > > default value and the fifo size will be retrieved from the DT
> > > property.
> >
> > You need to explain why you are doing this.
> >
> > It's confusing to initialize some statically and some dynamically.
> 
> I agree, why not just make them all dynamic?

I thought it was the easiest way for me to expand the number of ports
without many changes :)
I'm looking around all other drivers how they initialize the ports.
I couldn't find any drivers who initializes the port dynamically. I think
they need to assign .nr of struct uart driver so they don't need to allocate
the ports dynamically.

static struct uart_driver s3c24xx_uart_drv = {
	.nr             = UART_NR,

I'll try to convert the initialization dynamically but I'm not convinced
whether it can be possible.

Best Regards,
Chanho Park




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux