cuboot-kilauea.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Old U-boot compatibility for PPC405EX. This image is already included
  4. * a dtb.
  5. *
  6. * Author: Tiejun Chen <[email protected]>
  7. *
  8. * Copyright (C) 2009 Wind River Systems, Inc.
  9. */
  10. #include "ops.h"
  11. #include "io.h"
  12. #include "dcr.h"
  13. #include "stdio.h"
  14. #include "4xx.h"
  15. #include "44x.h"
  16. #include "cuboot.h"
  17. #define TARGET_4xx
  18. #define TARGET_44x
  19. #include "ppcboot.h"
  20. #define KILAUEA_SYS_EXT_SERIAL_CLOCK 11059200 /* ext. 11.059MHz clk */
  21. static bd_t bd;
  22. static void kilauea_fixups(void)
  23. {
  24. unsigned long sysclk = 33333333;
  25. ibm405ex_fixup_clocks(sysclk, KILAUEA_SYS_EXT_SERIAL_CLOCK);
  26. dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
  27. ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
  28. dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
  29. dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
  30. }
  31. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  32. unsigned long r6, unsigned long r7)
  33. {
  34. CUBOOT_INIT();
  35. platform_ops.fixups = kilauea_fixups;
  36. platform_ops.exit = ibm40x_dbcr_reset;
  37. fdt_init(_dtb_start);
  38. serial_console_init();
  39. }