]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
treewide: Use OF_REAL instead of !OF_PLATDATA
authorSimon Glass <sjg@chromium.org>
Sat, 7 Aug 2021 13:24:04 +0000 (07:24 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 25 Sep 2021 15:46:15 +0000 (09:46 -0600)
Now that we have a 'positive' Kconfig option, use this instead of the
negative one, which is harder to understand.

Signed-off-by: Simon Glass <sjg@chromium.org>
63 files changed:
arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
arch/arm/mach-rockchip/rk3568/syscon_rk3568.c
arch/x86/cpu/apollolake/hostbridge.c
arch/x86/cpu/apollolake/lpc.c
arch/x86/cpu/apollolake/pch.c
arch/x86/cpu/apollolake/pmc.c
arch/x86/cpu/apollolake/uart.c
arch/x86/cpu/intel_common/itss.c
arch/x86/cpu/intel_common/p2sb.c
arch/x86/lib/tpl.c
board/google/chromebook_coral/coral.c
board/sandbox/sandbox.c
doc/develop/driver-model/of-plat.rst
drivers/clk/clk_fixed_factor.c
drivers/clk/clk_fixed_rate.c
drivers/clk/rockchip/clk_rk3188.c
drivers/clk/rockchip/clk_rk3288.c
drivers/clk/rockchip/clk_rk3368.c
drivers/clk/rockchip/clk_rk3399.c
drivers/core/simple-bus.c
drivers/core/syscon-uclass.c
drivers/core/util.c
drivers/gpio/gpio-uclass.c
drivers/gpio/intel_gpio.c
drivers/gpio/omap_gpio.c
drivers/i2c/i2c-emul-uclass.c
drivers/misc/cros_ec.c
drivers/misc/p2sb-uclass.c
drivers/mmc/fsl_esdhc_imx.c
drivers/mmc/ftsdc010_mci.c
drivers/mmc/rockchip_dw_mmc.c
drivers/pinctrl/intel/pinctrl_apl.c
drivers/pinctrl/nxp/pinctrl-mxs.c
drivers/pinctrl/pinctrl-uclass.c
drivers/pinctrl/rockchip/pinctrl-px30.c
drivers/pinctrl/rockchip/pinctrl-rk3036.c
drivers/pinctrl/rockchip/pinctrl-rk3128.c
drivers/pinctrl/rockchip/pinctrl-rk3188.c
drivers/pinctrl/rockchip/pinctrl-rk322x.c
drivers/pinctrl/rockchip/pinctrl-rk3288.c
drivers/pinctrl/rockchip/pinctrl-rk3308.c
drivers/pinctrl/rockchip/pinctrl-rk3328.c
drivers/pinctrl/rockchip/pinctrl-rk3368.c
drivers/pinctrl/rockchip/pinctrl-rk3399.c
drivers/pinctrl/rockchip/pinctrl-rv1108.c
drivers/ram/rockchip/dmc-rk3368.c
drivers/ram/rockchip/sdram_rk3188.c
drivers/ram/rockchip/sdram_rk322x.c
drivers/ram/rockchip/sdram_rk3288.c
drivers/ram/rockchip/sdram_rk3328.c
drivers/ram/rockchip/sdram_rk3399.c
drivers/rtc/rtc-uclass.c
drivers/serial/sandbox.c
drivers/serial/serial_mt7620.c
drivers/spi/ich.c
drivers/spi/pl022_spi.c
drivers/spi/rk_spi.c
drivers/spi/spi-uclass.c
drivers/sysreset/sysreset_sandbox.c
drivers/timer/rockchip_timer.c
drivers/timer/timer-uclass.c
drivers/timer/tsc_timer.c
include/dm/device.h

index b360ca7ddef004ce27a2e92044471bc19162f9fc..2b5746cb31bba2e0b6ec8932de4d2e11481fe615 100644 (file)
@@ -21,7 +21,7 @@ static const struct udevice_id rk3399_syscon_ids[] = {
 U_BOOT_DRIVER(syscon_rk3399) = {
        .name = "rk3399_syscon",
        .id = UCLASS_SYSCON,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind = dm_scan_fdt_dev,
 #endif
        .of_match = rk3399_syscon_ids,
index 20adfd11690fc68bb45c07b776d5bc6c50628c9d..5407e7827f5234fa999106199ea9dc91ca5e3a06 100644 (file)
@@ -18,7 +18,7 @@ U_BOOT_DRIVER(syscon_rk3568) = {
        .name = "rk3568_syscon",
        .id = UCLASS_SYSCON,
        .of_match = rk3568_syscon_ids,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind = dm_scan_fdt_dev,
 #endif
 };
index 9decab7aa332f18f70ac9a3334c8f7a9262f7114..2405dec8525b1af4e3d5aa93164844b4a833de62 100644 (file)
@@ -220,7 +220,7 @@ static int apl_hostbridge_of_to_plat(struct udevice *dev)
        ret = uclass_first_device_err(UCLASS_PINCTRL, &pinctrl);
        if (ret)
                return log_msg_ret("no hostbridge PINCTRL", ret);
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        int root;
 
        /* Get length of PCI Express Region */
@@ -375,7 +375,7 @@ struct acpi_ops apl_hostbridge_acpi_ops = {
 #endif
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id apl_hostbridge_ids[] = {
        { .compatible = "intel,apl-hostbridge" },
        { }
index e085890d638d766e664bc1497a8c4e3018bded7c..4be6366f0438fcfc807dd9ce94109194e58e4c98 100644 (file)
@@ -128,7 +128,7 @@ struct acpi_ops apl_lpc_acpi_ops = {
        .inject_dsdt    = southbridge_inject_dsdt,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id apl_lpc_ids[] = {
        { .compatible = "intel,apl-lpc" },
        { }
index 39d6ad5ed49aa39aaeb9417dc13cb7991fc292ce..a0f9b031dea31d74f129ec3c0e2249648f595bfd 100644 (file)
@@ -23,7 +23,7 @@ static const struct pch_ops apl_pch_ops = {
        .set_spi_protect = apl_set_spi_protect,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id apl_pch_ids[] = {
        { .compatible = "intel,apl-pch" },
        { }
index 1d21187c96d23926a201ec6de52e342632e1d230..163119e2e9e9c706d088f9fb17576bb3047cf43b 100644 (file)
@@ -107,7 +107,7 @@ int apl_pmc_ofdata_to_uc_plat(struct udevice *dev)
        struct acpi_pmc_upriv *upriv = dev_get_uclass_priv(dev);
        struct apl_pmc_plat *plat = dev_get_plat(dev);
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        u32 base[6];
        int size;
        int ret;
@@ -206,7 +206,7 @@ static const struct acpi_pmc_ops apl_pmc_ops = {
        .global_reset_set_enable = apl_global_reset_set_enable,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id apl_pmc_ids[] = {
        { .compatible = "intel,apl-pmc" },
        { }
index 876fa592b8d999a3c13ff10cdbba96121764e6c3..a9362436000cd1e90c12f6c27e7bce2ea88027e1 100644 (file)
@@ -123,7 +123,7 @@ static int apl_ns16550_of_to_plat(struct udevice *dev)
        return 0;
 }
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id apl_ns16550_serial_ids[] = {
        { .compatible = "intel,apl-ns16550" },
        { },
index 1eff0309831432ac0735b03072ea93b9ac3e3979..ec73b3d89312adc5d1d4b08e28b1dc0d63841dc4 100644 (file)
@@ -213,7 +213,7 @@ static const struct irq_ops itss_ops = {
 #endif
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id itss_ids[] = {
        { .compatible = "intel,itss", .data = X86_IRQT_ITSS },
        { }
index d73ae438bbb07f4de7c6f888d0c269c16fb5dca1..5dc816396e57d435e1de6360f1a28063af2126a7 100644 (file)
@@ -88,7 +88,7 @@ int p2sb_of_to_plat(struct udevice *dev)
        struct p2sb_uc_priv *upriv = dev_get_uclass_priv(dev);
        struct p2sb_plat *plat = dev_get_plat(dev);
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        int ret;
        u32 base[2];
 
@@ -159,7 +159,7 @@ static int p2sb_remove(struct udevice *dev)
 
 static int p2sb_child_post_bind(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct p2sb_child_plat *pplat = dev_get_parent_plat(dev);
        int ret;
        u32 pid;
@@ -177,7 +177,7 @@ static const struct p2sb_ops p2sb_ops = {
        .set_hide       = intel_p2sb_set_hide,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id p2sb_ids[] = {
        { .compatible = "intel,p2sb" },
        { }
index b3e5f9c9138a46ce4702670a57482a479ea96b48..5b57e53c2ddf1b1db37e41b25f8f7519777eb5af 100644 (file)
@@ -139,7 +139,7 @@ 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)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id tpl_fake_pci_ids[] = {
        { .compatible = "pci-x86" },
        { }
index 85cba50d4e5c11cc50cffd11b1c688d9d5cd1c1a..53c5171d02b4e91f935e2455181a27e0e7e7e220 100644 (file)
@@ -300,7 +300,7 @@ struct sysinfo_ops coral_sysinfo_ops = {
        .get_str        = coral_get_str,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id coral_ids[] = {
        { .compatible = "google,coral" },
        { }
index dcd73451a34876d744f7a77353a12bddd8989c63..5d9a945d64c0d27e7feffbbe250f2c1a2ae5ae2a 100644 (file)
 gd_t *gd;
 
 #if !CONFIG_IS_ENABLED(OF_PLATDATA)
-/* Add a simple GPIO device */
+/*
+ * Add a simple GPIO device (don't use with of-platdata as it interferes with
+ * the auto-generated devices)
+ */
 U_BOOT_DRVINFO(gpio_sandbox) = {
        .name = "sandbox_gpio",
 };
index 0bd978759c78e17a999f4f383c950b34320c4792..8b16f553017f87c157624b360bdd870761304f58 100644 (file)
@@ -215,7 +215,7 @@ For example:
 
     static int mmc_of_to_plat(struct udevice *dev)
     {
-    #if !CONFIG_IS_ENABLED(OF_PLATDATA)
+    #if CONFIG_IS_ENABLED(OF_REAL)
             /* Decode the devicetree data */
             struct mmc_plat *plat = dev_get_plat(dev);
             const void *blob = gd->fdt_blob;
index e51f94a937108d84e62b02d74481c94af28e9b69..04871b4744de467b4b6874c1dfc0c0b05f00ad00 100644 (file)
@@ -40,7 +40,7 @@ const struct clk_ops clk_fixed_factor_ops = {
 
 static int clk_fixed_factor_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        int err;
        struct clk_fixed_factor *ff = to_clk_fixed_factor(dev);
 
index 325a9b2dcfb07dea945f2b6b33a7ee8743644008..d0f25941d0a964e3796960f8c68aabb6a2037cfe 100644 (file)
@@ -32,7 +32,7 @@ void clk_fixed_rate_ofdata_to_plat_(struct udevice *dev,
                                    struct clk_fixed_rate *plat)
 {
        struct clk *clk = &plat->clk;
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        plat->fixed_rate = dev_read_u32_default(dev, "clock-frequency", 0);
 #endif
        /* Make fixed rate clock accessible from higher level struct clk */
index 1b62d8d2898be7aad3da436fd49b6db6d4f29f17..1751672f640cce8a5785f89ffe644a0f16d9f6c2 100644 (file)
@@ -540,7 +540,7 @@ static struct clk_ops rk3188_clk_ops = {
 
 static int rk3188_clk_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3188_clk_priv *priv = dev_get_priv(dev);
 
        priv->cru = dev_read_addr_ptr(dev);
index e61bd6f1bf655fb8cf141087201bf537ff9beaa5..ee222217a536c65e53dba5d8ff236fe943bee6bf 100644 (file)
@@ -957,7 +957,7 @@ static struct clk_ops rk3288_clk_ops = {
 
 static int rk3288_clk_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3288_clk_priv *priv = dev_get_priv(dev);
 
        priv->cru = dev_read_addr_ptr(dev);
index a0887b50a13b2f6c4d35862c326492e39d5961d7..d0d0046eb1e26fdddea26e2e73620825e96fe6ca 100644 (file)
@@ -596,7 +596,7 @@ static int rk3368_clk_probe(struct udevice *dev)
 
 static int rk3368_clk_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3368_clk_priv *priv = dev_get_priv(dev);
 
        priv->cru = dev_read_addr_ptr(dev);
index 75b6fbfc1b1eaf021ac02596dcf476653e125071..209c726a4de4602502dbb5fd4af6ac2cdafb6973 100644 (file)
@@ -1402,7 +1402,7 @@ static int rk3399_clk_probe(struct udevice *dev)
 
 static int rk3399_clk_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3399_clk_priv *priv = dev_get_priv(dev);
 
        priv->cru = dev_read_addr_ptr(dev);
@@ -1614,7 +1614,7 @@ static int rk3399_pmuclk_probe(struct udevice *dev)
 
 static int rk3399_pmuclk_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
 
        priv->pmucru = dev_read_addr_ptr(dev);
index abc55c217197b5df23a1d057f30073c1634c7f6b..6022e7514e0e99ebda831a5724a2eb877a7ff9f5 100644 (file)
@@ -65,7 +65,7 @@ UCLASS_DRIVER(simple_bus) = {
        .per_device_plat_auto   = sizeof(struct simple_bus_plat),
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id generic_simple_bus_ids[] = {
        { .compatible = "simple-bus" },
        { .compatible = "simple-mfd" },
index cb33facc7138939ad44e70f2c95c7401f2fd8b69..25fdb66eaa07154ae53dc46960d9e3e1696678d1 100644 (file)
@@ -186,7 +186,7 @@ static const struct udevice_id generic_syscon_ids[] = {
 U_BOOT_DRIVER(generic_syscon) = {
        .name   = "syscon",
        .id     = UCLASS_SYSCON,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .of_match = generic_syscon_ids,
index 5be4ee79deb99bfb7c95ca56c671ec36b2667c92..aa60fdd15bc4b1ed9ba55c013f234d9caf5a3b2c 100644 (file)
@@ -22,7 +22,7 @@ int list_count_items(struct list_head *head)
        return count;
 }
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 int pci_get_devfn(struct udevice *dev)
 {
        struct fdt_pci_addr addr;
index 8c77777dbe3b6ca1724ee70536900c7ca10c47ac..e0d3ae6f8cf86cbd00c04d609dce49986c0197cc 100644 (file)
@@ -1137,7 +1137,7 @@ err:
        return ret;
 }
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static int _gpio_request_by_name_nodev(ofnode node, const char *list_name,
                                       int index, struct gpio_desc *desc,
                                       int flags, bool add_index)
index f15ce7b59eeae8e0ffdae49c3b9179dff79b4758..4a3ec6d6350230ae36a8a870cedb0a088d81a889 100644 (file)
@@ -204,7 +204,7 @@ static const struct dm_gpio_ops gpio_intel_ops = {
 #endif
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id intel_intel_gpio_ids[] = {
        { .compatible = "intel,gpio" },
        { }
index eee36458d5a034ac74f17c85a8b2d9b26a78ed14..50c4f75ddf5db592bebe735c0bb73e75b444e28e 100644 (file)
@@ -362,7 +362,7 @@ U_BOOT_DRIVER(gpio_omap) = {
        .name   = "gpio_omap",
        .id     = UCLASS_GPIO,
 #if CONFIG_IS_ENABLED(OF_CONTROL)
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .of_match = omap_gpio_ids,
        .of_to_plat = of_match_ptr(omap_gpio_of_to_plat),
        .plat_auto      = sizeof(struct omap_gpio_plat),
index aeec6aa9fa66bbf1419080e1364b25d4332824f1..1107cf309fcea14755986610fd40e1f07db7058d 100644 (file)
@@ -79,7 +79,7 @@ UCLASS_DRIVER(i2c_emul) = {
 UCLASS_DRIVER(i2c_emul_parent) = {
        .id             = UCLASS_I2C_EMUL_PARENT,
        .name           = "i2c_emul_parent",
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .post_bind      = dm_scan_fdt_dev,
 #endif
 };
index 2a15094d20a6c1ef4d54c64bff67a980219a7d61..1bbc0f98ae838c10ad01dd75d1802bd89bb13c98 100644 (file)
@@ -1671,7 +1671,7 @@ UCLASS_DRIVER(cros_ec) = {
        .id             = UCLASS_CROS_EC,
        .name           = "cros-ec",
        .per_device_auto        = sizeof(struct cros_ec_dev),
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .post_bind      = dm_scan_fdt_dev,
 #endif
        .flags          = DM_UC_FLAG_ALLOC_PRIV_DMA,
index 94d273de9b3f3d19fbe8decfc845263fd0eb670d..98d58b37c28ce5552589b69656d6b39d151f96a6 100644 (file)
@@ -183,7 +183,7 @@ int p2sb_set_port_id(struct udevice *dev, int portid)
 
 static int p2sb_child_post_bind(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct p2sb_child_plat *pplat = dev_get_parent_plat(dev);
        int ret;
        u32 pid;
index aabf39535f9ff4d18ed9bc9ed269d6e1c1f477c8..2f6156e039cc8a70665a41a028d3e90693831596 100644 (file)
@@ -1411,7 +1411,7 @@ __weak void init_clk_usdhc(u32 index)
 
 static int fsl_esdhc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct fsl_esdhc_priv *priv = dev_get_priv(dev);
 #if CONFIG_IS_ENABLED(DM_REGULATOR)
        struct udevice *vqmmc_dev;
@@ -1598,7 +1598,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
                return ret;
        }
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        ret = mmc_of_parse(dev, &plat->cfg);
        if (ret)
                return ret;
index 0fa037224fbe80e7be8ee6f6fdbc6f4f75799aea..221fba313d3de110fed8d89c94b803bb80b080ce 100644 (file)
@@ -392,7 +392,7 @@ static void ftsdc_setup_cfg(struct mmc_config *cfg, const char *name, int buswid
 
 static int ftsdc010_mmc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct ftsdc_priv *priv = dev_get_priv(dev);
        struct ftsdc010_chip *chip = &priv->chip;
        chip->name = dev->name;
index d7d5361fd50b29c535f83185a40e475f053e7352..fa297a0bc98a7bfff253a16e0be7abfaaed571e8 100644 (file)
@@ -52,7 +52,7 @@ static uint rockchip_dwmmc_get_mmc_clk(struct dwmci_host *host, uint freq)
 
 static int rockchip_dwmmc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rockchip_dwmmc_priv *priv = dev_get_priv(dev);
        struct dwmci_host *host = &priv->host;
 
index acaa55d2e7fe030a2336dd82ffe227274359c122..181a6ff27026c74d24634f25de4c7a61ca2fc554 100644 (file)
@@ -155,7 +155,7 @@ 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)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id apl_gpio_ids[] = {
        { .compatible = "intel,apl-pinctrl"},
        { }
@@ -168,7 +168,7 @@ U_BOOT_DRIVER(intel_apl_pinctrl) = {
        .of_match       = of_match_ptr(apl_gpio_ids),
        .probe          = intel_pinctrl_probe,
        .ops            = &intel_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .of_to_plat = apl_pinctrl_of_to_plat,
index e6b10a377b6c12f65b8f405546e4e974dfb4f2f9..9a54b8bbe9028311dd1ee087864aac368a61a3f8 100644 (file)
@@ -186,7 +186,7 @@ U_BOOT_DRIVER(fsl_imx23_pinctrl) = {
        .id = UCLASS_PINCTRL,
        .of_match = of_match_ptr(mxs_pinctrl_match),
        .probe = mxs_pinctrl_probe,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .priv_auto      = sizeof(struct mxs_pinctrl_priv),
index dfe60b6dadb29b3867f269d13c381bb229734ff0..4462ed20e2d36941f83031b5add8fb0299270277 100644 (file)
@@ -421,7 +421,7 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev)
 
 UCLASS_DRIVER(pinctrl) = {
        .id = UCLASS_PINCTRL,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .post_bind = pinctrl_post_bind,
 #endif
        .flags = DM_UC_FLAG_SEQ_ALIAS,
index 6058d0f4c13f4455d963c16aa27da03381f7514a..9de29c0b8b4332eafccb997c957252561454cf41 100644 (file)
@@ -363,7 +363,7 @@ U_BOOT_DRIVER(pinctrl_px30) = {
        .of_match       = px30_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index 9ccee465b0f38be8374a94dfcce95d3f41abf9d3..afcd34396e277e4e770dd2fd2c91926e6a514558 100644 (file)
@@ -103,7 +103,7 @@ U_BOOT_DRIVER(pinctrl_rockchip) = {
        .of_match       = rk3036_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index 85c2e611b6b21f1a09fceffbadacd930c8b6f656..e6dc1af86e960524f27cfae00fc4b6cc2d057326 100644 (file)
@@ -205,7 +205,7 @@ U_BOOT_DRIVER(pinctrl_rk3128) = {
        .of_match       = rk3128_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index 06d53e22d27d649c3588fdd2ed6e6350325ceb65..9a982cbfad9ced0207080f7868b2e553364ecc78 100644 (file)
@@ -126,7 +126,7 @@ U_BOOT_DRIVER(rockchip_rk3188_pinctrl) = {
        .of_match       = rk3188_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index fe386933c585670288c8998e8b803dad9f8d8b74..7c58f40d93db86755934093e0bf59b93d62833f8 100644 (file)
@@ -292,7 +292,7 @@ U_BOOT_DRIVER(pinctrl_rk3228) = {
        .of_match       = rk3228_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index fc2810248ba1f50ab3055cba162a0bddd3569312..5894f47f534b1c314fe04165482f623982e826b0 100644 (file)
@@ -248,7 +248,7 @@ U_BOOT_DRIVER(rockchip_rk3288_pinctrl) = {
        .of_match       = rk3288_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index a9b87b745718a2719e83a82a3fe161af066658ae..83186f40f6f089d2bfb04b771f0af56cc2417d28 100644 (file)
@@ -459,7 +459,7 @@ U_BOOT_DRIVER(pinctrl_rk3308) = {
        .of_match       = rk3308_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index aa8bd76d6fb5496f33d3729f3c34120124819f2f..1c3c5986a50458252ab0b5287400503c1f736d24 100644 (file)
@@ -323,7 +323,7 @@ U_BOOT_DRIVER(rockchip_rk3328_pinctrl) = {
        .of_match       = rk3328_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index 18d3e3a9b5c55b6fa69188398505e4bfbe2fc9d5..ba867a891748741f788705b0bc94b1bf58b6f7d9 100644 (file)
@@ -177,7 +177,7 @@ U_BOOT_DRIVER(rockchip_rk3368_pinctrl) = {
        .of_match       = rk3368_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index 0c1adc379465f9679244739251015883580036b2..caa92200c6eb9c36d5474b0585479663e70dbc24 100644 (file)
@@ -317,7 +317,7 @@ U_BOOT_DRIVER(pinctrl_rk3399) = {
        .of_match       = rk3399_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index d35425b5fa2a69c287670fa3c897deee1e1afaa4..5b70b503d2b12381194c1aa254c45c9b29eb3b19 100644 (file)
@@ -291,7 +291,7 @@ U_BOOT_DRIVER(pinctrl_rv1108) = {
        .of_match       = rv1108_pinctrl_ids,
        .priv_auto      = sizeof(struct rockchip_pinctrl_priv),
        .ops            = &rockchip_pinctrl_ops,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .bind           = dm_scan_fdt_dev,
 #endif
        .probe          = rockchip_pinctrl_probe,
index a9d051852a48b260073be21a526fe02db56132c4..5a72283dac2d162651f08e1a776857985b294b65 100644 (file)
@@ -883,7 +883,7 @@ static int rk3368_dmc_of_to_plat(struct udevice *dev)
 {
        int ret = 0;
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3368_sdram_params *plat = dev_get_plat(dev);
 
        ret = regmap_init_mem(dev_ofnode(dev), &plat->map);
index 25ae69e9acd1960b703a37aad7cf7cfa87d2c7a9..38d25c8b780fe7377c68cdcba43299a1be1ae825 100644 (file)
@@ -816,7 +816,7 @@ static int setup_sdram(struct udevice *dev)
 
 static int rk3188_dmc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3188_sdram_params *params = dev_get_plat(dev);
        int ret;
 
index 9057ccacd96e1fef2206bbd9ec8bcfa2c095b0b3..fd12008ed904abff007fe77d089615ba6571a868 100644 (file)
@@ -716,7 +716,7 @@ out:
 
 static int rk322x_dmc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk322x_sdram_params *params = dev_get_plat(dev);
        const void *blob = gd->fdt_blob;
        int node = dev_of_offset(dev);
index a933abf0d459e2bd26ef5f63e39a5bad755ecd30..2cb034f263fec47c9d1afc1f952dadefa667c076 100644 (file)
@@ -973,7 +973,7 @@ static int setup_sdram(struct udevice *dev)
 
 static int rk3288_dmc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3288_sdram_params *params = dev_get_plat(dev);
        int ret;
 
index 9af4c372d50b4f025282e2e3c6be4419c01fd74f..9c6798f816ac89b9a91b2de84e184fd06f15bf8a 100644 (file)
@@ -517,7 +517,7 @@ static int rk3328_dmc_init(struct udevice *dev)
        struct rockchip_dmc_plat *plat = dev_get_plat(dev);
        int ret;
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3328_sdram_params *params = &plat->sdram_params;
 #else
        struct dtd_rockchip_rk3328_dmc *dtplat = &plat->dtplat;
@@ -549,7 +549,7 @@ static int rk3328_dmc_init(struct udevice *dev)
 
 static int rk3328_dmc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rockchip_dmc_plat *plat = dev_get_plat(dev);
        int ret;
 
index a83a670b32203894957b3e4d1153164f07bcd5e8..c9631af2643763eff047904df890bde82f9fdf90 100644 (file)
@@ -3013,7 +3013,7 @@ static int sdram_init(struct dram_info *dram,
 
 static int rk3399_dmc_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rockchip_dmc_plat *plat = dev_get_plat(dev);
        int ret;
 
@@ -3068,7 +3068,7 @@ static int rk3399_dmc_init(struct udevice *dev)
        struct dram_info *priv = dev_get_priv(dev);
        struct rockchip_dmc_plat *plat = dev_get_plat(dev);
        int ret;
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rk3399_sdram_params *params = &plat->sdram_params;
 #else
        struct dtd_rockchip_rk3399_dmc *dtplat = &plat->dtplat;
index 321b8732ed9a238e9fd3050808631674f3ffd811..e5ae6ea4d5f3cf4aa55ed5c771c64f91e0f7db9e 100644 (file)
@@ -177,7 +177,7 @@ UCLASS_DRIVER(rtc) = {
        .name           = "rtc",
        .id             = UCLASS_RTC,
        .flags          = DM_UC_FLAG_SEQ_ALIAS,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .post_bind      = dm_scan_fdt_dev,
 #endif
 };
index 5243c955fbf41c273905e4368aeecb8a6268e169..dbbcea5bb4db8d64526db7543089aaa22c1f946f 100644 (file)
@@ -237,7 +237,7 @@ U_BOOT_DRIVER(sandbox_serial) = {
        .flags = DM_FLAG_PRE_RELOC,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct sandbox_serial_plat platdata_non_fdt = {
        .colour = -1,
 };
index 826a14b49f8b95ccf905dfda915ef017e9df77ef..76ecc2b38ce6e7c8e63aa9178a36e3f61bcdc529 100644 (file)
@@ -145,7 +145,7 @@ static int mt7620_serial_probe(struct udevice *dev)
        return 0;
 }
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static int mt7620_serial_of_to_plat(struct udevice *dev)
 {
        struct mt7620_serial_plat *plat = dev_get_plat(dev);
@@ -200,7 +200,7 @@ static const struct dm_serial_ops mt7620_serial_ops = {
 U_BOOT_DRIVER(serial_mt7620) = {
        .name = "serial_mt7620",
        .id = UCLASS_SERIAL,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .of_match = mt7620_serial_ids,
        .of_to_plat = mt7620_serial_of_to_plat,
 #endif
index 08d54e86f45d7d27f57159adcb3a37002a2435e3..42071bb70c4ef1a519c6baba82d4edbe30cd2795 100644 (file)
@@ -604,7 +604,7 @@ static int ich_spi_exec_op(struct spi_slave *slave, const struct spi_mem_op *op)
        return ret;
 }
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 /**
  * ich_spi_get_basics() - Get basic information about the ICH device
  *
@@ -672,7 +672,7 @@ static int ich_get_mmap_bus(struct udevice *bus, ulong *map_basep,
                            uint *map_sizep, uint *offsetp)
 {
        pci_dev_t spi_bdf;
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        if (device_is_on_pci_bus(bus)) {
                struct pci_child_plat *pplat;
 
@@ -940,7 +940,7 @@ static int ich_spi_of_to_plat(struct udevice *dev)
 {
        struct ich_spi_plat *plat = dev_get_plat(dev);
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct ich_spi_priv *priv = dev_get_priv(dev);
        int ret;
 
index 9856a5669ca134e46347e8b7ca2911d442d92af5..ea1691438be6efd9a1235807d97b4872dd3e27ac 100644 (file)
@@ -286,7 +286,7 @@ static const struct dm_spi_ops pl022_spi_ops = {
        .cs_info        = pl022_cs_info,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static int pl022_spi_of_to_plat(struct udevice *bus)
 {
        struct pl022_spi_pdata *plat = dev_get_plat(bus);
@@ -315,7 +315,7 @@ static const struct udevice_id pl022_spi_ids[] = {
 U_BOOT_DRIVER(pl022_spi) = {
        .name   = "pl022_spi",
        .id     = UCLASS_SPI,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .of_match = pl022_spi_ids,
        .of_to_plat = pl022_spi_of_to_plat,
 #endif
index 40bd8851b7c071ec6de2c777ebc1b931d21f40f5..e504e306fd74797ff2df6a18806fa62fc021ded2 100644 (file)
@@ -193,7 +193,7 @@ static int conv_of_plat(struct udevice *dev)
 
 static int rockchip_spi_of_to_plat(struct udevice *bus)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rockchip_spi_plat *plat = dev_get_plat(bus);
        struct rockchip_spi_priv *priv = dev_get_priv(bus);
        int ret;
index 5a2a74367877f6b65c1511d9238fd02d7aef0060..655fb1407aac4fd7d3f32788dd35aa79467aa85b 100644 (file)
@@ -162,7 +162,7 @@ int spi_write_then_read(struct spi_slave *slave, const u8 *opcode,
        return ret;
 }
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static int spi_child_post_bind(struct udevice *dev)
 {
        struct dm_spi_slave_plat *plat = dev_get_parent_plat(dev);
@@ -176,7 +176,7 @@ static int spi_child_post_bind(struct udevice *dev)
 
 static int spi_post_probe(struct udevice *bus)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct dm_spi_bus *spi = dev_get_uclass_priv(bus);
 
        spi->max_hz = dev_read_u32_default(bus, "spi-max-frequency", 0);
@@ -539,7 +539,7 @@ UCLASS_DRIVER(spi) = {
        .per_device_auto        = sizeof(struct dm_spi_bus),
        .per_child_auto = sizeof(struct spi_slave),
        .per_child_plat_auto    = sizeof(struct dm_spi_slave_plat),
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        .child_post_bind = spi_child_post_bind,
 #endif
 };
index 08685823e99dffe0f1eca3a6156a687ba5a79b41..0ee286cbb34f1f44f6b2565227e80ce4d85164c5 100644 (file)
@@ -133,7 +133,7 @@ U_BOOT_DRIVER(warm_sysreset_sandbox) = {
        .ops            = &sandbox_warm_sysreset_ops,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 /* This is here in case we don't have a device tree */
 U_BOOT_DRVINFO(sysreset_sandbox_non_fdt) = {
        .name = "sysreset_sandbox",
index 18c61450aff59a8677554ae2508187cbb92fd9e6..96621479105b63d33b441102593d3ded913942d6 100644 (file)
@@ -55,7 +55,7 @@ ulong timer_get_boot_us(void)
                /* The timer is available */
                rate = timer_get_rate(gd->timer);
                timer_get_count(gd->timer, &ticks);
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        } else if (ret == -EAGAIN) {
                /* We have been called so early that the DM is not ready,... */
                ofnode node = offset_to_ofnode(-1);
@@ -100,7 +100,7 @@ static u64 rockchip_timer_get_count(struct udevice *dev)
 
 static int rockchip_clk_of_to_plat(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct rockchip_timer_priv *priv = dev_get_priv(dev);
 
        priv->timer = dev_read_addr_ptr(dev);
index c8e8419b22e789a47bf218ef20310f4481c5616e..52bddb9654f0636bcf627da62f52f59e0487f767 100644 (file)
@@ -50,7 +50,7 @@ unsigned long notrace timer_get_rate(struct udevice *dev)
 
 static int timer_pre_probe(struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        struct timer_dev_priv *uc_priv = dev_get_uclass_priv(dev);
        struct clk timer_clk;
        int err;
@@ -136,7 +136,7 @@ int notrace dm_timer_init(void)
        if (gd->dm_root == NULL)
                return -EAGAIN;
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        /* Check for a chosen timer to be used for tick */
        node = ofnode_get_chosen_node("tick-timer");
 
index adef50c37440dacbeebe4e954f6a906405eb457a..192c7b71a5a386f6d7d62e47ca170b9747f90eff 100644 (file)
@@ -479,7 +479,7 @@ static const struct timer_ops tsc_timer_ops = {
        .get_count = tsc_timer_get_count,
 };
 
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
 static const struct udevice_id tsc_timer_ids[] = {
        { .compatible = "x86,tsc-timer", },
        { }
index 68986dd11e28eb2211764df5ee1045f769189865..fac99612086dc929fcb7c8e36c1c38ae17536c74 100644 (file)
@@ -181,7 +181,7 @@ struct udevice {
        u32 flags_;
 #endif
        int seq_;
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        ofnode node_;
 #endif
 #ifdef CONFIG_DEVRES
@@ -242,7 +242,7 @@ static inline void dev_bic_flags(struct udevice *dev, u32 bic)
  */
 static inline ofnode dev_ofnode(const struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        return dev->node_;
 #else
        return ofnode_null();
@@ -262,7 +262,7 @@ static inline ofnode dev_ofnode(const struct udevice *dev)
 
 static inline int dev_of_offset(const struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        return ofnode_to_offset(dev_ofnode(dev));
 #else
        return -1;
@@ -271,7 +271,7 @@ static inline int dev_of_offset(const struct udevice *dev)
 
 static inline bool dev_has_ofnode(const struct udevice *dev)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        return ofnode_valid(dev_ofnode(dev));
 #else
        return false;
@@ -280,7 +280,7 @@ static inline bool dev_has_ofnode(const struct udevice *dev)
 
 static inline void dev_set_ofnode(struct udevice *dev, ofnode node)
 {
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
        dev->node_ = node;
 #endif
 }