Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / x86 / cpu / broadwell / pinctrl_broadwell.c
index 2a3fcedd0dbc9de38e6311ad570a8a0ff46c078c..0ead13af62aaa950f86d67dd19a036eec5221c38 100644 (file)
@@ -1,13 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2016 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
 #include <fdtdec.h>
+#include <log.h>
 #include <pch.h>
 #include <pci.h>
 #include <asm/cpu.h>
@@ -17,6 +17,7 @@
 #include <asm/arch/gpio.h>
 #include <dt-bindings/gpio/x86-gpio.h>
 #include <dm/pinctrl.h>
+#include <dm/uclass-internal.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -51,7 +52,7 @@ static int broadwell_pinctrl_read_configs(struct udevice *dev,
        int node;
 
        debug("%s: starting\n", __func__);
-       for (node = fdt_first_subnode(blob, dev->of_offset);
+       for (node = fdt_first_subnode(blob, dev_of_offset(dev));
             node > 0;
             node = fdt_next_subnode(blob, node)) {
                int phandle = fdt_get_phandle(blob, node);
@@ -115,7 +116,7 @@ static int broadwell_pinctrl_read_pins(struct udevice *dev,
        int count = 0;
        int node;
 
-       for (node = fdt_first_subnode(blob, dev->of_offset);
+       for (node = fdt_first_subnode(blob, dev_of_offset(dev));
             node > 0;
             node = fdt_next_subnode(blob, node)) {
                int len, i;
@@ -215,7 +216,7 @@ static int broadwell_pinctrl_probe(struct udevice *dev)
        u32 gpiobase;
        int ret;
 
-       ret = uclass_first_device(UCLASS_PCH, &pch);
+       ret = uclass_find_first_device(UCLASS_PCH, &pch);
        if (ret)
                return ret;
        if (!pch)