Skip to contentSkip to conversation

arm: socfpga: Zap spl.h and ad-hoc related syms

PATCH New Marek Vasut 2 participants 3 messages Oct 19, 2014 – Oct 22, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: Zap spl.h and ad-hoc related syms

Switch to the common spl.h file and zap the arch/spl.h . Since the arch/spl.h contained various ad-hoc symbols, zap those symbols as well and rework the board configuration a little so it doesn't depend on them.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Vince Bridgers <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Pavel Machek <[email protected]>
---
 arch/arm/cpu/armv7/socfpga/u-boot-spl.lds |  9 ---------
 arch/arm/include/asm/arch-socfpga/spl.h   | 15 ---------------
 arch/arm/include/asm/spl.h                |  2 +-
 include/configs/socfpga_common.h          | 17 +++++++++++------
 4 files changed, 12 insertions(+), 31 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-socfpga/spl.h
arch/arm/cpu/armv7/socfpga/u-boot-spl.lds +0 -9
index db9bdad..569fa41 100644
@@ -42,13 +42,4 @@ SECTIONS
 		. = ALIGN(4);
 		__bss_end = .;
 	} >.sdram
-
-	. = ALIGN(8);
-	__malloc_start = .;
-	. = . + CONFIG_SPL_MALLOC_SIZE;
-	__malloc_end = .;
-
-	. = . + CONFIG_SPL_STACK_SIZE;
-	. = ALIGN(8);
-	__stack_start = .;
 }
arch/arm/include/asm/arch-socfpga/spl.h deleted +0 -15
deleted file mode 100644
index 7e310d5..0000000
@@ -1,15 +0,0 @@
-/*
- *  Copyright (C) 2012 Pavel Machek <[email protected]>
- *
- * SPDX-License-Identifier:	GPL-2.0+
- */
-
-#ifndef _SOCFPGA_SPL_H_
-#define _SOCFPGA_SPL_H_
-
-/* Symbols from linker script */
-extern char __malloc_start, __malloc_end, __stack_start;
-
-#define BOOT_DEVICE_RAM 1
-
-#endif
arch/arm/include/asm/spl.h +1 -1
index e5daf89..8acd7cd 100644
@@ -7,7 +7,7 @@
 #ifndef	_ASM_SPL_H_
 #define	_ASM_SPL_H_
 
-#if defined(CONFIG_OMAP) || defined(CONFIG_SOCFPGA) \
+#if defined(CONFIG_OMAP) \
 	|| defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) \
 	|| defined(CONFIG_EXYNOS4210)
 /* Platform-specific defines */
include/configs/socfpga_common.h +11 -6
index 49504dc..88f46ce 100644
@@ -167,16 +167,21 @@
 
 /*
  * SPL
+ *
+ * SRAM Memory layout:
+ *
+ * 0xFFFF_0000 ...... Start of SRAM
+ * 0xFFFF_xxxx ...... Top of stack (grows down)
+ * 0xFFFF_yyyy ...... Malloc area
+ * 0xFFFF_zzzz ...... Global Data
+ * 0xFFFF_FF00 ...... End of SRAM
  */
 #define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_RAM_DEVICE
-#define CONFIG_SPL_TEXT_BASE		0xFFFF0000
-#define CONFIG_SPL_STACK		CONFIG_SYS_INIT_SP_ADDR
-#define CONFIG_SPL_STACK_SIZE		(4 * 1024)
-#define CONFIG_SPL_MALLOC_SIZE		(5 * 1024)	/* FIXME */
-#define CONFIG_SYS_SPL_MALLOC_START	((unsigned long) (&__malloc_start))
-#define CONFIG_SYS_SPL_MALLOC_SIZE	(&__malloc_end - &__malloc_start)
+#define CONFIG_SPL_TEXT_BASE		CONFIG_SYS_INIT_RAM_ADDR
+#define CONFIG_SYS_SPL_MALLOC_START	CONFIG_SYS_INIT_SP_ADDR
+#define CONFIG_SYS_SPL_MALLOC_SIZE	(5 * 1024)
 
 #define CHUNKSZ_CRC32			(1 * 1024)	/* FIXME: ewww */
 #define CONFIG_CRC32_VERIFY
Signature · 1 line
2.1.1
#1 lore raw

PATCH 1/1 arm: socfpga: Zap spl.h and ad-hoc related syms

Quoted 9 lines · Marek Vasut

Switch to the common spl.h file and zap the arch/spl.h . Since the arch/spl.h contained various ad-hoc symbols, zap those symbols as well and rework the board configuration a little so it doesn't depend on them.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Vince Bridgers <[email protected]>
Cc Albert Aribaud <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author Applied
#2 lore raw

PATCH 1/1 arm: socfpga: Zap spl.h and ad-hoc related syms

Quoted 6 lines · Pavel Machek
Quoted 5 lines · Marek Vasut

Switch to the common spl.h file and zap the arch/spl.h . Since the arch/spl.h contained various ad-hoc symbols, zap those symbols as well and rework the board configuration a little so it doesn't depend on them.

Quoted 7 lines
Quoted 5 lines
Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Vince Bridgers <[email protected]>
Cc Albert Aribaud <[email protected]>

Applied, thanks.

Best regards,
Marek Vasut