cuboot-warp.c 767 B

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2008 PIKA Technologies
  4. * Sean MacLennan <smaclennan@pikatech.com>
  5. */
  6. #include "ops.h"
  7. #include "4xx.h"
  8. #include "cuboot.h"
  9. #include "stdio.h"
  10. #define TARGET_4xx
  11. #define TARGET_44x
  12. #include "ppcboot.h"
  13. static bd_t bd;
  14. static void warp_fixups(void)
  15. {
  16. ibm440ep_fixup_clocks(66000000, 11059200, 50000000);
  17. ibm4xx_sdram_fixup_memsize();
  18. ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
  19. dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
  20. }
  21. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  22. unsigned long r6, unsigned long r7)
  23. {
  24. CUBOOT_INIT();
  25. platform_ops.fixups = warp_fixups;
  26. platform_ops.exit = ibm44x_dbcr_reset;
  27. fdt_init(_dtb_start);
  28. serial_console_init();
  29. }