#include <asm/armv8/mmu.h>
#include <asm/io.h>
+DECLARE_GLOBAL_DATA_PTR;
+
static struct mm_region rk3328_mem_map[] = {
{
.virt = 0x0UL,
struct mm_region *mem_map = rk3328_mem_map;
+int dram_init_banksize(void)
+{
+ size_t max_size = min((unsigned long)gd->ram_size, gd->ram_top);
+
+ /* Reserve 0x200000 for ATF bl31 */
+ gd->bd->bi_dram[0].start = 0x200000;
+ gd->bd->bi_dram[0].size = max_size - gd->bd->bi_dram[0].start;
+
+ return 0;
+}
+
int arch_cpu_init(void)
{
/* We do some SoC one time setting here. */
#include <asm/arch/grf_rk3368.h>
#include <syscon.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define IMEM_BASE 0xFF8C0000
/* Max MCU's SRAM value is 8K, begin at (IMEM_BASE + 4K) */
struct mm_region *mem_map = rk3368_mem_map;
+int dram_init_banksize(void)
+{
+ size_t max_size = min((unsigned long)gd->ram_size, gd->ram_top);
+
+ /* Reserve 0x200000 for ATF bl31 */
+ gd->bd->bi_dram[0].start = 0x200000;
+ gd->bd->bi_dram[0].size = max_size - gd->bd->bi_dram[0].start;
+
+ return 0;
+}
+
#ifdef CONFIG_ARCH_EARLY_INIT_R
static int mcu_init(void)
{
#include <asm/io.h>
#include <asm/arch/hardware.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define GRF_EMMCCORE_CON11 0xff77f02c
static struct mm_region rk3399_mem_map[] = {
struct mm_region *mem_map = rk3399_mem_map;
+int dram_init_banksize(void)
+{
+ size_t max_size = min((unsigned long)gd->ram_size, gd->ram_top);
+
+ /* Reserve 0x200000 for ATF bl31 */
+ gd->bd->bi_dram[0].start = 0x200000;
+ gd->bd->bi_dram[0].size = max_size - gd->bd->bi_dram[0].start;
+
+ return 0;
+}
+
int arch_cpu_init(void)
{
/* We do some SoC one time setting here. */
{
return 0;
}
-
-int dram_init_banksize(void)
-{
- gd->bd->bi_dram[0].start = 0;
- gd->bd->bi_dram[0].size = 0x80000000;
-
- return 0;
-}
{
return 0;
}
-
-int dram_init_banksize(void)
-{
- /* Reserve 0x200000 for ATF bl31 */
- gd->bd->bi_dram[0].start = 0x200000;
- gd->bd->bi_dram[0].size = 0x3fe00000;
-
- return 0;
-}
return 0;
}
-int dram_init_banksize(void)
-{
- /* Reserve 0x200000 for ATF bl31 */
- gd->bd->bi_dram[0].start = 0x200000;
- gd->bd->bi_dram[0].size = 0x7e000000;
-
- return 0;
-}
-
int board_usb_init(int index, enum usb_init_type init)
{
return 0;
out:
return 0;
}
-
-int dram_init_banksize(void)
-{
- /* Reserve 0x200000 for ATF bl31 */
- gd->bd->bi_dram[0].start = 0x200000;
- gd->bd->bi_dram[0].size = 0x7e000000;
-
- return 0;
-}
{
return 0;
}
-
-int dram_init_banksize(void)
-{
- gd->bd->bi_dram[0].start = 0x200000;
- gd->bd->bi_dram[0].size = 0x7fe00000;
-
- return 0;
-}
serialnr->low = (u32)(serial & 0xffffffff);
}
#endif
-
-int dram_init_banksize(void)
-{
- /* Reserve 0x200000 for ATF bl31 */
- gd->bd->bi_dram[0].start = 0x200000;
- gd->bd->bi_dram[0].size = 0x7e000000;
-
- return 0;
-}