Commit dc23e2605d998d5d0739a23be06083511e612a10
1 parent
dcb8c512
PXA: Account for offset from page start in a subpage mapping.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5917 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
hw/pxa2xx.c
... | ... | @@ -1487,7 +1487,7 @@ struct pxa2xx_i2c_s *pxa2xx_i2c_init(target_phys_addr_t base, |
1487 | 1487 | s->slave.recv = pxa2xx_i2c_rx; |
1488 | 1488 | s->slave.send = pxa2xx_i2c_tx; |
1489 | 1489 | s->bus = i2c_init_bus(); |
1490 | - s->offset = base & region_size; | |
1490 | + s->offset = base - (base & (~region_size) & TARGET_PAGE_MASK); | |
1491 | 1491 | |
1492 | 1492 | iomemtype = cpu_register_io_memory(0, pxa2xx_i2c_readfn, |
1493 | 1493 | pxa2xx_i2c_writefn, s); | ... | ... |