SPDX: Convert all of our single license tags to Linux Kernel style
[oweals/u-boot.git] / drivers / phy / marvell / comphy_core.c
index ab0b2a800cfca42c7ef419db64cfccda67bcb650..17ab39c5d0210e78fa6de511a42a76b826c71474 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2015-2016 Marvell International Ltd.
  *
  * Copyright (C) 2016 Stefan Roese <sr@denx.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -113,11 +112,11 @@ static int comphy_probe(struct udevice *dev)
        static int current_idx;
 
        /* Save base addresses for later use */
-       chip_cfg->comphy_base_addr = (void *)dev_get_addr_index(dev, 0);
+       chip_cfg->comphy_base_addr = (void *)devfdt_get_addr_index(dev, 0);
        if (IS_ERR(chip_cfg->comphy_base_addr))
                return PTR_ERR(chip_cfg->comphy_base_addr);
 
-       chip_cfg->hpipe3_base_addr = (void *)dev_get_addr_index(dev, 1);
+       chip_cfg->hpipe3_base_addr = (void *)devfdt_get_addr_index(dev, 1);
        if (IS_ERR(chip_cfg->hpipe3_base_addr))
                return PTR_ERR(chip_cfg->hpipe3_base_addr);
 
@@ -135,10 +134,10 @@ static int comphy_probe(struct udevice *dev)
                return -EINVAL;
        }
 
-       if (of_device_is_compatible(dev, "marvell,comphy-armada-3700"))
+       if (device_is_compatible(dev, "marvell,comphy-armada-3700"))
                chip_cfg->ptr_comphy_chip_init = comphy_a3700_init;
 
-       if (of_device_is_compatible(dev, "marvell,comphy-cp110"))
+       if (device_is_compatible(dev, "marvell,comphy-cp110"))
                chip_cfg->ptr_comphy_chip_init = comphy_cp110_init;
 
        /*
@@ -174,13 +173,13 @@ static int comphy_probe(struct udevice *dev)
                lane++;
        }
 
-       /* Save comphy index for MultiCP devices (A8K) */
-       chip_cfg->comphy_index = current_idx++;
+       /* Save CP index for MultiCP devices (A8K) */
+       chip_cfg->cp_index = current_idx++;
        /* PHY power UP sequence */
        chip_cfg->ptr_comphy_chip_init(chip_cfg, comphy_map_data);
        /* PHY print SerDes status */
        if (of_machine_is_compatible("marvell,armada8040"))
-               printf("Comphy chip #%d:\n", chip_cfg->comphy_index);
+               printf("Comphy chip #%d:\n", chip_cfg->cp_index);
        comphy_print(chip_cfg, comphy_map_data);
 
        /*
@@ -189,7 +188,7 @@ static int comphy_probe(struct udevice *dev)
        if (of_machine_is_compatible("marvell,armada8040"))
                last_idx = 1;
 
-       if (chip_cfg->comphy_index == last_idx) {
+       if (chip_cfg->cp_index == last_idx) {
                /* Initialize dedicated PHYs (not muxed SerDes lanes) */
                comphy_dedicated_phys_init();
        }