dram.c 335 B

12345678910111213141516171819
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
  4. */
  5. #include <common.h>
  6. #include <linux/sizes.h>
  7. #include <asm/addrspace.h>
  8. #include <mach/ddr.h>
  9. DECLARE_GLOBAL_DATA_PTR;
  10. int dram_init(void)
  11. {
  12. ddr_tap_tuning();
  13. gd->ram_size = get_ram_size((void *)KSEG1, SZ_256M);
  14. return 0;
  15. }