Deleted Added
full compact
legacyvar.h (120362) legacyvar.h (129284)
1/*-
2 * Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/amd64/include/legacyvar.h 120362 2003-09-23 00:03:44Z peter $
26 * $FreeBSD: head/sys/amd64/include/legacyvar.h 129284 2004-05-16 20:30:47Z peter $
27 */
28
29#ifndef _MACHINE_LEGACYVAR_H_
30#define _MACHINE_LEGACYVAR_H_
31
32enum legacy_device_ivars {
33 LEGACY_IVAR_PCIBUS
34};
35
36#define LEGACY_ACCESSOR(var, ivar, type) \
37 __BUS_ACCESSOR(legacy, var, LEGACY, ivar, type)
38
39LEGACY_ACCESSOR(pcibus, PCIBUS, u_int32_t)
40
41#undef LEGACY_ACCESSOR
42
27 */
28
29#ifndef _MACHINE_LEGACYVAR_H_
30#define _MACHINE_LEGACYVAR_H_
31
32enum legacy_device_ivars {
33 LEGACY_IVAR_PCIBUS
34};
35
36#define LEGACY_ACCESSOR(var, ivar, type) \
37 __BUS_ACCESSOR(legacy, var, LEGACY, ivar, type)
38
39LEGACY_ACCESSOR(pcibus, PCIBUS, u_int32_t)
40
41#undef LEGACY_ACCESSOR
42
43int legacy_pcib_attach(device_t dev);
44int legacy_pcib_maxslots(device_t dev);
45u_int32_t legacy_pcib_read_config(device_t dev, int bus, int slot, int func,
46 int reg, int bytes);
47int legacy_pcib_read_ivar(device_t dev, device_t child, int which,
48 uintptr_t *result);
49void legacy_pcib_write_config(device_t dev, int bus, int slot, int func,
50 int reg, u_int32_t data, int bytes);
51int legacy_pcib_write_ivar(device_t dev, device_t child, int which,
52 uintptr_t value);
53
54#endif /* !_MACHINE_LEGACYVAR_H_ */
43int legacy_pcib_maxslots(device_t dev);
44u_int32_t legacy_pcib_read_config(device_t dev, int bus, int slot, int func,
45 int reg, int bytes);
46int legacy_pcib_read_ivar(device_t dev, device_t child, int which,
47 uintptr_t *result);
48void legacy_pcib_write_config(device_t dev, int bus, int slot, int func,
49 int reg, u_int32_t data, int bytes);
50int legacy_pcib_write_ivar(device_t dev, device_t child, int which,
51 uintptr_t value);
52
53#endif /* !_MACHINE_LEGACYVAR_H_ */