Deleted Added
full compact
intpm.c (49064) intpm.c (49195)
1/*-
2 * Copyright (c) 1998, 1999 Takanori Watanabe
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) 1998, 1999 Takanori Watanabe
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 * $Id: intpm.c,v 1.11 1999/07/03 20:17:06 peter Exp $
26 * $Id: intpm.c,v 1.12 1999/07/24 19:13:54 nsouch Exp $
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <machine/bus_pio.h>
33#include <machine/bus_memio.h>
34#include <machine/bus.h>

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

62} pci_ids[] =
63{
64 { 0x71138086,"Intel 82371AB Power management controller"},
65
66 { 0x00000000, NULL }
67};
68static int intsmb_probe(device_t);
69static int intsmb_attach(device_t);
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <machine/bus_pio.h>
33#include <machine/bus_memio.h>
34#include <machine/bus.h>

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

62} pci_ids[] =
63{
64 { 0x71138086,"Intel 82371AB Power management controller"},
65
66 { 0x00000000, NULL }
67};
68static int intsmb_probe(device_t);
69static int intsmb_attach(device_t);
70static void intsmb_print_child(device_t, device_t);
71
72static int intsmb_intr(device_t dev);
73static int intsmb_slvintr(device_t dev);
74static void intsmb_alrintr(device_t dev);
75static int intsmb_callback(device_t dev, int index, caddr_t data);
76static int intsmb_quick(device_t dev, u_char slave, int how);
77static int intsmb_sendb(device_t dev, u_char slave, char byte);
78static int intsmb_recvb(device_t dev, u_char slave, char *byte);

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

90static int intpm_probe (device_t dev);
91static int intpm_attach (device_t dev);
92static devclass_t intsmb_devclass;
93
94static device_method_t intpm_methods[]={
95 DEVMETHOD(device_probe,intsmb_probe),
96 DEVMETHOD(device_attach,intsmb_attach),
97
70
71static int intsmb_intr(device_t dev);
72static int intsmb_slvintr(device_t dev);
73static void intsmb_alrintr(device_t dev);
74static int intsmb_callback(device_t dev, int index, caddr_t data);
75static int intsmb_quick(device_t dev, u_char slave, int how);
76static int intsmb_sendb(device_t dev, u_char slave, char byte);
77static int intsmb_recvb(device_t dev, u_char slave, char *byte);

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

89static int intpm_probe (device_t dev);
90static int intpm_attach (device_t dev);
91static devclass_t intsmb_devclass;
92
93static device_method_t intpm_methods[]={
94 DEVMETHOD(device_probe,intsmb_probe),
95 DEVMETHOD(device_attach,intsmb_attach),
96
98 DEVMETHOD(bus_print_child, intsmb_print_child),
97 DEVMETHOD(bus_print_child, bus_generic_print_child),
99
100 DEVMETHOD(smbus_callback,intsmb_callback),
101 DEVMETHOD(smbus_quick,intsmb_quick),
102 DEVMETHOD(smbus_sendb,intsmb_sendb),
103 DEVMETHOD(smbus_recvb,intsmb_recvb),
104 DEVMETHOD(smbus_writeb,intsmb_writeb),
105 DEVMETHOD(smbus_writew,intsmb_writew),
106 DEVMETHOD(smbus_readb,intsmb_readb),

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

171#ifdef ENABLE_ALART
172 /*Enable Arart*/
173 bus_space_write_1(sc->st,sc->sh,PIIX4_SMBSLVCNT,
174 PIIX4_SMBSLVCNT_ALTEN);
175#endif
176 return (0);
177}
178
98
99 DEVMETHOD(smbus_callback,intsmb_callback),
100 DEVMETHOD(smbus_quick,intsmb_quick),
101 DEVMETHOD(smbus_sendb,intsmb_sendb),
102 DEVMETHOD(smbus_recvb,intsmb_recvb),
103 DEVMETHOD(smbus_writeb,intsmb_writeb),
104 DEVMETHOD(smbus_writew,intsmb_writew),
105 DEVMETHOD(smbus_readb,intsmb_readb),

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

170#ifdef ENABLE_ALART
171 /*Enable Arart*/
172 bus_space_write_1(sc->st,sc->sh,PIIX4_SMBSLVCNT,
173 PIIX4_SMBSLVCNT_ALTEN);
174#endif
175 return (0);
176}
177
179static void
180intsmb_print_child(device_t bus, device_t dev)
181{
182 printf(" on %s%d", device_get_name(bus), device_get_unit(bus));
183 return;
184}
185static int
186intsmb_callback(device_t dev, int index, caddr_t data)
187{
188 int error = 0;
189 intrmask_t s;
190 s=splnet();
191 switch (index) {
192 case SMB_REQUEST_BUS:

--- 576 unchanged lines hidden ---
178static int
179intsmb_callback(device_t dev, int index, caddr_t data)
180{
181 int error = 0;
182 intrmask_t s;
183 s=splnet();
184 switch (index) {
185 case SMB_REQUEST_BUS:

--- 576 unchanged lines hidden ---