Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/matt-nb6-plus]: src/sys/arch Merge changes from -current.
details: https://anonhg.NetBSD.org/src/rev/e6e1584a3fed
branches: matt-nb6-plus
changeset: 774529:e6e1584a3fed
user: matt <matt%NetBSD.org@localhost>
date: Thu Dec 06 17:57:24 2012 +0000
description:
Merge changes from -current.
diffstat:
sys/arch/arm/include/isa_machdep.h | 41 +--
sys/arch/shark/conf/std.shark | 3 +-
sys/arch/shark/include/vmparam.h | 10 +-
sys/arch/shark/isa/isa_irq.S | 16 +-
sys/arch/shark/isa/isadma_machdep.c | 547 +----------------------------------
sys/arch/shark/ofw/ofw.c | 12 +-
sys/arch/shark/shark/autoconf.c | 18 +-
sys/arch/shark/shark/shark_machdep.c | 8 +-
8 files changed, 38 insertions(+), 617 deletions(-)
diffs (truncated from 896 to 300 lines):
diff -r cdadc7267ecc -r e6e1584a3fed sys/arch/arm/include/isa_machdep.h
--- a/sys/arch/arm/include/isa_machdep.h Thu Dec 06 17:22:42 2012 +0000
+++ b/sys/arch/arm/include/isa_machdep.h Thu Dec 06 17:57:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.h,v 1.8 2011/07/01 21:16:40 dyoung Exp $ */
+/* $NetBSD: isa_machdep.h,v 1.8.10.1 2012/12/06 17:57:24 matt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -45,13 +45,12 @@
typedef struct arm32_isa_chipset *isa_chipset_tag_t;
-struct device; /* XXX */
struct isabus_attach_args; /* XXX */
/*
* Functions provided to machine-independent ISA code.
*/
-void isa_attach_hook(struct device *, struct device *,
+void isa_attach_hook(device_t, device_t,
struct isabus_attach_args *);
void isa_detach_hook(isa_chipset_tag_t, device_t);
const struct evcnt *isa_intr_evcnt(isa_chipset_tag_t ic, int irq);
@@ -115,42 +114,6 @@
extern struct arm32_bus_dma_tag isa_bus_dma_tag;
-/*
- * Cookie used by ISA DMA. A pointer to one of these is stashed in
- * the DMA map.
- */
-struct arm32_isa_dma_cookie {
- int id_flags; /* flags; see below */
-
- /*
- * Information about the original buffer used during
- * DMA map syncs. Note that origbuflen is only used
- * for ID_BUFTYPE_LINEAR.
- */
- void *id_origbuf; /* pointer to orig buffer if
- bouncing */
- bus_size_t id_origbuflen; /* ...and size */
- int id_buftype; /* type of buffer */
-
- void *id_bouncebuf; /* pointer to the bounce buffer */
- bus_size_t id_bouncebuflen; /* ...and size */
- int id_nbouncesegs; /* number of valid bounce segs */
- bus_dma_segment_t id_bouncesegs[0]; /* array of bounce buffer
- physical memory segments */
-};
-
-/* id_flags */
-#define ID_MIGHT_NEED_BOUNCE 0x01 /* map could need bounce buffers */
-#define ID_HAS_BOUNCE 0x02 /* map currently has bounce buffers */
-#define ID_IS_BOUNCING 0x04 /* map is bouncing current xfer */
-
-/* id_buftype */
-#define ID_BUFTYPE_INVALID 0
-#define ID_BUFTYPE_LINEAR 1
-#define ID_BUFTYPE_MBUF 2
-#define ID_BUFTYPE_UIO 3
-#define ID_BUFTYPE_RAW 4
-
/* bus space tags */
extern struct bus_space isa_io_bs_tag;
extern struct bus_space isa_mem_bs_tag;
diff -r cdadc7267ecc -r e6e1584a3fed sys/arch/shark/conf/std.shark
--- a/sys/arch/shark/conf/std.shark Thu Dec 06 17:22:42 2012 +0000
+++ b/sys/arch/shark/conf/std.shark Thu Dec 06 17:57:24 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.shark,v 1.8 2008/01/27 12:37:12 chris Exp $
+# $NetBSD: std.shark,v 1.8.52.1 2012/12/06 17:57:24 matt Exp $
#
# standard NetBSD/shark options
@@ -12,6 +12,7 @@
# To support easy transit to ../arch/arm/arm32
options ARM32
+options _ARM32_NEED_BUS_DMA_BOUNCE
#options ARM32_NEW_VM_LAYOUT # Not yet ready for prime-time
diff -r cdadc7267ecc -r e6e1584a3fed sys/arch/shark/include/vmparam.h
--- a/sys/arch/shark/include/vmparam.h Thu Dec 06 17:22:42 2012 +0000
+++ b/sys/arch/shark/include/vmparam.h Thu Dec 06 17:57:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.17 2010/11/06 15:42:49 uebayasi Exp $ */
+/* $NetBSD: vmparam.h,v 1.17.16.1 2012/12/06 17:57:24 matt Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -29,10 +29,10 @@
* SUCH DAMAGE.
*/
-#ifndef _ARM32_VMPARAM_H_
-#define _ARM32_VMPARAM_H_
+#ifndef _SHARK_VMPARAM_H_
+#define _SHARK_VMPARAM_H_
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(_KMEMUSER)
#include <arm/arm32/vmparam.h>
@@ -90,4 +90,4 @@
#endif /* _KERNEL */
-#endif /* _ARM32_VMPARAM_H_ */
+#endif /* _SHARK_VMPARAM_H_ */
diff -r cdadc7267ecc -r e6e1584a3fed sys/arch/shark/isa/isa_irq.S
--- a/sys/arch/shark/isa/isa_irq.S Thu Dec 06 17:22:42 2012 +0000
+++ b/sys/arch/shark/isa/isa_irq.S Thu Dec 06 17:57:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_irq.S,v 1.13 2010/12/20 00:25:43 matt Exp $ */
+/* $NetBSD: isa_irq.S,v 1.13.16.1 2012/12/06 17:57:24 matt Exp $ */
/*
* Copyright 1997
@@ -113,8 +113,8 @@
/*
* Register usage
*
+ * r5 - Pointer to handler pointer list
* r6 - Address of current handler
- * r7 - Pointer to handler pointer list
* r8 - Current IRQ requests.
* r9 - Used to count through possible IRQ bits.
* r10 - Base address of IOMD
@@ -183,17 +183,17 @@
*/
mov r9, #(NIPL - 1)
- ldr r7, .Lspl_masks
+ ldr r5, .Lspl_masks
.Lfind_highest_ipl:
- ldr r2, [r7, r9, lsl #2]
+ ldr r2, [r5, r9, lsl #2]
tst r8, r2
subeq r9, r9, #1
beq .Lfind_highest_ipl
/* r9 = SPL level of highest priority interrupt */
add r9, r9, #1
- ldr r2, [r7, r9, lsl #2]
+ ldr r2, [r5, r9, lsl #2]
mvn r2, r2
orr r0, r0, r2
@@ -210,7 +210,7 @@
bic r0, r0, #I32_bit
msr cpsr_all, r0
- ldr r7, .Lirqhandlers
+ ldr r5, .Lirqhandlers
mov r9, #0x00000001
irqloop:
@@ -218,7 +218,7 @@
tst r8, r9 /* Is a bit set ? */
beq nextirq /* No ? try next bit */
- ldr r6, [r7] /* Get address of first handler structure */
+ ldr r6, [r5] /* Get address of first handler structure */
teq r6, #0x00000000 /* Do we have a handler */
moveq r0, r8 /* IRQ requests as arg 0 */
@@ -255,7 +255,7 @@
stmia r3, {r1-r2} /* store ev_count */
nextirq:
- add r7, r7, #0x00000004 /* update pointer to handlers */
+ add r5, r5, #0x00000004 /* update pointer to handlers */
mov r9, r9, lsl #1 /* move on to next bit */
teq r9, #(1 << 16) /* done the last bit ? */
bne irqloop /* no - loop back. */
diff -r cdadc7267ecc -r e6e1584a3fed sys/arch/shark/isa/isadma_machdep.c
--- a/sys/arch/shark/isa/isadma_machdep.c Thu Dec 06 17:22:42 2012 +0000
+++ b/sys/arch/shark/isa/isadma_machdep.c Thu Dec 06 17:57:24 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isadma_machdep.c,v 1.16 2012/01/31 04:28:50 matt Exp $ */
+/* $NetBSD: isadma_machdep.c,v 1.16.4.1 2012/12/06 17:57:24 matt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.16 2012/01/31 04:28:50 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isadma_machdep.c,v 1.16.4.1 2012/12/06 17:57:24 matt Exp $");
#define ISA_DMA_STATS
@@ -63,51 +63,15 @@
extern struct arm32_dma_range *shark_isa_dma_ranges;
extern int shark_isa_dma_nranges;
-int _isa_bus_dmamap_create(bus_dma_tag_t, bus_size_t, int,
- bus_size_t, bus_size_t, int, bus_dmamap_t *);
-void _isa_bus_dmamap_destroy(bus_dma_tag_t, bus_dmamap_t);
-int _isa_bus_dmamap_load(bus_dma_tag_t, bus_dmamap_t, void *,
- bus_size_t, struct proc *, int);
-int _isa_bus_dmamap_load_mbuf(bus_dma_tag_t, bus_dmamap_t,
- struct mbuf *, int);
-int _isa_bus_dmamap_load_uio(bus_dma_tag_t, bus_dmamap_t,
- struct uio *, int);
-int _isa_bus_dmamap_load_raw(bus_dma_tag_t, bus_dmamap_t,
- bus_dma_segment_t *, int, bus_size_t, int);
-void _isa_bus_dmamap_unload(bus_dma_tag_t, bus_dmamap_t);
-void _isa_bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t,
- bus_addr_t, bus_size_t, int);
-
-int _isa_bus_dmamem_alloc(bus_dma_tag_t, bus_size_t, bus_size_t,
- bus_size_t, bus_dma_segment_t *, int, int *, int);
-
-int _isa_dma_alloc_bouncebuf(bus_dma_tag_t, bus_dmamap_t,
- bus_size_t, int);
-void _isa_dma_free_bouncebuf(bus_dma_tag_t, bus_dmamap_t);
-
/*
* Entry points for ISA DMA. These are mostly wrappers around
* the generic functions that understand how to deal with bounce
* buffers, if necessary.
*/
struct arm32_bus_dma_tag isa_bus_dma_tag = {
- 0, /* _ranges */
- 0, /* _nranges */
- NULL, /* _cookie */
- _isa_bus_dmamap_create,
- _isa_bus_dmamap_destroy,
- _isa_bus_dmamap_load,
- _isa_bus_dmamap_load_mbuf,
- _isa_bus_dmamap_load_uio,
- _isa_bus_dmamap_load_raw,
- _isa_bus_dmamap_unload,
- _isa_bus_dmamap_sync, /* pre */
- _isa_bus_dmamap_sync, /* post */
- _isa_bus_dmamem_alloc,
- _bus_dmamem_free,
- _bus_dmamem_map,
- _bus_dmamem_unmap,
- _bus_dmamem_mmap,
+ _BUS_DMAMAP_FUNCS,
+ _BUS_DMAMEM_FUNCS,
+ _BUS_DMATAG_FUNCS,
};
/*
@@ -120,504 +84,3 @@
isa_bus_dma_tag._ranges = shark_isa_dma_ranges;
isa_bus_dma_tag._nranges = shark_isa_dma_nranges;
}
-
-/**********************************************************************
- * bus.h dma interface entry points
- **********************************************************************/
-
-#ifdef ISA_DMA_STATS
-#define STAT_INCR(v) (v)++
-#define STAT_DECR(v) do { \
- if ((v) == 0) \
- printf("%s:%d -- Already 0!\n", __FILE__, __LINE__); \
- else \
- (v)--; \
- } while (0)
-u_long isa_dma_stats_loads;
-u_long isa_dma_stats_bounces;
-u_long isa_dma_stats_nbouncebufs;
-#else
-#define STAT_INCR(v)
-#define STAT_DECR(v)
-#endif
-
-/*
- * Create an ISA DMA map.
- */
-int
-_isa_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments, bus_size_t maxsegsz, bus_size_t boundary, int flags, bus_dmamap_t *dmamp)
-{
- struct arm32_isa_dma_cookie *cookie;
- bus_dmamap_t map;
- int error, cookieflags;
- void *cookiestore;
- size_t cookiesize;
-
- /* Call common function to create the basic map. */
- error = _bus_dmamap_create(t, size, nsegments, maxsegsz, boundary,
- flags, dmamp);
- if (error)
- return (error);
-
- map = *dmamp;
- map->_dm_cookie = NULL;
-
- cookiesize = sizeof(struct arm32_isa_dma_cookie);
Home |
Main Index |
Thread Index |
Old Index