Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
On 09/02/2021 03.37, Krzysztof Kozlowski wrote: Looking at Greg's comment, we can get rid of the PORT_ stuff entirely. First of all, PORT_S3C2410 == PORT_S3C2412, so this define is not accurate. This leaves us with three types (s3c2400, s3c2440, s3c6410 and Apple). The s3c2440 could be removed w

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
On 09/02/2021 01.46, Greg Kroah-Hartman wrote: I HATE adding new PORT_ types, as I am almost positive no one uses them, but as they are in the uapi files, we can't delete them. So, just use an existing one, why do you want a new one? If you don't have a userspace tool that requires it, don't bo

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Krzysztof Kozlowski
On Tue, Feb 09, 2021 at 01:10:02AM +0900, Hector Martin wrote: > On 08/02/2021 19.54, Krzysztof Kozlowski wrote: > > > +enum s3c24xx_irq_type { > > > + IRQ_DISCRETE = 0, > > > + IRQ_S3C6400 = 1, > > > + IRQ_APPLE = 2, > > > > It seems you add the third structure to differentiate type of UART. > >

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
On 08/02/2021 19.34, Marc Zyngier wrote: On 2021-02-07 09:12, Hector Martin 'marcan' wrote: On 06/02/2021 22.15, Marc Zyngier wrote: Do you actually need a new port type here? Looking at the driver itself, it is mainly used to work out the IRQ model. Maybe introducing a new irq_type field in th

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
On 08/02/2021 18.36, Krzysztof Kozlowski wrote: Please use the scripts/get_maintainers.pl to get the list of people to Cc. The script would point necessary folks. I thought I'd try Thomas first since he introduced the IRQF_SHARED specifically, but I should've gone straight to maintainers (I di

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Hector Martin
On 08/02/2021 19.54, Krzysztof Kozlowski wrote: +enum s3c24xx_irq_type { + IRQ_DISCRETE = 0, + IRQ_S3C6400 = 1, + IRQ_APPLE = 2, It seems you add the third structure to differentiate type of UART. There is already port type and s3c24xx_serial_drv_data, no need for third struct

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Krzysztof Kozlowski
On Fri, Feb 05, 2021 at 05:39:38AM +0900, Hector Martin wrote: > Apple SoCs are a distant descendant of Samsung designs and use yet > another variant of their UART style, with different interrupt handling. > > In particular, this variant has the following differences with existing > ones: > > * I

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-08 Thread Krzysztof Kozlowski
On Sun, Feb 07, 2021 at 06:26:43PM +0900, Hector Martin 'marcan' wrote: > On 07/02/2021 18.12, Hector Martin 'marcan' wrote: > > On 06/02/2021 22.15, Marc Zyngier wrote: > > > The default should be IRQ_NONE, otherwise the kernel cannot detect a > > > screaming spurious interrupt. > > > > Good poin

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-07 Thread Hector Martin 'marcan'
On 07/02/2021 18.12, Hector Martin 'marcan' wrote: On 06/02/2021 22.15, Marc Zyngier wrote: The default should be IRQ_NONE, otherwise the kernel cannot detect a screaming spurious interrupt. Good point, and this needs fixing in s3c64xx_serial_handle_irq too then (which is what I based mine off

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-07 Thread Hector Martin 'marcan'
On 06/02/2021 22.15, Marc Zyngier wrote: -static int s3c24xx_serial_has_interrupt_mask(struct uart_port *port) +static int s3c24xx_irq_type(struct uart_port *port) { - return to_ourport(port)->info->type == PORT_S3C6400; + switch (to_ourport(port)->info->type) { + case PORT_S3

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-05 Thread Hector Martin 'marcan'
On 05/02/2021 08.55, kernel test robot wrote: drivers/tty/serial/samsung_tty.c:60: warning: "NO_IRQ" redefined 60 | #define NO_IRQ -1 Turns out arm (32) defines NO_IRQ. Replaced with NOT_IN_IRQ for v2. -- Hector Martin "marcan" (mar...@marcan.st) Public Key: https://mrcn.st/pub

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-04 Thread kernel test robot
Hi Hector, I love your patch! Yet something to improve: [auto build test ERROR on arm64/for-next/core] [also build test ERROR on robh/for-next linus/master v5.11-rc6 next-20210125] [cannot apply to tip/irq/core] [If your patch is applied to the wrong git tree, kindly drop us a note. And when subm

Re: [PATCH 05/18] tty: serial: samsung_tty: add support for Apple UARTs

2021-02-04 Thread kernel test robot
Hi Hector, I love your patch! Perhaps something to improve: [auto build test WARNING on arm64/for-next/core] [also build test WARNING on robh/for-next linus/master v5.11-rc6 next-20210125] [cannot apply to tip/irq/core] [If your patch is applied to the wrong git tree, kindly drop us a note. And w