diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-23 08:11:30 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-01-05 12:24:41 -0700 |
commit | 8b842be10c2d40437b1f24a8dce8718c33045376 (patch) | |
tree | d92e428e1be0982f160823d685b9feb218cece85 /drivers | |
parent | 5e89be1efd4fb4633875f99b1dbe095ff4787c98 (diff) | |
download | u-boot-8b842be10c2d40437b1f24a8dce8718c33045376.tar.gz |
x86: apl: Reduce size for TPL
Update various drivers to use of_match_ptr() and to avoid including debug
strings in TPL. Omit the WiFi driver entirely, since it is not used in
TPL.
This reduces the TPL binary size by about 608 bytes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/intel_gpio.c | 4 | ||||
-rw-r--r-- | drivers/pinctrl/intel/pinctrl_apl.c | 4 | ||||
-rw-r--r-- | drivers/power/acpi_pmc/acpi-pmc-uclass.c | 4 | ||||
-rw-r--r-- | drivers/timer/tsc_timer.c | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c index 41540d8ebc..eda95485c9 100644 --- a/drivers/gpio/intel_gpio.c +++ b/drivers/gpio/intel_gpio.c @@ -188,15 +188,17 @@ static const struct dm_gpio_ops gpio_intel_ops = { #endif }; +#if !CONFIG_IS_ENABLED(OF_PLATDATA) static const struct udevice_id intel_intel_gpio_ids[] = { { .compatible = "intel,gpio" }, { } }; +#endif U_BOOT_DRIVER(intel_gpio) = { .name = "intel_gpio", .id = UCLASS_GPIO, - .of_match = intel_intel_gpio_ids, + .of_match = of_match_ptr(intel_intel_gpio_ids), .ops = &gpio_intel_ops, .of_to_plat = intel_gpio_of_to_plat, .probe = intel_gpio_probe, diff --git a/drivers/pinctrl/intel/pinctrl_apl.c b/drivers/pinctrl/intel/pinctrl_apl.c index 2bb654c8a1..b512a85f3e 100644 --- a/drivers/pinctrl/intel/pinctrl_apl.c +++ b/drivers/pinctrl/intel/pinctrl_apl.c @@ -167,15 +167,17 @@ static int apl_pinctrl_of_to_plat(struct udevice *dev) return intel_pinctrl_of_to_plat(dev, comm, 2); } +#if !CONFIG_IS_ENABLED(OF_PLATDATA) static const struct udevice_id apl_gpio_ids[] = { { .compatible = "intel,apl-pinctrl"}, { } }; +#endif U_BOOT_DRIVER(intel_apl_pinctrl) = { .name = "intel_apl_pinctrl", .id = UCLASS_PINCTRL, - .of_match = apl_gpio_ids, + .of_match = of_match_ptr(apl_gpio_ids), .probe = intel_pinctrl_probe, .ops = &intel_pinctrl_ops, #if !CONFIG_IS_ENABLED(OF_PLATDATA) diff --git a/drivers/power/acpi_pmc/acpi-pmc-uclass.c b/drivers/power/acpi_pmc/acpi-pmc-uclass.c index 32a2836f0b..34446a34e6 100644 --- a/drivers/power/acpi_pmc/acpi-pmc-uclass.c +++ b/drivers/power/acpi_pmc/acpi-pmc-uclass.c @@ -8,6 +8,7 @@ #include <common.h> #include <dm.h> #include <log.h> +#include <spl.h> #include <acpi/acpi_s3.h> #ifdef CONFIG_X86 #include <asm/intel_pinctrl.h> @@ -60,7 +61,8 @@ int pmc_gpe_init(struct udevice *dev) * are different and if they aren't, use the reset values. */ if (dw[0] == dw[1] || dw[1] == dw[2]) { - log_info("PMC: Using default GPE route"); + if (spl_phase() > PHASE_TPL) + log_info("PMC: Using default GPE route"); gpio_cfg = readl(upriv->gpe_cfg); for (i = 0; i < upriv->gpe0_count; i++) dw[i] = gpio_cfg >> gpe0_shift(upriv, i); diff --git a/drivers/timer/tsc_timer.c b/drivers/timer/tsc_timer.c index e3677704b3..706d52b830 100644 --- a/drivers/timer/tsc_timer.c +++ b/drivers/timer/tsc_timer.c @@ -477,15 +477,17 @@ static const struct timer_ops tsc_timer_ops = { .get_count = tsc_timer_get_count, }; +#if !CONFIG_IS_ENABLED(OF_PLATDATA) static const struct udevice_id tsc_timer_ids[] = { { .compatible = "x86,tsc-timer", }, { } }; +#endif U_BOOT_DRIVER(x86_tsc_timer) = { .name = "x86_tsc_timer", .id = UCLASS_TIMER, - .of_match = tsc_timer_ids, + .of_match = of_match_ptr(tsc_timer_ids), .probe = tsc_timer_probe, .ops = &tsc_timer_ops, }; |