diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-04 20:30:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-04 20:30:59 +0000 |
commit | 15d15e3ad69f61e77c02fed009906131becd759f (patch) | |
tree | 382144a13e51909c2f7035e535b7813b707ae3c8 /sys/arch/mac68k/dev/esp.c | |
parent | bd2c72db9b1c9a925d92b2f4df3fc3e1b95ca9a5 (diff) |
More accurate sc_minsync computation on 16.5MHz ESPs; ok martin@
Diffstat (limited to 'sys/arch/mac68k/dev/esp.c')
-rw-r--r-- | sys/arch/mac68k/dev/esp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/mac68k/dev/esp.c b/sys/arch/mac68k/dev/esp.c index 7439c46c397..578fc98caec 100644 --- a/sys/arch/mac68k/dev/esp.c +++ b/sys/arch/mac68k/dev/esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esp.c,v 1.23 2005/10/01 13:39:23 martin Exp $ */ +/* $OpenBSD: esp.c,v 1.24 2006/01/04 20:30:58 miod Exp $ */ /* $NetBSD: esp.c,v 1.17 1998/09/05 15:15:35 pk Exp $ */ /* @@ -275,9 +275,6 @@ espattach(parent, self, aux) sc->sc_id = 7; - /* gimme MHz */ - sc->sc_freq /= 1000000; - /* * It is necessary to try to load the 2nd config register here, * to find out what rev the esp chip is, else the esp_reset @@ -297,7 +294,7 @@ espattach(parent, self, aux) * Since the chip's clock is given in MHz, we have the following * formula: 4 * period = (1000 / freq) * 4 */ - sc->sc_minsync = 1000 / sc->sc_freq; + sc->sc_minsync = (1000 * 1000000) / sc->sc_freq; /* We need this to fit into the TCR... */ sc->sc_maxxfer = 64 * 1024; @@ -307,6 +304,9 @@ espattach(parent, self, aux) sc->sc_maxxfer = 8 * 1024; } + /* gimme MHz */ + sc->sc_freq /= 1000000; + /* * Configure interrupts. */ |