[Pdbg] [PATCH 0/3] Add i2c put and get to pdbg
Alistair Popple
alistair at popple.id.au
Mon Apr 15 13:47:01 AEST 2019
On Monday, 15 April 2019 11:14:11 AM AEST Rashmica Gupta wrote:
> At the moment we only support multiples of 4 bytes. So if you just want to
> set the device to read from it you need to do something like:
> ./pdbg -P i2cm puti2c 0 0x50 10 3 0x000000 (the device addr counts as a
> byte)
It seems odd that the restriction includes the device address, or is that
referring to the SMBus command-code/register offset? Also I couldn't quite
grok what all the numbers in the puti2c command might be, maybe I should go
read the code.
>
> The i2c reset function doesn't work as well as I would like... Sometimes
> if you try to read from devices that don't exist, you can no longer read
> from devices that do exist - using the reset func in skiboot (by doing
> i2ctransfer from i2ctools on the host or a reboot) or resetting the lbus
> (./pdbg -P fsi0 -D4 putcfam 0x80d 0x20000000) sometimes but not always
> fixes things.
>
>
> Rashmica Gupta (3):
> libpdbg: use i2ctools lib
> libpdbg: Add i2c get and put functions for i2c master on CFAM
> libpdbg: Add i2c get and put for i2c masters on the PIB
>
> Makefile.am | 7 +
> configure.ac | 5 +
> libpdbg/i2cm.c | 667 ++++++++++++++++++++++++++++++++++++++++++++++
> libpdbg/libpdbg.h | 5 +
> libpdbg/target.c | 24 ++
> libpdbg/target.h | 12 +
> p9-fsi.dtsi.m4 | 7 +
> p9-host.dts.m4 | 28 ++
> p9-i2c.dts.m4 | 21 ++
> p9-kernel.dts.m4 | 8 +
> src/i2c.c | 82 ++++++
> src/main.c | 6 +-
> src/parsers.c | 18 ++
> src/parsers.h | 2 +
> 14 files changed, 890 insertions(+), 2 deletions(-)
> create mode 100644 libpdbg/i2cm.c
> create mode 100644 p9-i2c.dts.m4
> create mode 100644 src/i2c.c
More information about the Pdbg
mailing list