mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-22 03:03:05 +00:00
7e6e40c572
-----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTjxwsACgkQFHw5/5Y0 tyz4TAwAtVgllQGPVNIVDaEBdG93htm1DoZPc4EMZ4L5rf0nT0yJPeOhRCGygYY+ zYL1ueleBZtpJhYOuHGetSns0B/M5Wx7gu1eGHNGrMNHH7zCV5Ynjjee2IaqKgbU tdSSc8XQpJ3PJY6rhJ6qZ7pO/EcUlQEdqplEUGFmA4JObx43j1+bmqyGTJA57vEw rrr+tyUVlr+Wv4lqlX/YJWzAB6IoSMUStv34M2lmiZvZoTYHezvIqBK33GrQ4Cwl hQ8nP7ymBXdA5GoMFBpfaBCA7aX3esx4yYN3JIRNRjNmnITJHYs0G8oIh8R5iNnJ psroU7GRPu3MmXfOnHlRfA/v0mo8xQGc2RQHyZUGXuApTI8+SFK/4WJPBny/IYse ggcVCHoI57dx1+j4+JHYhh61bMR1JUwARs4/UU4dKT3MRZM8Gb99OvbXO3+switZ R0YHSnDP///MTC7/MzbOPWzsJiTn9gkZd8nFVTXoncrVI8F3OtCc89G4HBruBSj7 ptfylxqH =VlzD -----END PGP SIGNATURE----- Merge tag 'v2023.10-rc3' into next Prepare v2023.10-rc3 Signed-off-by: Tom Rini <trini@konsulko.com>
88 lines
1.7 KiB
C
88 lines
1.7 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* JZ4780 common routines
|
|
*
|
|
* Copyright (c) 2013 Imagination Technologies
|
|
* Author: Paul Burton <paul.burton@imgtec.com>
|
|
*/
|
|
|
|
#include <config.h>
|
|
#include <common.h>
|
|
#include <cpu_func.h>
|
|
#include <hang.h>
|
|
#include <image.h>
|
|
#include <init.h>
|
|
#include <asm/global_data.h>
|
|
#include <asm/io.h>
|
|
#include <asm/sections.h>
|
|
#include <mach/jz4780.h>
|
|
#include <mach/jz4780_dram.h>
|
|
#include <mmc.h>
|
|
#include <spl.h>
|
|
|
|
#ifdef CONFIG_SPL_BUILD
|
|
/* Pointer to the global data structure for SPL */
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
gd_t gdata __section(".bss");
|
|
|
|
void board_init_f(ulong dummy)
|
|
{
|
|
typedef void __noreturn (*image_entry_noargs_t)(void);
|
|
struct mmc *mmc;
|
|
unsigned long count;
|
|
struct legacy_img_hdr *header;
|
|
int ret;
|
|
|
|
/* Set global data pointer */
|
|
gd = &gdata;
|
|
|
|
timer_init();
|
|
pll_init();
|
|
sdram_init();
|
|
enable_caches();
|
|
|
|
/* Clear the BSS */
|
|
memset(__bss_start, 0, (size_t)__bss_end - (size_t)__bss_start);
|
|
|
|
gd->flags |= GD_FLG_SPL_INIT;
|
|
|
|
ret = mmc_initialize(NULL);
|
|
if (ret)
|
|
hang();
|
|
|
|
mmc = find_mmc_device(BOOT_DEVICE_MMC1);
|
|
if (ret)
|
|
hang();
|
|
|
|
ret = mmc_init(mmc);
|
|
if (ret)
|
|
hang();
|
|
|
|
header = (struct legacy_img_hdr *)(CONFIG_TEXT_BASE -
|
|
sizeof(struct legacy_img_hdr));
|
|
|
|
count = blk_dread(mmc_get_blk_desc(mmc),
|
|
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR,
|
|
0x800, header);
|
|
if (count == 0)
|
|
hang();
|
|
|
|
image_entry_noargs_t image_entry =
|
|
(image_entry_noargs_t)CONFIG_TEXT_BASE;
|
|
|
|
image_entry();
|
|
|
|
hang();
|
|
}
|
|
#endif /* CONFIG_SPL_BUILD */
|
|
|
|
phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
|
|
{
|
|
return CFG_SYS_SDRAM_BASE + (256 * 1024 * 1024);
|
|
}
|
|
|
|
int print_cpuinfo(void)
|
|
{
|
|
printf("CPU: Ingenic JZ4780\n");
|
|
return 0;
|
|
}
|