ebi.c 564 B

1234567891011121314151617181920212223242526272829303132333435
  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. #include <common.h>
  9. #include <asm/io.h>
  10. #include "vct.h"
  11. int ebi_initialize(void)
  12. {
  13. #if defined(CONFIG_VCT_NOR)
  14. if (ebi_init_nor_flash())
  15. return -1;
  16. #endif
  17. #if defined(CONFIG_VCT_ONENAND)
  18. if (ebi_init_onenand())
  19. return -1;
  20. #endif
  21. #if defined(CONFIG_DRIVER_SMC911X)
  22. if (ebi_init_smc911x())
  23. return -1;
  24. #endif
  25. reg_write(EBI_CTRL_SIG_ACTLV(EBI_BASE), 0x00004100);
  26. ebi_wait();
  27. return 0;
  28. }