Fork of the vendor (Boundary Devices) u-boot for Reform 2, with minor tweaks. The goal is to migrate to mainstream u-boot or barebox ASAP. The main impediment so far is the 4GB RAM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2KB

  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * (C) Copyright 2007 Semihalf
  4. *
  5. * Written by: Rafal Jaworowski <raj@semihalf.com>
  6. *
  7. * This file contains routines that fetch data from PowerPC-dependent sources
  8. * (bd_info etc.)
  9. */
  10. #include <config.h>
  11. #include <linux/types.h>
  12. #include <api_public.h>
  13. #include <asm/u-boot.h>
  14. #include <asm/global_data.h>
  15. #include "api_private.h"
  16. DECLARE_GLOBAL_DATA_PTR;
  17. /*
  18. * Important notice: handling of individual fields MUST be kept in sync with
  19. * include/asm-ppc/u-boot.h and include/asm-ppc/global_data.h, so any changes
  20. * need to reflect their current state and layout of structures involved!
  21. */
  22. int platform_sys_info(struct sys_info *si)
  23. {
  24. si->clk_bus = gd->bus_clk;
  25. si->clk_cpu = gd->cpu_clk;
  26. #if defined(CONFIG_MPC8xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
  27. #define bi_bar bi_immr_base
  28. #elif defined(CONFIG_MPC83xx)
  29. #define bi_bar bi_immrbar
  30. #endif
  31. #if defined(bi_bar)
  32. si->bar = gd->bd->bi_bar;
  33. #undef bi_bar
  34. #else
  35. si->bar = 0;
  36. #endif
  37. platform_set_mr(si, gd->bd->bi_memstart, gd->bd->bi_memsize, MR_ATTR_DRAM);
  38. platform_set_mr(si, gd->bd->bi_flashstart, gd->bd->bi_flashsize, MR_ATTR_FLASH);
  39. platform_set_mr(si, gd->bd->bi_sramstart, gd->bd->bi_sramsize, MR_ATTR_SRAM);
  40. return 1;
  41. }