cpu.c 398 B

1234567891011121314151617181920212223
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
  4. */
  5. #include <common.h>
  6. #include <irq_func.h>
  7. #include <asm/cache.h>
  8. /*
  9. * cleanup_before_linux() is called just before we call linux
  10. * it prepares the processor for linux
  11. *
  12. * we disable interrupt and caches.
  13. */
  14. int cleanup_before_linux(void)
  15. {
  16. disable_interrupts();
  17. cache_flush();
  18. return 0;
  19. }