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>
14 #include <asm/sections.h>
15 #include <mach/jz4780.h>
16 #include <mach/jz4780_dram.h>
20 #ifdef CONFIG_SPL_BUILD
21 /* Pointer to the global data structure for SPL */
22 DECLARE_GLOBAL_DATA_PTR;
23 gd_t gdata __attribute__ ((section(".bss")));
25 void board_init_f(ulong dummy)
27 typedef void __noreturn (*image_entry_noargs_t)(void);
30 struct image_header *header;
33 /* Set global data pointer */
42 memset(__bss_start, 0, (char *)&__bss_end - __bss_start);
44 gd->flags |= GD_FLG_SPL_INIT;
46 ret = mmc_initialize(NULL);
50 mmc = find_mmc_device(BOOT_DEVICE_MMC1);
58 header = (struct image_header *)(CONFIG_SYS_TEXT_BASE -
59 sizeof(struct image_header));
61 count = blk_dread(mmc_get_blk_desc(mmc),
62 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR,
67 image_entry_noargs_t image_entry =
68 (image_entry_noargs_t)CONFIG_SYS_TEXT_BASE;
74 #endif /* CONFIG_SPL_BUILD */
76 ulong board_get_usable_ram_top(ulong total_size)
78 return CONFIG_SYS_SDRAM_BASE + (256 * 1024 * 1024);
81 int print_cpuinfo(void)
83 printf("CPU: Ingenic JZ4780\n");