From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH v6 10/15] serial: stm32-usart: Add STM32 USART Driver Date: Tue, 28 Apr 2015 14:13:16 +0200 Message-ID: References: <1428424234-28572-1-git-send-email-mcoquelin.stm32@gmail.com> <1428424234-28572-11-git-send-email-mcoquelin.stm32@gmail.com> <552678E7.4040107@mentor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <552678E7.4040107-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vladimir Zapolskiy Cc: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Geert Uytterhoeven , Rob Herring , Philipp Zabel , Linus Walleij , Arnd Bergmann , Stefan Agner , Peter Meerwald , Paul Bolle , Peter Hurley , Andy Shevchenko , Chanwoo Choi , Russell King , Daniel Lezcano , Joe Perches , Jonathan Corbet , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thomas Gleixner List-Id: linux-gpio@vger.kernel.org Hi Vladimir, Thanks for the review, and sorry for the late reply. 2015-04-09 15:04 GMT+02:00 Vladimir Zapolskiy : > Hi Maxime, > > On 07.04.2015 19:30, Maxime Coquelin wrote: >> This drivers adds support to the STM32 USART controller, which is a >> standard serial driver. >> >> Tested-by: Chanwoo Choi >> Reviewed-by: Peter Hurley >> Signed-off-by: Maxime Coquelin >> --- >> drivers/tty/serial/Kconfig | 17 + >> drivers/tty/serial/Makefile | 1 + >> drivers/tty/serial/stm32-usart.c | 735 +++++++++++++++++++++++++++++++++++++++ >> include/uapi/linux/serial_core.h | 3 + >> 4 files changed, 756 insertions(+) >> create mode 100644 drivers/tty/serial/stm32-usart.c > > [snip] > >> +static void stm32_console_write(struct console *co, const char *s, unsigned cnt) >> +{ >> + struct uart_port *port = &stm32_ports[co->index].port; >> + unsigned long flags; >> + u32 old_cr1, new_cr1; >> + int locked = 1; >> + >> + if (oops_in_progress) { >> + locked = spin_trylock_irqsave(&port->lock, flags); >> + } else { >> + locked = 1; ID > > locked = 1 is done from the declaration. Right, I will fix this in next version > > Also do you want to add "if (port->sysrq) locked = 0;" check? Yes, that makes sense. It will be also in v7. > >> + spin_lock_irqsave(&port->lock, flags); >> + } >> + > > [snip] > > Everything else is fine from point of view. > > Reviewed-by: Vladimir Zapolskiy Regards, Maxime > > -- > With best wishes, > Vladimir From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965850AbbD1MN2 (ORCPT ); Tue, 28 Apr 2015 08:13:28 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:37499 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965594AbbD1MNS (ORCPT ); Tue, 28 Apr 2015 08:13:18 -0400 MIME-Version: 1.0 In-Reply-To: <552678E7.4040107@mentor.com> References: <1428424234-28572-1-git-send-email-mcoquelin.stm32@gmail.com> <1428424234-28572-11-git-send-email-mcoquelin.stm32@gmail.com> <552678E7.4040107@mentor.com> Date: Tue, 28 Apr 2015 14:13:16 +0200 Message-ID: Subject: Re: [PATCH v6 10/15] serial: stm32-usart: Add STM32 USART Driver From: Maxime Coquelin To: Vladimir Zapolskiy Cc: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Geert Uytterhoeven , Rob Herring , Philipp Zabel , Linus Walleij , Arnd Bergmann , Stefan Agner , Peter Meerwald , Paul Bolle , Peter Hurley , Andy Shevchenko , Chanwoo Choi , Russell King , Daniel Lezcano , Joe Perches , Jonathan Corbet , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Antti Palosaari , Tejun Heo , Will Deacon , Nikolay Borisov , Rusty Russell , Kees Cook , Michal Marek , "linux-doc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-serial@vger.kernel.org" , Linux-Arch , "linux-api@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vladimir, Thanks for the review, and sorry for the late reply. 2015-04-09 15:04 GMT+02:00 Vladimir Zapolskiy : > Hi Maxime, > > On 07.04.2015 19:30, Maxime Coquelin wrote: >> This drivers adds support to the STM32 USART controller, which is a >> standard serial driver. >> >> Tested-by: Chanwoo Choi >> Reviewed-by: Peter Hurley >> Signed-off-by: Maxime Coquelin >> --- >> drivers/tty/serial/Kconfig | 17 + >> drivers/tty/serial/Makefile | 1 + >> drivers/tty/serial/stm32-usart.c | 735 +++++++++++++++++++++++++++++++++++++++ >> include/uapi/linux/serial_core.h | 3 + >> 4 files changed, 756 insertions(+) >> create mode 100644 drivers/tty/serial/stm32-usart.c > > [snip] > >> +static void stm32_console_write(struct console *co, const char *s, unsigned cnt) >> +{ >> + struct uart_port *port = &stm32_ports[co->index].port; >> + unsigned long flags; >> + u32 old_cr1, new_cr1; >> + int locked = 1; >> + >> + if (oops_in_progress) { >> + locked = spin_trylock_irqsave(&port->lock, flags); >> + } else { >> + locked = 1; ID > > locked = 1 is done from the declaration. Right, I will fix this in next version > > Also do you want to add "if (port->sysrq) locked = 0;" check? Yes, that makes sense. It will be also in v7. > >> + spin_lock_irqsave(&port->lock, flags); >> + } >> + > > [snip] > > Everything else is fine from point of view. > > Reviewed-by: Vladimir Zapolskiy Regards, Maxime > > -- > With best wishes, > Vladimir From mboxrd@z Thu Jan 1 00:00:00 1970 From: mcoquelin.stm32@gmail.com (Maxime Coquelin) Date: Tue, 28 Apr 2015 14:13:16 +0200 Subject: [PATCH v6 10/15] serial: stm32-usart: Add STM32 USART Driver In-Reply-To: <552678E7.4040107@mentor.com> References: <1428424234-28572-1-git-send-email-mcoquelin.stm32@gmail.com> <1428424234-28572-11-git-send-email-mcoquelin.stm32@gmail.com> <552678E7.4040107@mentor.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Vladimir, Thanks for the review, and sorry for the late reply. 2015-04-09 15:04 GMT+02:00 Vladimir Zapolskiy : > Hi Maxime, > > On 07.04.2015 19:30, Maxime Coquelin wrote: >> This drivers adds support to the STM32 USART controller, which is a >> standard serial driver. >> >> Tested-by: Chanwoo Choi >> Reviewed-by: Peter Hurley >> Signed-off-by: Maxime Coquelin >> --- >> drivers/tty/serial/Kconfig | 17 + >> drivers/tty/serial/Makefile | 1 + >> drivers/tty/serial/stm32-usart.c | 735 +++++++++++++++++++++++++++++++++++++++ >> include/uapi/linux/serial_core.h | 3 + >> 4 files changed, 756 insertions(+) >> create mode 100644 drivers/tty/serial/stm32-usart.c > > [snip] > >> +static void stm32_console_write(struct console *co, const char *s, unsigned cnt) >> +{ >> + struct uart_port *port = &stm32_ports[co->index].port; >> + unsigned long flags; >> + u32 old_cr1, new_cr1; >> + int locked = 1; >> + >> + if (oops_in_progress) { >> + locked = spin_trylock_irqsave(&port->lock, flags); >> + } else { >> + locked = 1; ID > > locked = 1 is done from the declaration. Right, I will fix this in next version > > Also do you want to add "if (port->sysrq) locked = 0;" check? Yes, that makes sense. It will be also in v7. > >> + spin_lock_irqsave(&port->lock, flags); >> + } >> + > > [snip] > > Everything else is fine from point of view. > > Reviewed-by: Vladimir Zapolskiy Regards, Maxime > > -- > With best wishes, > Vladimir