> Date: Fri, 10 Nov 2017 00:16:26 +0200
> From: Artturi Alm <artturi....@gmail.com>
> 
> Hi,
> 
> does also remove ti,omapX-uart compatibles from arm64 com_fdt,
> as they're never to be found there.
> iirc. the lenght is based on minimal lenght i found from any datasheet
> for SoCs w/"snps,dw-apb-uart", and conclusions drawn from gpl-sources.

As far as I can tell the FIFO functionality is optional for the
Synopys "IP".  It's just safer to not bother with the FIFO.

> diff --git a/sys/arch/arm64/dev/com_fdt.c b/sys/arch/arm64/dev/com_fdt.c
> index 9f2a8eb760a..1dd67c7c3e0 100644
> --- a/sys/arch/arm64/dev/com_fdt.c
> +++ b/sys/arch/arm64/dev/com_fdt.c
> @@ -66,9 +66,7 @@ com_fdt_init_cons(void)
>       void *node;
>  
>       if ((node = fdt_find_cons("brcm,bcm2835-aux-uart")) == NULL &&
> -         (node = fdt_find_cons("snps,dw-apb-uart")) == NULL &&
> -         (node = fdt_find_cons("ti,omap3-uart")) == NULL &&
> -         (node = fdt_find_cons("ti,omap4-uart")) == NULL)
> +         (node = fdt_find_cons("snps,dw-apb-uart")) == NULL)
>                       return;
>       if (fdt_get_reg(node, 0, &reg))
>               return;
> @@ -95,9 +93,7 @@ com_fdt_match(struct device *parent, void *match, void *aux)
>       struct fdt_attach_args *faa = aux;
>  
>       return (OF_is_compatible(faa->fa_node, "brcm,bcm2835-aux-uart") ||
> -         OF_is_compatible(faa->fa_node, "snps,dw-apb-uart") ||
> -         OF_is_compatible(faa->fa_node, "ti,omap3-uart") ||
> -         OF_is_compatible(faa->fa_node, "ti,omap4-uart"));
> +         OF_is_compatible(faa->fa_node, "snps,dw-apb-uart"));
>  }
>  
>  void
> @@ -136,12 +132,11 @@ com_fdt_attach(struct device *parent, struct device 
> *self, void *aux)
>       sc->sc.sc_uarttype = COM_UART_16550;
>       sc->sc.sc_frequency = freq ? freq : COM_FREQ;
>  
> -     if (OF_is_compatible(faa->fa_node, "snps,dw-apb-uart"))
> +     if (OF_is_compatible(faa->fa_node, "snps,dw-apb-uart")) {
> +             sc->sc.sc_uarttype = COM_UART_16550A;
> +             sc->sc.sc_fifolen = 64;
>               intr = com_fdt_intr_designware;
> -
> -     if (OF_is_compatible(faa->fa_node, "ti,omap3-uart") ||
> -         OF_is_compatible(faa->fa_node, "ti,omap4-uart"))
> -             sc->sc.sc_uarttype = COM_UART_TI16750;
> +     }
>  
>       if (stdout_node == faa->fa_node) {
>               SET(sc->sc.sc_hwflags, COM_HW_CONSOLE);
> diff --git a/sys/arch/armv7/dev/com_fdt.c b/sys/arch/armv7/dev/com_fdt.c
> index 00504801850..97c535a5a05 100644
> --- a/sys/arch/armv7/dev/com_fdt.c
> +++ b/sys/arch/armv7/dev/com_fdt.c
> @@ -140,8 +140,11 @@ com_fdt_attach(struct device *parent, struct device 
> *self, void *aux)
>       sc->sc.sc_uarttype = COM_UART_16550;
>       sc->sc.sc_frequency = freq ? freq : COM_FREQ;
>  
> -     if (OF_is_compatible(faa->fa_node, "snps,dw-apb-uart"))
> +     if (OF_is_compatible(faa->fa_node, "snps,dw-apb-uart")) {
> +             sc->sc.sc_uarttype = COM_UART_16550A;
> +             sc->sc.sc_fifolen = 64;
>               intr = com_fdt_intr_designware;
> +     }
>  
>       if (OF_is_compatible(faa->fa_node, "ti,omap3-uart") ||
>           OF_is_compatible(faa->fa_node, "ti,omap4-uart"))
> 
> 

Reply via email to