Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1648386

Re: [PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the number of xilinx ps uarts

From Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the number of xilinx ps uarts
Date 2017-05-23 22:10 +0200
Message-ID <tKohX-887-9@gated-at.bofh.it> (permalink)
References <tJ2jv-39J-1@gated-at.bofh.it> <tJfqp-3NM-3@gated-at.bofh.it> <tK0fE-HF-11@gated-at.bofh.it> <tK0fE-HF-9@gated-at.bofh.it> <tKohX-887-11@gated-at.bofh.it>
Organization Intel Corporation

Show all headers | View raw


> yep hardcoded max 4 where in probe first free space is found and used
> (range 0-3) but still max3100s statically allocated.
> Shouldn't be this also dynamically allocated?

The code to do the dynamic allocation would be larger than the array of
pointers for the sane worst case.

> I am not quite sure how exactly you want to do this via DT.

Count the number of DT entries for this kind of port and allocate that
many ?

> 
> Also what do you think is a safe maximum number? This is fpga - hundreds
> of pins which can do just uart.
> 
> > There are lots of options better than breaking the "one kernel many
> > platforms" model.  
> 
> Another options is also module parameter and dynamically allocated array
> in cdns_uart_init.

For a given platform the number is constant and they need to be
described, so it seems to make no sense to put it anywhere other than the
DT for that platform.

Why should users have to pass magic config options not use DT as
intended ?

Alan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the number of xilinx ps uarts Sam Povilus <kernel.development@povil.us> - 2017-05-20 04:30 +0200
  Re: [PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the  number of xilinx ps uarts Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-20 18:30 +0200
    Re: [PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the  number of xilinx ps uarts Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-22 20:30 +0200
      Re: [PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the  number of xilinx ps uarts Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-23 22:10 +0200
        Re: [PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the  number of xilinx ps uarts Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-05-24 15:40 +0200
      Re: [PATCH 1/1] xilinx ps uart: Adding a kernel parameter for the  number of xilinx ps uarts Sam Povilus <kernel.development@povil.us> - 2017-05-24 05:30 +0200

csiph-web