PERFORCE change 96170 for review
Marcel Moolenaar
marcel at FreeBSD.org
Wed Apr 26 23:27:55 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=96170
Change 96170 by marcel at marcel_nfs on 2006/04/26 23:26:58
Save the final value of the SPR register in the least
significant bits. That allows us easy access from
within the interrupt handler.
Affected files ...
.. //depot/projects/uart/dev/puc/pucdata.c#29 edit
Differences ...
==== //depot/projects/uart/dev/puc/pucdata.c#29 (text+ko) ====
@@ -743,7 +743,7 @@
/* Clear DLAB in the LCR register of UART 0. */
bus_write_1(bar->b_res, 3, 0);
/* Save the two values read-back from the SPR register. */
- sc->sc_cfg_data = (v1 << 8) | v0;
+ sc->sc_cfg_data = (v0 << 8) | v1;
if (v0 == 0 && v1 == 0x80 + -cfg->clock) {
/*
* The SPR register echoed the two values written
@@ -779,8 +779,8 @@
"%d selected\n", 1 << -cfg->clock);
return (0);
case PUC_CFG_GET_CLOCK:
- v0 = sc->sc_cfg_data & 0xff;
- v1 = (sc->sc_cfg_data >> 8) & 0xff;
+ v0 = (sc->sc_cfg_data >> 8) & 0xff;
+ v1 = sc->sc_cfg_data & 0xff;
if (v0 == 0 && v1 == 0x80 + -cfg->clock) {
/*
* XXX With the SPAD jumper applied, there's no
@@ -801,8 +801,8 @@
*res = DEFAULT_RCLK << v0;
return (0);
case PUC_CFG_GET_ILR:
- v0 = sc->sc_cfg_data & 0xff;
- v1 = (sc->sc_cfg_data >> 8) & 0xff;
+ v0 = (sc->sc_cfg_data >> 8) & 0xff;
+ v1 = sc->sc_cfg_data & 0xff;
*res = (v0 == 0 && v1 == 0x80 + -cfg->clock)
? PUC_ILR_NONE : PUC_ILR_QUATECH;
return (0);
More information about the p4-projects
mailing list