summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2003-02-17 22:41:32 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2003-02-17 22:41:32 +0000
commit5e6d00497579f273134afd44513b4f62372e2480 (patch)
tree600deabadfe5a838f4b268bf2ac2267379d323a2
parente1f1d2e8d314d2f5804b424fd356f9f133f3d3eb (diff)
can use the same bus_space_read_region_4() to copy both type1 and type4 prom; tested on type4 by me and miod on type1
-rw-r--r--sys/dev/ic/sti.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c
index 041ef00fdd3..a427dc03efc 100644
--- a/sys/dev/ic/sti.c
+++ b/sys/dev/ic/sti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti.c,v 1.21 2003/02/17 13:02:14 mickey Exp $ */
+/* $OpenBSD: sti.c,v 1.22 2003/02/17 22:41:31 mickey Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -408,21 +408,8 @@ sti_fetchfonts(struct sti_softc *sc, u_int32_t addr)
if (sc->sc_romfont == NULL)
return (ENOMEM);
- if (sc->sc_devtype == STI_DEVTYPE1) {
- u_int8_t *p;
-
- bzero(sc->sc_romfont, size);
- p = (u_int8_t *)sc->sc_romfont + 3;
- addr += 3;
- for (; size != 0; size -= 4) {
- *p = bus_space_read_1(sc->memt, sc->romh,
- addr);
- p += 4;
- addr += 4;
- }
- } else
- bus_space_read_region_4(sc->memt, sc->romh, addr,
- (u_int32_t *)sc->sc_romfont, size / 4);
+ bus_space_read_region_4(sc->memt, sc->romh, addr,
+ (u_int32_t *)sc->sc_romfont, size / 4);
addr = NULL; /* fp->next */
} while (addr);