1 // SPDX-License-Identifier: GPL-2.0+
3 * JZ4780 common routines
5 * Copyright (c) 2013 Imagination Technologies
6 * Author: Paul Burton <paul.burton@imgtec.com>
16 #include <asm/sections.h>
17 #include <mach/jz4780.h>
18 #include <mach/jz4780_dram.h>
22 #ifdef CONFIG_SPL_BUILD
23 /* Pointer to the global data structure for SPL */
24 DECLARE_GLOBAL_DATA_PTR;
25 gd_t gdata __attribute__ ((section(".bss")));
27 void board_init_f(ulong dummy)
29 typedef void __noreturn (*image_entry_noargs_t)(void);
32 struct image_header *header;
35 /* Set global data pointer */
44 memset(__bss_start, 0, (char *)&__bss_end - __bss_start);
46 gd->flags |= GD_FLG_SPL_INIT;
48 ret = mmc_initialize(NULL);
52 mmc = find_mmc_device(BOOT_DEVICE_MMC1);
60 header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
61 sizeof(struct image_header));
63 count = blk_dread(mmc_get_blk_desc(mmc),
64 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR,
69 image_entry_noargs_t image_entry =
70 (image_entry_noargs_t)CONFIG_SYS_TEXT_BASE;
76 #endif /* CONFIG_SPL_BUILD */
78 ulong board_get_usable_ram_top(ulong total_size)
80 return CONFIG_SYS_SDRAM_BASE + (256 * 1024 * 1024);
83 int print_cpuinfo(void)
85 printf("CPU: Ingenic JZ4780\n");