Deleted Added
full compact
pcf_ebus.c (130320) pcf_ebus.c (133522)
1/*-
2 * Copyright (c) 2004 Marius Strobl, 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 Marius Strobl, 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_ebus.c 130320 2004-06-10 21:56:52Z marius $");
31__FBSDID("$FreeBSD: head/sys/dev/pcf/pcf_ebus.c 133522 2004-08-11 21:19:31Z marius $");
32
33/*
34 * Device specific driver for the EBus i2c devices found on some sun4u
35 * systems. On systems not having a boot-bus controller the i2c devices
36 * are PCF8584.
37 *
38 * Known onboard slave devices on the primary bus are:
39 *

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

153
154 /* IO port is mandatory */
155 sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
156 &sc->rid_ioport, RF_ACTIVE);
157 if (sc->res_ioport == 0) {
158 device_printf(dev, "cannot reserve I/O port range\n");
159 goto error;
160 }
32
33/*
34 * Device specific driver for the EBus i2c devices found on some sun4u
35 * systems. On systems not having a boot-bus controller the i2c devices
36 * are PCF8584.
37 *
38 * Known onboard slave devices on the primary bus are:
39 *

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

153
154 /* IO port is mandatory */
155 sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
156 &sc->rid_ioport, RF_ACTIVE);
157 if (sc->res_ioport == 0) {
158 device_printf(dev, "cannot reserve I/O port range\n");
159 goto error;
160 }
161 sc->bt_ioport = rman_get_bustag(sc->res_ioport);
162 sc->bh_ioport = rman_get_bushandle(sc->res_ioport);
161
162 sc->pcf_flags = device_get_flags(dev);
163
164 /*
165 * XXX use poll-mode property?
166 */
167 if (!(sc->pcf_flags & IIC_POLLED)) {
168 sc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ,

--- 93 unchanged lines hidden ---
163
164 sc->pcf_flags = device_get_flags(dev);
165
166 /*
167 * XXX use poll-mode property?
168 */
169 if (!(sc->pcf_flags & IIC_POLLED)) {
170 sc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ,

--- 93 unchanged lines hidden ---