cuboot-mpc7448hpc2.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
  3. *
  4. * Author: Roy Zang <tie-fei.zang@freescale.com>
  5. *
  6. * Description:
  7. * Old U-boot compatibility for mpc7448hpc2 board
  8. * Based on the code of Scott Wood <scottwood@freescale.com>
  9. * for 83xx and 85xx.
  10. *
  11. * This is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. */
  17. #include "ops.h"
  18. #include "stdio.h"
  19. #include "cuboot.h"
  20. #define TARGET_HAS_ETH1
  21. #include "ppcboot.h"
  22. static bd_t bd;
  23. extern char _dtb_start[], _dtb_end[];
  24. static void platform_fixups(void)
  25. {
  26. void *tsi;
  27. dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
  28. dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
  29. dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 4, bd.bi_busfreq);
  30. tsi = find_node_by_devtype(NULL, "tsi-bridge");
  31. if (tsi)
  32. setprop(tsi, "bus-frequency", &bd.bi_busfreq,
  33. sizeof(bd.bi_busfreq));
  34. }
  35. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  36. unsigned long r6, unsigned long r7)
  37. {
  38. CUBOOT_INIT();
  39. fdt_init(_dtb_start);
  40. serial_console_init();
  41. platform_ops.fixups = platform_fixups;
  42. }