svn commit: r269312 - projects/arm64/sys/arm64/include

Andrew Turner andrew at FreeBSD.org
Wed Jul 30 17:41:16 UTC 2014


Author: andrew
Date: Wed Jul 30 17:41:15 2014
New Revision: 269312
URL: http://svnweb.freebsd.org/changeset/base/269312

Log:
  Remove unneeded bits of machine/bus.h on arm64

Modified:
  projects/arm64/sys/arm64/include/bus.h

Modified: projects/arm64/sys/arm64/include/bus.h
==============================================================================
--- projects/arm64/sys/arm64/include/bus.h	Wed Jul 30 17:40:20 2014	(r269311)
+++ projects/arm64/sys/arm64/include/bus.h	Wed Jul 30 17:41:15 2014	(r269312)
@@ -70,17 +70,26 @@
 
 #include <machine/_bus.h>
 
-/*
- *	int bus_space_map  (bus_space_tag_t t, bus_addr_t addr,
- *	    bus_size_t size, int flags, bus_space_handle_t *bshp);
- *
- * Map a region of bus space.
- */
+#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
+
+#define BUS_SPACE_MAXADDR_24BIT	0xFFFFFFUL
+#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFFUL
+#define BUS_SPACE_MAXSIZE_24BIT	0xFFFFFFUL
+#define BUS_SPACE_MAXSIZE_32BIT	0xFFFFFFFFUL
+
+#define BUS_SPACE_MAXADDR 	0xFFFFFFFFFFFFFFFFUL
+#define BUS_SPACE_MAXSIZE 	0xFFFFFFFFFFFFFFFFUL
 
 #define	BUS_SPACE_MAP_CACHEABLE		0x01
 #define	BUS_SPACE_MAP_LINEAR		0x02
 #define	BUS_SPACE_MAP_PREFETCHABLE     	0x04
 
+#define	BUS_SPACE_UNRESTRICTED	(~0)
+
+#define	BUS_SPACE_BARRIER_READ	0x01
+#define	BUS_SPACE_BARRIER_WRITE	0x02
+
+
 struct bus_space {
 	/* cookie */
 	void		*bs_cookie;
@@ -104,7 +113,7 @@ struct bus_space {
 	void		(*bs_barrier) (void *, bus_space_handle_t,
 			    bus_size_t, bus_size_t, int);
 
-	/* read (single) */
+	/* read single */
 	u_int8_t	(*bs_r_1) (void *, bus_space_handle_t, bus_size_t);
 	u_int16_t	(*bs_r_2) (void *, bus_space_handle_t, bus_size_t);
 	u_int32_t	(*bs_r_4) (void *, bus_space_handle_t, bus_size_t);
@@ -130,7 +139,7 @@ struct bus_space {
 	void		(*bs_rr_8) (void *, bus_space_handle_t,
 			    bus_size_t, u_int64_t *, bus_size_t);
 					
-	/* write (single) */
+	/* write single */
 	void		(*bs_w_1) (void *, bus_space_handle_t,
 			    bus_size_t, u_int8_t);
 	void		(*bs_w_2) (void *, bus_space_handle_t,
@@ -190,7 +199,7 @@ struct bus_space {
 	void		(*bs_c_8) (void *, bus_space_handle_t, bus_size_t,
 			    bus_space_handle_t, bus_size_t, bus_size_t);
 
-	/* read stream (single) */
+	/* read single stream */
 	u_int8_t	(*bs_r_1_s) (void *, bus_space_handle_t, bus_size_t);
 	u_int16_t	(*bs_r_2_s) (void *, bus_space_handle_t, bus_size_t);
 	u_int32_t	(*bs_r_4_s) (void *, bus_space_handle_t, bus_size_t);
@@ -300,8 +309,7 @@ struct bus_space {
 #define	bus_space_barrier(t, h, o, l, f)				\
 	(*(t)->bs_barrier)((t)->bs_cookie, (h), (o), (l), (f))
 
-#define	BUS_SPACE_BARRIER_READ	0x01
-#define	BUS_SPACE_BARRIER_WRITE	0x02
+
 
 /*
  * Bus read (single) operations.
@@ -456,277 +464,9 @@ struct bus_space {
 #define	bus_space_copy_region_8(t, h1, o1, h2, o2, c)				\
 	__bs_copy(8, t, h1, o1, h2, o2, c)
 
-/*
- * Macros to provide prototypes for all the functions used in the
- * bus_space structure
- */
-
-#define bs_map_proto(f)							\
-int	__bs_c(f,_bs_map) (void *t, bus_addr_t addr,		\
-	    bus_size_t size, int cacheable, bus_space_handle_t *bshp);
-
-#define bs_unmap_proto(f)						\
-void	__bs_c(f,_bs_unmap) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t size);
-
-#define bs_subregion_proto(f)						\
-int	__bs_c(f,_bs_subregion) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, bus_size_t size, 			\
-	    bus_space_handle_t *nbshp);
-
-#define bs_alloc_proto(f)						\
-int	__bs_c(f,_bs_alloc) (void *t, bus_addr_t rstart,		\
-	    bus_addr_t rend, bus_size_t size, bus_size_t align,		\
-	    bus_size_t boundary, int cacheable, bus_addr_t *addrp,	\
-	    bus_space_handle_t *bshp);
-
-#define bs_free_proto(f)						\
-void	__bs_c(f,_bs_free) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t size);
-
-#define bs_mmap_proto(f)						\
-int	__bs_c(f,_bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int);
-
-#define bs_barrier_proto(f)						\
-void	__bs_c(f,_bs_barrier) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, bus_size_t len, int flags);
-
-#define	bs_r_1_proto(f)							\
-u_int8_t	__bs_c(f,_bs_r_1) (void *t, bus_space_handle_t bsh,	\
-		    bus_size_t offset);
-
-#define	bs_r_2_proto(f)							\
-u_int16_t	__bs_c(f,_bs_r_2) (void *t, bus_space_handle_t bsh,	\
-		    bus_size_t offset);
-
-#define	bs_r_4_proto(f)							\
-u_int32_t	__bs_c(f,_bs_r_4) (void *t, bus_space_handle_t bsh,	\
-		    bus_size_t offset);
-
-#define	bs_r_8_proto(f)							\
-u_int64_t	__bs_c(f,_bs_r_8) (void *t, bus_space_handle_t bsh,	\
-		    bus_size_t offset);
-
-#define	bs_r_1_s_proto(f)						\
-u_int8_t	__bs_c(f,_bs_r_1_s) (void *t, bus_space_handle_t bsh,	\
-		    bus_size_t offset);
-
-#define	bs_r_2_s_proto(f)						\
-u_int16_t	__bs_c(f,_bs_r_2_s) (void *t, bus_space_handle_t bsh,	\
-		    bus_size_t offset);
-
-#define	bs_r_4_s_proto(f)						\
-u_int32_t	__bs_c(f,_bs_r_4_s) (void *t, bus_space_handle_t bsh,	\
-		    bus_size_t offset);
-
-#define	bs_w_1_proto(f)							\
-void	__bs_c(f,_bs_w_1) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t offset, u_int8_t value);
-
-#define	bs_w_2_proto(f)							\
-void	__bs_c(f,_bs_w_2) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t offset, u_int16_t value);
-
-#define	bs_w_4_proto(f)							\
-void	__bs_c(f,_bs_w_4) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t offset, u_int32_t value);
-
-#define	bs_w_8_proto(f)							\
-void	__bs_c(f,_bs_w_8) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t offset, u_int64_t value);
-
-#define	bs_w_1_s_proto(f)						\
-void	__bs_c(f,_bs_w_1_s) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t offset, u_int8_t value);
-
-#define	bs_w_2_s_proto(f)						\
-void	__bs_c(f,_bs_w_2_s) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t offset, u_int16_t value);
-
-#define	bs_w_4_s_proto(f)						\
-void	__bs_c(f,_bs_w_4_s) (void *t, bus_space_handle_t bsh,		\
-	    bus_size_t offset, u_int32_t value);
-
-#define	bs_rm_1_proto(f)						\
-void	__bs_c(f,_bs_rm_1) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int8_t *addr, bus_size_t count);
-
-#define	bs_rm_2_proto(f)						\
-void	__bs_c(f,_bs_rm_2) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int16_t *addr, bus_size_t count);
-
-#define	bs_rm_4_proto(f)						\
-void	__bs_c(f,_bs_rm_4) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int32_t *addr, bus_size_t count);		
-
-#define	bs_rm_8_proto(f)						\
-void	__bs_c(f,_bs_rm_8) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int64_t *addr, bus_size_t count);
-
-#define	bs_wm_1_proto(f)						\
-void	__bs_c(f,_bs_wm_1) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int8_t *addr, bus_size_t count);
-
-#define	bs_wm_2_proto(f)						\
-void	__bs_c(f,_bs_wm_2) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int16_t *addr, bus_size_t count);
-
-#define	bs_wm_4_proto(f)						\
-void	__bs_c(f,_bs_wm_4) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int32_t *addr, bus_size_t count);
-
-#define	bs_wm_8_proto(f)						\
-void	__bs_c(f,_bs_wm_8) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int64_t *addr, bus_size_t count);
-
-#define	bs_rr_1_proto(f)						\
-void	__bs_c(f, _bs_rr_1) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int8_t *addr, bus_size_t count);
-
-#define	bs_rr_2_proto(f)						\
-void	__bs_c(f, _bs_rr_2) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int16_t *addr, bus_size_t count);
-
-#define	bs_rr_4_proto(f)						\
-void	__bs_c(f, _bs_rr_4) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int32_t *addr, bus_size_t count);
-
-#define	bs_rr_8_proto(f)						\
-void	__bs_c(f, _bs_rr_8) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int64_t *addr, bus_size_t count);
-
-#define	bs_wr_1_proto(f)						\
-void	__bs_c(f, _bs_wr_1) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int8_t *addr, bus_size_t count);
-
-#define	bs_wr_2_proto(f)						\
-void	__bs_c(f, _bs_wr_2) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int16_t *addr, bus_size_t count);
-
-#define	bs_wr_4_proto(f)						\
-void	__bs_c(f, _bs_wr_4) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int32_t *addr, bus_size_t count);
-
-#define	bs_wr_8_proto(f)						\
-void	__bs_c(f, _bs_wr_8) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, const u_int64_t *addr, bus_size_t count);
-
-#define	bs_sm_1_proto(f)						\
-void	__bs_c(f,_bs_sm_1) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int8_t value, bus_size_t count);
-
-#define	bs_sm_2_proto(f)						\
-void	__bs_c(f,_bs_sm_2) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int16_t value, bus_size_t count);
-
-#define	bs_sm_4_proto(f)						\
-void	__bs_c(f,_bs_sm_4) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int32_t value, bus_size_t count);
-
-#define	bs_sm_8_proto(f)						\
-void	__bs_c(f,_bs_sm_8) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int64_t value, bus_size_t count);
-
-#define	bs_sr_1_proto(f)						\
-void	__bs_c(f,_bs_sr_1) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int8_t value, bus_size_t count);
-
-#define	bs_sr_2_proto(f)						\
-void	__bs_c(f,_bs_sr_2) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int16_t value, bus_size_t count);
-
-#define	bs_sr_4_proto(f)						\
-void	__bs_c(f,_bs_sr_4) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int32_t value, bus_size_t count);
-
-#define	bs_sr_8_proto(f)						\
-void	__bs_c(f,_bs_sr_8) (void *t, bus_space_handle_t bsh,	\
-	    bus_size_t offset, u_int64_t value, bus_size_t count);
-
-#define	bs_c_1_proto(f)							\
-void	__bs_c(f,_bs_c_1) (void *t, bus_space_handle_t bsh1,	\
-	    bus_size_t offset1, bus_space_handle_t bsh2,		\
-	    bus_size_t offset2, bus_size_t count);
-
-#define	bs_c_2_proto(f)							\
-void	__bs_c(f,_bs_c_2) (void *t, bus_space_handle_t bsh1,	\
-	    bus_size_t offset1, bus_space_handle_t bsh2,		\
-	    bus_size_t offset2, bus_size_t count);
-
-#define	bs_c_4_proto(f)							\
-void	__bs_c(f,_bs_c_4) (void *t, bus_space_handle_t bsh1,	\
-	    bus_size_t offset1, bus_space_handle_t bsh2,		\
-	    bus_size_t offset2, bus_size_t count);
-
-#define	bs_c_8_proto(f)							\
-void	__bs_c(f,_bs_c_8) (void *t, bus_space_handle_t bsh1,	\
-	    bus_size_t offset1, bus_space_handle_t bsh2,		\
-	    bus_size_t offset2, bus_size_t count);
-
-#define bs_protos(f)		\
-bs_map_proto(f);		\
-bs_unmap_proto(f);		\
-bs_subregion_proto(f);		\
-bs_alloc_proto(f);		\
-bs_free_proto(f);		\
-bs_mmap_proto(f);		\
-bs_barrier_proto(f);		\
-bs_r_1_proto(f);		\
-bs_r_2_proto(f);		\
-bs_r_4_proto(f);		\
-bs_r_8_proto(f);		\
-bs_r_1_s_proto(f);		\
-bs_r_2_s_proto(f);		\
-bs_r_4_s_proto(f);		\
-bs_w_1_proto(f);		\
-bs_w_2_proto(f);		\
-bs_w_4_proto(f);		\
-bs_w_8_proto(f);		\
-bs_w_1_s_proto(f);		\
-bs_w_2_s_proto(f);		\
-bs_w_4_s_proto(f);		\
-bs_rm_1_proto(f);		\
-bs_rm_2_proto(f);		\
-bs_rm_4_proto(f);		\
-bs_rm_8_proto(f);		\
-bs_wm_1_proto(f);		\
-bs_wm_2_proto(f);		\
-bs_wm_4_proto(f);		\
-bs_wm_8_proto(f);		\
-bs_rr_1_proto(f);		\
-bs_rr_2_proto(f);		\
-bs_rr_4_proto(f);		\
-bs_rr_8_proto(f);		\
-bs_wr_1_proto(f);		\
-bs_wr_2_proto(f);		\
-bs_wr_4_proto(f);		\
-bs_wr_8_proto(f);		\
-bs_sm_1_proto(f);		\
-bs_sm_2_proto(f);		\
-bs_sm_4_proto(f);		\
-bs_sm_8_proto(f);		\
-bs_sr_1_proto(f);		\
-bs_sr_2_proto(f);		\
-bs_sr_4_proto(f);		\
-bs_sr_8_proto(f);		\
-bs_c_1_proto(f);		\
-bs_c_2_proto(f);		\
-bs_c_4_proto(f);		\
-bs_c_8_proto(f);
-
-#define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
-
-#define BUS_SPACE_MAXADDR_24BIT	0xFFFFFF
-#define BUS_SPACE_MAXADDR_32BIT 0xFFFFFFFF
-#define BUS_SPACE_MAXADDR 	0xFFFFFFFF
-#define BUS_SPACE_MAXSIZE_24BIT	0xFFFFFF
-#define BUS_SPACE_MAXSIZE_32BIT	0xFFFFFFFF
-#define BUS_SPACE_MAXSIZE 	0xFFFFFFFF
-
-#define BUS_SPACE_UNRESTRICTED	(~0)
-
 #include <machine/bus_dma.h>
 
+#if 0
 /*
  * Get the physical address of a bus space memory-mapped resource.
  * Doing this as a macro is a temporary solution until a more robust fix is
@@ -734,5 +474,6 @@ bs_c_8_proto(f);
  */
 #define BUS_SPACE_PHYSADDR(res, offs) \
 	((u_int)(rman_get_start(res)+(offs)))
+#endif
 
 #endif /* _MACHINE_BUS_H_ */


More information about the svn-src-projects mailing list