1. 26 5月, 2018 2 次提交
    • M
      tpm: disociate TPMv1.x specific and generic code · d677bfe2
      Miquel Raynal 提交于
      There are no changes in this commit but a new organization of the code
      as follow.
      
      * cmd/ directory:
              > move existing code from cmd/tpm.c in cmd/tpm-common.c
      	> move specific code in cmd/tpm-v1.c
      	> create a specific header file with generic definitions for
      	  commands only called cmd/tpm-user-utils.h
      
      * lib/ directory:
              > move existing code from lib/tpm.c in lib/tpm-common.c
      	> move specific code in lib/tpm-v1.c
      	> create a specific header file with generic definitions for
      	  the library itself called lib/tpm-utils.h
      
      * include/ directory:
              > move existing code from include/tpm.h in include/tpm-common.h
      	> move specific code in include/tpm-v1.h
      
      Code designated as 'common' is compiled if TPM are used. Code designated
      as 'specific' is compiled only if the right specification has been
      selected.
      
      All files include tpm-common.h.
      Files in cmd/ include tpm-user-utils.h.
      Files in lib/ include tpm-utils.h.
      Depending on the specification, files may include either (not both)
      tpm-v1.h or tpm-v2.h.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      d677bfe2
    • M
      tpm: prepare introduction of TPMv2.x support in Kconfig · 9f9ce3c3
      Miquel Raynal 提交于
      Because both major revisions are not compatible at all, let's make them
      mutually exclusive in Kconfig. This way we will be sure, when using a
      command or a library function that it is supported by the right
      revision.
      
      Current drivers are currently prefixed by "tpm_", we will prefix TPMv2.x
      files by "tpm2_" to make the distinction without moving everything.
      
      The Kconfig menu about TPM drivers is now divided into two sections, one
      for each specification. Compliant drivers with one specification will
      only show up if this specification _only_ has been selected, otherwise a
      comment is displayed.
      
      Once a driver is selected by the user, it selects automatically a
      boolean value, that is needed in order to activate the TPM commands.
      Selecting the TPM commands will automatically select the right
      command/library files.
      Signed-off-by: NMiquel Raynal <miquel.raynal@bootlin.com>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Reviewed-by: NTom Rini <trini@konsulko.com>
      [trini: Rework deps as TPM_V1 and TPM_V2 depend on TPM,
              drop TPM_DRIVER_SELECTED]
      Signed-off-by: NTom Rini <trini@konsulko.com>
      9f9ce3c3
  2. 25 5月, 2018 8 次提交
  3. 24 5月, 2018 30 次提交