treeboot-ebony.c 695 B

1234567891011121314151617181920212223242526272829
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Old U-boot compatibility for Ebony
  4. *
  5. * Author: David Gibson <david@gibson.dropbear.id.au>
  6. *
  7. * Copyright 2007 David Gibson, IBM Corporatio.
  8. * Based on cuboot-83xx.c, which is:
  9. * Copyright (c) 2007 Freescale Semiconductor, Inc.
  10. */
  11. #include "ops.h"
  12. #include "stdio.h"
  13. #include "44x.h"
  14. BSS_STACK(4096);
  15. #define OPENBIOS_MAC_BASE 0xfffffe0c
  16. #define OPENBIOS_MAC_OFFSET 0xc
  17. void platform_init(void)
  18. {
  19. unsigned long end_of_ram = 0x8000000;
  20. unsigned long avail_ram = end_of_ram - (unsigned long)_end;
  21. simple_alloc_init(_end, avail_ram, 32, 64);
  22. ebony_init((u8 *)OPENBIOS_MAC_BASE,
  23. (u8 *)(OPENBIOS_MAC_BASE + OPENBIOS_MAC_OFFSET));
  24. }