Merge branch 'master' of git://git.denx.de/u-boot-sh
This commit is contained in:
commit
678150f155
28
MAKEALL
28
MAKEALL
|
@ -609,31 +609,11 @@ LIST_blackfin="$(boards_by_arch blackfin)
|
|||
## SH Systems
|
||||
#########################################################################
|
||||
|
||||
LIST_sh2=" \
|
||||
rsk7203 \
|
||||
"
|
||||
LIST_sh3=" \
|
||||
mpr2 \
|
||||
ms7720se \
|
||||
"
|
||||
LIST_sh2="$(boards_by_cpu sh2)"
|
||||
LIST_sh3="$(boards_by_cpu sh3)"
|
||||
LIST_sh4="$(boards_by_cpu sh4)"
|
||||
|
||||
LIST_sh4=" \
|
||||
ms7750se \
|
||||
ms7722se \
|
||||
MigoR \
|
||||
r7780mp \
|
||||
r2dplus \
|
||||
sh7763rdp \
|
||||
sh7785lcr \
|
||||
ap325rxa \
|
||||
espt \
|
||||
"
|
||||
|
||||
LIST_sh=" \
|
||||
${LIST_sh2} \
|
||||
${LIST_sh3} \
|
||||
${LIST_sh4} \
|
||||
"
|
||||
LIST_sh="$(boards_by_arch sh)"
|
||||
|
||||
#########################################################################
|
||||
## SPARC Systems
|
||||
|
|
82
Makefile
82
Makefile
|
@ -1184,88 +1184,6 @@ bf527-ezkit-v2_config : unconfig
|
|||
@$(MKCONFIG) -t BF527_EZKIT_REV_2_1 \
|
||||
bf527-ezkit blackfin blackfin bf527-ezkit
|
||||
|
||||
#========================================================================
|
||||
# SH3 (SuperH)
|
||||
#========================================================================
|
||||
|
||||
#########################################################################
|
||||
## sh2 (Renesas SuperH)
|
||||
#########################################################################
|
||||
rsk7203_config: unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_RSK7203 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh2 rsk7203 renesas
|
||||
|
||||
#########################################################################
|
||||
## sh3 (Renesas SuperH)
|
||||
#########################################################################
|
||||
|
||||
mpr2_config: unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_MPR2 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh3 mpr2
|
||||
|
||||
ms7720se_config: unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_MS7720SE 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh3 ms7720se
|
||||
|
||||
#########################################################################
|
||||
## sh4 (Renesas SuperH)
|
||||
#########################################################################
|
||||
|
||||
MigoR_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_MIGO_R 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 MigoR renesas
|
||||
|
||||
ms7750se_config: unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_MS7750SE 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 ms7750se
|
||||
|
||||
ms7722se_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_MS7722SE 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 ms7722se
|
||||
|
||||
r2dplus_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_R2DPLUS 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 r2dplus renesas
|
||||
|
||||
r7780mp_config: unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_R7780MP 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 r7780mp renesas
|
||||
|
||||
sh7763rdp_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 sh7763rdp renesas
|
||||
|
||||
sh7785lcr_32bit_config \
|
||||
sh7785lcr_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@mkdir -p $(obj)board/renesas/sh7785lcr
|
||||
@echo "#define CONFIG_SH7785LCR 1" > $(obj)include/config.h
|
||||
@if [ "$(findstring 32bit, $@)" ] ; then \
|
||||
echo "#define CONFIG_SH_32BIT 1" >> $(obj)include/config.h ; \
|
||||
echo "CONFIG_SYS_TEXT_BASE = 0x8ff80000" > \
|
||||
$(obj)board/renesas/sh7785lcr/config.tmp ; \
|
||||
fi
|
||||
@$(MKCONFIG) -n $@ -a sh7785lcr sh sh4 sh7785lcr renesas
|
||||
|
||||
ap325rxa_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_AP325RXA 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 ap325rxa renesas
|
||||
|
||||
espt_config : unconfig
|
||||
@mkdir -p $(obj)include
|
||||
@echo "#define CONFIG_ESPT 1" > $(obj)include/config.h
|
||||
@$(MKCONFIG) -a $@ sh sh4 espt
|
||||
|
||||
#########################################################################
|
||||
#########################################################################
|
||||
|
||||
|
|
|
@ -29,6 +29,6 @@ STANDALONE_LOAD_ADDR += -EB
|
|||
endif
|
||||
|
||||
PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
|
||||
PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(TEXT_BASE)
|
||||
PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE)
|
||||
|
||||
LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
|
||||
|
|
|
@ -43,6 +43,41 @@ static void hexdump(unsigned char *buf, int len)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define MOUNT_ROOT_RDONLY 0x000
|
||||
#define RAMDISK_FLAGS 0x004
|
||||
#define ORIG_ROOT_DEV 0x008
|
||||
#define LOADER_TYPE 0x00c
|
||||
#define INITRD_START 0x010
|
||||
#define INITRD_SIZE 0x014
|
||||
#define COMMAND_LINE 0x100
|
||||
|
||||
#define RD_PROMPT (1<<15)
|
||||
#define RD_DOLOAD (1<<14)
|
||||
#define CMD_ARG_RD_PROMPT "prompt_ramdisk="
|
||||
#define CMD_ARG_RD_DOLOAD "load_ramdisk="
|
||||
|
||||
#ifdef CONFIG_SH_SDRAM_OFFSET
|
||||
#define GET_INITRD_START(initrd, linux) (initrd - linux + CONFIG_SH_SDRAM_OFFSET)
|
||||
#else
|
||||
#define GET_INITRD_START(initrd, linux) (initrd - linux)
|
||||
#endif
|
||||
|
||||
static void set_sh_linux_param(unsigned long param_addr, unsigned long data)
|
||||
{
|
||||
*(unsigned long *)(param_addr) = data;
|
||||
}
|
||||
|
||||
static unsigned long sh_check_cmd_arg(char *cmdline, char *key, int base)
|
||||
{
|
||||
unsigned long val = 0;
|
||||
char *p = strstr(cmdline, key);
|
||||
if (p) {
|
||||
p += strlen(key);
|
||||
val = simple_strtol(p, NULL, base);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images)
|
||||
{
|
||||
/* Linux kernel load address */
|
||||
|
@ -51,7 +86,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
|
|||
unsigned char *param
|
||||
= (unsigned char *)image_get_load(images->legacy_hdr_os);
|
||||
/* Linux kernel command line */
|
||||
char *cmdline = (char *)param + 0x100;
|
||||
char *cmdline = (char *)param + COMMAND_LINE;
|
||||
/* PAGE_SIZE */
|
||||
unsigned long size = images->ep - (unsigned long)param;
|
||||
char *bootargs = getenv("bootargs");
|
||||
|
@ -61,8 +96,37 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
|
|||
|
||||
/* Setup parameters */
|
||||
memset(param, 0, size); /* Clear zero page */
|
||||
|
||||
/* Set commandline */
|
||||
strcpy(cmdline, bootargs);
|
||||
|
||||
sh_check_cmd_arg(bootargs, CMD_ARG_RD_DOLOAD, 10);
|
||||
/* Initrd */
|
||||
if (images->rd_start || images->rd_end) {
|
||||
unsigned long ramdisk_flags = 0;
|
||||
int val = sh_check_cmd_arg(bootargs, CMD_ARG_RD_PROMPT, 10);
|
||||
if (val == 1)
|
||||
ramdisk_flags |= RD_PROMPT;
|
||||
else
|
||||
ramdisk_flags &= ~RD_PROMPT;
|
||||
|
||||
val = sh_check_cmd_arg(bootargs, CMD_ARG_RD_DOLOAD, 10);
|
||||
if (val == 1)
|
||||
ramdisk_flags |= RD_DOLOAD;
|
||||
else
|
||||
ramdisk_flags &= ~RD_DOLOAD;
|
||||
|
||||
set_sh_linux_param((unsigned long)param + MOUNT_ROOT_RDONLY, 0x0001);
|
||||
set_sh_linux_param((unsigned long)param + RAMDISK_FLAGS, ramdisk_flags);
|
||||
set_sh_linux_param((unsigned long)param + ORIG_ROOT_DEV, 0x0200);
|
||||
set_sh_linux_param((unsigned long)param + LOADER_TYPE, 0x0001);
|
||||
set_sh_linux_param((unsigned long)param + INITRD_START,
|
||||
GET_INITRD_START(images->rd_start, CONFIG_SYS_SDRAM_BASE));
|
||||
set_sh_linux_param((unsigned long)param + INITRD_SIZE,
|
||||
images->rd_end - images->rd_start);
|
||||
}
|
||||
|
||||
/* Boot kernel */
|
||||
kernel();
|
||||
/* does not return */
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#
|
||||
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
|
||||
|
||||
ifndef CONFIG_SYS_TEXT_BASE
|
||||
ifdef CONFIG_SH_32BIT
|
||||
CONFIG_SYS_TEXT_BASE = 0x8FF80000
|
||||
else
|
||||
CONFIG_SYS_TEXT_BASE = 0x0ff80000
|
||||
endif
|
||||
|
|
13
boards.cfg
13
boards.cfg
|
@ -732,5 +732,18 @@ davinci_dm6467evm arm arm926ejs dm6467evm davinci davinci
|
|||
davinci_schmoogie arm arm926ejs schmoogie davinci davinci
|
||||
davinci_dm355leopard arm arm926ejs dm355leopard davinci davinci
|
||||
bf527-ad7160-eval blackfin blackfin
|
||||
rsk7203 sh sh2 rsk7203 renesas -
|
||||
mpr2 sh sh3 mpr2 - -
|
||||
ms7720se sh sh3 ms7720se - -
|
||||
MigoRsh sh4 MigoR renesas -
|
||||
ms7750se sh sh4 ms7750se - -
|
||||
ms7722se sh sh4 ms7722se - -
|
||||
r2dplus sh sh4 r2dplus renesas -
|
||||
r7780mp sh sh4 r7780mp renesas -
|
||||
sh7763rdp sh sh4 sh7763rdp renesas -
|
||||
sh7785lcr sh sh4 sh7785lcr renesas -
|
||||
sh7785lcr_32bit sh sh4 sh7785lcr renesas - sh7785lcr:SH_32BIT=1
|
||||
ap325rxa sh sh4 ap325rxa renesas -
|
||||
espt sh sh4 espt - -
|
||||
# Target ARCH CPU Board name Vendor SoC Options
|
||||
###############################################################################################
|
||||
|
|
|
@ -62,8 +62,10 @@
|
|||
|
||||
/* MEMORY */
|
||||
#if defined(CONFIG_SH_32BIT)
|
||||
#define SH7785LCR_SDRAM_PHYS_BASE (0x48000000)
|
||||
#define SH7785LCR_SDRAM_BASE (0x88000000)
|
||||
/* 0x40000000 - 0x47FFFFFF does not use */
|
||||
#define CONFIG_SH_SDRAM_OFFSET (0x8000000)
|
||||
#define SH7785LCR_SDRAM_PHYS_BASE (0x40000000 + CONFIG_SH_SDRAM_OFFSET)
|
||||
#define SH7785LCR_SDRAM_BASE (0x80000000 + CONFIG_SH_SDRAM_OFFSET)
|
||||
#define SH7785LCR_SDRAM_SIZE (384 * 1024 * 1024)
|
||||
#define SH7785LCR_FLASH_BASE_1 (0xa0000000)
|
||||
#define SH7785LCR_FLASH_BANK_SIZE (64 * 1024 * 1024)
|
||||
|
|
Loading…
Reference in New Issue