summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Harring <ferringb@chromium.org>2012-02-08 23:33:15 -0800
committerBrian Harring <ferringb@chromium.org>2012-02-08 23:34:35 -0800
commit3848b4ed5e95e44be300f3c5132706dbd8271b77 (patch)
tree0c28785a6fbed4277223d5882d92c7e8ffc5db8d
parente7efcd3803a1359c9955a57f4f831c346b052c01 (diff)
Revert "arm: tegra2: add .lds to calculate warm boot code size"
This reverts commit 9a3fbb5f0b02382c7abe0cf40a4f08abbf269d05 Broke tegra2: http://code.google.com/p/chromium-os/issues/detail?id=26116 Change-Id: I7d35211c6ebce7a10750cb1033c6f8ba9a0f63bc Reviewed-on: https://gerrit.chromium.org/gerrit/15560 Reviewed-by: Brian Harring <ferringb@chromium.org> Tested-by: Brian Harring <ferringb@chromium.org>
-rw-r--r--arch/arm/cpu/armv7/tegra-common/warmboot.c4
-rw-r--r--arch/arm/cpu/armv7/tegra2/Makefile8
-rw-r--r--arch/arm/cpu/armv7/tegra2/warmboot_avp.c8
-rw-r--r--arch/arm/cpu/armv7/tegra2/warmboot_avp.lds37
-rw-r--r--arch/arm/include/asm/arch-tegra/warmboot.h1
5 files changed, 11 insertions, 47 deletions
diff --git a/arch/arm/cpu/armv7/tegra-common/warmboot.c b/arch/arm/cpu/armv7/tegra-common/warmboot.c
index 27a61d894a..beb7a146ed 100644
--- a/arch/arm/cpu/armv7/tegra-common/warmboot.c
+++ b/arch/arm/cpu/armv7/tegra-common/warmboot.c
@@ -32,8 +32,6 @@
#include <asm/arch/gp_padctrl.h>
-extern u32 __wb_end; /* End of WB assembly code */
-
/*
* NOTE: If more than one of the following is enabled, only one of them will
* actually be used. RANDOM takes precedence over PATTERN and ZERO, and
@@ -168,7 +166,7 @@ int warmboot_prepare_code(u32 seg_address, u32 seg_length)
determine_crypto_options(&is_encrypted, &is_signed, &use_zero_key);
/* Get the actual code limits. */
- length = roundup(((u32)&__wb_end - (u32)wb_start), 16);
+ length = roundup(((u32)wb_end - (u32)wb_start), 16);
/*
* The region specified by seg_address must not be in IRAM and must be
diff --git a/arch/arm/cpu/armv7/tegra2/Makefile b/arch/arm/cpu/armv7/tegra2/Makefile
index b42a6b31b2..cb5c261107 100644
--- a/arch/arm/cpu/armv7/tegra2/Makefile
+++ b/arch/arm/cpu/armv7/tegra2/Makefile
@@ -37,17 +37,11 @@ COBJS-y := board.o pinmux.o sys_info.o
COBJS-$(CONFIG_VIDEO_TEGRA) += display.o
COBJS-$(CONFIG_TEGRA2_WARMBOOT) += warmboot.o warmboot_avp.o
-ifeq ($(CONFIG_TEGRA2_WARMBOOT),y)
- LDSCRIPT= warmboot_avp.lds
-else
- LDSCRIPT=
-endif
-
SOBJS := $(SOBJS-y)
COBJS := $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS) $(LDSCRIPT))
+OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
all: $(obj).depend $(LIB)
diff --git a/arch/arm/cpu/armv7/tegra2/warmboot_avp.c b/arch/arm/cpu/armv7/tegra2/warmboot_avp.c
index 121425ba23..bb1872fe12 100644
--- a/arch/arm/cpu/armv7/tegra2/warmboot_avp.c
+++ b/arch/arm/cpu/armv7/tegra2/warmboot_avp.c
@@ -303,3 +303,11 @@ do_reset:
goto do_reset;
}
+/*
+ * wb_end() is a dummy function, and must be directly following wb_start(),
+ * and is used to calculate the size of wb_start().
+ */
+void wb_end(void)
+{
+}
+
diff --git a/arch/arm/cpu/armv7/tegra2/warmboot_avp.lds b/arch/arm/cpu/armv7/tegra2/warmboot_avp.lds
deleted file mode 100644
index 8fc377292b..0000000000
--- a/arch/arm/cpu/armv7/tegra2/warmboot_avp.lds
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * (C) Copyright 2010 - 2011
- * NVIDIA Corporation <www.nvidia.com>
- *
- * 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
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-
-SECTIONS
-{
- . = 0x00000000;
- . = ALIGN(4);
-
- .text :
- {
- warmboot_avp.o (.text)
- __wb_end = .;
- }
-}
diff --git a/arch/arm/include/asm/arch-tegra/warmboot.h b/arch/arm/include/asm/arch-tegra/warmboot.h
index 0d4da269ee..c1a9a15929 100644
--- a/arch/arm/include/asm/arch-tegra/warmboot.h
+++ b/arch/arm/include/asm/arch-tegra/warmboot.h
@@ -79,5 +79,6 @@ void warmboot_save_sdram_params(void);
int warmboot_prepare_code(u32 seg_address, u32 seg_length);
int sign_data_block(u8 *source, u32 length, u8 *signature);
void wb_start(void); /* Start of WB assembly code */
+void wb_end(void); /* End of WB assembly code */
#endif