[Pdbg] [PATCH 2/3] add i2cm from bmc
Alistair Popple
alistair at popple.id.au
Thu Apr 11 13:33:56 AEST 2019
On Thursday, 11 April 2019 2:30:32 AM AEST Joel Stanley wrote:
> On Wed, 10 Apr 2019 at 02:31, Alistair Popple <alistair at popple.id.au> wrote:
> > > @@ -46,7 +47,10 @@ static int kernel_fsi_getcfam(struct fsi *fsi,
> > > uint32_t
> > > addr64, uint32_t *value) return errno;
> > >
> > > }
> > >
> > > - rc = read(fsi_fd, &tmp, 4);
> > > + if (addr == 0x1800)
> > > + rc = read(fsi_fd, &tmp2, 1);
> >
> > So this might clarify my comment above - I wonder what this read actually
> > does at the hardware level. In this case it depends on the OpenFSI kernel
> > driver.
> >
> > Joel do you know if the OpenFSI read() call supports reading a single
> > physical byte from the FSI bus? (rather than reading 4 bytes from the HW
> > and throwing away 3 bytes).
>
> I had to double check the code. Yes, AFAICT we read a single byte. The
> read is the size requested, we don't throw away bytes.
Interesting, had no idea. We never did make that work for pdbg as I couldn't
figure out the application. I suppose reading a single byte from the I2C is
valid though.
- Alistair
> Cheers,
>
> Joel
More information about the Pdbg
mailing list