2 * Copyright (C) 2011-2014 Panasonic Corporation
3 * Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/arch/sg-regs.h>
17 tmp = sg_memconf_val_ch0(CONFIG_SDRAM0_SIZE, CONFIG_DDR_NUM_CH0);
18 tmp |= sg_memconf_val_ch1(CONFIG_SDRAM1_SIZE, CONFIG_DDR_NUM_CH1);
19 #if CONFIG_SDRAM0_BASE + CONFIG_SDRAM0_SIZE < CONFIG_SDRAM1_BASE
20 tmp |= SG_MEMCONF_SPARSEMEM;
22 writel(tmp, SG_MEMCONF);
24 /* Input ports must be enabled before deasserting reset of cores */
25 tmp = readl(SG_IECTRL);
27 writel(tmp, SG_IECTRL);