cuboot-katmai.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Old U-boot compatibility for Katmai
  4. *
  5. * Author: Hugh Blemings <[email protected]>
  6. *
  7. * Copyright 2007 Hugh Blemings, IBM Corporation.
  8. * Based on cuboot-ebony.c which is:
  9. * Copyright 2007 David Gibson, IBM Corporation.
  10. * Based on cuboot-83xx.c, which is:
  11. * Copyright (c) 2007 Freescale Semiconductor, Inc.
  12. */
  13. #include "ops.h"
  14. #include "stdio.h"
  15. #include "reg.h"
  16. #include "dcr.h"
  17. #include "4xx.h"
  18. #include "44x.h"
  19. #include "cuboot.h"
  20. #define TARGET_4xx
  21. #define TARGET_44x
  22. #include "ppcboot.h"
  23. static bd_t bd;
  24. BSS_STACK(4096);
  25. static void katmai_fixups(void)
  26. {
  27. unsigned long sysclk = 33333000;
  28. /* 440SP Clock logic is all but identical to 440GX
  29. * so we just use that code for now at least
  30. */
  31. ibm440spe_fixup_clocks(sysclk, 6 * 1843200, 0);
  32. ibm440spe_fixup_memsize();
  33. dt_fixup_mac_address(0, bd.bi_enetaddr);
  34. ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
  35. }
  36. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  37. unsigned long r6, unsigned long r7)
  38. {
  39. CUBOOT_INIT();
  40. platform_ops.fixups = katmai_fixups;
  41. fdt_init(_dtb_start);
  42. serial_console_init();
  43. }