]> Git Repo - J-u-boot.git/blobdiff - drivers/cache/cache-v5l2.c
common: Drop asm/global_data.h from common header
[J-u-boot.git] / drivers / cache / cache-v5l2.c
index 1373e7c387d8bce94b5d9723d2df3ee0c9d3db39..2c7983d0ceafa16f6160abfc4faf8e8c5573ea6d 100644 (file)
@@ -9,8 +9,10 @@
 #include <cache.h>
 #include <dm.h>
 #include <hang.h>
+#include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/ofnode.h>
+#include <linux/bitops.h>
 
 struct l2cache {
        volatile u64    configure;
@@ -72,7 +74,7 @@ struct v5l2_plat {
 
 static int v5l2_enable(struct udevice *dev)
 {
-       struct v5l2_plat *plat = dev_get_platdata(dev);
+       struct v5l2_plat *plat = dev_get_plat(dev);
        volatile struct l2cache *regs = plat->regs;
 
        if (regs)
@@ -83,7 +85,7 @@ static int v5l2_enable(struct udevice *dev)
 
 static int v5l2_disable(struct udevice *dev)
 {
-       struct v5l2_plat *plat = dev_get_platdata(dev);
+       struct v5l2_plat *plat = dev_get_plat(dev);
        volatile struct l2cache *regs = plat->regs;
        u8 hart = gd->arch.boot_hart;
        void __iomem *cctlcmd = (void __iomem *)CCTL_CMD_REG(regs, hart);
@@ -103,9 +105,9 @@ static int v5l2_disable(struct udevice *dev)
        return 0;
 }
 
-static int v5l2_ofdata_to_platdata(struct udevice *dev)
+static int v5l2_of_to_plat(struct udevice *dev)
 {
-       struct v5l2_plat *plat = dev_get_platdata(dev);
+       struct v5l2_plat *plat = dev_get_plat(dev);
        struct l2cache *regs;
 
        regs = (struct l2cache *)dev_read_addr(dev);
@@ -129,7 +131,7 @@ static int v5l2_ofdata_to_platdata(struct udevice *dev)
 
 static int v5l2_probe(struct udevice *dev)
 {
-       struct v5l2_plat *plat = dev_get_platdata(dev);
+       struct v5l2_plat *plat = dev_get_plat(dev);
        struct l2cache *regs = plat->regs;
        u32 ctl_val;
 
@@ -179,9 +181,9 @@ U_BOOT_DRIVER(v5l2_cache) = {
        .name   = "v5l2_cache",
        .id     = UCLASS_CACHE,
        .of_match = v5l2_cache_ids,
-       .ofdata_to_platdata = v5l2_ofdata_to_platdata,
+       .of_to_plat = v5l2_of_to_plat,
        .probe  = v5l2_probe,
-       .platdata_auto_alloc_size = sizeof(struct v5l2_plat),
+       .plat_auto      = sizeof(struct v5l2_plat),
        .ops = &v5l2_cache_ops,
        .flags  = DM_FLAG_PRE_RELOC,
 };
This page took 0.026989 seconds and 4 git commands to generate.