cuboot-sequoia.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Old U-boot compatibility for Sequoia
  4. *
  5. * Valentine Barshak <vbarshak@ru.mvista.com>
  6. * Copyright 2007 MontaVista Software, Inc
  7. *
  8. * Based on Ebony code by David Gibson <david@gibson.dropbear.id.au>
  9. * Copyright IBM Corporation, 2007
  10. *
  11. * Based on Bamboo code by Josh Boyer <jwboyer@linux.vnet.ibm.com>
  12. * Copyright IBM Corporation, 2007
  13. */
  14. #include <stdarg.h>
  15. #include <stddef.h>
  16. #include "types.h"
  17. #include "elf.h"
  18. #include "string.h"
  19. #include "stdio.h"
  20. #include "page.h"
  21. #include "ops.h"
  22. #include "dcr.h"
  23. #include "4xx.h"
  24. #include "44x.h"
  25. #include "cuboot.h"
  26. #define TARGET_4xx
  27. #define TARGET_44x
  28. #include "ppcboot.h"
  29. static bd_t bd;
  30. static void sequoia_fixups(void)
  31. {
  32. unsigned long sysclk = 33333333;
  33. ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
  34. ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
  35. ibm4xx_denali_fixup_memsize();
  36. dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
  37. dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
  38. }
  39. void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
  40. unsigned long r6, unsigned long r7)
  41. {
  42. CUBOOT_INIT();
  43. platform_ops.fixups = sequoia_fixups;
  44. platform_ops.exit = ibm44x_dbcr_reset;
  45. fdt_init(_dtb_start);
  46. serial_console_init();
  47. }