[uboot] create uboot from github:
repo: https://github.com/u-boot/u-boot commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91 Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
This commit is contained in:
46
u-boot-2021.10/drivers/cache/cache-uclass.c
vendored
Normal file
46
u-boot-2021.10/drivers/cache/cache-uclass.c
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation <www.intel.com>
|
||||
*/
|
||||
|
||||
#define LOG_CATEGORY UCLASS_CACHE
|
||||
|
||||
#include <common.h>
|
||||
#include <cache.h>
|
||||
#include <dm.h>
|
||||
|
||||
int cache_get_info(struct udevice *dev, struct cache_info *info)
|
||||
{
|
||||
struct cache_ops *ops = cache_get_ops(dev);
|
||||
|
||||
if (!ops->get_info)
|
||||
return -ENOSYS;
|
||||
|
||||
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",
|
||||
.post_bind = dm_scan_fdt_dev,
|
||||
};
|
||||
Reference in New Issue
Block a user