Deleted Added
full compact
ppb_base.c (184130) ppb_base.c (185003)
1/*-
2 * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
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

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

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
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997, 1998, 1999 Nicolas Souchu
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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/ppbus/ppb_base.c 184130 2008-10-21 18:30:10Z jhb $");
28__FBSDID("$FreeBSD: head/sys/dev/ppbus/ppb_base.c 185003 2008-11-16 17:42:02Z jhb $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/bus.h>
35
36#include <dev/ppbus/ppbconf.h>
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <sys/bus.h>
35
36#include <dev/ppbus/ppbconf.h>
37
37
38#include "ppbus_if.h"
39
40#include <dev/ppbus/ppbio.h>
38#include "ppbus_if.h"
39
40#include <dev/ppbus/ppbio.h>
41
41
42MODULE_VERSION(ppbus, 1);
43
44#define DEVTOSOFTC(dev) ((struct ppb_data *)device_get_softc(dev))
42MODULE_VERSION(ppbus, 1);
43
44#define DEVTOSOFTC(dev) ((struct ppb_data *)device_get_softc(dev))
45
45
46/*
47 * ppb_poll_bus()
48 *
49 * Polls the bus
50 *
51 * max is a delay in 10-milliseconds
52 */
53int

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

128 */
129int
130ppb_set_mode(device_t bus, int mode)
131{
132 struct ppb_data *ppb = DEVTOSOFTC(bus);
133 int old_mode = ppb_get_mode(bus);
134
135 if (PPBUS_SETMODE(device_get_parent(bus), mode))
46/*
47 * ppb_poll_bus()
48 *
49 * Polls the bus
50 *
51 * max is a delay in 10-milliseconds
52 */
53int

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

128 */
129int
130ppb_set_mode(device_t bus, int mode)
131{
132 struct ppb_data *ppb = DEVTOSOFTC(bus);
133 int old_mode = ppb_get_mode(bus);
134
135 if (PPBUS_SETMODE(device_get_parent(bus), mode))
136 return -1;
136 return (-1);
137
138 /* XXX yet device mode = ppbus mode = chipset mode */
139 ppb->mode = (mode & PPB_MASK);
140
141 return (old_mode);
142}
143
144/*

--- 53 unchanged lines hidden ---
137
138 /* XXX yet device mode = ppbus mode = chipset mode */
139 ppb->mode = (mode & PPB_MASK);
140
141 return (old_mode);
142}
143
144/*

--- 53 unchanged lines hidden ---