SPL: ARM: spear: Add SPL support for SPEAr600 platform
PATCH 6/7 SPL: ARM: spear: Add SPL support for SPEAr600 platform
This patch adds SPL support for SPEAr600. Currently only SNOR (Serial NOR) flash support is included. Other boot devices (NAND, MMC, USB ...) may be added with later patches.
Tested on the STM SPEAr600 evaluation and x600 SPEAr600 boards.
--- arch/arm/cpu/arm926ejs/spear/Makefile | 24 +- arch/arm/cpu/arm926ejs/spear/spear600.c | 236 ++++++++++++++++ arch/arm/cpu/arm926ejs/spear/spl.c | 282 ++++++++++++++++++++ arch/arm/cpu/arm926ejs/spear/spl_boot.c | 197 ++++++++++++++ .../spear/spr600_mt47h128m8_3_266_cl5_async.c | 130 +++++++++ .../spear/spr600_mt47h32m16_333_cl5_psync.c | 135 ++++++++++ .../spear/spr600_mt47h32m16_37e_166_cl4_sync.c | 130 +++++++++ .../spear/spr600_mt47h64m16_3_333_cl5_psync.c | 144 ++++++++++ arch/arm/cpu/arm926ejs/spear/start.S | 122 +++++++++ arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 87 ++++++ arch/arm/include/asm/arch-spear/hardware.h | 55 ++-- arch/arm/include/asm/arch-spear/spr_defs.h | 30 +++ arch/arm/include/asm/arch-spear/spr_misc.h | 136 +++++++++- arch/arm/include/asm/arch-spear/spr_ssp.h | 45 ++++ arch/arm/include/asm/arch-spear/spr_syscntl.h | 14 + 15 files changed, 1740 insertions(+), 27 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/spear600.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spl.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spl_boot.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c create mode 100644 arch/arm/cpu/arm926ejs/spear/start.S create mode 100644 arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds create mode 100644 arch/arm/include/asm/arch-spear/spr_ssp.h
arch/arm/cpu/arm926ejs/spear/Makefile +17 -7
@@ -25,17 +25,27 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o -COBJS := cpu.o \ +COBJS-y := cpu.o \ reset.o \ timer.o -SOBJS := -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) +ifdef CONFIG_SPL_BUILD +COBJS-y += spl.o spl_boot.o +COBJS-$(CONFIG_SPEAR600) += spear600.o +COBJS-$(CONFIG_DDR_MT47H64M16) += spr600_mt47h64m16_3_333_cl5_psync.o +COBJS-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_333_cl5_psync.o +COBJS-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_37e_166_cl4_sync.o +COBJS-$(CONFIG_DDR_MT47H128M8) += spr600_mt47h128m8_3_266_cl5_async.o +endif -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) +SRCS := $(START:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +START := $(addprefix $(obj),$(START)) + +all: $(obj).depend $(LIB) + +$(LIB): $(OBJS) + $(call cmd_link_o_target, $(OBJS)) #########################################################################
arch/arm/cpu/arm926ejs/spear/spear600.c new file +236 -0
236 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spl.c new file +282 -0
282 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spl_boot.c new file +197 -0
197 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c new file +130 -0
130 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c new file +135 -0
135 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c new file +130 -0
130 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c new file +144 -0
144 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/start.S new file +122 -0
122 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds new file +87 -0
87 lines not on this page · raw message
arch/arm/include/asm/arch-spear/hardware.h +36 -19
84 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spr_defs.h +30 -0
@@ -28,6 +28,30 @@ extern int spear_board_init(ulong);extern void setfreq (unsigned int ,unsigned int );extern unsigned int setfreq_sz; +void plat_ddr_init (void ); +void soc_init (void ); +void spear_late_init (void ); +void plat_late_init (void ); + +int snor_boot_selected (void ); +int nand_boot_selected (void ); +int pnor_boot_selected (void ); +int usb_boot_selected (void ); +int uart_boot_selected (void ); +int tftp_boot_selected (void ); +int i2c_boot_selected (void ); +int spi_boot_selected (void ); +int mmc_boot_selected (void ); + +extern u32 mpmc_conf_vals[]; + +struct chip_data { +int cpufreq; +int dramfreq; +int dramtype; +uchar version[32 ]; +}; +/* HW mac id in i2c memory definitions */ #define MAGIC_OFF 0x0#define MAGIC_LEN 0x2
@@ -36,4 +60,10 @@ extern unsigned int setfreq_sz;#define MAC_OFF 0x2#define MAC_LEN 0x6 +#define PNOR_WIDTH_8 0 +#define PNOR_WIDTH_16 1 +#define PNOR_WIDTH_32 2 +#define PNOR_WIDTH_NUM 3 +#define PNOR_WIDTH_SEARCH 0xff +#endif
arch/arm/include/asm/arch-spear/spr_misc.h +135 -1
157 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spr_ssp.h new file +45 -0
45 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spr_syscntl.h +14 -0
@@ -21,6 +21,9 @@* MA 02111-1307 USA */ +#ifndef __SYSCTRL_H +#define __SYSCTRL_H + struct syscntl_regs { u32 scctrl; u32 scsysstat;
@@ -36,3 +39,14 @@ struct syscntl_regs {const u32 scperclken; const u32 scperstat; }; + +#define MODE_SHIFT 0x00000003 + +#define NORMAL 0x00000004 +#define SLOW 0x00000002 +#define DOZE 0x00000001 +#define SLEEP 0x00000000 + +#define PLL_TIM 0x01FFFFFF + +#endif
Signature · 1 line
1.7.10.1