blob: 8a730866955776866654128df5296c223523ce71 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Stefan Roese50752792009-01-21 17:24:39 +01002/*
3 * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering
4 *
5 * Copyright (C) 2006 Micronas GmbH
Stefan Roese50752792009-01-21 17:24:39 +01006 */
7
8#include <common.h>
9#include <asm/io.h>
10#include "vct.h"
11
12int 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}