Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic (pcic_chip_do_mem_map): handle 8-bit memory



details:   https://anonhg.NetBSD.org/src/rev/00e6b8e75755
branches:  trunk
changeset: 480457:00e6b8e75755
user:      joda <joda%NetBSD.org@localhost>
date:      Thu Jan 13 09:00:30 2000 +0000

description:
(pcic_chip_do_mem_map): handle 8-bit memory

diffstat:

 sys/dev/ic/i82365.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 1a662b150df0 -r 00e6b8e75755 sys/dev/ic/i82365.c
--- a/sys/dev/ic/i82365.c       Thu Jan 13 08:58:51 2000 +0000
+++ b/sys/dev/ic/i82365.c       Thu Jan 13 09:00:30 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82365.c,v 1.27 2000/01/02 02:08:07 sommerfeld Exp $   */
+/*     $NetBSD: i82365.c,v 1.28 2000/01/13 09:00:30 joda Exp $ */
 
 #define        PCICDEBUG
 
@@ -932,6 +932,9 @@
 {
        int reg;
 
+       int kind = h->mem[win].kind & ~PCMCIA_WIDTH_MEM_MASK;
+       int mem8 = (h->mem[win].kind & PCMCIA_WIDTH_MEM_MASK) == PCMCIA_WIDTH_MEM8;
+
        pcic_write(h, mem_map_index[win].sysmem_start_lsb,
            (h->mem[win].addr >> PCIC_SYSMEM_ADDRX_SHIFT) & 0xff);
        pcic_write(h, mem_map_index[win].sysmem_start_msb,
@@ -957,11 +960,11 @@
        pcic_write(h, mem_map_index[win].cardmem_msb,
            ((h->mem[win].offset >> (PCIC_CARDMEM_ADDRX_SHIFT + 8)) &
            PCIC_CARDMEM_ADDRX_MSB_ADDR_MASK) |
-           ((h->mem[win].kind == PCMCIA_MEM_ATTR) ?
+           ((kind == PCMCIA_MEM_ATTR) ?
            PCIC_CARDMEM_ADDRX_MSB_REGACTIVE_ATTR : 0));
 
        reg = pcic_read(h, PCIC_ADDRWIN_ENABLE);
-       reg |= (mem_map_index[win].memenable | PCIC_ADDRWIN_ENABLE_MEMCS16);
+       reg |= (mem_map_index[win].memenable | (mem8 ? 0 : PCIC_ADDRWIN_ENABLE_MEMCS16));
        pcic_write(h, PCIC_ADDRWIN_ENABLE, reg);
 
        delay(100);



Home | Main Index | Thread Index | Old Index