]> Git Repo - u-boot.git/blobdiff - drivers/cpu/bmips_cpu.c
Merge tag 'dm-pull-14dec20' of git://git.denx.de/u-boot-dm into next
[u-boot.git] / drivers / cpu / bmips_cpu.c
index fc047473f5bc9eb163813ee5d90ee894e3394588..172bc9980f6bb9a11ec061b194759c170f6765dc 100644 (file)
@@ -11,7 +11,9 @@
 #include <cpu.h>
 #include <dm.h>
 #include <errno.h>
+#include <init.h>
 #include <asm/io.h>
+#include <linux/bitops.h>
 
 #define REV_CHIPID_SHIFT               16
 #define REV_CHIPID_MASK                        (0xffff << REV_CHIPID_SHIFT)
@@ -377,7 +379,7 @@ static const struct bmips_cpu_hw bmips_cpu_bcm6838 = {
 };
 
 /* Generic CPU Ops */
-static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
+static int bmips_cpu_get_desc(const struct udevice *dev, char *buf, int size)
 {
        struct bmips_cpu_priv *priv = dev_get_priv(dev);
        const struct bmips_cpu_hw *hw = priv->hw;
@@ -385,7 +387,7 @@ static int bmips_cpu_get_desc(struct udevice *dev, char *buf, int size)
        return hw->get_cpu_desc(priv, buf, size);
 }
 
-static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
+static int bmips_cpu_get_info(const struct udevice *dev, struct cpu_info *info)
 {
        struct bmips_cpu_priv *priv = dev_get_priv(dev);
        const struct bmips_cpu_hw *hw = priv->hw;
@@ -398,7 +400,7 @@ static int bmips_cpu_get_info(struct udevice *dev, struct cpu_info *info)
        return 0;
 }
 
-static int bmips_cpu_get_count(struct udevice *dev)
+static int bmips_cpu_get_count(const struct udevice *dev)
 {
        struct bmips_cpu_priv *priv = dev_get_priv(dev);
        const struct bmips_cpu_hw *hw = priv->hw;
@@ -406,7 +408,7 @@ static int bmips_cpu_get_count(struct udevice *dev)
        return hw->get_cpu_count(priv);
 }
 
-static int bmips_cpu_get_vendor(struct udevice *dev, char *buf, int size)
+static int bmips_cpu_get_vendor(const struct udevice *dev, char *buf, int size)
 {
        snprintf(buf, size, "Broadcom");
 
@@ -423,7 +425,7 @@ static const struct cpu_ops bmips_cpu_ops = {
 /* BMIPS CPU driver */
 int bmips_cpu_bind(struct udevice *dev)
 {
-       struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+       struct cpu_plat *plat = dev_get_parent_plat(dev);
 
        plat->cpu_id = dev_read_u32_default(dev, "reg", -1);
        plat->device_id = read_c0_prid();
@@ -487,7 +489,7 @@ U_BOOT_DRIVER(bmips_cpu_drv) = {
        .of_match = bmips_cpu_ids,
        .bind = bmips_cpu_bind,
        .probe = bmips_cpu_probe,
-       .priv_auto_alloc_size = sizeof(struct bmips_cpu_priv),
+       .priv_auto      = sizeof(struct bmips_cpu_priv),
        .ops = &bmips_cpu_ops,
        .flags = DM_FLAG_PRE_RELOC,
 };
This page took 0.02366 seconds and 4 git commands to generate.