summaryrefslogtreecommitdiffstats
path: root/sys/dev/cy/cyreg.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-13 19:03:22 +0000
committerbde <bde@FreeBSD.org>1998-08-13 19:03:22 +0000
commit122a40654582cbaa4d9584f2b9bff47b01a6e8cc (patch)
tree627ff1f945614e74376e7f8d76bc605c4af2935e /sys/dev/cy/cyreg.h
parent41c7b6c82ed2ddd54f358c9e38664726599ac37f (diff)
downloadFreeBSD-src-122a40654582cbaa4d9584f2b9bff47b01a6e8cc.zip
FreeBSD-src-122a40654582cbaa4d9584f2b9bff47b01a6e8cc.tar.gz
Cleaned up previous commit, mainly by moving repetitive calculations
of invariants to cyattach(). Fixed minor bugs: - cyparam() returned without restoring the ipl in the error cases. This was harmless because cyparam() is always called at spltty(). - one check for "rev. J or higher" actually checked for precisely rev. J.
Diffstat (limited to 'sys/dev/cy/cyreg.h')
-rw-r--r--sys/dev/cy/cyreg.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/cy/cyreg.h b/sys/dev/cy/cyreg.h
index 8b83258..d98cfd8 100644
--- a/sys/dev/cy/cyreg.h
+++ b/sys/dev/cy/cyreg.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: cyreg.h,v 1.3 1996/10/13 01:09:17 davidg Exp $
+ * $Id: cyreg.h,v 1.6 1998/08/13 13:54:10 bde Exp $
*/
/*
@@ -41,13 +41,8 @@
#define CY_MAX_CD1400s 8 /* for Cyclom-32Y */
-#define CD1400_REV_G 0x46
-#define CD1400_REV_J 0x48
-
-#define CY_CLOCK_25 25000000 /* baud rate clock */
-#define CY_CLOCK_60 60000000 /* baud rate clock */
-#define CY_CLOCK_25_1MS 0x31
-#define CY_CLOCK_60_1MS 0x75
+#define CY_CLOCK(version) ((version) >= 0x48 ? 60000000 : 25000000)
+#define CY_RTS_DTR_SWAPPED(version) ((version) >= 0x48)
#ifdef CyDebug
#define cd_inb(iobase, reg, cy_align) (++cd_inbs, *((iobase) + ((reg)*2 << (cy_align))))
OpenPOWER on IntegriCloud