45726b6e | 20-Aug-2018 |
Corey Minyard <cminyard@mvista.com> |
i2c: pm_smbus: Add the ability to force block transfer enable
The PIIX4 hardware has block transfer buffer always enabled in the hardware, but the i801 does not. Add a parameter to pm_smbus_init to
i2c: pm_smbus: Add the ability to force block transfer enable
The PIIX4 hardware has block transfer buffer always enabled in the hardware, but the i801 does not. Add a parameter to pm_smbus_init to force on the block transfer so the PIIX4 handler can enable this by default, as it was disabled by default before.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1534796770-10295-9-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
12bd93c1 | 20-Aug-2018 |
Corey Minyard <cminyard@mvista.com> |
i2c: pm_smbus: Don't delay host status register busy bit when interrupts are enabled
Change 880b1ffe6ec2f0ae "smbus: do not immediately complete commands" changed pm_smbus to delay setting the host
i2c: pm_smbus: Don't delay host status register busy bit when interrupts are enabled
Change 880b1ffe6ec2f0ae "smbus: do not immediately complete commands" changed pm_smbus to delay setting the host busy bit until the status register was read, to work around a bug in AMIBIOS. Unfortunately, when interrupts are enabled, the status register will never get read and the processing will never happen.
Modify the code to only delay setting the host busy bit if interrupts are not enabled.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Hervé Poussineau <hpoussin@reactos.org> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <1534796770-10295-8-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
e724385a | 20-Aug-2018 |
Corey Minyard <cminyard@mvista.com> |
i2c: pm_smbus: Add interrupt handling
Add the necessary code so that interrupts actually work from the pm_smbus device.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Michael S. Tsirkin <ms
i2c: pm_smbus: Add interrupt handling
Add the necessary code so that interrupts actually work from the pm_smbus device.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1534796770-10295-7-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
38ad4fae | 20-Aug-2018 |
Corey Minyard <cminyard@mvista.com> |
i2c: pm_smbus: Add block transfer capability
There was no block transfer code in pm_smbus.c, and it is needed for some devices. So add it.
This adds both byte-by-byte block transfers and buffered
i2c: pm_smbus: Add block transfer capability
There was no block transfer code in pm_smbus.c, and it is needed for some devices. So add it.
This adds both byte-by-byte block transfers and buffered block transfers.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1534796770-10295-5-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
00bdfeab | 20-Aug-2018 |
Corey Minyard <cminyard@mvista.com> |
i2c: pm_smbus: Make the I2C block read command read-only
It did have write capability, but the manual says the behavior with write enabled is undefined. So just set an error in this case.
Signed-o
i2c: pm_smbus: Make the I2C block read command read-only
It did have write capability, but the manual says the behavior with write enabled is undefined. So just set an error in this case.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1534796770-10295-4-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
4b615be5 | 20-Aug-2018 |
Corey Minyard <cminyard@mvista.com> |
i2c: pm_smbus: Fix the semantics of block I2C transfers
The I2C block transfer commands was not implemented correctly, it read a length byte and such like it was an smbus transfer.
So fix the smbus
i2c: pm_smbus: Fix the semantics of block I2C transfers
The I2C block transfer commands was not implemented correctly, it read a length byte and such like it was an smbus transfer.
So fix the smbus_read_block() and smbus_write_block() functions so they can properly handle I2C transfers, and normal SMBus transfers (for upcoming changes). Pass in a transfer size and a bool to know whether to use the size byte (like SMBus) or use the length given (like I2C).
Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1534796770-10295-3-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
ef9173a5 | 19-Jun-2018 |
BALATON Zoltan <balaton@eik.bme.hu> |
ppc4xx_i2c: Implement directcntl register
As well as being able to generate its own i2c transactions, the ppc4xx i2c controller has a DIRECTCNTL register which allows explicit control of the i2c lin
ppc4xx_i2c: Implement directcntl register
As well as being able to generate its own i2c transactions, the ppc4xx i2c controller has a DIRECTCNTL register which allows explicit control of the i2c lines.
Using this register an OS can directly bitbang i2c operations. In order to let emulated i2c devices respond to this, we need to wire up the DIRECTCNTL register to qemu's bitbanged i2c handling code.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
show more ...
|
c8c9e103 | 28-May-2018 |
Philippe Mathieu-Daudé <f4bug@amsat.org> |
hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init
I2CSlaveClass::init is no more used, remove it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180419212727.2
hw/i2c: Use DeviceClass::realize instead of I2CSlaveClass::init
I2CSlaveClass::init is no more used, remove it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180419212727.26095-3-f4bug@amsat.org> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180528144509.15812-3-armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
839a2b28 | 01-Mar-2018 |
Linus Walleij <linus.walleij@linaro.org> |
hw/i2c-ddc: Do not fail writes
The tx function of the DDC I2C slave emulation was returning 1 on all writes resulting in NACK in the I2C bus. Changing it to 0 makes the DDC I2C work fine with bit-ba
hw/i2c-ddc: Do not fail writes
The tx function of the DDC I2C slave emulation was returning 1 on all writes resulting in NACK in the I2C bus. Changing it to 0 makes the DDC I2C work fine with bit-banged I2C such as the versatile I2C.
I guess it was not affecting whatever I2C controller this was used with until now, but with the Versatile I2C it surely does not work.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Message-id: 20180227104903.21353-4-linus.walleij@linaro.org Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
aa88d7ad | 01-Mar-2018 |
Corey Minyard <cminyard@mvista.com> |
i2c: Move the bus class to i2c.h
Some devices need access to it.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Linus Wallei
i2c: Move the bus class to i2c.h
Some devices need access to it.
Signed-off-by: Corey Minyard <cminyard@mvista.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Message-id: 20180227104903.21353-3-linus.walleij@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|