Convert bus_space_{read,write}_multi_1() into macros, since they're just
wrappers round {read,write}_multi_1() anyway.
This commit is contained in:
parent
54a986d7fc
commit
0c870e10e0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus.c,v 1.6 2001/06/02 10:45:43 bjh21 Exp $ */
|
||||
/* $NetBSD: bus.c,v 1.7 2001/06/02 21:31:02 bjh21 Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 Ben Harris
|
||||
* All rights reserved.
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <sys/param.h>
|
||||
|
||||
__RCSID("$NetBSD: bus.c,v 1.6 2001/06/02 10:45:43 bjh21 Exp $");
|
||||
__RCSID("$NetBSD: bus.c,v 1.7 2001/06/02 21:31:02 bjh21 Exp $");
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/memcreg.h>
|
||||
|
@ -70,14 +70,6 @@ bus_space_shift(bus_space_tag_t bst, bus_space_handle_t bsh, int shift,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
bus_space_read_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int8_t *datap, bus_size_t count)
|
||||
{
|
||||
|
||||
read_multi_1(bsh + (offset << bst), datap, count);
|
||||
}
|
||||
|
||||
void
|
||||
bus_space_read_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int16_t *datap, bus_size_t count)
|
||||
|
@ -88,15 +80,6 @@ bus_space_read_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh,
|
|||
datap[i] = bus_space_read_2(bst, bsh, offset);
|
||||
}
|
||||
|
||||
void
|
||||
bus_space_write_multi_1(bus_space_tag_t bst, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int8_t const *datap,
|
||||
bus_size_t count)
|
||||
{
|
||||
|
||||
write_multi_1(bsh + (offset << bst), datap, count);
|
||||
}
|
||||
|
||||
void
|
||||
bus_space_write_multi_2(bus_space_tag_t bst, bus_space_handle_t bsh,
|
||||
bus_size_t offset, u_int16_t const *datap,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus.h,v 1.3 2000/12/09 18:47:15 bjh21 Exp $ */
|
||||
/* $NetBSD: bus.h,v 1.4 2001/06/02 21:31:02 bjh21 Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 Ben Harris
|
||||
|
@ -34,6 +34,8 @@
|
|||
#ifndef _ARM26_BUS_H_
|
||||
#define _ARM26_BUS_H_
|
||||
|
||||
#include <arm/blockio.h>
|
||||
|
||||
/*
|
||||
* I believe that there's only one sensible bus space on the Archimedes,
|
||||
* which corresponds to the system I/O bus.
|
||||
|
@ -84,15 +86,15 @@ extern int bus_space_shift(bus_space_tag_t, bus_space_handle_t, int,
|
|||
(*(volatile u_int32_t *)((h) + ((o) << (t))) = (v) | ((v) << 16))
|
||||
|
||||
/* Bus read multiple operations. */
|
||||
extern void bus_space_read_multi_1(bus_space_tag_t, bus_space_handle_t,
|
||||
bus_size_t, u_int8_t *, bus_size_t);
|
||||
#define bus_space_read_multi_1(t, h, o, d, c) \
|
||||
(read_multi_1((h) + ((o) << (t)), (d), (c)))
|
||||
extern void bus_space_read_multi_2(bus_space_tag_t, bus_space_handle_t,
|
||||
bus_size_t, u_int16_t *, bus_size_t);
|
||||
#define bus_space_read_multi_4(t, h, o, d, s) panic("bus_space_read_multi_4")
|
||||
|
||||
/* Bus write multiple operations. */
|
||||
extern void bus_space_write_multi_1(bus_space_tag_t, bus_space_handle_t,
|
||||
bus_size_t, u_int8_t const *, bus_size_t);
|
||||
#define bus_space_write_multi_1(t, h, o, d, c) \
|
||||
(write_multi_1((h) + ((o) << (t)), (d), (c)))
|
||||
extern void bus_space_write_multi_2(bus_space_tag_t, bus_space_handle_t,
|
||||
bus_size_t, u_int16_t const *, bus_size_t);
|
||||
#define bus_space_write_multi_4(t, h, o, d, s) panic("bus_space_write_multi_4")
|
||||
|
|
Loading…
Reference in New Issue