From baa16e9c254b10b0a7963f197beabba5b544d41c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 5 Nov 2019 18:38:00 +0200 Subject: [PATCH] drivers/pc80/tpm: Replace __RAMSTAGE_ guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia6e161c3b4fc44292cdac692a2918c522680d60d Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/36631 Reviewed-by: Arthur Heymans Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/drivers/pc80/tpm/tis.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c index 5927377d15..1baab26b00 100644 --- a/src/drivers/pc80/tpm/tis.c +++ b/src/drivers/pc80/tpm/tis.c @@ -721,8 +721,6 @@ int tis_sendrecv(const uint8_t *sendbuf, size_t send_size, return tis_readresponse(recvbuf, recv_len); } -#ifdef __RAMSTAGE__ - /* * tis_setup_interrupt() * @@ -769,7 +767,7 @@ static void lpc_tpm_read_resources(struct device *dev) static void lpc_tpm_set_resources(struct device *dev) { tpm_config_t *config = (tpm_config_t *)dev->chip_info; - struct resource *res; + DEVTREE_CONST struct resource *res; for (res = dev->resource_list; res; res = res->next) { if (!(res->flags & IORESOURCE_ASSIGNED)) @@ -783,8 +781,10 @@ static void lpc_tpm_set_resources(struct device *dev) continue; } +#if !DEVTREE_EARLY res->flags |= IORESOURCE_STORED; report_resource_stored(dev, res, " "); +#endif } } @@ -973,8 +973,10 @@ static void lpc_tpm_fill_ssdt(struct device *dev) acpigen_pop_len(); /* Device */ acpigen_pop_len(); /* Scope */ +#if !DEVTREE_EARLY printk(BIOS_INFO, "%s.%s: %s %s\n", path, acpi_device_name(dev), dev->chip_ops->name, dev_path(dev)); +#endif } static const char *lpc_tpm_acpi_name(const struct device *dev) @@ -1006,5 +1008,3 @@ struct chip_operations drivers_pc80_tpm_ops = { CHIP_NAME("LPC TPM") .enable_dev = enable_dev }; - -#endif /* __RAMSTAGE__ */