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