Skip to content

Commit

Permalink
Merge branch 'master' of git://git.denx.de/u-boot-arm
Browse files Browse the repository at this point in the history
  • Loading branch information
trini committed Oct 4, 2012
2 parents 73c15c6 + 7775440 commit 1981668
Show file tree
Hide file tree
Showing 150 changed files with 13,849 additions and 179 deletions.
24 changes: 24 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ Klaus Heydeck <[email protected]>
KUP4K MPC855
KUP4X MPC859

Gabriel Huau <[email protected]>

mini2440 s3c2440

Gary Jennejohn <[email protected]>

quad100hd PPC405EP
Expand Down Expand Up @@ -777,6 +781,11 @@ Nagendra T S <[email protected]>

am3517_crane ARM ARMV7 (AM35x SoC)

Dinh Nguyen <[email protected]>
Chin Liang See <[email protected]>

socfpga socfpga_cyclone5

Sandeep Paulraj <[email protected]>

davinci_dm355evm ARM926EJS
Expand All @@ -799,6 +808,7 @@ Veli-Pekka Peltola <[email protected]>
Luka Perkov <[email protected]>

ib62x0 ARM926EJS
iconnect ARM926EJS

Dave Peverley <[email protected]>

Expand Down Expand Up @@ -852,6 +862,8 @@ John Rigby <[email protected]>

Stefan Roese <[email protected]>

x600 ARM926EJS (spear600 Soc)

pdnb3 xscale/ixp
scpu xscale/ixp

Expand Down Expand Up @@ -890,6 +902,10 @@ Matt Sealey <[email protected]>
Bo Shen <[email protected]>
at91sam9x5ek ARM926EJS (AT91SAM9G15,G25,G35,X25,X35 SoC)

Michal Simek <[email protected]>

zynq ARM ARMV7 (Zynq SoC)

Nick Thompson <[email protected]>

da830evm ARM926EJS (DA830/OMAP-L137)
Expand Down Expand Up @@ -990,6 +1006,14 @@ Zhong Hongbo <[email protected]>

SMDK6400 ARM1176 (S3C6400 SoC)

Nobuhiro Iwamatsu <[email protected]>

kzm9g SH73A0 (RMOBILE SoC)

Nobuhiro Iwamatsu <[email protected]>

armadillo-800eva R8A7740 (RMOBILE SoC)

-------------------------------------------------------------------------

Unknown / orphaned boards:
Expand Down
18 changes: 18 additions & 0 deletions arch/arm/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,21 @@ endif
ifndef CONFIG_NAND_SPL
LDFLAGS_u-boot += -pie
endif

#
# FIXME: binutils versions < 2.22 have a bug in the assembler where
# branches to weak symbols can be incorrectly optimized in thumb mode
# to a short branch (b.n instruction) that won't reach when the symbol
# gets preempted
#
# http://sourceware.org/bugzilla/show_bug.cgi?id=12532
#
ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
ifeq ($(GAS_BUG_12532),)
export GAS_BUG_12532:=$(shell if [ $(call binutils-version) -lt 0222 ] ; \
then echo y; else echo n; fi)
endif
ifeq ($(GAS_BUG_12532),y)
PLATFORM_RELFLAGS += -fno-optimize-sibling-calls
endif
endif
1 change: 1 addition & 0 deletions arch/arm/cpu/arm1136/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ stack_setup:

adr r0, _start
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _bss_start_ofs
Expand Down
1 change: 1 addition & 0 deletions arch/arm/cpu/arm1176/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ stack_setup:

adr r0, _start
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _bss_start_ofs
Expand Down
1 change: 1 addition & 0 deletions arch/arm/cpu/arm920t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ stack_setup:

adr r0, _start
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _bss_start_ofs
Expand Down
1 change: 1 addition & 0 deletions arch/arm/cpu/arm925t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ stack_setup:

adr r0, _start
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _bss_start_ofs
Expand Down
58 changes: 52 additions & 6 deletions arch/arm/cpu/arm926ejs/kirkwood/dram.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,84 @@

DECLARE_GLOBAL_DATA_PTR;

#define KW_REG_CPUCS_WIN_BAR(x) (KW_REGISTER(0x1500) + (x * 0x08))
#define KW_REG_CPUCS_WIN_SZ(x) (KW_REGISTER(0x1504) + (x * 0x08))
struct kw_sdram_bank {
u32 win_bar;
u32 win_sz;
};

struct kw_sdram_addr_dec {
struct kw_sdram_bank sdram_bank[4];
};

#define KW_REG_CPUCS_WIN_ENABLE (1 << 0)
#define KW_REG_CPUCS_WIN_WR_PROTECT (1 << 1)
#define KW_REG_CPUCS_WIN_WIN0_CS(x) (((x) & 0x3) << 2)
#define KW_REG_CPUCS_WIN_SIZE(x) (((x) & 0xff) << 24)

/*
* kw_sdram_bar - reads SDRAM Base Address Register
*/
u32 kw_sdram_bar(enum memory_bank bank)
{
struct kw_sdram_addr_dec *base =
(struct kw_sdram_addr_dec *)KW_REGISTER(0x1500);
u32 result = 0;
u32 enable = 0x01 & readl(KW_REG_CPUCS_WIN_SZ(bank));
u32 enable = 0x01 & readl(&base->sdram_bank[bank].win_sz);

if ((!enable) || (bank > BANK3))
return 0;

result = readl(KW_REG_CPUCS_WIN_BAR(bank));
result = readl(&base->sdram_bank[bank].win_bar);
return result;
}

/*
* kw_sdram_bs_set - writes SDRAM Bank size
*/
static void kw_sdram_bs_set(enum memory_bank bank, u32 size)
{
struct kw_sdram_addr_dec *base =
(struct kw_sdram_addr_dec *)KW_REGISTER(0x1500);
/* Read current register value */
u32 reg = readl(&base->sdram_bank[bank].win_sz);

/* Clear window size */
reg &= ~KW_REG_CPUCS_WIN_SIZE(0xFF);

/* Set new window size */
reg |= KW_REG_CPUCS_WIN_SIZE((size - 1) >> 24);

writel(reg, &base->sdram_bank[bank].win_sz);
}

/*
* kw_sdram_bs - reads SDRAM Bank size
*/
u32 kw_sdram_bs(enum memory_bank bank)
{
struct kw_sdram_addr_dec *base =
(struct kw_sdram_addr_dec *)KW_REGISTER(0x1500);
u32 result = 0;
u32 enable = 0x01 & readl(KW_REG_CPUCS_WIN_SZ(bank));
u32 enable = 0x01 & readl(&base->sdram_bank[bank].win_sz);

if ((!enable) || (bank > BANK3))
return 0;
result = 0xff000000 & readl(KW_REG_CPUCS_WIN_SZ(bank));
result = 0xff000000 & readl(&base->sdram_bank[bank].win_sz);
result += 0x01000000;
return result;
}

void kw_sdram_size_adjust(enum memory_bank bank)
{
u32 size;

/* probe currently equipped RAM size */
size = get_ram_size((void *)kw_sdram_bar(bank), kw_sdram_bs(bank));

/* adjust SDRAM window size accordingly */
kw_sdram_bs_set(bank, size);
}

#ifndef CONFIG_SYS_BOARD_DRAM_INIT
int dram_init(void)
{
Expand Down
1 change: 1 addition & 0 deletions arch/arm/cpu/arm926ejs/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ stack_setup:
adr r0, _start
sub r9, r6, r0 /* r9 <- relocation offset */
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy loop */
ldr r3, _bss_start_ofs
Expand Down
1 change: 1 addition & 0 deletions arch/arm/cpu/arm946es/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ stack_setup:

adr r0, _start
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _bss_start_ofs
Expand Down
1 change: 1 addition & 0 deletions arch/arm/cpu/arm_intcm/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ stack_setup:

adr r0, _start
cmp r0, r6
moveq r9, #0 /* no relocation. relocation offset(r9) = 0 */
beq clear_bss /* skip relocation */
mov r1, r6 /* r1 <- scratch for copy_loop */
ldr r3, _bss_start_ofs
Expand Down
1 change: 0 additions & 1 deletion arch/arm/cpu/armv7/highbank/config.mk

This file was deleted.

9 changes: 0 additions & 9 deletions arch/arm/cpu/armv7/omap-common/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float

# Make ARMv5 to allow more compilers to work, even though its v7a.
PLATFORM_CPPFLAGS += -march=armv5
# =========================================================================
#
# Supply options according to compiler version
#
# =========================================================================
PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,\
$(call cc-option,-malignment-traps,))
PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT)
5 changes: 3 additions & 2 deletions arch/arm/cpu/armv7/omap-common/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/

#include <asm/arch/omap.h>
#include <asm/arch/spl.h>
#include <linux/linkage.h>

ENTRY(save_boot_params)
Expand Down Expand Up @@ -59,9 +60,9 @@ ENTRY(save_boot_params)
strb r2, [r3, #BOOT_DEVICE_OFFSET] @ spl_boot_device <- r1

/* boot mode is passed only for devices that can raw/fat mode */
cmp r2, #2
cmp r2, #BOOT_DEVICE_XIP
blt 2f
cmp r2, #7
cmp r2, #BOOT_DEVICE_MMC2
bgt 2f
/* Store the boot mode (raw/FAT) in omap_bootmode */
ldr r2, [r0, #DEV_DESC_PTR_OFFSET] @ get the device descriptor ptr
Expand Down
65 changes: 65 additions & 0 deletions arch/arm/cpu/armv7/rmobile/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, [email protected].
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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
#

include $(TOPDIR)/config.mk

LIB = $(obj)lib$(SOC).o

SOBJS = lowlevel_init.o
COBJS-y += cpu_info.o
COBJS-y += emac.o

COBJS-$(CONFIG_DISPLAY_BOARDINFO) += board.o
COBJS-$(CONFIG_GLOBAL_TIMER) += timer.o
COBJS-$(CONFIG_R8A7740) += cpu_info-r8a7740.o
COBJS-$(CONFIG_R8A7740) += pfc-r8a7740.o
COBJS-$(CONFIG_SH73A0) += cpu_info-sh73a0.o
COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o
COBJS_LN-$(CONFIG_TMU_TIMER) += sh_timer.o

COBJS := $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix $(obj),$(COBJS_LN-y:.o=.c))
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS_LN-y))
SOBJS := $(addprefix $(obj),$(SOBJS))
START := $(addprefix $(obj),$(START))

all: $(obj).depend $(LIB)

$(LIB): $(OBJS)
$(call cmd_link_o_target, $(OBJS))

# from arch/sh/lib/ directory
$(obj)sh_timer.c:
@rm -f $(obj)sh_timer.c
ln -s $(SRCTREE)/arch/sh/lib/time.c $(obj)sh_timer.c

#########################################################################

# defines $(obj).depend target
include $(SRCTREE)/rules.mk

sinclude $(obj).depend

#########################################################################

31 changes: 31 additions & 0 deletions arch/arm/cpu/armv7/rmobile/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* (C) Copyright 2012 Nobuhiro Iwamatsu <[email protected]>
* (C) Copyright 2012 Renesas Solutions Corp.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* 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
*/
#include <common.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>

int checkboard(void)
{
printf("Board: %s\n", sysinfo.board_string);
return 0;
}
26 changes: 26 additions & 0 deletions arch/arm/cpu/armv7/rmobile/config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# (C) Copyright 2002
# Gary Jennejohn, DENX Software Engineering, <[email protected]>
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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
#
PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float

# Make ARMv5 to allow more compilers to work, even though its v7a.
PLATFORM_CPPFLAGS += -march=armv5
Loading

0 comments on commit 1981668

Please sign in to comment.