xref: /openbmc/u-boot/board/micronas/vct/ebi.c (revision ee7bb5be)
1 /*
2  * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering
3  *
4  * Copyright (C) 2006 Micronas GmbH
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #include <common.h>
10 #include <asm/io.h>
11 #include "vct.h"
12 
13 int ebi_initialize(void)
14 {
15 #if defined(CONFIG_VCT_NOR)
16 	if (ebi_init_nor_flash())
17 		return -1;
18 #endif
19 
20 #if defined(CONFIG_VCT_ONENAND)
21 	if (ebi_init_onenand())
22 		return -1;
23 #endif
24 
25 #if defined(CONFIG_DRIVER_SMC911X)
26 	if (ebi_init_smc911x())
27 		return -1;
28 #endif
29 
30 	reg_write(EBI_CTRL_SIG_ACTLV(EBI_BASE), 0x00004100);
31 
32 	ebi_wait();
33 
34 	return 0;
35 }
36