lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 7 Feb 2022 19:28:13 +0800
From:   hammer hsieh <hammerh0314@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     robh+dt@...nel.org, linux-serial@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiri Slaby <jirislaby@...nel.org>, p.zabel@...gutronix.de,
        wells.lu@...plus.com, "hammer.hsieh" <hammer.hsieh@...plus.com>
Subject: Re: [PATCH v7 2/2] serial:sunplus-uart:Add Sunplus SoC UART Driver

Greg KH <gregkh@...uxfoundation.org> 於 2022年2月7日 週一 下午3:18寫道:
>
> On Mon, Feb 07, 2022 at 01:58:01PM +0800, Hammer Hsieh wrote:
> > Add Sunplus SoC UART Driver
> >
>
> We need more of a changelog comment here please.  Describe the hardware,
> what the new tty name you are using, and other stuff.  Be descriptive.
>

I will describe as below.
Add Sunplus SoC UART Driver.
SP7021 UART block contains 5 UARTs.
There are UART0~4 that supported in SP7021, the features list as below.
Support Full-duplex communication.
Support data packet length configurable.
Support stop bit number configurable.
Support force break condition.
Support baud rate configurable.
Support error detection and report.
Support RXD Noise Rejection Vote configurable.

UART0 pinout only support TX/RX two pins.
UART1 to UART4 pinout support TX/RX/CTS/RTS four pins.
Normally UART0 used for kernel console, also can be used for normal uart.
Command line set "console=ttySUP0,115200", SUP means Sunplus Uart Port.
UART driver probe will create path named "/dev/ttySUPx".

https://sunplus.atlassian.net/wiki/spaces/doc/pages/1873412290/13.+Universal+Asynchronous+Receiver+Transmitter+UART

> > --- a/include/uapi/linux/serial_core.h
> > +++ b/include/uapi/linux/serial_core.h
> > @@ -274,4 +274,7 @@
> >  /* Freescale LINFlexD UART */
> >  #define PORT_LINFLEXUART     122
> >
> > +/* Sunplus UART */
> > +#define PORT_SUNPLUS 123
>
> Why is this needed?  Are you going to require this in some userspace
> code?  If not, please do not add it.
>

In serial_core.c (line 3014) uart_add_one_port( )
It will call uart_configure_port( ).
In my uart driver probe set port->flags=UPF_BOOT_AUTOCONF.
I try to remove port define and remove  sunplus_config_port( )
 and just add a "sunplus_uart" for in sunplus_type( ).
And my uart console not work with PuTTY tool.

I try to do another test as below.
static const char *sunplus_type(struct uart_port *port)
{
        return "sunplus_uart";
}
static void sunplus_config_port(struct uart_port *port, int type)
{
        if (type & UART_CONFIG_TYPE)
                port->type = "sunplus_uart"; //type define is unsigned int
}
Uart console works, but port->type should be unsigned int , not string.
So compile will warning " assignment makes integer from pointer
without a cast [-Wint-conversion]".

I think I should keep the current submit code.

> thanks,
>
> greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ