-/* $OpenBSD: dma.h,v 1.1.1.1 1997/02/06 16:02:42 pefo Exp $ */
+/* $OpenBSD: dma.h,v 1.2 1997/02/16 22:31:22 pefo Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
xcmd = ~(0x30 << 6); \
} \
dcmd |= (1 << 26); \
+ /* Switch direction before enable */ \
+ out32(R3715_IO_TIMING, (in32(R3715_IO_TIMING) & xcmd) | \
+ (dcmd & ~0x410)); \
+ (void)in16(RISC_STATUS); \
out32(R3715_IO_TIMING, (in32(R3715_IO_TIMING) & xcmd) | dcmd);\
}
#endif
#define DMA_DRAIN(r)
#define DMA_END(c) \
{ \
- int dcmd; \
- dcmd = ((c)->dma_ch == DMA_CH0) ? 0x10 : 0x10000; \
- out32(R3715_IO_TIMING, in32(R3715_IO_TIMING) & ~dcmd); \
+ int resudial; \
+ if((c)->dma_ch == DMA_CH0) { \
+ out32(R3715_IO_TIMING, in32(R3715_IO_TIMING) & ~0x10); \
+ resudial = in32(R3715_DMA_CNT0); \
+if(resudial) \
+printf("res: %d\n", resudial); \
+ } \
+ else { \
+ out32(R3715_IO_TIMING, in32(R3715_IO_TIMING) & ~0x400); \
+ resudial = in32(R3715_DMA_CNT1); \
+ } \
if((c)->mode == DMA_FROM_DEV) { \
int *_v = (int *)(c)->req_va; \
int *_p = (int *)PHYS_TO_UNCACHED(CACHED_TO_PHYS(dma_buffer)); \
-/* $OpenBSD: bus.h,v 1.1.1.1 1997/02/06 16:02:44 pefo Exp $ */
+/* $OpenBSD: bus.h,v 1.2 1997/02/16 22:31:25 pefo Exp $ */
/*
* Copyright (c) 1996 Niklas Hallqvist. All rights reserved.
CAT(bus_space_read_,n)(bus_space_tag_t bst, bus_space_handle_t bsh, \
bus_addr_t ba) \
{ \
+ wbflush(); \
+ wbflush(); \
wbflush(); \
wbflush(); \
wbflush(); \
bus_addr_t ba, CAT3(u_int,m,_t) x) \
{ \
wbflush(); \
- *(volatile CAT3(u_int,m,_t) *)(bsh + ba) = x; \
wbflush(); \
wbflush(); \
wbflush(); \
+ wbflush(); \
+ wbflush(); \
+ wbflush(); \
+ *(volatile CAT3(u_int,m,_t) *)(bsh + ba) = x; \
}
bus_space_write(1,8)
-/* $OpenBSD: machdep.c,v 1.1.1.1 1997/02/06 16:02:46 pefo Exp $ */
+/* $OpenBSD: machdep.c,v 1.2 1997/02/16 22:31:26 pefo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
* SUCH DAMAGE.
*
* from: @(#)machdep.c 8.3 (Berkeley) 1/12/94
- * $Id: machdep.c,v 1.1.1.1 1997/02/06 16:02:46 pefo Exp $
+ * $Id: machdep.c,v 1.2 1997/02/16 22:31:26 pefo Exp $
*/
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
mem_layout[1].mem_size = 0x400000 - (int)(CACHED_TO_PHYS(sysend));
physmem = 4096 * 1024;
+ mem_layout[2].mem_start = 0x400000;
+ mem_layout[2].mem_size = 0x800000;
+ physmem += 8192 * 1024;
switch (cputype) {
case WGRISC9100:
-/* $OpenBSD: mem.c,v 1.1.1.1 1997/02/06 16:02:46 pefo Exp $ */
+/* $OpenBSD: mem.c,v 1.2 1997/02/16 22:31:28 pefo Exp $ */
/* $NetBSD: mem.c,v 1.6 1995/04/10 11:55:03 mycroft Exp $ */
/*
uio->uio_resid = 0;
return (0);
+ case 3:
+ mdbpanic();
+ return(0);
+
/* minor device 12 (/dev/zero) is source of nulls on read, rathole on write */
case 12:
if (uio->uio_rw == UIO_WRITE) {