aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/board-msm7x30.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2011-08-11 19:14:28 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-08-13 06:26:18 -0400
commit9e775ad19f52d70a53797b4d0eb740c52b0a9567 (patch)
tree3136bbf2c8d26bc5c6791a96fdbc5540cc858ba5 /arch/arm/mach-msm/board-msm7x30.c
parentc1becedc8871645278832fabdc6fe138082a495b (diff)
ARM: 7012/1: Set proper TEXT_OFFSET for newer MSMs
MSMs post 8x50 have 2Mb at the beginning of RAM reserved for shared memory. Since the kernel hasn't typically been told this RAM exists, PHYS_OFFSET has been set to 0xN0200000 and the memory atags passed to the kernel have matched. This doesn't play nicely with things such as AUTO_ZRELADDR, which doesn't work at all, and dynamic phys to virt, which requires an MSM specific workaround. Work around these issues by telling the kernel RAM starts at 0xN0000000 (it actually does) and fixup the atags from the bootloader (if necessary) to say the same. In addition, make sure to set TEXT_OFFSET at least 2Mb beyond the start of RAM so that the kernel doesn't end up being decompressed into shared memory. After doing this, AUTO_ZRELADDR should work on MSM with no problems and ARM_PATCH_PHYS_VIRT_16BIT should no longer be necessary. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: David Brown <davidb@codeaurora.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-msm/board-msm7x30.c')
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index b7a84966b711..d1e4cc83b1e6 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -24,6 +24,7 @@
24#include <linux/smsc911x.h> 24#include <linux/smsc911x.h>
25#include <linux/usb/msm_hsusb.h> 25#include <linux/usb/msm_hsusb.h>
26#include <linux/clkdev.h> 26#include <linux/clkdev.h>
27#include <linux/memblock.h>
27 28
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
@@ -42,6 +43,21 @@
42 43
43extern struct sys_timer msm_timer; 44extern struct sys_timer msm_timer;
44 45
46static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag,
47 char **cmdline, struct meminfo *mi)
48{
49 for (; tag->hdr.size; tag = tag_next(tag))
50 if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) {
51 tag->u.mem.start = 0;
52 tag->u.mem.size += SZ_2M;
53 }
54}
55
56static void __init msm7x30_reserve(void)
57{
58 memblock_remove(0x0, SZ_2M);
59}
60
45static int hsusb_phy_init_seq[] = { 61static int hsusb_phy_init_seq[] = {
46 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ 62 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */
47 0x02, 0x36, /* Disable CDR Auto Reset feature */ 63 0x02, 0x36, /* Disable CDR Auto Reset feature */
@@ -107,6 +123,8 @@ static void __init msm7x30_map_io(void)
107 123
108MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") 124MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
109 .boot_params = PLAT_PHYS_OFFSET + 0x100, 125 .boot_params = PLAT_PHYS_OFFSET + 0x100,
126 .fixup = msm7x30_fixup,
127 .reserve = msm7x30_reserve,
110 .map_io = msm7x30_map_io, 128 .map_io = msm7x30_map_io,
111 .init_irq = msm7x30_init_irq, 129 .init_irq = msm7x30_init_irq,
112 .init_machine = msm7x30_init, 130 .init_machine = msm7x30_init,
@@ -115,6 +133,8 @@ MACHINE_END
115 133
116MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") 134MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
117 .boot_params = PLAT_PHYS_OFFSET + 0x100, 135 .boot_params = PLAT_PHYS_OFFSET + 0x100,
136 .fixup = msm7x30_fixup,
137 .reserve = msm7x30_reserve,
118 .map_io = msm7x30_map_io, 138 .map_io = msm7x30_map_io,
119 .init_irq = msm7x30_init_irq, 139 .init_irq = msm7x30_init_irq,
120 .init_machine = msm7x30_init, 140 .init_machine = msm7x30_init,
@@ -123,6 +143,8 @@ MACHINE_END
123 143
124MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") 144MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
125 .boot_params = PLAT_PHYS_OFFSET + 0x100, 145 .boot_params = PLAT_PHYS_OFFSET + 0x100,
146 .fixup = msm7x30_fixup,
147 .reserve = msm7x30_reserve,
126 .map_io = msm7x30_map_io, 148 .map_io = msm7x30_map_io,
127 .init_irq = msm7x30_init_irq, 149 .init_irq = msm7x30_init_irq,
128 .init_machine = msm7x30_init, 150 .init_machine = msm7x30_init,