Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/dev If rate or frequency are unspecified, as...
details: https://anonhg.NetBSD.org/src/rev/ef223ccb865b
branches: trunk
changeset: 433932:ef223ccb865b
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Oct 12 22:18:38 2018 +0000
description:
If rate or frequency are unspecified, assume "use firmware configuration" for clocks
diffstat:
sys/arch/evbarm/dev/plcom.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diffs (47 lines):
diff -r fa5ac5d57a2b -r ef223ccb865b sys/arch/evbarm/dev/plcom.c
--- a/sys/arch/evbarm/dev/plcom.c Fri Oct 12 22:15:48 2018 +0000
+++ b/sys/arch/evbarm/dev/plcom.c Fri Oct 12 22:18:38 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plcom.c,v 1.53 2017/11/07 07:21:13 skrll Exp $ */
+/* $NetBSD: plcom.c,v 1.54 2018/10/12 22:18:38 jmcneill Exp $ */
/*-
* Copyright (c) 2001 ARM Ltd
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.53 2017/11/07 07:21:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.54 2018/10/12 22:18:38 jmcneill Exp $");
#include "opt_plcom.h"
#include "opt_ddb.h"
@@ -2367,18 +2367,22 @@
case PLCOM_TYPE_PL010:
PWRITE1(pi, PL010COM_CR, 0);
- rate = pl010comspeed(rate, frequency);
- PWRITE1(pi, PL010COM_DLBL, (rate & 0xff));
- PWRITE1(pi, PL010COM_DLBH, ((rate >> 8) & 0xff));
+ if (rate && frequency) {
+ rate = pl010comspeed(rate, frequency);
+ PWRITE1(pi, PL010COM_DLBL, (rate & 0xff));
+ PWRITE1(pi, PL010COM_DLBH, ((rate >> 8) & 0xff));
+ }
PWRITE1(pi, PL010COM_LCR, lcr);
PWRITE1(pi, PL010COM_CR, PL01X_CR_UARTEN);
break;
case PLCOM_TYPE_PL011:
PWRITE4(pi, PL011COM_CR, 0);
- rate = pl011comspeed(rate, frequency);
- PWRITE1(pi, PL011COM_FBRD, rate & ((1 << 6) - 1));
- PWRITE4(pi, PL011COM_IBRD, rate >> 6);
+ if (rate && frequency) {
+ rate = pl011comspeed(rate, frequency);
+ PWRITE1(pi, PL011COM_FBRD, rate & ((1 << 6) - 1));
+ PWRITE4(pi, PL011COM_IBRD, rate >> 6);
+ }
PWRITE1(pi, PL011COM_LCRH, lcr);
PWRITE4(pi, PL011COM_CR,
PL01X_CR_UARTEN | PL011_CR_RXE | PL011_CR_TXE);
Home |
Main Index |
Thread Index |
Old Index