dram.c 338 B

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