OMAP3 and devkit8000 SPL support
v10 cover OMAP3 and devkit8000 SPL support
(Simon, I hope you don't mind me re-posting these on your behalf. Everyone else, this is Simon's v9 series from August 8 just rebased)
V1 Initial SPL support for OMAP3 was based on the old SPL
V2 Introduced major changes. It is based on the OMAP4-SPL patch by
Aneesh V and the new SPL Framework by Daniel Schwierzeck and Aneesh V
V3 Some small bug fixes and correct placed SOB.
V4 Corrected one bugfix and some style problems
V5 Exclude some nand objects from SPL, interface change for nand_spl V6 Added nand_spl.c - git add mistake, some small changes
V7 integrates "[PATCH V0] omap-common: move early UART clock setup to
board.c", rewrite of image loading to use image headers, removed many #ifdefs, use read functions from nand_base.c, some smaller changes
V8 added boot parameter saving (was not implemented before V8!), added define
CONFIG_SPL_NAND_SIMPLE, reorganization of omap-common SPL
V9 added missing file. Changes in boot_mode
V10 Rebase to current (no content changes)
PATCH v10 1/9 omap-common/omap4: relocate early UART clock setup
From: Simon Schwarz <[email protected]>
Moves the early UART clock setup setup_clocks_for_console() from preloader_console_init() to s_init() of OMAP4.
This is done to prepare for OMAP3 integration.
This patch was posted seperatly to the mailinglist but I decidet - since it is a prereqesit for this patch to add it. Former port to ML:
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/104395
--- arch/arm/cpu/armv7/omap-common/spl.c | 2 +- arch/arm/cpu/armv7/omap4/board.c | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap-common/spl.c +1 -1
@@ -249,6 +249,7 @@ void board_init_r(gd_t *id, ulong dummy) } } +/* This requires UART clocks to be enabled */ void preloader_console_init (void ) {const char *u_boot_rev =U_BOOT_VERSION ;
@@ -259,7 +260,6 @@ void preloader_console_init(void) gd->flags |=GD_FLG_RELOC ; gd->baudrate =CONFIG_BAUDRATE ; -setup_clocks_for_console ();serial_init ();/* serial communications setup */ /* Avoid a second "U-Boot" coming from this string */
arch/arm/cpu/armv7/omap4/board.c +1 -0
@@ -257,6 +257,7 @@ void s_init(void)watchdog_init ();set_mux_conf_regs ();#ifdef CONFIG_SPL_BUILD +setup_clocks_for_console ();preloader_console_init ();do_io_settings ();#endif
Signature · 1 line
1.7.0.4
PATCH v10 2/9 omap3: Configure RAM bank 0 if in SPL
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
OMAP3 relied on the memory config done by X-loader or Configuration Header. This has to be reworked for the implementation of a SPL. This patch configures RAM bank 0 if CONFIG_SPL_BUILD is set. Settings for Micron-RAM used by devkit8000 are added to mem.h
--- arch/arm/cpu/armv7/omap3/sdrc.c | 32 ++++++++++++++++++++++++++++- arch/arm/include/asm/arch-omap3/mem.h | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/omap3/sdrc.c +31 -1
@@ -8,6 +8,9 @@* Copyright (C) 2004-2010 * Texas Instruments Incorporated - http://www.ti.com/ * +* Copyright (C) 2011 +* Corscience GmbH & Co. KG - Simon Schwarz <[email protected]> +* * Author : * Vaibhav Hiremath <[email protected]> *
@@ -133,13 +136,40 @@ void do_sdrc_init(u32 cs, u32 early)sdelay (0x20000 ); } +/* As long as V_MCFG and V_RFR_CTRL is not defined for all OMAP3 boards we need +* to prevent this to be build in non-SPL build */ +#ifdef CONFIG_SPL_BUILD +/* If we use a SPL there is no x-loader nor config header so we have +* to do the job ourselfs +*/ +if (cs ==CS0 ) { + sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE ; + +/* General SDRC config */ +writel (V_MCFG , &sdrc_base->cs[cs].mcfg); +writel (V_RFR_CTRL , &sdrc_base->cs[cs].rfr_ctrl); + +/* AC timings */ +writel (V_ACTIMA_165 , &sdrc_actim_base0->ctrla); +writel (V_ACTIMB_165 , &sdrc_actim_base0->ctrlb); + +/* Initialize */ +writel (CMD_NOP , &sdrc_base->cs[cs].manual); +writel (CMD_PRECHARGE , &sdrc_base->cs[cs].manual); +writel (CMD_AUTOREFRESH , &sdrc_base->cs[cs].manual); +writel (CMD_AUTOREFRESH , &sdrc_base->cs[cs].manual); + +writel (V_MR , &sdrc_base->cs[cs].mr); + } +#endif +/* * SDRC timings are set up by x-load or config header * We don't need to redo them here. * Older x-loads configure only CS0 * configure CS1 to handle this ommission */ -if (cs) { +if (cs ==CS1 ) { sdrc_actim_base0 = (struct sdrc_actim *)SDRC_ACTIM_CTRL0_BASE ; sdrc_actim_base1 = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE ; writel(readl(&sdrc_base->cs[CS0].mcfg),
arch/arm/include/asm/arch-omap3/mem.h +36 -0
@@ -128,6 +128,33 @@ enum { (MICRON_XSR_165 << 0) | (MICRON_TXP_165 << 8) | \ (MICRON_TWTR_165 << 16)) +#define MICRON_RAMTYPE 0x1 +#define MICRON_DDRTYPE 0x0 +#define MICRON_DEEPPD 0x1 +#define MICRON_B32NOT16 0x1 +#define MICRON_BANKALLOCATION 0x2 +#define MICRON_RAMSIZE ((PHYS_SDRAM_1_SIZE/(1024*1024))/2) +#define MICRON_ADDRMUXLEGACY 0x1 +#define MICRON_CASWIDTH 0x5 +#define MICRON_RASWIDTH 0x2 +#define MICRON_LOCKSTATUS 0x0 +#define MICRON_V_MCFG ((MICRON_LOCKSTATUS << 30) | (MICRON_RASWIDTH << 24) | \ + (MICRON_CASWIDTH << 20) | (MICRON_ADDRMUXLEGACY << 19) | \ + (MICRON_RAMSIZE << 8) | (MICRON_BANKALLOCATION << 6) | \ + (MICRON_B32NOT16 << 4) | (MICRON_DEEPPD << 3) | \ + (MICRON_DDRTYPE << 2) | (MICRON_RAMTYPE)) + +#define MICRON_ARCV 2030 +#define MICRON_ARE 0x1 +#define MICRON_V_RFR_CTRL ((MICRON_ARCV << 8) | (MICRON_ARE)) + +#define MICRON_BL 0x2 +#define MICRON_SIL 0x0 +#define MICRON_CASL 0x3 +#define MICRON_WBST 0x0 +#define MICRON_V_MR ((MICRON_WBST << 9) | (MICRON_CASL << 4) | \ + (MICRON_SIL << 3) | (MICRON_BL)) +/* * NUMONYX part of IGEP v2 (165MHz optimized) 6.06ns * ACTIMA
@@ -171,10 +198,15 @@ enum {#define V_ACTIMA_165 INFINEON_V_ACTIMA_165#define V_ACTIMB_165 INFINEON_V_ACTIMB_165#endif +#ifdef CONFIG_OMAP3_MICRON_DDR #define V_ACTIMA_165 MICRON_V_ACTIMA_165#define V_ACTIMB_165 MICRON_V_ACTIMB_165 +#define V_MCFG MICRON_V_MCFG +#define V_RFR_CTRL MICRON_V_RFR_CTRL +#define V_MR MICRON_V_MR#endif +#ifdef CONFIG_OMAP3_NUMONYX_DDR #define V_ACTIMA_165 NUMONYX_V_ACTIMA_165#define V_ACTIMB_165 NUMONYX_V_ACTIMB_165
@@ -184,6 +216,10 @@ enum {#error "Please choose the right DDR type in config header"#endif +#if defined(CONFIG_SPL_BUILD ) && (!defined(V_MCFG ) || !defined(V_RFR_CTRL )) +#error "Please choose the right DDR type in config header" +#endif +/* * GPMC settings - * Definitions is as per the following format
Signature · 1 line
1.7.0.4
PATCH v10 3/9 omap-common: add nand spl support
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
Add NAND support for the new SPL structure.
--- arch/arm/cpu/armv7/omap-common/spl.c | 46 ++++++++++++++++++++++++++++++- arch/arm/cpu/armv7/omap3/board.c | 50 ++++++++++++++++++++++++++++++++- arch/arm/include/asm/omap_common.h | 31 +++++++++++++++++++++ include/nand.h | 3 ++ 4 files changed, 127 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/omap-common/spl.c +45 -1
@@ -26,6 +26,7 @@#include <asm/u-boot.h> #include <asm/utils.h> #include <asm/arch/sys_proto.h> +#include <nand.h> #include <mmc.h> #include <fat.h> #include <timestamp_autogenerated.h>
@@ -173,7 +174,7 @@ end:hang (); } } - +static void mmc_load_image (void ) __attribute__((unused));static void mmc_load_image (void ) {struct mmc *mmc;
@@ -207,12 +208,48 @@ static void mmc_load_image(void) } } +#ifdef CONFIG_SPL_NAND_SUPPORT +static void nand_load_image (void ) __attribute__ ((unused)); +static void nand_load_image (void ) +{ +struct image_header *header; + +gpmc_init (); +nand_init (); + +/*use CONFIG_SYS_TEXT_BASE as temporary storage area */ + header = (struct image_header *)(CONFIG_SYS_TEXT_BASE ); + +#ifdef CONFIG_NAND_ENV_DST +nand_spl_load_image (CONFIG_ENV_OFFSET , +CONFIG_SYS_NAND_PAGE_SIZE , (void *)header); +parse_image_header (header); +nand_spl_load_image (CONFIG_ENV_OFFSET , image_size, + (void *)image_load_addr); +#ifdef CONFIG_ENV_OFFSET_REDUND +nand_spl_load_image (CONFIG_ENV_OFFSET_REDUND , +CONFIG_SYS_NAND_PAGE_SIZE , (void *)header); +parse_image_header (header); +nand_spl_load_image (CONFIG_ENV_OFFSET_REDUND , image_size, + (void *)image_load_addr); +#endif +#endif +/* Load u-boot */ +nand_spl_load_image (CONFIG_SYS_NAND_U_BOOT_OFFS , +CONFIG_SYS_NAND_PAGE_SIZE , (void *)header); +parse_image_header (header); +nand_spl_load_image (CONFIG_SYS_NAND_U_BOOT_OFFS , + image_size, (void *)image_load_addr); +nand_deselect (); +} +#endif /* CONFIG_SPL_NAND_SUPPORT */ void jump_to_image_no_args (void ) {typedef void (*image_entry_noargs_t )(void )__attribute__ ((noreturn));image_entry_noargs_t image_entry = (image_entry_noargs_t ) image_entry_point; +debug ("image entry point: 0x%X\n" , image_entry_point);image_entry (); }
@@ -228,10 +265,17 @@ void board_init_r(gd_t *id, ulong dummy) boot_device =omap_boot_device ();debug ("boot device - %d\n" , boot_device);switch (boot_device) { +#ifdef CONFIG_SPL_MMC_SUPPORT case BOOT_DEVICE_MMC1 :case BOOT_DEVICE_MMC2 :mmc_load_image ();break ; +#endif +#ifdef CONFIG_SPL_NAND_SUPPORT +case BOOT_DEVICE_NAND : +nand_load_image (); +break ; +#endif default :printf ("SPL: Un-supported Boot Device - %d!!!\n" , boot_device);hang ();
arch/arm/cpu/armv7/omap3/board.c +48 -2
83 lines not on this page · raw message
arch/arm/include/asm/omap_common.h +31 -0
@@ -37,6 +37,7 @@void preloader_console_init (void );/* Boot device */ +#ifdef CONFIG_OMAP44XX /* OMAP4 */ #define BOOT_DEVICE_NONE 0#define BOOT_DEVICE_XIP 1#define BOOT_DEVICE_XIPWAIT 2
@@ -44,13 +45,43 @@ void preloader_console_init(void);#define BOOT_DEVICE_ONE_NAND 4#define BOOT_DEVICE_MMC1 5#define BOOT_DEVICE_MMC2 6 +#elif CONFIG_OMAP34XX /* OMAP3 */ +#define BOOT_DEVICE_NONE 0 +#define BOOT_DEVICE_XIP 1 +#define BOOT_DEVICE_NAND 2 +#define BOOT_DEVICE_ONE_NAND 3 +#define BOOT_DEVICE_MMC2 5/*emmc*/ +#define BOOT_DEVICE_MMC1 6 +#define BOOT_DEVICE_XIPWAIT 7 +#endif /* Boot type */ #define MMCSD_MODE_UNDEFINED 0#define MMCSD_MODE_RAW 1#define MMCSD_MODE_FAT 2 +#define NAND_MODE_HW_ECC 3 + +struct spl_image_info { +const char *name; +u8 os; +u32 load_addr; +u32 entry_point; +u32 size; +}; + +extern struct spl_image_info spl_image;u32 omap_boot_device (void );u32 omap_boot_mode (void ); + +/* SPL common function s*/ +void spl_parse_image_header (const struct image_header *header); + +/* NAND SPL functions */ +void spl_nand_load_image (void ); + +/* MMC SPL functions */ +void spl_mmc_load_image (void ); +#endif /* _OMAP_COMMON_H_ */
include/nand.h +3 -0
@@ -132,6 +132,9 @@ int nand_lock( nand_info_t *meminfo, int tight );int nand_unlock (nand_info_t *meminfo,ulong start,ulong length );int nand_get_lock_status (nand_info_t *meminfo,loff_t offset); +void nand_spl_load_image (loff_t offs,unsigned int size,uchar *dst); +void nand_deselect (void ); +#ifdef CONFIG_SYS_NAND_SELECT_DEVICE void board_nand_select_device (struct nand_chip *nand,int chip);#endif
Signature · 1 line
1.7.0.4
PATCH v10 4/9 spl: add NAND Library to new SPL
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
Adds NAND library to SPL.
--- doc/README.SPL | 1 + drivers/mtd/nand/Makefile | 10 ++- drivers/mtd/nand/nand_base.c | 4 +- drivers/mtd/nand/nand_spl_simple.c | 245 ++++++++++++++++++++++++++++++++++++ drivers/mtd/nand/omap_gpmc.c | 27 ++++ include/nand.h | 5 +- spl/Makefile | 1 + 7 files changed, 288 insertions(+), 5 deletions(-) create mode 100644 drivers/mtd/nand/nand_spl_simple.c
doc/README.SPL +1 -0
@@ -60,3 +60,4 @@ CONFIG_SPL_SPI_FLASH_SUPPORT (drivers/mtd/spi/libspi_flash.o) CONFIG_SPL_SPI_SUPPORT (drivers/spi/libspi.o) CONFIG_SPL_FAT_SUPPORT (fs/fat/libfat.o) CONFIG_SPL_LIBGENERIC_SUPPORT (lib/libgeneric.o) +CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o)
drivers/mtd/nand/Makefile +8 -2
@@ -26,12 +26,18 @@ include $(TOPDIR)/config.mk LIB := $(obj)libnand.o ifdef CONFIG_CMD_NAND +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_NAND_SIMPLE +COBJS-y += nand_spl_simple.o +endif +else COBJS-y += nand.o -COBJS-y += nand_base.o COBJS-y += nand_bbt.o -COBJS-y += nand_ecc.o COBJS-y += nand_ids.o COBJS-y += nand_util.o +endif +COBJS-y += nand_ecc.o +COBJS-y += nand_base.o COBJS-$(CONFIG_NAND_ATMEL) += atmel_nand.o COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
drivers/mtd/nand/nand_base.c +2 -2
@@ -213,7 +213,7 @@ static void nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)* * Default read function for 8bit buswith */ -static void nand_read_buf (struct mtd_info *mtd,uint8_t *buf,int len) +void nand_read_buf (struct mtd_info *mtd,uint8_t *buf,int len) {int i;struct nand_chip *chip = mtd->priv;
@@ -269,7 +269,7 @@ static void nand_write_buf16(struct mtd_info *mtd, const uint8_t *buf, int len)* * Default read function for 16bit buswith */ -static void nand_read_buf16 (struct mtd_info *mtd,uint8_t *buf,int len) +void nand_read_buf16 (struct mtd_info *mtd,uint8_t *buf,int len) {int i;struct nand_chip *chip = mtd->priv;
drivers/mtd/nand/nand_spl_simple.c new file +245 -0
245 lines not on this page · raw message
drivers/mtd/nand/omap_gpmc.c +27 -0
@@ -61,6 +61,14 @@ static void omap_nand_hwcontrol(struct mtd_info *mtd, int32_t cmd,writeb (cmd, this->IO_ADDR_W); } +#ifdef CONFIG_SPL_BUILD +/* Check wait pin as dev ready indicator */ +int omap_spl_dev_ready (struct mtd_info *mtd) +{ +return gpmc_cfg->status & (1 <<8 ); +} +#endif +/* * omap_hwecc_init - Initialize the Hardware ECC for NAND flash in * GPMC controller
@@ -224,6 +232,7 @@ static void omap_enable_hwecc(struct mtd_info *mtd, int32_t mode) } } +#ifndef CONFIG_SPL_BUILD /* * omap_nand_switch_ecc - switch the ECC operation b/w h/w ecc and s/w ecc. * The default is to come up on s/w ecc
@@ -280,6 +289,7 @@ void omap_nand_switch_ecc(int32_t hardware) nand->options &= ~NAND_OWN_BUFFERS; } +#endif /* CONFIG_SPL_BUILD */ /* * Board-specific NAND initialization. The following members of the
@@ -338,7 +348,24 @@ int board_nand_init(struct nand_chip *nand) nand->chip_delay =100 ;/* Default ECC mode */ +#ifndef CONFIG_SPL_BUILD nand->ecc.mode =NAND_ECC_SOFT ; +#else + nand->ecc.mode =NAND_ECC_HW ; + nand->ecc.layout = &hw_nand_oob; + nand->ecc.size =CONFIG_SYS_NAND_ECCSIZE ; + nand->ecc.bytes =CONFIG_SYS_NAND_ECCBYTES ; + nand->ecc.hwctl = omap_enable_hwecc; + nand->ecc.correct = omap_correct_data; + nand->ecc.calculate = omap_calculate_ecc; +omap_hwecc_init (nand); + +if (nand->options &NAND_BUSWIDTH_16 ) + nand->read_buf = nand_read_buf16; +else + nand->read_buf = nand_read_buf; + nand->dev_ready = omap_spl_dev_ready; +#endif return 0 ; }
include/nand.h +4 -1
@@ -132,9 +132,12 @@ int nand_lock( nand_info_t *meminfo, int tight );int nand_unlock (nand_info_t *meminfo,ulong start,ulong length );int nand_get_lock_status (nand_info_t *meminfo,loff_t offset); -void nand_spl_load_image (loff_t offs,unsigned int size,uchar *dst); +int nand_spl_load_image (uint32_t offs,unsigned int size,void *dst);void nand_deselect (void ); +void nand_read_buf16 (struct mtd_info *mtd,uint8_t *buf,int len); +void nand_read_buf (struct mtd_info *mtd,uint8_t *buf,int len); +#ifdef CONFIG_SYS_NAND_SELECT_DEVICE void board_nand_select_device (struct nand_chip *nand,int chip);#endif
spl/Makefile +1 -0
@@ -46,6 +46,7 @@ LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/libspi_flash.o LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/libspi.o LIBS-$(CONFIG_SPL_FAT_SUPPORT) += fs/fat/libfat.o LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/libgeneric.o +LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/libnand.o ifeq ($(SOC),omap3) LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
Signature · 1 line
1.7.0.4
PATCH v10 5/9 spl: Add POWER library to new spl
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
Adds power library to the new spl
--- doc/README.SPL | 1 + spl/Makefile | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
doc/README.SPL +1 -0
@@ -60,4 +60,5 @@ CONFIG_SPL_SPI_FLASH_SUPPORT (drivers/mtd/spi/libspi_flash.o) CONFIG_SPL_SPI_SUPPORT (drivers/spi/libspi.o) CONFIG_SPL_FAT_SUPPORT (fs/fat/libfat.o) CONFIG_SPL_LIBGENERIC_SUPPORT (lib/libgeneric.o) +CONFIG_SPL_POWER_SUPPORT (drivers/power/libpower.o) CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o)
spl/Makefile +1 -0
@@ -46,6 +46,7 @@ LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/libspi_flash.o LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/libspi.o LIBS-$(CONFIG_SPL_FAT_SUPPORT) += fs/fat/libfat.o LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/libgeneric.o +LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/libpower.o LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/libnand.o ifeq ($(SOC),omap3)
Signature · 1 line
1.7.0.4
PATCH v10 6/9 omap3: new SPL structure support
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
Support for the new spl structure. Using the interface defined by Aneesh V for OMAP4
--- arch/arm/cpu/armv7/omap3/config.mk | 30 +++++++++++++++++++++++++++ arch/arm/cpu/armv7/omap3/lowlevel_init.S | 5 ++++ arch/arm/include/asm/arch-omap3/sys_proto.h | 1 + 3 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/omap3/config.mk
arch/arm/cpu/armv7/omap3/config.mk new file +30 -0
@@ -0,0 +1,30 @@ +# +# Copyright 2011 Linaro Limited +# See file CREDITS for list of people who contributed to this +# project. +# +# (C) Copyright 2010 +# Texas Instruments, <www.ti.com> +# +# Aneesh V <[email protected]> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# +ifdef CONFIG_SPL_BUILD +ALL-y += $(OBJTREE)/MLO +else +ALL-y += $(obj)u-boot.img +endif
arch/arm/cpu/armv7/omap3/lowlevel_init.S +5 -0
@@ -35,6 +35,11 @@ _TEXT_BASE: .word CONFIG_SYS_TEXT_BASE /* sdram load addr from config.mk */ +.global save_boot_params +save_boot_params: + #warning "Please implement save_boot_params for OMAP3" + bx lr + .global omap3_gp_romcode_call omap3_gp_romcode_call: PUSH {r4-r12, lr} @ Save all registers from ROM code!
arch/arm/include/asm/arch-omap3/sys_proto.h +1 -0
@@ -71,4 +71,5 @@ void power_init_r(void);void dieid_num_r (void );void do_omap3_emu_romcode_call (u32 service_id,u32 parameters);void omap3_gp_romcode_call (u32 service_id,u32 parameter); +void omap_rev_string (char *omap_rev_string);#endif
Signature · 1 line
1.7.0.4
PATCH v10 7/9 devkit8000: Add nand-spl support for new SPL
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
Add NAND SPL support to the devkit8000 config
--- board/timll/devkit8000/devkit8000.c | 2 +- include/configs/devkit8000.h | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletions(-)
board/timll/devkit8000/devkit8000.c +1 -1
@@ -128,7 +128,7 @@ int board_mmc_init(bd_t *bis) }#endif -#ifdef CONFIG_DRIVER_DM9000 +#if defined(CONFIG_DRIVER_DM9000 ) & !defined(CONFIG_SPL_BUILD )/* * Routine: board_eth_init * Description: Setting up the Ethernet hardware.
include/configs/devkit8000.h +46 -0
50 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH v10 8/9 omap3: implement boot parameter saving
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
Implements the saving of boot params passed by OMAP3 ROM code.
--- arch/arm/cpu/armv7/omap-common/spl.c | 6 +++++- arch/arm/cpu/armv7/omap3/lowlevel_init.S | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/omap-common/spl.c +5 -1
@@ -194,8 +194,12 @@ static void mmc_load_image(void)printf ("spl: mmc init failed: err - %d\n" , err);hang (); } - +/* For OMAP3 there is no automatic boot mode detection */ +#ifdef CONFIG_OMAP34XX + boot_mode =CONFIG_SYS_MMC_SD_BOOTMODE ; +#else boot_mode =omap_boot_mode (); +#endif if (boot_mode ==MMCSD_MODE_RAW ) {debug ("boot mode - RAW\n" );mmc_load_image_raw (mmc);
arch/arm/cpu/armv7/omap3/lowlevel_init.S +7 -2
@@ -37,8 +37,13 @@ _TEXT_BASE: .global save_boot_params save_boot_params: - #warning "Please implement save_boot_params for OMAP3" - bx lr +#ifdef CONFIG_SPL_BUILD + ldr r4, =omap3_boot_device + ldr r5, [r0, #0x4] + and r5, r5, #0xff + str r5, [r4] +#endif + bx lr .global omap3_gp_romcode_call omap3_gp_romcode_call:
Signature · 1 line
1.7.0.4
PATCH v10 9/9 omap-common: reorganize spl.c
In reply to Tom RiniFrom: Simon Schwarz <[email protected]>
split-up spl.c into spl.c, spl_mmc.c and spl_nand.c. This avoids problems with missing defines if a board does not use mmc or nand. This includes adding spl_ prefix to some functions which are now public. spl_image_t is now a public type. Added some of the common functions to omap-common.h
--- arch/arm/cpu/armv7/omap-common/Makefile | 6 + arch/arm/cpu/armv7/omap-common/spl.c | 197 +++-------------------------- arch/arm/cpu/armv7/omap-common/spl_mmc.c | 150 ++++++++++++++++++++++ arch/arm/cpu/armv7/omap-common/spl_nand.c | 71 +++++++++++ 4 files changed, 247 insertions(+), 177 deletions(-) create mode 100644 arch/arm/cpu/armv7/omap-common/spl_mmc.c create mode 100644 arch/arm/cpu/armv7/omap-common/spl_nand.c
arch/arm/cpu/armv7/omap-common/Makefile +6 -0
@@ -33,6 +33,12 @@ COBJS += gpio.o ifdef CONFIG_SPL_BUILD COBJS += spl.o +ifdef CONFIG_SPL_NAND_SUPPORT +COBJS += spl_nand.o +endif +ifdef CONFIG_SPL_MMC_SUPPORT +COBJS += spl_mmc.o +endif endif SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
arch/arm/cpu/armv7/omap-common/spl.c +20 -177
247 lines not on this page · raw message
arch/arm/cpu/armv7/omap-common/spl_mmc.c new file +150 -0
150 lines not on this page · raw message
arch/arm/cpu/armv7/omap-common/spl_nand.c new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
1.7.0.4