imx_i2c.c (95a9457fd44ad97c518858a4e1586a5498f9773c) imx_i2c.c (8e5c952b370b57beb642826882c80e1b66a9cf12)
1/*
2 * i.MX I2C Bus Serial Interface Emulation
3 *
4 * Copyright (C) 2013 Jean-Christophe Dubois. <jcd@tribudubois.net>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or

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

300static void imx_i2c_realize(DeviceState *dev, Error **errp)
301{
302 IMXI2CState *s = IMX_I2C(dev);
303
304 memory_region_init_io(&s->iomem, OBJECT(s), &imx_i2c_ops, s, TYPE_IMX_I2C,
305 IMX_I2C_MEM_SIZE);
306 sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
307 sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->irq);
1/*
2 * i.MX I2C Bus Serial Interface Emulation
3 *
4 * Copyright (C) 2013 Jean-Christophe Dubois. <jcd@tribudubois.net>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or

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

300static void imx_i2c_realize(DeviceState *dev, Error **errp)
301{
302 IMXI2CState *s = IMX_I2C(dev);
303
304 memory_region_init_io(&s->iomem, OBJECT(s), &imx_i2c_ops, s, TYPE_IMX_I2C,
305 IMX_I2C_MEM_SIZE);
306 sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
307 sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->irq);
308 s->bus = i2c_init_bus(DEVICE(dev), NULL);
308 s->bus = i2c_init_bus(dev, NULL);
309}
310
311static void imx_i2c_class_init(ObjectClass *klass, void *data)
312{
313 DeviceClass *dc = DEVICE_CLASS(klass);
314
315 dc->vmsd = &imx_i2c_vmstate;
316 dc->reset = imx_i2c_reset;

--- 17 unchanged lines hidden ---
309}
310
311static void imx_i2c_class_init(ObjectClass *klass, void *data)
312{
313 DeviceClass *dc = DEVICE_CLASS(klass);
314
315 dc->vmsd = &imx_i2c_vmstate;
316 dc->reset = imx_i2c_reset;

--- 17 unchanged lines hidden ---