Deleted Added
full compact
pcf_isa.c (130318) pcf_isa.c (133522)
1/*-
2 * Copyright (c) 2004 Joerg Wunsch
3 *
4 * derived from sys/i386/isa/pcf.c which is:
5 *
6 * Copyright (c) 1998 Nicolas Souchu, Marc Bouget
7 * All rights reserved.
8 *

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

23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004 Joerg Wunsch
3 *
4 * derived from sys/i386/isa/pcf.c which is:
5 *
6 * Copyright (c) 1998 Nicolas Souchu, Marc Bouget
7 * All rights reserved.
8 *

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

23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/pcf/pcf_isa.c 130318 2004-06-10 21:51:39Z marius $");
31__FBSDID("$FreeBSD: head/sys/dev/pcf/pcf_isa.c 133522 2004-08-11 21:19:31Z marius $");
32
33/*
34 * Hardware driver for a Philips PCF8584 I2C bus controller sitting
35 * on a generic ISA bus.
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>

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

127
128 /* IO port is mandatory */
129 sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
130 &sc->rid_ioport, RF_ACTIVE);
131 if (sc->res_ioport == 0) {
132 device_printf(dev, "cannot reserve I/O port range\n");
133 goto error;
134 }
32
33/*
34 * Hardware driver for a Philips PCF8584 I2C bus controller sitting
35 * on a generic ISA bus.
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>

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

127
128 /* IO port is mandatory */
129 sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
130 &sc->rid_ioport, RF_ACTIVE);
131 if (sc->res_ioport == 0) {
132 device_printf(dev, "cannot reserve I/O port range\n");
133 goto error;
134 }
135 sc->bt_ioport = rman_get_bustag(sc->res_ioport);
136 sc->bh_ioport = rman_get_bushandle(sc->res_ioport);
135
136 sc->pcf_flags = device_get_flags(dev);
137
138 if (!(sc->pcf_flags & IIC_POLLED)) {
139 sc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->rid_irq,
140 RF_ACTIVE);
141 if (sc->res_irq == 0) {
142 device_printf(dev, "can't reserve irq, polled mode.\n");

--- 71 unchanged lines hidden ---
137
138 sc->pcf_flags = device_get_flags(dev);
139
140 if (!(sc->pcf_flags & IIC_POLLED)) {
141 sc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->rid_irq,
142 RF_ACTIVE);
143 if (sc->res_irq == 0) {
144 device_printf(dev, "can't reserve irq, polled mode.\n");

--- 71 unchanged lines hidden ---