Module Name:src
Committed By: dyoung
Date: Sat Jul 9 17:22:08 UTC 2011
Modified Files:
src/sys/arch/algor/include: bus_defs.h bus_funcs.h
Log Message:
Use the definitions in mips/bus_{dma,space}_{defs,funcs}.h.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/algor/include/bus_defs.h \
src/sys/arch/algor/include/bus_funcs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/algor/include/bus_defs.h
diff -u src/sys/arch/algor/include/bus_defs.h:1.1 src/sys/arch/algor/include/bus_defs.h:1.2
--- src/sys/arch/algor/include/bus_defs.h:1.1 Fri Jul 1 17:09:58 2011
+++ src/sys/arch/algor/include/bus_defs.h Sat Jul 9 17:22:08 2011
@@ -1,392 +1,10 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/01 17:09:58 dyoung Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
- * NASA Ames Research Center.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1996 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or software.distribut...@cs.cmu.edu
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
+/* $NetBSD: bus_defs.h,v 1.2 2011/07/09 17:22:08 dyoung Exp $ */
#ifndef _ALGOR_BUS_DEFS_H_
#define _ALGOR_BUS_DEFS_H_
+#define _MIPS_NEED_BUS_DMA_BOUNCE
-#include
-
-#ifdef _KERNEL
-/*
- * Addresses (in bus space).
- */
-typedef u_long bus_addr_t;
-typedef u_long bus_size_t;
-
-/*
- * Turn on BUS_SPACE_DEBUG if the global DEBUG option is enabled.
- */
-#if defined(DEBUG) && !defined(BUS_SPACE_DEBUG)
-#define BUS_SPACE_DEBUG
-#endif
-
-#ifdef BUS_SPACE_DEBUG
-#include /* for printf() prototype */
-/*
- * Macros for checking the aligned-ness of pointers passed to bus
- * space ops. Strict alignment is required by the MIPS architecture,
- * and a trap will occur if unaligned access is performed. These
- * may aid in the debugging of a broken device driver by displaying
- * useful information about the problem.
- */
-#define __BUS_SPACE_ALIGNED_ADDRESS(p, t)\
- u_long)(p)) & (sizeof(t)-1)) == 0)
-
-#define __BUS_SPACE_ADDRESS_SANITY(p, t, d)\
-({ \
- if (__BUS_SPACE_ALIGNED_ADDRESS((p), t) == 0) { \
- printf("%s 0x%lx not aligned to %zu bytes %s:%d\n", \
- d, (u_long)(p), sizeof(t), __FILE__, __LINE__); \
- }\
- (void) 0; \
-})
-
-#define BUS_SPACE_ALIGNED_POINTER(p, t) __BUS_SPACE_ALIGNED_ADDRESS(p, t)
-#else
-#define __BUS_SPACE_ADDRESS_SANITY(p, t, d) (void) 0
-#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
-#endif /* BUS_SPACE_DEBUG */
-#endif /* _KERNEL */
-
-struct