Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Stefan Roese | 5075279 | 2009-01-21 17:24:39 +0100 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering |
| 4 | * |
| 5 | * Copyright (C) 2006 Micronas GmbH |
Stefan Roese | 5075279 | 2009-01-21 17:24:39 +0100 | [diff] [blame] | 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 | } |