Date: Mon, 21 May 2018 20:59:15 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333999 - head/sys/dev/usb/serial Message-ID: <201805212059.w4LKxFLY002288@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon May 21 20:59:15 2018 New Revision: 333999 URL: https://svnweb.freebsd.org/changeset/base/333999 Log: uchcom: add a hardware configuration tweak seen in Linux code Reviewed by: hselasky MFC after: 2 weeks Modified: head/sys/dev/usb/serial/uchcom.c Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon May 21 20:58:06 2018 (r333998) +++ head/sys/dev/usb/serial/uchcom.c Mon May 21 20:59:15 2018 (r333999) @@ -618,8 +618,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t if (uchcom_calc_divider_settings(&dv, rate)) return; + /* + * According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE, + * otherwise the chip will buffer data. + */ uchcom_write_reg(sc, - UCHCOM_REG_BPS_PRE, dv.dv_prescaler, + UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80, UCHCOM_REG_BPS_DIV, dv.dv_div); uchcom_write_reg(sc, UCHCOM_REG_BPS_MOD, dv.dv_mod,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805212059.w4LKxFLY002288>