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>
13 #include <asm/sections.h>
14 #include <mach/jz4780.h>
15 #include <mach/jz4780_dram.h>
19 #ifdef CONFIG_SPL_BUILD
20 /* Pointer to the global data structure for SPL */
21 DECLARE_GLOBAL_DATA_PTR;
22 gd_t gdata __attribute__ ((section(".bss")));
24 void board_init_f(ulong dummy)
26 typedef void __noreturn (*image_entry_noargs_t)(void);
29 struct image_header *header;
32 /* Set global data pointer */
41 memset(__bss_start, 0, (char *)&__bss_end - __bss_start);
43 gd->flags |= GD_FLG_SPL_INIT;
45 ret = mmc_initialize(NULL);
49 mmc = find_mmc_device(BOOT_DEVICE_MMC1);
57 header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
58 sizeof(struct image_header));
60 count = blk_dread(mmc_get_blk_desc(mmc),
61 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR,
66 image_entry_noargs_t image_entry =
67 (image_entry_noargs_t)CONFIG_SYS_TEXT_BASE;
73 #endif /* CONFIG_SPL_BUILD */
75 ulong board_get_usable_ram_top(ulong total_size)
77 return CONFIG_SYS_SDRAM_BASE + (256 * 1024 * 1024);
80 int print_cpuinfo(void)
82 printf("CPU: Ingenic JZ4780\n");