Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp700/include Switch to new-style <sys/bus.h>. hp70...



details:   https://anonhg.NetBSD.org/src/rev/094c4f76226d
branches:  trunk
changeset: 767391:094c4f76226d
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Sun Jul 17 23:32:21 2011 +0000

description:
Switch to new-style <sys/bus.h>. hp700 releases are unbuildable for
reasons not related to my changes here, so I'm not 100% that a release
build will run to completion with these changes in place.

diffstat:

 sys/arch/hp700/include/Makefile |    4 +-
 sys/arch/hp700/include/bus.h    |  452 ----------------------------------------
 sys/arch/hp700/include/types.h  |    4 +-
 3 files changed, 4 insertions(+), 456 deletions(-)

diffs (truncated from 488 to 300 lines):

diff -r 2319d63fb2db -r 094c4f76226d sys/arch/hp700/include/Makefile
--- a/sys/arch/hp700/include/Makefile   Sun Jul 17 23:29:10 2011 +0000
+++ b/sys/arch/hp700/include/Makefile   Sun Jul 17 23:32:21 2011 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile,v 1.11 2011/07/17 20:54:40 joerg Exp $
+#      $NetBSD: Makefile,v 1.12 2011/07/17 23:32:21 dyoung Exp $
 
 INCSDIR= /usr/include/hp700
 
 INCS=  ansi.h aout_machdep.h asm.h autoconf.h \
-       bswap.h bus.h byte_swap.h \
+       bswap.h byte_swap.h \
        cdefs.h cpu.h cpufunc.h \
        disklabel.h \
        eisa_machdep.h elf_machdep.h endian.h endian_machdep.h exec.h \
diff -r 2319d63fb2db -r 094c4f76226d sys/arch/hp700/include/bus.h
--- a/sys/arch/hp700/include/bus.h      Sun Jul 17 23:29:10 2011 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,452 +0,0 @@
-/*     $NetBSD: bus.h,v 1.16 2009/11/03 05:07:25 snj Exp $     */
-
-/*     $OpenBSD: bus.h,v 1.13 2001/07/30 14:15:59 art Exp $    */
-
-/*
- * Copyright (c) 1998-2004 Michael Shalayeff
- * All rights reserved.
- *
- * 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 AUTHOR ``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 AUTHOR OR HIS RELATIVES 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 MIND, 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.
- */
-
-
-#ifndef _MACHINE_BUS_H_
-#define _MACHINE_BUS_H_
-
-#include <machine/cpufunc.h>
-
-/*
- * Bus address and size types.
- */
-typedef u_long bus_addr_t;
-typedef u_long bus_size_t;
-typedef u_long bus_space_handle_t;
-
-struct hppa_bus_space_tag {
-       void *hbt_cookie;
-
-       int  (*hbt_map)(void *v, bus_addr_t addr, bus_size_t size,
-                            int flags, bus_space_handle_t *bshp);
-       void (*hbt_unmap)(void *v, bus_space_handle_t bsh,
-                              bus_size_t size);
-       int  (*hbt_subregion)(void *v, bus_space_handle_t bsh,
-                                  bus_size_t offset, bus_size_t size,
-                                  bus_space_handle_t *nbshp);
-       int  (*hbt_alloc)(void *v, bus_addr_t rstart, bus_addr_t rend,
-                              bus_size_t size, bus_size_t align,
-                              bus_size_t boundary, int flags,
-                              bus_addr_t *addrp, bus_space_handle_t *bshp);
-       void (*hbt_free)(void *, bus_space_handle_t, bus_size_t);
-       void (*hbt_barrier)(void *v, bus_space_handle_t h,
-                                bus_size_t o, bus_size_t l, int op);
-       void *(*hbt_vaddr)(void *, bus_space_handle_t);
-       paddr_t (*hbt_mmap)(void *, bus_addr_t, off_t, int, int);
-
-       uint8_t  (*hbt_r1)(void *, bus_space_handle_t, bus_size_t);
-       uint16_t (*hbt_r2)(void *, bus_space_handle_t, bus_size_t);
-       uint32_t (*hbt_r4)(void *, bus_space_handle_t, bus_size_t);
-       uint64_t (*hbt_r8)(void *, bus_space_handle_t, bus_size_t);
-
-       void (*hbt_w1)(void *, bus_space_handle_t, bus_size_t, uint8_t);
-       void (*hbt_w2)(void *, bus_space_handle_t, bus_size_t, uint16_t);
-       void (*hbt_w4)(void *, bus_space_handle_t, bus_size_t, uint32_t);
-       void (*hbt_w8)(void *, bus_space_handle_t, bus_size_t, uint64_t);
-
-       void (*hbt_rm_1)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint8_t *a, bus_size_t c);
-       void (*hbt_rm_2)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint16_t *a, bus_size_t c);
-       void (*hbt_rm_4)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint32_t *a, bus_size_t c);
-       void (*hbt_rm_8)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint64_t *a, bus_size_t c);
-
-       void (*hbt_wm_1)(void *v, bus_space_handle_t h, bus_size_t o,
-                             const uint8_t *a, bus_size_t c);
-       void (*hbt_wm_2)(void *v, bus_space_handle_t h, bus_size_t o,
-                             const uint16_t *a, bus_size_t c);
-       void (*hbt_wm_4)(void *v, bus_space_handle_t h, bus_size_t o,
-                             const uint32_t *a, bus_size_t c);
-       void (*hbt_wm_8)(void *v, bus_space_handle_t h, bus_size_t o,
-                             const uint64_t *a, bus_size_t c);
-
-       void (*hbt_sm_1)(void *v, bus_space_handle_t h, bus_size_t o,
-                             uint8_t  vv, bus_size_t c);
-       void (*hbt_sm_2)(void *v, bus_space_handle_t h, bus_size_t o,
-                             uint16_t vv, bus_size_t c);
-       void (*hbt_sm_4)(void *v, bus_space_handle_t h, bus_size_t o,
-                             uint32_t vv, bus_size_t c);
-       void (*hbt_sm_8)(void *v, bus_space_handle_t h, bus_size_t o,
-                             uint64_t vv, bus_size_t c);
-
-       void (*hbt_rrm_2)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint16_t *a, bus_size_t c);
-       void (*hbt_rrm_4)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint32_t *a, bus_size_t c);
-       void (*hbt_rrm_8)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint64_t *a, bus_size_t c);
-
-       void (*hbt_wrm_2)(void *v, bus_space_handle_t h,
-                              bus_size_t o, const uint16_t *a, bus_size_t c);
-       void (*hbt_wrm_4)(void *v, bus_space_handle_t h,
-                              bus_size_t o, const uint32_t *a, bus_size_t c);
-       void (*hbt_wrm_8)(void *v, bus_space_handle_t h,
-                              bus_size_t o, const uint64_t *a, bus_size_t c);
-
-       void (*hbt_rr_1)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint8_t *a, bus_size_t c);
-       void (*hbt_rr_2)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint16_t *a, bus_size_t c);
-       void (*hbt_rr_4)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint32_t *a, bus_size_t c);
-       void (*hbt_rr_8)(void *v, bus_space_handle_t h,
-                             bus_size_t o, uint64_t *a, bus_size_t c);
-
-       void (*hbt_wr_1)(void *v, bus_space_handle_t h,
-                             bus_size_t o, const uint8_t *a, bus_size_t c);
-       void (*hbt_wr_2)(void *v, bus_space_handle_t h,
-                             bus_size_t o, const uint16_t *a, bus_size_t c);
-       void (*hbt_wr_4)(void *v, bus_space_handle_t h,
-                             bus_size_t o, const uint32_t *a, bus_size_t c);
-       void (*hbt_wr_8)(void *v, bus_space_handle_t h,
-                             bus_size_t o, const uint64_t *a, bus_size_t c);
-
-       void (*hbt_rrr_2)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint16_t *a, bus_size_t c);
-       void (*hbt_rrr_4)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint32_t *a, bus_size_t c);
-       void (*hbt_rrr_8)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint64_t *a, bus_size_t c);
-
-       void (*hbt_wrr_2)(void *v, bus_space_handle_t h,
-                              bus_size_t o, const uint16_t *a, bus_size_t c);
-       void (*hbt_wrr_4)(void *v, bus_space_handle_t h,
-                              bus_size_t o, const uint32_t *a, bus_size_t c);
-       void (*hbt_wrr_8)(void *v, bus_space_handle_t h,
-                              bus_size_t o, const uint64_t *a, bus_size_t c);
-
-       void (*hbt_sr_1)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint8_t vv, bus_size_t c);
-       void (*hbt_sr_2)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint16_t vv, bus_size_t c);
-       void (*hbt_sr_4)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint32_t vv, bus_size_t c);
-       void (*hbt_sr_8)(void *v, bus_space_handle_t h,
-                              bus_size_t o, uint64_t vv, bus_size_t c);
-
-       void (*hbt_cp_1)(void *v, bus_space_handle_t h1, bus_size_t o1,
-                             bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
-       void (*hbt_cp_2)(void *v, bus_space_handle_t h1, bus_size_t o1,
-                             bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
-       void (*hbt_cp_4)(void *v, bus_space_handle_t h1, bus_size_t o1,
-                             bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
-       void (*hbt_cp_8)(void *v, bus_space_handle_t h1, bus_size_t o1,
-                             bus_space_handle_t h2, bus_size_t o2, bus_size_t c);
-};
-typedef const struct hppa_bus_space_tag *bus_space_tag_t;
-extern const struct hppa_bus_space_tag hppa_bustag;
-
-/* flags for bus space map functions */
-#define BUS_SPACE_MAP_CACHEABLE                0x0001
-#define BUS_SPACE_MAP_LINEAR           0x0002
-#define BUS_SPACE_MAP_READONLY         0x0004
-#define BUS_SPACE_MAP_PREFETCHABLE     0x0008
-#define BUS_SPACE_MAP_NOEXTENT         0x8000  /* no extent ops */
-#define        BUS_SPACE_BARRIER_READ          0x0000
-#define        BUS_SPACE_BARRIER_WRITE         0x0001
-
-
-/* bus access routines */
-#define        BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t)
-
-#define        bus_space_map(t,a,c,ca,hp) \
-       (((t)->hbt_map)((t)->hbt_cookie,(a),(c),(ca),(hp)))
-#define        bus_space_unmap(t,h,c) \
-       (((t)->hbt_unmap)((t)->hbt_cookie,(h),(c)))
-#define        bus_space_subregion(t,h,o,c,hp) \
-       (((t)->hbt_subregion)((t)->hbt_cookie,(h),(o),(c),(hp)))
-#define        bus_space_alloc(t,b,e,c,al,bn,ca,ap,hp) \
-       (((t)->hbt_alloc)((t)->hbt_cookie,(b),(e),(c),(al),(bn),(ca),(ap),(hp)))
-#define        bus_space_free(t,h,c) \
-       (((t)->hbt_free)((t)->hbt_cookie,(h),(c)))
-#define        bus_space_barrier(t,h,o,l,op) \
-       ((t)->hbt_barrier((t)->hbt_cookie, (h), (o), (l), (op)))
-#define        bus_space_vaddr(t,h) \
-       (((t)->hbt_vaddr)((t)->hbt_cookie,(h)))
-#define bus_space_mmap(t, a, o, p, f) \
-       (*(t)->hbt_mmap)((t)->hbt_cookie, (a), (o), (p), (f))
-
-#define        bus_space_read_1(t,h,o) (((t)->hbt_r1)((t)->hbt_cookie,(h),(o)))
-#define        bus_space_read_2(t,h,o) (((t)->hbt_r2)((t)->hbt_cookie,(h),(o)))
-#define        bus_space_read_4(t,h,o) (((t)->hbt_r4)((t)->hbt_cookie,(h),(o)))
-#define        bus_space_read_8(t,h,o) (((t)->hbt_r8)((t)->hbt_cookie,(h),(o)))
-
-#define        bus_space_write_1(t,h,o,v) (((t)->hbt_w1)((t)->hbt_cookie,(h),(o),(v)))
-#define        bus_space_write_2(t,h,o,v) (((t)->hbt_w2)((t)->hbt_cookie,(h),(o),(v)))
-#define        bus_space_write_4(t,h,o,v) (((t)->hbt_w4)((t)->hbt_cookie,(h),(o),(v)))
-#define        bus_space_write_8(t,h,o,v) (((t)->hbt_w8)((t)->hbt_cookie,(h),(o),(v)))
-
-/* XXX fredette */
-#define        __BUS_SPACE_HAS_STREAM_METHODS
-#define        bus_space_read_stream_2 bus_space_read_2
-#define        bus_space_read_stream_4 bus_space_read_4
-#define        bus_space_read_stream_8 bus_space_read_8
-
-#define        bus_space_write_stream_2        bus_space_write_2
-#define        bus_space_write_stream_4        bus_space_write_4
-#define        bus_space_write_stream_8        bus_space_write_8
-
-#define        bus_space_read_multi_1(t,h,o,a,c) \
-       (((t)->hbt_rm_1)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_multi_2(t,h,o,a,c) \
-       (((t)->hbt_rm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_multi_4(t,h,o,a,c) \
-       (((t)->hbt_rm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_multi_8(t,h,o,a,c) \
-       (((t)->hbt_rm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
-
-#define        bus_space_write_multi_1(t,h,o,a,c) \
-       (((t)->hbt_wm_1)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_multi_2(t,h,o,a,c) \
-       (((t)->hbt_wm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_multi_4(t,h,o,a,c) \
-       (((t)->hbt_wm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_multi_8(t,h,o,a,c) \
-       (((t)->hbt_wm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
-
-#define        bus_space_set_multi_1(t,h,o,v,c) \
-       (((t)->hbt_sm_1)((t)->hbt_cookie, (h), (o), (v), (c)))
-#define        bus_space_set_multi_2(t,h,o,v,c) \
-       (((t)->hbt_sm_2)((t)->hbt_cookie, (h), (o), (v), (c)))
-#define        bus_space_set_multi_4(t,h,o,v,c) \
-       (((t)->hbt_sm_4)((t)->hbt_cookie, (h), (o), (v), (c)))
-#define        bus_space_set_multi_8(t,h,o,v,c) \
-       (((t)->hbt_sm_8)((t)->hbt_cookie, (h), (o), (v), (c)))
-
-#define        bus_space_read_multi_stream_2(t, h, o, a, c) \
-       (((t)->hbt_rrm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_multi_stream_4(t, h, o, a, c) \
-       (((t)->hbt_rrm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_multi_stream_8(t, h, o, a, c) \
-       (((t)->hbt_rrm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
-
-#define        bus_space_write_multi_stream_2(t, h, o, a, c) \
-       (((t)->hbt_wrm_2)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_multi_stream_4(t, h, o, a, c) \
-       (((t)->hbt_wrm_4)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_multi_stream_8(t, h, o, a, c) \
-       (((t)->hbt_wrm_8)((t)->hbt_cookie, (h), (o), (a), (c)))
-
-#define        bus_space_read_region_1(t, h, o, a, c) \
-       (((t)->hbt_rr_1)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_region_2(t, h, o, a, c) \
-       (((t)->hbt_rr_2)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_region_4(t, h, o, a, c) \
-       (((t)->hbt_rr_4)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_region_8(t, h, o, a, c) \
-       (((t)->hbt_rr_8)((t)->hbt_cookie, (h), (o), (a), (c)))
-
-#define        bus_space_write_region_1(t, h, o, a, c) \
-       (((t)->hbt_wr_1)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_region_2(t, h, o, a, c) \
-       (((t)->hbt_wr_2)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_region_4(t, h, o, a, c) \
-       (((t)->hbt_wr_4)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_write_region_8(t, h, o, a, c) \
-       (((t)->hbt_wr_8)((t)->hbt_cookie, (h), (o), (a), (c)))
-
-#define        bus_space_read_region_stream_2(t, h, o, a, c) \
-       (((t)->hbt_rrr_2)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_region_stream_4(t, h, o, a, c) \
-       (((t)->hbt_rrr_4)((t)->hbt_cookie, (h), (o), (a), (c)))
-#define        bus_space_read_region_stream_8(t, h, o, a, c) \



Home | Main Index | Thread Index | Old Index