From mboxrd@z Thu Jan 1 00:00:00 1970 From: Murali Karicheri Date: Fri, 7 Mar 2014 16:21:15 -0500 Subject: [U-Boot] [U-Boot PATCH v2 08/12] k2hk: add support for k2hk SOC and EVM In-Reply-To: <20140225221143.GK16805@bill-the-cat> References: <1392918914-15564-1-git-send-email-m-karicheri2@ti.com> <1392918914-15564-9-git-send-email-m-karicheri2@ti.com> <20140225221143.GK16805@bill-the-cat> Message-ID: <531A384B.9030308@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de [snip] >> +Build instructions: >> +=================== >> + >> +To build u-boot.bin >> + >make k2hk_evm_config >> + >make u-boot-spi.gph >> + >> +To build u-boot-spi.gph >> + >make k2hk_evm_config >> + >make u-boot-spi.gph > We need to use CONFIG_SPL_TARGET so that make all just works. I am assuming we need to do #define CONFIG_SPL_TARGET "u-boot-spi.gph" and then ./MAKEALL -a arm will build this image as well. Is that right? Murali > >> + if (err < 0) >> + printf("error deleting linux,initrd-start\n"); > Here and elsewhere, puts when we aren't using format chars. > >> diff --git a/boards.cfg b/boards.cfg >> index a8336cc..1690315 100644 >> --- a/boards.cfg >> +++ b/boards.cfg > Please make sure that the entry is correctly sorted, see the top of > boards.cfg. > >> +++ b/include/configs/k2hk_evm.h >> @@ -0,0 +1,221 @@ >> +/* >> + * Configuration header file for TI's k2hk-evm >> + * >> + * (C) Copyright 2012-2014 >> + * Texas Instruments Incorporated, >> + * >> + * SPDX-License-Identifier: GPL-2.0+ >> + */ >> + >> +#ifndef __CONFIG_H > Please use __CONFIG_K2HK_EVM_H > >> +/* Platform type */ >> +#define CONFIG_SOC_K2HK >> +#define CONFIG_K2HK_EVM > Make sure we use these. > >> + >> +/* U-Boot Build Configuration */ >> +#define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is a 2nd stage loader */ > So there's a level before SPL that is doing a certain amount of init we > don't want to re-do? > >> +#define CONFIG_SYS_DCACHE_OFF > Really? > >> +#define CONFIG_SYS_MALLOC_LEN (1024 << 10) /* 1 MiB */ > This is pretty small, especially since we care about UBI. > >> +#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE >> +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + 32 << 20) > Please see doc/README.memory-test > >> +/* SPL SPI Loader Configuration */ >> +#define CONFIG_SPL_TEXT_BASE 0x0c200000 >> +#define CONFIG_SPL_PAD_TO 65536 >> +#define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_PAD_TO - 8) > Please explain this a bit more, esp since SPL_PAD_TO should take into > account the header size already... > >> +#define CONFIG_SPL_BSS_START_ADDR (CONFIG_SPL_TEXT_BASE + \ >> + CONFIG_SPL_MAX_SIZE) >> +#define CONFIG_SPL_BSS_MAX_SIZE (32 * 1024) > Do we really want SPL BSS in early ram (I don't want to get the name of > the type wrong) rather than DDR? > >> +#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \ >> + CONFIG_SPL_BSS_MAX_SIZE) >> +#define CONFIG_SYS_SPL_MALLOC_SIZE (32 * 1024) > Same. > >> +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } > Please use the default table. > >> +#define PART_BOOT "1024k(bootloader)ro," >> +#define PART_PARAMS "512k(params)ro," >> +#define PART_UBI "-(ubifs)" >> +#define MTDPARTS_DEFAULT "mtdparts=davinci_nand.0:" \ >> + PART_BOOT PART_PARAMS PART_UBI > Please just set these outright. > >> +/* U-Boot command configuration */ >> +#include >> +#undef CONFIG_CMD_BDI > Why? > >> +#undef CONFIG_CMD_FLASH > Shouldn't be needed. > >> +#undef CONFIG_CMD_FPGA >> +#undef CONFIG_CMD_SETGETDCR > Same. > >> +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " > Not needed. > >> + "fdt_high=0xffffffff\0" \ > Please don't do this, set it to the top of kernel low mem. > >> + "mtdparts=mtdparts=davinci_nand.0:" \ >> + "1024k(bootloader)ro,512k(params)ro,522752k(ubifs)\0" > Now you're not using the mtdparts you define, this shouldn't be needed. > >> +/* Linux interfacing */ >> +#define CONFIG_CMDLINE_TAG >> +#define CONFIG_SETUP_MEMORY_TAGS > OF/FDT things should be down here. > >> +#define LINUX_BOOT_PARAM_ADDR (CONFIG_SYS_SDRAM_BASE + 0x100) > Just use this in the code. > > Thanks! >