cuboot-amigaone.c 719 B

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Old U-boot compatibility for AmigaOne
  4. *
  5. * Author: Gerhard Pircher (gerhard_pircher@gmx.net)
  6. *
  7. * Based on cuboot-83xx.c
  8. * Copyright (c) 2007 Freescale Semiconductor, Inc.
  9. */
  10. #include "ops.h"
  11. #include "stdio.h"
  12. #include "cuboot.h"
  13. #include "ppcboot.h"
  14. static bd_t bd;
  15. static void platform_fixups(void)
  16. {
  17. dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
  18. dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
  19. }
  20. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  21. unsigned long r6, unsigned long r7)
  22. {
  23. CUBOOT_INIT();
  24. fdt_init(_dtb_start);
  25. serial_console_init();
  26. platform_ops.fixups = platform_fixups;
  27. }