From: Andes Date: Tue, 28 May 2019 17:39:10 +0800 Subject: [U-Boot] [PATCH 2/6] riscv: ae350: use the v5l2 driver to configure the cache In-Reply-To: <20190528093914.4672-1-uboot@andestech.com> References: <20190528093914.4672-1-uboot@andestech.com> Message-ID: <20190528093914.4672-3-uboot@andestech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Rick Chen Find the UCLASS_CACHE driver to configure the cache controller's settings. Signed-off-by: Rick Chen Cc: Greentime Hu --- board/AndesTech/ax25-ae350/ax25-ae350.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c index 3d65ce7..686ec4a 100644 --- a/board/AndesTech/ax25-ae350/ax25-ae350.c +++ b/board/AndesTech/ax25-ae350/ax25-ae350.c @@ -11,6 +11,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -93,10 +94,24 @@ int smc_init(void) return 0; } +int v5l2_init(void) +{ + struct udevice *dev; + int ret; + + ret = uclass_get_device(UCLASS_CACHE, 0, &dev); + + if (ret) + return ret; + + return 0; +} + #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { smc_init(); + v5l2_init(); return 0; } -- 2.7.4