efi_loader: efi_variable_parse_signature() returns NULL on error
[oweals/u-boot.git] / drivers / phy / sti_usb_phy.c
index 88fcfbb3e5b9832c001d27babb1847f2620be343..ec597da84e3d335ff275965c617712d3bc85b322 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright (c) 2017
- * Patrice Chotard <patrice.chotard@st.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
+ * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
+ * Author(s): Patrice Chotard, <patrice.chotard@st.com> for STMicroelectronics.
  */
 
 #include <common.h>
@@ -12,7 +11,7 @@
 #include <errno.h>
 #include <fdtdec.h>
 #include <generic-phy.h>
-#include <libfdt.h>
+#include <linux/libfdt.h>
 #include <regmap.h>
 #include <reset-uclass.h>
 #include <syscon.h>
@@ -65,12 +64,12 @@ static int sti_usb_phy_init(struct phy *usb_phy)
        void __iomem *reg;
 
        /* set ctrl picophy value */
-       reg = (void __iomem *)phy->regmap->base + phy->ctrl;
+       reg = (void __iomem *)phy->regmap->ranges[0].start + phy->ctrl;
        /* CTRL_PORT mask is 0x1f */
        clrsetbits_le32(reg, 0x1f, STIH407_USB_PICOPHY_CTRL_PORT_CONF);
 
        /* set ports parameters overriding */
-       reg = (void __iomem *)phy->regmap->base + phy->param;
+       reg = (void __iomem *)phy->regmap->ranges[0].start + phy->param;
        /* PARAM_DEF mask is 0xffffffff */
        clrsetbits_le32(reg, 0xffffffff, STIH407_USB_PICOPHY_PARAM_DEF);