cuboot-taishan.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Old U-boot compatibility for Taishan
  4. *
  5. * Author: Hugh Blemings <hugh@au.ibm.com>
  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 "cuboot.h"
  16. #include "reg.h"
  17. #include "dcr.h"
  18. #include "4xx.h"
  19. #define TARGET_4xx
  20. #define TARGET_44x
  21. #define TARGET_440GX
  22. #include "ppcboot.h"
  23. static bd_t bd;
  24. BSS_STACK(4096);
  25. static void taishan_fixups(void)
  26. {
  27. /* FIXME: sysclk should be derived by reading the FPGA
  28. registers */
  29. unsigned long sysclk = 33000000;
  30. ibm440gx_fixup_clocks(sysclk, 6 * 1843200, 25000000);
  31. ibm4xx_sdram_fixup_memsize();
  32. dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
  33. dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
  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 = taishan_fixups;
  41. fdt_init(_dtb_start);
  42. serial_console_init();
  43. }