nand: brcmnand: return without disabling clock
[oweals/u-boot.git] / drivers / cache / cache-uclass.c
index 97ce0249a4a8b6878cc2ef79a533440ada0ba621..3b20a10f087d06b80caab67e3b48bd190fdc1c09 100644 (file)
@@ -17,6 +17,26 @@ int cache_get_info(struct udevice *dev, struct cache_info *info)
        return ops->get_info(dev, info);
 }
 
+int cache_enable(struct udevice *dev)
+{
+       struct cache_ops *ops = cache_get_ops(dev);
+
+       if (!ops->enable)
+               return -ENOSYS;
+
+       return ops->enable(dev);
+}
+
+int cache_disable(struct udevice *dev)
+{
+       struct cache_ops *ops = cache_get_ops(dev);
+
+       if (!ops->disable)
+               return -ENOSYS;
+
+       return ops->disable(dev);
+}
+
 UCLASS_DRIVER(cache) = {
        .id             = UCLASS_CACHE,
        .name           = "cache",