diff options
author | Sughosh Ganu <urwithsughosh@gmail.com> | 2012-02-02 00:44:41 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-02-12 10:11:33 +0100 |
commit | 6b873dcabd85ca4109a76c488c653609ea71c848 (patch) | |
tree | d1b5defe382eb04d716d527c8595dd3358a6238d /arch | |
parent | d735a99d3b15daa8edfc10e52fa8860c06fe803c (diff) | |
download | u-boot-imx-6b873dcabd85ca4109a76c488c653609ea71c848.zip u-boot-imx-6b873dcabd85ca4109a76c488c653609ea71c848.tar.gz u-boot-imx-6b873dcabd85ca4109a76c488c653609ea71c848.tar.bz2 |
Changes to move hawkboard to the new spl infrastructure
This patch moves hawkboard to the new spl infrastructure from the
older nand_spl one.
Removed the hawkboard_nand_config build option -- The spl code now
gets compiled with hawkboard_config, after building the main u-boot
image, using the CONFIG_SPL_TEXT_BASE. Modified the README.hawkboard
to reflect the same.
Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Tom Rini <trini@ti.com>
Acked-by: Christian Riesch <christian.riesch@omicron.at>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 24 | ||||
-rw-r--r-- | arch/arm/cpu/arm926ejs/davinci/spl.c | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-davinci/da850_lowlevel.h | 9 |
3 files changed, 26 insertions, 11 deletions
diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c index eec06bc..df7d6a2 100644 --- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c @@ -32,6 +32,7 @@ #include <asm/arch/emif_defs.h> #include <asm/arch/pll_defs.h> +#if defined(CONFIG_SYS_DA850_PLL_INIT) void da850_waitloop(unsigned long loopcnt) { unsigned long i; @@ -163,7 +164,9 @@ int da850_pll_init(struct davinci_pllc_regs *reg, unsigned long pllmult) return 0; } +#endif /* CONFIG_SYS_DA850_PLL_INIT */ +#if defined(CONFIG_SYS_DA850_DDR_INIT) int da850_ddr_setup(void) { unsigned long tmp; @@ -242,6 +245,7 @@ int da850_ddr_setup(void) return 0; } +#endif /* CONFIG_SYS_DA850_DDR_INIT */ __attribute__((weak)) void board_gpio_init(void) @@ -249,10 +253,6 @@ void board_gpio_init(void) return; } -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; - int arch_cpu_init(void) { /* Unlock kick registers */ @@ -266,13 +266,11 @@ int arch_cpu_init(void) if (davinci_configure_pin_mux_items(pinmuxes, pinmuxes_size)) return 1; +#if defined(CONFIG_SYS_DA850_PLL_INIT) /* PLL setup */ da850_pll_init(davinci_pllc0_regs, CONFIG_SYS_DA850_PLL0_PLLM); da850_pll_init(davinci_pllc1_regs, CONFIG_SYS_DA850_PLL1_PLLM); - - /* GPIO setup */ - board_gpio_init(); - +#endif /* setup CSn config */ #if defined(CONFIG_SYS_DA850_CS2CFG) writel(CONFIG_SYS_DA850_CS2CFG, &davinci_emif_regs->ab1cr); @@ -281,7 +279,12 @@ int arch_cpu_init(void) writel(CONFIG_SYS_DA850_CS3CFG, &davinci_emif_regs->ab2cr); #endif - lpsc_on(CONFIG_SYS_DA850_LPSC_UART); + da8xx_configure_lpsc_items(lpsc, lpsc_size); + + /* GPIO setup */ + board_gpio_init(); + + NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM1), CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE); @@ -293,6 +296,9 @@ int arch_cpu_init(void) DAVINCI_UART_PWREMU_MGMT_UTRST), &davinci_uart2_ctrl_regs->pwremu_mgmt); +#if defined(CONFIG_SYS_DA850_DDR_INIT) da850_ddr_setup(); +#endif + return 0; } diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c index f475f9b..74632e5 100644 --- a/arch/arm/cpu/arm926ejs/davinci/spl.c +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c @@ -74,12 +74,12 @@ void board_init_f(ulong dummy) void board_init_r(gd_t *id, ulong dummy) { -#ifdef CONFIG_SOC_DM365 +#ifdef CONFIG_SPL_NAND_LOAD nand_init(); puts("Nand boot...\n"); nand_boot(); #endif -#ifdef CONFIG_SOC_DA8XX +#ifdef CONFIG_SPL_SPI_LOAD mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN); diff --git a/arch/arm/include/asm/arch-davinci/da850_lowlevel.h b/arch/arm/include/asm/arch-davinci/da850_lowlevel.h index e489c47..11ed91d 100644 --- a/arch/arm/include/asm/arch-davinci/da850_lowlevel.h +++ b/arch/arm/include/asm/arch-davinci/da850_lowlevel.h @@ -24,6 +24,15 @@ #ifndef __DA850_LOWLEVEL_H #define __DA850_LOWLEVEL_H +#include <asm/arch/pinmux_defs.h> + +/* pinmux_resource[] vector is defined in the board specific file */ +extern const struct pinmux_resource pinmuxes[]; +extern const int pinmuxes_size; + +extern const struct lpsc_resource lpsc[]; +extern const int lpsc_size; + /* NOR Boot Configuration Word Field Descriptions */ #define DA850_NORBOOT_COPY_XK(X) ((X - 1) << 8) #define DA850_NORBOOT_METHOD_DIRECT (1 << 4) |