Deleted Added
full compact
28c28
< __FBSDID("$FreeBSD: head/sys/powerpc/mpc85xx/i2c.c 194630 2009-06-22 15:34:32Z raj $");
---
> __FBSDID("$FreeBSD: head/sys/powerpc/mpc85xx/i2c.c 209908 2010-07-11 21:08:29Z raj $");
39d38
< #include <machine/ocpbus.h>
49c48,49
< #include <powerpc/mpc85xx/ocpbus.h>
---
> #include <dev/ofw/ofw_bus.h>
> #include <dev/ofw/ofw_bus_subr.h>
127c127
< DRIVER_MODULE(i2c, ocpbus, i2c_driver, i2c_devclass, 0, 0);
---
> DRIVER_MODULE(i2c, simplebus, i2c_driver, i2c_devclass, 0, 0);
160c160
< status = i2c_read_reg(sc,I2C_STATUS_REG);
---
> status = i2c_read_reg(sc, I2C_STATUS_REG);
191d190
< device_t parent;
193,194d191
< uintptr_t devtype;
< int error;
196,203c193
< parent = device_get_parent(dev);
<
< error = BUS_READ_IVAR(parent, dev, OCPBUS_IVAR_DEVTYPE, &devtype);
<
< if (error)
< return (error);
<
< if (devtype != OCPBUS_DEVTYPE_I2C)
---
> if (!ofw_bus_is_compatible(dev, "fsl-i2c"))
212c202
< device_printf(dev, "could not allocate resources");
---
> device_printf(dev, "could not allocate resources\n");