Add Kconfig TPM
Defined as TPM1 || TPM2. Change-Id: I18c26d6991c2ccf782a515a8e90a3eb82b53b0e6 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/54853 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
		
				
					committed by
					
						
						Felix Held
					
				
			
			
				
	
			
			
			
						parent
						
							0ed04569d7
						
					
				
				
					commit
					d2b2a18307
				
			@@ -52,7 +52,7 @@ static void set_flex_ratio_to_tdp_nominal(void)
 | 
				
			|||||||
	RCBA32_OR(SOFT_RESET_CTRL, 1);
 | 
						RCBA32_OR(SOFT_RESET_CTRL, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Delay before reset to avoid potential TPM lockout */
 | 
						/* Delay before reset to avoid potential TPM lockout */
 | 
				
			||||||
	if (CONFIG(TPM1) || CONFIG(TPM2))
 | 
						if (CONFIG(TPM))
 | 
				
			||||||
		mdelay(30);
 | 
							mdelay(30);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Issue warm reset, will be "CPU only" due to soft reset data */
 | 
						/* Issue warm reset, will be "CPU only" due to soft reset data */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -877,7 +877,7 @@ static struct pnp_info pnp_dev_info[] = {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void enable_dev(struct device *dev)
 | 
					static void enable_dev(struct device *dev)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (CONFIG(TPM1) || CONFIG(TPM2))
 | 
						if (CONFIG(TPM))
 | 
				
			||||||
		pnp_enable_devices(dev, &lpc_tpm_ops,
 | 
							pnp_enable_devices(dev, &lpc_tpm_ops,
 | 
				
			||||||
			ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
 | 
								ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,6 +21,11 @@ config TPM2
 | 
				
			|||||||
		   MAINBOARD_HAS_SPI_TPM || \
 | 
							   MAINBOARD_HAS_SPI_TPM || \
 | 
				
			||||||
		   MAINBOARD_HAS_CRB_TPM
 | 
							   MAINBOARD_HAS_CRB_TPM
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					config TPM
 | 
				
			||||||
 | 
						bool
 | 
				
			||||||
 | 
						default y
 | 
				
			||||||
 | 
						depends on TPM1 || TPM2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config MAINBOARD_HAS_TPM1
 | 
					config MAINBOARD_HAS_TPM1
 | 
				
			||||||
	bool
 | 
						bool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
 | 
					/* SPDX-License-Identifier: GPL-2.0-only */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if CONFIG(TPM1) || CONFIG(TPM2)
 | 
					#if CONFIG(TPM)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Start of the root of trust */
 | 
					/* Start of the root of trust */
 | 
				
			||||||
uint32_t vboot_setup_tpm(struct vb2_context *ctx);
 | 
					uint32_t vboot_setup_tpm(struct vb2_context *ctx);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user