[PATCH 01/06] ARM: shmobile: Introduce SHMOBILE_FIXUP() helper

Magnus Damm magnus.damm at gmail.com
Wed Jun 5 03:34:18 EDT 2013


From: Magnus Damm <damm at opensource.se>

Introduce SHMOBILE_FIXUP() as a helper function to
allow boards to specify their memory base and size.

Signed-off-by: Magnus Damm <damm at opensource.se>
---

 arch/arm/mach-shmobile/include/mach/common.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- 0001/arch/arm/mach-shmobile/include/mach/common.h
+++ work/arch/arm/mach-shmobile/include/mach/common.h	2013-06-04 13:01:40.000000000 +0900
@@ -37,4 +37,17 @@ static inline void __init shmobile_init_
 	shmobile_cpuidle_init();
 }
 
+#define SHMOBILE_FIXUP(boardname, mem_start, mem_size)			\
+static void __init boardname##_fixup(struct tag *tag, char **cmdline,	\
+				struct meminfo *mi)			\
+{									\
+	for (; tag->hdr.size; tag = tag_next(tag)) {			\
+		if (tag->hdr.tag == ATAG_MEM) {				\
+			tag->u.mem.start = (mem_start);			\
+			tag->u.mem.size = (mem_size);			\
+			break;						\
+		}							\
+	}								\
+}
+
 #endif /* __ARCH_MACH_COMMON_H */



More information about the linux-arm-kernel mailing list