On Tue, Jan 07, 2020 at 09:02:14AM +0000, Kristof Provost wrote:
> Author: kp
> Date: Tue Jan  7 09:02:14 2020
> New Revision: 356438
> URL: https://svnweb.freebsd.org/changeset/base/356438
> 
> Log:
>   sifive: Fix incorrect tx/rx ctrl defines
>   
>   Happily these were never used, but they should be correct anyway.
>   
>   Reported by:        Nicholas O'Brien <nickisobrien_gmail.com>
>   Sponsored by:       Axiado
> 
> Modified:
>   head/sys/riscv/sifive/sifive_uart.c
> 
> Modified: head/sys/riscv/sifive/sifive_uart.c
> ==============================================================================
> --- head/sys/riscv/sifive/sifive_uart.c       Tue Jan  7 05:33:33 2020        
> (r356437)
> +++ head/sys/riscv/sifive/sifive_uart.c       Tue Jan  7 09:02:14 2020        
> (r356438)
> @@ -64,11 +64,11 @@ __FBSDID("$FreeBSD$");
>  #define      SFUART_TXCTRL                   0x08
>  #define              SFUART_TXCTRL_ENABLE    0x01
>  #define              SFUART_TXCTRL_NSTOP     0x02
> -#define              SFUART_TXCTRL_TXCNT     0xb0000
> +#define              SFUART_TXCTRL_TXCNT     0x70000
>  #define              SFUART_TXCTRL_TXCNT_SHIFT       16
>  #define      SFUART_RXCTRL                   0x0c
>  #define              SFUART_RXCTRL_ENABLE    0x01
> -#define              SFUART_RXCTRL_RXCNT     0xb0000
> +#define              SFUART_RXCTRL_RXCNT     0x70000
>  #define              SFUART_RXCTRL_RXCNT_SHIFT       16
>  #define      SFUART_IRQ_ENABLE               0x10
>  #define              SFUART_IRQ_ENABLE_TXWM  0x01

That could be
#define  SFUART_RXCTRL_RXCNT_SHIFT      16
#define  SFUART_RXCTRL_RXCNT_MASK       (0x7 << SFUART_RXCTRL_RXCNT_SHIFT)

Ruslan

_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to