[Pdbg] [PATCH 0/3] Add i2c put and get to pdbg

Rashmica Gupta rashmica.g at gmail.com
Mon Apr 15 11:14:11 AEST 2019


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)


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

-- 
2.17.2



More information about the Pdbg mailing list