Revision cf965d24 hw/omap_i2c.c

b/hw/omap_i2c.c
194 194
static uint32_t omap_i2c_read(void *opaque, target_phys_addr_t addr)
195 195
{
196 196
    struct omap_i2c_s *s = (struct omap_i2c_s *) opaque;
197
    int offset = addr - s->base;
197
    int offset = addr & OMAP_MPUI_REG_MASK;
198 198
    uint16_t ret;
199 199

  
200 200
    switch (offset) {
......
286 286
                uint32_t value)
287 287
{
288 288
    struct omap_i2c_s *s = (struct omap_i2c_s *) opaque;
289
    int offset = addr - s->base;
289
    int offset = addr & OMAP_MPUI_REG_MASK;
290 290
    int nack;
291 291

  
292 292
    switch (offset) {

Also available in: Unified diff