Deleted Added
full compact
envctrl.c (130319) envctrl.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/envctrl.c 130319 2004-06-10 21:53:04Z marius $");
31__FBSDID("$FreeBSD: head/sys/dev/pcf/envctrl.c 133522 2004-08-11 21:19:31Z marius $");
32
33/*
34 * Device specific driver for the SUNW,envctrl device found on some
35 * UltraSPARC Sun systems. This device is a Philips PCF8584 sitting
36 * on the Ebus2.
37 */
38
39#include <sys/param.h>

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

113
114 /* IO port is mandatory */
115 sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
116 &sc->rid_ioport, RF_ACTIVE);
117 if (sc->res_ioport == 0) {
118 device_printf(dev, "cannot reserve I/O port range\n");
119 goto error;
120 }
32
33/*
34 * Device specific driver for the SUNW,envctrl device found on some
35 * UltraSPARC Sun systems. This device is a Philips PCF8584 sitting
36 * on the Ebus2.
37 */
38
39#include <sys/param.h>

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

113
114 /* IO port is mandatory */
115 sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
116 &sc->rid_ioport, RF_ACTIVE);
117 if (sc->res_ioport == 0) {
118 device_printf(dev, "cannot reserve I/O port range\n");
119 goto error;
120 }
121 sc->bt_ioport = rman_get_bustag(sc->res_ioport);
122 sc->bh_ioport = rman_get_bushandle(sc->res_ioport);
121
122 sc->pcf_flags = device_get_flags(dev);
123
124 if (!(sc->pcf_flags & IIC_POLLED)) {
125 sc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->rid_irq,
126 RF_ACTIVE);
127 if (sc->res_irq == 0) {
128 device_printf(dev, "can't reserve irq, polled mode.\n");

--- 69 unchanged lines hidden ---
123
124 sc->pcf_flags = device_get_flags(dev);
125
126 if (!(sc->pcf_flags & IIC_POLLED)) {
127 sc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->rid_irq,
128 RF_ACTIVE);
129 if (sc->res_irq == 0) {
130 device_printf(dev, "can't reserve irq, polled mode.\n");

--- 69 unchanged lines hidden ---