diff mbox series

[v2,20/21] x86: tpl: Remove unwanted devicetree string

Message ID 20201223151133.2205985-13-sjg@chromium.org
State Accepted
Commit cee58bd2ad952d7c5421f8ec266f26e4c6d6a972
Delegated to: Simon Glass
Headers show
Series dm: Preparation for enhanced of-platdata (part B) | expand

Commit Message

Simon Glass Dec. 23, 2020, 3:11 p.m. UTC
Update this driver to use of_match_ptr().

This reduces the TPL binary size by about 32 bytes.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/x86/lib/tpl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Simon Glass Dec. 28, 2020, 4:25 p.m. UTC | #1
Update this driver to use of_match_ptr().

This reduces the TPL binary size by about 32 bytes.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 arch/x86/lib/tpl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 15b0212d190..04ff32277fd 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -133,14 +133,16 @@  void spl_board_init(void)
  * for devices, so the TPL BARs continue to be used. Once U-Boot starts it does
  * the auto allocation (after relocation).
  */
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
 static const struct udevice_id tpl_fake_pci_ids[] = {
 	{ .compatible = "pci-x86" },
 	{ }
 };
+#endif
 
 U_BOOT_DRIVER(pci_x86) = {
 	.name	= "pci_x86",
 	.id	= UCLASS_SIMPLE_BUS,
-	.of_match = tpl_fake_pci_ids,
+	.of_match = of_match_ptr(tpl_fake_pci_ids),
 };
 #endif