cuboot-mpc7448hpc2.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
  4. *
  5. * Author: Roy Zang <tie-fei.zang@freescale.com>
  6. *
  7. * Description:
  8. * Old U-boot compatibility for mpc7448hpc2 board
  9. * Based on the code of Scott Wood <scottwood@freescale.com>
  10. * for 83xx and 85xx.
  11. */
  12. #include "ops.h"
  13. #include "stdio.h"
  14. #include "cuboot.h"
  15. #define TARGET_HAS_ETH1
  16. #include "ppcboot.h"
  17. static bd_t bd;
  18. extern char _dtb_start[], _dtb_end[];
  19. static void platform_fixups(void)
  20. {
  21. void *tsi;
  22. dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
  23. dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
  24. dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
  25. tsi = find_node_by_devtype(NULL, "tsi-bridge");
  26. if (tsi)
  27. setprop(tsi, "bus-frequency", &bd.bi_busfreq,
  28. sizeof(bd.bi_busfreq));
  29. }
  30. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  31. unsigned long r6, unsigned long r7)
  32. {
  33. CUBOOT_INIT();
  34. fdt_init(_dtb_start);
  35. serial_console_init();
  36. platform_ops.fixups = platform_fixups;
  37. }