cuboot-warp.c 916 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2008 PIKA Technologies
  3. * Sean MacLennan <smaclennan@pikatech.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License version 2 as published
  7. * by the Free Software Foundation.
  8. */
  9. #include "ops.h"
  10. #include "4xx.h"
  11. #include "cuboot.h"
  12. #include "stdio.h"
  13. #define TARGET_4xx
  14. #define TARGET_44x
  15. #include "ppcboot.h"
  16. static bd_t bd;
  17. static void warp_fixups(void)
  18. {
  19. ibm440ep_fixup_clocks(66000000, 11059200, 50000000);
  20. ibm4xx_sdram_fixup_memsize();
  21. ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
  22. dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
  23. }
  24. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  25. unsigned long r6, unsigned long r7)
  26. {
  27. CUBOOT_INIT();
  28. platform_ops.fixups = warp_fixups;
  29. platform_ops.exit = ibm44x_dbcr_reset;
  30. fdt_init(_dtb_start);
  31. serial_console_init();
  32. }