diff options
author | imp <imp@FreeBSD.org> | 2006-03-18 01:30:31 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2006-03-18 01:30:31 +0000 |
commit | 4470c6462166a3f44cb0c077cd5bd243049d09c8 (patch) | |
tree | 1da94d65274eb4d06fa95e51dbf531dff6487ec8 | |
parent | 84fa4a809dace3ccc694724a112a5ece6aa99867 (diff) | |
download | FreeBSD-src-4470c6462166a3f44cb0c077cd5bd243049d09c8.zip FreeBSD-src-4470c6462166a3f44cb0c077cd5bd243049d09c8.tar.gz |
MFp4:
o Disable all interrupts that the ST can generate until we have an ISR
to service them.
o Correct clock calculation to make DELAY the right length...
Submitted by: cognet (#2)
-rw-r--r-- | sys/arm/at91/at91_st.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arm/at91/at91_st.c b/sys/arm/at91/at91_st.c index 8d77683..1960e61 100644 --- a/sys/arm/at91/at91_st.c +++ b/sys/arm/at91/at91_st.c @@ -102,7 +102,8 @@ at91st_attach(device_t dev) * initializing clocks so that DELAY works. */ WR4(ST_RTMR, 1); - + /* Disable all interrupts */ + WR4(ST_IDR, 0xffffffff); return (0); } @@ -175,7 +176,7 @@ DELAY(int n) uint32_t start, end, cur; start = st_crtr(); - n = (n * 1000000) / 32768; + n = (n * 1000) / 32768; if (n <= 0) n = 1; end = (start + n) & ST_CRTR_MASK; |