Hi Lin, On 20 October 2015 at 20:37, Lin Huang <h...@rock-chips.com> wrote: > Signed-off-by: Lin Huang <h...@rock-chips.com>
Please add a commit message. > --- > Changes in v1: > - clean copyright announcement > > arch/arm/mach-rockchip/Kconfig | 10 ++- > arch/arm/mach-rockchip/Makefile | 1 + > arch/arm/mach-rockchip/board.c | 13 +++- > arch/arm/mach-rockchip/rk3036/Kconfig | 11 ++++ > include/configs/rk3036_common.h | 116 > ++++++++++++++++++++++++++++++++++ > 5 files changed, 149 insertions(+), 2 deletions(-) > create mode 100644 arch/arm/mach-rockchip/rk3036/Kconfig > create mode 100644 include/configs/rk3036_common.h > > diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig > index 15cd380..72d61d1 100644 > --- a/arch/arm/mach-rockchip/Kconfig > +++ b/arch/arm/mach-rockchip/Kconfig > @@ -11,6 +11,14 @@ config ROCKCHIP_RK3288 > and video codec support. Peripherals include Gigabit Ethernet, > USB2 host and OTG, SDIO, I2S, UART,s, SPI, I2C and PWMs. > > +config ROCKCHIP_RK3036 > + bool "Support Rockchip RK3036" > + help > + The Rockchip RK3036 is a ARM-based SoC with a dual-core Cortex-A7 > + including NEON and GPU, Mali-400 graphics, several DDR3 options > + and video codec support. Peripherals include Gigabit Ethernet, > + USB2 host and OTG, SDIO, I2S, UART, SPI, I2C and PWMs. > + > config SYS_MALLOC_F > default y > > @@ -39,5 +47,5 @@ config ROCKCHIP_SERIAL > default y > > source "arch/arm/mach-rockchip/rk3288/Kconfig" > - > +source "arch/arm/mach-rockchip/rk3036/Kconfig" > endif > diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile > index 5a4e383..1cdbc34 100644 > --- a/arch/arm/mach-rockchip/Makefile > +++ b/arch/arm/mach-rockchip/Makefile > @@ -11,3 +11,4 @@ obj-y += board.o > endif > obj-y += common.o > obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288/ > +obj-$(CONFIG_ROCKCHIP_RK3036) += rk3036/ > diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c > index 789a801..d1d8856 100644 > --- a/arch/arm/mach-rockchip/board.c > +++ b/arch/arm/mach-rockchip/board.c > @@ -3,6 +3,8 @@ > * > * SPDX-License-Identifier: GPL-2.0+ > */ > + > +#include <asm/io.h> > #include <asm/arch/timer.h> > #include <common.h> > #include <dm.h> > @@ -23,6 +25,7 @@ int board_init(void) > > int dram_init(void) > { > +#ifdef CONFIG_SPL_BUILD > struct ram_info ram; > struct udevice *dev; > int ret; > @@ -37,8 +40,16 @@ int dram_init(void) > debug("Cannot get DRAM size: %d\n", ret); > return ret; > } > - debug("SDRAM base=%lx, size=%x\n", ram.base, ram.size); > gd->ram_size = ram.size; > +#else > + int i; > + unsigned int addr; > + > + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { > + addr = CONFIG_SYS_SDRAM_BASE + (i * SDRAM_BANK_SIZE); > + gd->ram_size += get_ram_size((long *)addr, SDRAM_BANK_SIZE); > + } I think this code should go in a new RAM driver - see the RK3288 version. All it needs to do is to implement the get_info() method. Of course we need to figure out the proper RAM init too in SPL, but it sounds like that would not use driver model due to the 8KB space constraint. > +config TARGET_EVB_RK3036 > + bool "EVB_RK3036" > + Please add some help for this, describing the board. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot