Re: [PATCH v13 1/7] tpm: Make read{16, 32}() and write32() in tpm_tis_phy_ops optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2021-08-26 at 14:19 +0300, amirmizi6@xxxxxxxxx wrote:
> From: Amir Mizinski <amirmizi6@xxxxxxxxx>
> 
> Only tpm_tis can use memory-mapped I/O, which is truly mapped into
> the kernel's memory space. Therefore, using ioread16/ioread32/iowrite32
> turns into a straightforward pointer dereference.
> Every other driver requires more complicated operations to read more than
> one byte at a time and will just fall back to read_bytes/write_bytes.

s/Every other driver/Some drivers, such as tpm_tis_spi,/g.

> Therefore, move this common code out of tpm_tis_spi and into tpm_tis_core
> so that it is used automatically when low-level drivers do not implement
> the specialized methods.

This does not really explain why you are moving the code.

You are moving it so that you don't have to reimplement things both in
SPI and I2C drivers?

Perhaps:

"Re-implement tpm_tis_{read, write}_{16, 32}, so that they check
 if implementations for {read, write}_{16, 32} in tpm_tis_phys_ops
 exist, and if not, fallback to {read, write}_bytes()."

> Co-developed-by: Alexander Steffen <Alexander.Steffen@xxxxxxxxxxxx>
> Signed-off-by: Alexander Steffen <Alexander.Steffen@xxxxxxxxxxxx>
> Signed-off-by: Amir Mizinski <amirmizi6@xxxxxxxxx>
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>
> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>

Since there's been a while, it'd be better if you dropped my tags.
I consider them as expired by now. Please do this for all patches.

/Jarkko





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux