cuboot-sequoia.c 1.4 KB

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