diff options
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r-- | arch/arm/mach-msm/Makefile.boot | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-halibut.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-mahimahi.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-msm7x27.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-msm7x30.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-msm8960.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-msm8x60.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-qsd8x50.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-sapphire.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-trout-mmc.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-trout-panel.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-trout.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/debug-macro.S | 4 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/entry-macro-qgic.S | 73 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/gpio.h | 27 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/memory.h | 35 | ||||
-rw-r--r-- | arch/arm/mach-msm/platsmp.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-msm/timer.c | 69 |
19 files changed, 148 insertions, 210 deletions
diff --git a/arch/arm/mach-msm/Makefile.boot b/arch/arm/mach-msm/Makefile.boot index 24dfbf8c07c..9b803a578b4 100644 --- a/arch/arm/mach-msm/Makefile.boot +++ b/arch/arm/mach-msm/Makefile.boot | |||
@@ -1,3 +1,3 @@ | |||
1 | zreladdr-y := 0x10008000 | 1 | zreladdr-y += 0x10008000 |
2 | params_phys-y := 0x10000100 | 2 | params_phys-y := 0x10000100 |
3 | initrd_phys-y := 0x10800000 | 3 | initrd_phys-y := 0x10800000 |
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 18a3c97bc86..a60ab6d04ec 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -78,8 +78,8 @@ static void __init halibut_init(void) | |||
78 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 78 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
79 | } | 79 | } |
80 | 80 | ||
81 | static void __init halibut_fixup(struct machine_desc *desc, struct tag *tags, | 81 | static void __init halibut_fixup(struct tag *tags, char **cmdline, |
82 | char **cmdline, struct meminfo *mi) | 82 | struct meminfo *mi) |
83 | { | 83 | { |
84 | mi->nr_banks=1; | 84 | mi->nr_banks=1; |
85 | mi->bank[0].start = PHYS_OFFSET; | 85 | mi->bank[0].start = PHYS_OFFSET; |
@@ -93,7 +93,7 @@ static void __init halibut_map_io(void) | |||
93 | } | 93 | } |
94 | 94 | ||
95 | MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") | 95 | MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") |
96 | .boot_params = 0x10000100, | 96 | .atag_offset = 0x100, |
97 | .fixup = halibut_fixup, | 97 | .fixup = halibut_fixup, |
98 | .map_io = halibut_map_io, | 98 | .map_io = halibut_map_io, |
99 | .init_irq = halibut_init_irq, | 99 | .init_irq = halibut_init_irq, |
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c index 7a9a03eb189..5a4882fc6f7 100644 --- a/arch/arm/mach-msm/board-mahimahi.c +++ b/arch/arm/mach-msm/board-mahimahi.c | |||
@@ -53,8 +53,8 @@ static void __init mahimahi_init(void) | |||
53 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 53 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void __init mahimahi_fixup(struct machine_desc *desc, struct tag *tags, | 56 | static void __init mahimahi_fixup(struct tag *tags, char **cmdline, |
57 | char **cmdline, struct meminfo *mi) | 57 | struct meminfo *mi) |
58 | { | 58 | { |
59 | mi->nr_banks = 2; | 59 | mi->nr_banks = 2; |
60 | mi->bank[0].start = PHYS_OFFSET; | 60 | mi->bank[0].start = PHYS_OFFSET; |
@@ -74,7 +74,7 @@ static void __init mahimahi_map_io(void) | |||
74 | extern struct sys_timer msm_timer; | 74 | extern struct sys_timer msm_timer; |
75 | 75 | ||
76 | MACHINE_START(MAHIMAHI, "mahimahi") | 76 | MACHINE_START(MAHIMAHI, "mahimahi") |
77 | .boot_params = 0x20000100, | 77 | .atag_offset = 0x100, |
78 | .fixup = mahimahi_fixup, | 78 | .fixup = mahimahi_fixup, |
79 | .map_io = mahimahi_map_io, | 79 | .map_io = mahimahi_map_io, |
80 | .init_irq = msm_init_irq, | 80 | .init_irq = msm_init_irq, |
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c index c03f269e2e4..6d84ee740df 100644 --- a/arch/arm/mach-msm/board-msm7x27.c +++ b/arch/arm/mach-msm/board-msm7x27.c | |||
@@ -13,7 +13,7 @@ | |||
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | 14 | * |
15 | */ | 15 | */ |
16 | 16 | #include <linux/gpio.h> | |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
@@ -34,7 +34,6 @@ | |||
34 | 34 | ||
35 | #include <mach/vreg.h> | 35 | #include <mach/vreg.h> |
36 | #include <mach/mpp.h> | 36 | #include <mach/mpp.h> |
37 | #include <mach/gpio.h> | ||
38 | #include <mach/board.h> | 37 | #include <mach/board.h> |
39 | #include <mach/msm_iomap.h> | 38 | #include <mach/msm_iomap.h> |
40 | 39 | ||
@@ -130,7 +129,7 @@ static void __init msm7x2x_map_io(void) | |||
130 | } | 129 | } |
131 | 130 | ||
132 | MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF") | 131 | MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF") |
133 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 132 | .atag_offset = 0x100, |
134 | .map_io = msm7x2x_map_io, | 133 | .map_io = msm7x2x_map_io, |
135 | .init_irq = msm7x2x_init_irq, | 134 | .init_irq = msm7x2x_init_irq, |
136 | .init_machine = msm7x2x_init, | 135 | .init_machine = msm7x2x_init, |
@@ -138,7 +137,7 @@ MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF") | |||
138 | MACHINE_END | 137 | MACHINE_END |
139 | 138 | ||
140 | MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA") | 139 | MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA") |
141 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 140 | .atag_offset = 0x100, |
142 | .map_io = msm7x2x_map_io, | 141 | .map_io = msm7x2x_map_io, |
143 | .init_irq = msm7x2x_init_irq, | 142 | .init_irq = msm7x2x_init_irq, |
144 | .init_machine = msm7x2x_init, | 143 | .init_machine = msm7x2x_init, |
@@ -146,7 +145,7 @@ MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA") | |||
146 | MACHINE_END | 145 | MACHINE_END |
147 | 146 | ||
148 | MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF") | 147 | MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF") |
149 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 148 | .atag_offset = 0x100, |
150 | .map_io = msm7x2x_map_io, | 149 | .map_io = msm7x2x_map_io, |
151 | .init_irq = msm7x2x_init_irq, | 150 | .init_irq = msm7x2x_init_irq, |
152 | .init_machine = msm7x2x_init, | 151 | .init_machine = msm7x2x_init, |
@@ -154,7 +153,7 @@ MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF") | |||
154 | MACHINE_END | 153 | MACHINE_END |
155 | 154 | ||
156 | MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA") | 155 | MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA") |
157 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 156 | .atag_offset = 0x100, |
158 | .map_io = msm7x2x_map_io, | 157 | .map_io = msm7x2x_map_io, |
159 | .init_irq = msm7x2x_init_irq, | 158 | .init_irq = msm7x2x_init_irq, |
160 | .init_machine = msm7x2x_init, | 159 | .init_machine = msm7x2x_init, |
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index b7a84966b71..71de5062c71 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
15 | * 02110-1301, USA. | 15 | * 02110-1301, USA. |
16 | */ | 16 | */ |
17 | 17 | #include <linux/gpio.h> | |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
@@ -24,13 +24,13 @@ | |||
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> |
30 | #include <asm/memory.h> | 31 | #include <asm/memory.h> |
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
32 | 33 | ||
33 | #include <mach/gpio.h> | ||
34 | #include <mach/board.h> | 34 | #include <mach/board.h> |
35 | #include <mach/msm_iomap.h> | 35 | #include <mach/msm_iomap.h> |
36 | #include <mach/dma.h> | 36 | #include <mach/dma.h> |
@@ -42,6 +42,21 @@ | |||
42 | 42 | ||
43 | extern struct sys_timer msm_timer; | 43 | extern struct sys_timer msm_timer; |
44 | 44 | ||
45 | static void __init msm7x30_fixup(struct machine_desc *desc, struct tag *tag, | ||
46 | char **cmdline, struct meminfo *mi) | ||
47 | { | ||
48 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
49 | if (tag->hdr.tag == ATAG_MEM && tag->u.mem.start == 0x200000) { | ||
50 | tag->u.mem.start = 0; | ||
51 | tag->u.mem.size += SZ_2M; | ||
52 | } | ||
53 | } | ||
54 | |||
55 | static void __init msm7x30_reserve(void) | ||
56 | { | ||
57 | memblock_remove(0x0, SZ_2M); | ||
58 | } | ||
59 | |||
45 | static int hsusb_phy_init_seq[] = { | 60 | static int hsusb_phy_init_seq[] = { |
46 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ | 61 | 0x30, 0x32, /* Enable and set Pre-Emphasis Depth to 20% */ |
47 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ | 62 | 0x02, 0x36, /* Disable CDR Auto Reset feature */ |
@@ -106,7 +121,9 @@ static void __init msm7x30_map_io(void) | |||
106 | } | 121 | } |
107 | 122 | ||
108 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") | 123 | MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") |
109 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 124 | .atag_offset = 0x100, |
125 | .fixup = msm7x30_fixup, | ||
126 | .reserve = msm7x30_reserve, | ||
110 | .map_io = msm7x30_map_io, | 127 | .map_io = msm7x30_map_io, |
111 | .init_irq = msm7x30_init_irq, | 128 | .init_irq = msm7x30_init_irq, |
112 | .init_machine = msm7x30_init, | 129 | .init_machine = msm7x30_init, |
@@ -114,7 +131,9 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") | |||
114 | MACHINE_END | 131 | MACHINE_END |
115 | 132 | ||
116 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | 133 | MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") |
117 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 134 | .atag_offset = 0x100, |
135 | .fixup = msm7x30_fixup, | ||
136 | .reserve = msm7x30_reserve, | ||
118 | .map_io = msm7x30_map_io, | 137 | .map_io = msm7x30_map_io, |
119 | .init_irq = msm7x30_init_irq, | 138 | .init_irq = msm7x30_init_irq, |
120 | .init_machine = msm7x30_init, | 139 | .init_machine = msm7x30_init, |
@@ -122,7 +141,9 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") | |||
122 | MACHINE_END | 141 | MACHINE_END |
123 | 142 | ||
124 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") | 143 | MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") |
125 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 144 | .atag_offset = 0x100, |
145 | .fixup = msm7x30_fixup, | ||
146 | .reserve = msm7x30_reserve, | ||
126 | .map_io = msm7x30_map_io, | 147 | .map_io = msm7x30_map_io, |
127 | .init_irq = msm7x30_init_irq, | 148 | .init_irq = msm7x30_init_irq, |
128 | .init_machine = msm7x30_init, | 149 | .init_machine = msm7x30_init, |
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c index 35c7ceeb3f2..b04468e7d00 100644 --- a/arch/arm/mach-msm/board-msm8960.c +++ b/arch/arm/mach-msm/board-msm8960.c | |||
@@ -20,16 +20,34 @@ | |||
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/clkdev.h> | 22 | #include <linux/clkdev.h> |
23 | #include <linux/memblock.h> | ||
23 | 24 | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | #include <asm/setup.h> | ||
27 | 29 | ||
28 | #include <mach/board.h> | 30 | #include <mach/board.h> |
29 | #include <mach/msm_iomap.h> | 31 | #include <mach/msm_iomap.h> |
30 | 32 | ||
31 | #include "devices.h" | 33 | #include "devices.h" |
32 | 34 | ||
35 | static void __init msm8960_fixup(struct machine_desc *desc, struct tag *tag, | ||
36 | char **cmdline, struct meminfo *mi) | ||
37 | { | ||
38 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
39 | if (tag->hdr.tag == ATAG_MEM && | ||
40 | tag->u.mem.start == 0x40200000) { | ||
41 | tag->u.mem.start = 0x40000000; | ||
42 | tag->u.mem.size += SZ_2M; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | static void __init msm8960_reserve(void) | ||
47 | { | ||
48 | memblock_remove(0x40000000, SZ_2M); | ||
49 | } | ||
50 | |||
33 | static void __init msm8960_map_io(void) | 51 | static void __init msm8960_map_io(void) |
34 | { | 52 | { |
35 | msm_map_msm8960_io(); | 53 | msm_map_msm8960_io(); |
@@ -76,6 +94,8 @@ static void __init msm8960_rumi3_init(void) | |||
76 | } | 94 | } |
77 | 95 | ||
78 | MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | 96 | MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") |
97 | .fixup = msm8960_fixup, | ||
98 | .reserve = msm8960_reserve, | ||
79 | .map_io = msm8960_map_io, | 99 | .map_io = msm8960_map_io, |
80 | .init_irq = msm8960_init_irq, | 100 | .init_irq = msm8960_init_irq, |
81 | .timer = &msm_timer, | 101 | .timer = &msm_timer, |
@@ -83,6 +103,8 @@ MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR") | |||
83 | MACHINE_END | 103 | MACHINE_END |
84 | 104 | ||
85 | MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") | 105 | MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3") |
106 | .fixup = msm8960_fixup, | ||
107 | .reserve = msm8960_reserve, | ||
86 | .map_io = msm8960_map_io, | 108 | .map_io = msm8960_map_io, |
87 | .init_irq = msm8960_init_irq, | 109 | .init_irq = msm8960_init_irq, |
88 | .timer = &msm_timer, | 110 | .timer = &msm_timer, |
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c index 1163b6fd05d..106170fb184 100644 --- a/arch/arm/mach-msm/board-msm8x60.c +++ b/arch/arm/mach-msm/board-msm8x60.c | |||
@@ -20,14 +20,31 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/memblock.h> | ||
23 | 24 | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/hardware/gic.h> | 27 | #include <asm/hardware/gic.h> |
28 | #include <asm/setup.h> | ||
27 | 29 | ||
28 | #include <mach/board.h> | 30 | #include <mach/board.h> |
29 | #include <mach/msm_iomap.h> | 31 | #include <mach/msm_iomap.h> |
30 | 32 | ||
33 | static void __init msm8x60_fixup(struct machine_desc *desc, struct tag *tag, | ||
34 | char **cmdline, struct meminfo *mi) | ||
35 | { | ||
36 | for (; tag->hdr.size; tag = tag_next(tag)) | ||
37 | if (tag->hdr.tag == ATAG_MEM && | ||
38 | tag->u.mem.start == 0x40200000) { | ||
39 | tag->u.mem.start = 0x40000000; | ||
40 | tag->u.mem.size += SZ_2M; | ||
41 | } | ||
42 | } | ||
43 | |||
44 | static void __init msm8x60_reserve(void) | ||
45 | { | ||
46 | memblock_remove(0x40000000, SZ_2M); | ||
47 | } | ||
31 | 48 | ||
32 | static void __init msm8x60_map_io(void) | 49 | static void __init msm8x60_map_io(void) |
33 | { | 50 | { |
@@ -36,8 +53,6 @@ static void __init msm8x60_map_io(void) | |||
36 | 53 | ||
37 | static void __init msm8x60_init_irq(void) | 54 | static void __init msm8x60_init_irq(void) |
38 | { | 55 | { |
39 | unsigned int i; | ||
40 | |||
41 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, | 56 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, |
42 | (void *)MSM_QGIC_CPU_BASE); | 57 | (void *)MSM_QGIC_CPU_BASE); |
43 | 58 | ||
@@ -49,15 +64,6 @@ static void __init msm8x60_init_irq(void) | |||
49 | */ | 64 | */ |
50 | if (!machine_is_msm8x60_sim()) | 65 | if (!machine_is_msm8x60_sim()) |
51 | writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET); | 66 | writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET); |
52 | |||
53 | /* FIXME: Not installing AVS_SVICINT and AVS_SVICINTSWDONE yet | ||
54 | * as they are configured as level, which does not play nice with | ||
55 | * handle_percpu_irq. | ||
56 | */ | ||
57 | for (i = GIC_PPI_START; i < GIC_SPI_START; i++) { | ||
58 | if (i != AVS_SVICINT && i != AVS_SVICINTSWDONE) | ||
59 | irq_set_handler(i, handle_percpu_irq); | ||
60 | } | ||
61 | } | 67 | } |
62 | 68 | ||
63 | static void __init msm8x60_init(void) | 69 | static void __init msm8x60_init(void) |
@@ -65,6 +71,8 @@ static void __init msm8x60_init(void) | |||
65 | } | 71 | } |
66 | 72 | ||
67 | MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | 73 | MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") |
74 | .fixup = msm8x60_fixup, | ||
75 | .reserve = msm8x60_reserve, | ||
68 | .map_io = msm8x60_map_io, | 76 | .map_io = msm8x60_map_io, |
69 | .init_irq = msm8x60_init_irq, | 77 | .init_irq = msm8x60_init_irq, |
70 | .init_machine = msm8x60_init, | 78 | .init_machine = msm8x60_init, |
@@ -72,6 +80,8 @@ MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3") | |||
72 | MACHINE_END | 80 | MACHINE_END |
73 | 81 | ||
74 | MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | 82 | MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") |
83 | .fixup = msm8x60_fixup, | ||
84 | .reserve = msm8x60_reserve, | ||
75 | .map_io = msm8x60_map_io, | 85 | .map_io = msm8x60_map_io, |
76 | .init_irq = msm8x60_init_irq, | 86 | .init_irq = msm8x60_init_irq, |
77 | .init_machine = msm8x60_init, | 87 | .init_machine = msm8x60_init, |
@@ -79,6 +89,8 @@ MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF") | |||
79 | MACHINE_END | 89 | MACHINE_END |
80 | 90 | ||
81 | MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | 91 | MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") |
92 | .fixup = msm8x60_fixup, | ||
93 | .reserve = msm8x60_reserve, | ||
82 | .map_io = msm8x60_map_io, | 94 | .map_io = msm8x60_map_io, |
83 | .init_irq = msm8x60_init_irq, | 95 | .init_irq = msm8x60_init_irq, |
84 | .init_machine = msm8x60_init, | 96 | .init_machine = msm8x60_init, |
@@ -86,6 +98,8 @@ MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR") | |||
86 | MACHINE_END | 98 | MACHINE_END |
87 | 99 | ||
88 | MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") | 100 | MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA") |
101 | .fixup = msm8x60_fixup, | ||
102 | .reserve = msm8x60_reserve, | ||
89 | .map_io = msm8x60_map_io, | 103 | .map_io = msm8x60_map_io, |
90 | .init_irq = msm8x60_init_irq, | 104 | .init_irq = msm8x60_init_irq, |
91 | .init_machine = msm8x60_init, | 105 | .init_machine = msm8x60_init, |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 6a96911b0ad..7e8909c978c 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
15 | * 02110-1301, USA. | 15 | * 02110-1301, USA. |
16 | */ | 16 | */ |
17 | 17 | #include <linux/gpio.h> | |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
@@ -32,7 +32,6 @@ | |||
32 | #include <mach/board.h> | 32 | #include <mach/board.h> |
33 | #include <mach/irqs.h> | 33 | #include <mach/irqs.h> |
34 | #include <mach/sirc.h> | 34 | #include <mach/sirc.h> |
35 | #include <mach/gpio.h> | ||
36 | #include <mach/vreg.h> | 35 | #include <mach/vreg.h> |
37 | #include <mach/mmc.h> | 36 | #include <mach/mmc.h> |
38 | 37 | ||
@@ -193,7 +192,7 @@ static void __init qsd8x50_init(void) | |||
193 | } | 192 | } |
194 | 193 | ||
195 | MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") | 194 | MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") |
196 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 195 | .atag_offset = 0x100, |
197 | .map_io = qsd8x50_map_io, | 196 | .map_io = qsd8x50_map_io, |
198 | .init_irq = qsd8x50_init_irq, | 197 | .init_irq = qsd8x50_init_irq, |
199 | .init_machine = qsd8x50_init, | 198 | .init_machine = qsd8x50_init, |
@@ -201,7 +200,7 @@ MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") | |||
201 | MACHINE_END | 200 | MACHINE_END |
202 | 201 | ||
203 | MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") | 202 | MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") |
204 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 203 | .atag_offset = 0x100, |
205 | .map_io = qsd8x50_map_io, | 204 | .map_io = qsd8x50_map_io, |
206 | .init_irq = qsd8x50_init_irq, | 205 | .init_irq = qsd8x50_init_irq, |
207 | .init_machine = qsd8x50_init, | 206 | .init_machine = qsd8x50_init, |
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c index 68f930f07d7..32b465763db 100644 --- a/arch/arm/mach-msm/board-sapphire.c +++ b/arch/arm/mach-msm/board-sapphire.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | */ | 13 | */ |
14 | 14 | #include <linux/gpio.h> | |
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
@@ -22,7 +22,6 @@ | |||
22 | 22 | ||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | 24 | ||
25 | #include <asm/gpio.h> | ||
26 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
27 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -77,8 +76,8 @@ static struct map_desc sapphire_io_desc[] __initdata = { | |||
77 | } | 76 | } |
78 | }; | 77 | }; |
79 | 78 | ||
80 | static void __init sapphire_fixup(struct machine_desc *desc, struct tag *tags, | 79 | static void __init sapphire_fixup(struct tag *tags, char **cmdline, |
81 | char **cmdline, struct meminfo *mi) | 80 | struct meminfo *mi) |
82 | { | 81 | { |
83 | int smi_sz = parse_tag_smi((const struct tag *)tags); | 82 | int smi_sz = parse_tag_smi((const struct tag *)tags); |
84 | 83 | ||
@@ -105,7 +104,7 @@ static void __init sapphire_map_io(void) | |||
105 | 104 | ||
106 | MACHINE_START(SAPPHIRE, "sapphire") | 105 | MACHINE_START(SAPPHIRE, "sapphire") |
107 | /* Maintainer: Brian Swetland <swetland@google.com> */ | 106 | /* Maintainer: Brian Swetland <swetland@google.com> */ |
108 | .boot_params = PLAT_PHYS_OFFSET + 0x100, | 107 | .atag_offset = 0x100, |
109 | .fixup = sapphire_fixup, | 108 | .fixup = sapphire_fixup, |
110 | .map_io = sapphire_map_io, | 109 | .map_io = sapphire_map_io, |
111 | .init_irq = sapphire_init_irq, | 110 | .init_irq = sapphire_init_irq, |
diff --git a/arch/arm/mach-msm/board-trout-mmc.c b/arch/arm/mach-msm/board-trout-mmc.c index f7a9724788b..8650342b749 100644 --- a/arch/arm/mach-msm/board-trout-mmc.c +++ b/arch/arm/mach-msm/board-trout-mmc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* linux/arch/arm/mach-msm/board-trout-mmc.c | 1 | /* linux/arch/arm/mach-msm/board-trout-mmc.c |
2 | ** Author: Brian Swetland <swetland@google.com> | 2 | ** Author: Brian Swetland <swetland@google.com> |
3 | */ | 3 | */ |
4 | 4 | #include <linux/gpio.h> | |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | #include <linux/debugfs.h> | 12 | #include <linux/debugfs.h> |
13 | 13 | ||
14 | #include <asm/gpio.h> | ||
15 | #include <asm/io.h> | 14 | #include <asm/io.h> |
16 | 15 | ||
17 | #include <mach/vreg.h> | 16 | #include <mach/vreg.h> |
diff --git a/arch/arm/mach-msm/board-trout-panel.c b/arch/arm/mach-msm/board-trout-panel.c index 729bb49a44c..25105c1027f 100644 --- a/arch/arm/mach-msm/board-trout-panel.c +++ b/arch/arm/mach-msm/board-trout-panel.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* linux/arch/arm/mach-msm/board-trout-mddi.c | 1 | /* linux/arch/arm/mach-msm/board-trout-mddi.c |
2 | ** Author: Brian Swetland <swetland@google.com> | 2 | ** Author: Brian Swetland <swetland@google.com> |
3 | */ | 3 | */ |
4 | 4 | #include <linux/gpio.h> | |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/platform_device.h> | 7 | #include <linux/platform_device.h> |
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/err.h> | 11 | #include <linux/err.h> |
12 | 12 | ||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/gpio.h> | ||
15 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
16 | 15 | ||
17 | #include <mach/msm_fb.h> | 16 | #include <mach/msm_fb.h> |
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index 814386772c6..6b9b227c87c 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c | |||
@@ -48,8 +48,8 @@ static void __init trout_init_irq(void) | |||
48 | msm_init_irq(); | 48 | msm_init_irq(); |
49 | } | 49 | } |
50 | 50 | ||
51 | static void __init trout_fixup(struct machine_desc *desc, struct tag *tags, | 51 | static void __init trout_fixup(struct tag *tags, char **cmdline, |
52 | char **cmdline, struct meminfo *mi) | 52 | struct meminfo *mi) |
53 | { | 53 | { |
54 | mi->nr_banks = 1; | 54 | mi->nr_banks = 1; |
55 | mi->bank[0].start = PHYS_OFFSET; | 55 | mi->bank[0].start = PHYS_OFFSET; |
@@ -93,7 +93,7 @@ static void __init trout_map_io(void) | |||
93 | } | 93 | } |
94 | 94 | ||
95 | MACHINE_START(TROUT, "HTC Dream") | 95 | MACHINE_START(TROUT, "HTC Dream") |
96 | .boot_params = 0x10000100, | 96 | .atag_offset = 0x100, |
97 | .fixup = trout_fixup, | 97 | .fixup = trout_fixup, |
98 | .map_io = trout_map_io, | 98 | .map_io = trout_map_io, |
99 | .init_irq = trout_init_irq, | 99 | .init_irq = trout_init_irq, |
diff --git a/arch/arm/mach-msm/clock.c b/arch/arm/mach-msm/clock.c index 22a53766962..d9145dfc2a3 100644 --- a/arch/arm/mach-msm/clock.c +++ b/arch/arm/mach-msm/clock.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <linux/err.h> | 19 | #include <linux/err.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/pm_qos_params.h> | 21 | #include <linux/pm_qos.h> |
22 | #include <linux/mutex.h> | 22 | #include <linux/mutex.h> |
23 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
24 | #include <linux/string.h> | 24 | #include <linux/string.h> |
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S index 646b99ebc77..2dc73ccddb1 100644 --- a/arch/arm/mach-msm/include/mach/debug-macro.S +++ b/arch/arm/mach-msm/include/mach/debug-macro.S | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <mach/msm_iomap.h> | 20 | #include <mach/msm_iomap.h> |
21 | 21 | ||
22 | #if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE) | 22 | #if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE) |
23 | .macro addruart, rp, rv | 23 | .macro addruart, rp, rv, tmp |
24 | ldr \rp, =MSM_DEBUG_UART_PHYS | 24 | ldr \rp, =MSM_DEBUG_UART_PHYS |
25 | ldr \rv, =MSM_DEBUG_UART_BASE | 25 | ldr \rv, =MSM_DEBUG_UART_BASE |
26 | .endm | 26 | .endm |
@@ -37,7 +37,7 @@ | |||
37 | beq 1001b | 37 | beq 1001b |
38 | .endm | 38 | .endm |
39 | #else | 39 | #else |
40 | .macro addruart, rp, rv | 40 | .macro addruart, rp, rv, tmp |
41 | mov \rv, #0xff000000 | 41 | mov \rv, #0xff000000 |
42 | orr \rv, \rv, #0x00f00000 | 42 | orr \rv, \rv, #0x00f00000 |
43 | .endm | 43 | .endm |
diff --git a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S b/arch/arm/mach-msm/include/mach/entry-macro-qgic.S index 12467157afb..717076f3ca7 100644 --- a/arch/arm/mach-msm/include/mach/entry-macro-qgic.S +++ b/arch/arm/mach-msm/include/mach/entry-macro-qgic.S | |||
@@ -8,81 +8,10 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <mach/hardware.h> | 11 | #include <asm/hardware/entry-macro-gic.S> |
12 | #include <asm/hardware/gic.h> | ||
13 | 12 | ||
14 | .macro disable_fiq | 13 | .macro disable_fiq |
15 | .endm | 14 | .endm |
16 | 15 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | ldr \base, =gic_cpu_base_addr | ||
19 | ldr \base, [\base] | ||
20 | .endm | ||
21 | |||
22 | .macro arch_ret_to_user, tmp1, tmp2 | 16 | .macro arch_ret_to_user, tmp1, tmp2 |
23 | .endm | 17 | .endm |
24 | |||
25 | /* | ||
26 | * The interrupt numbering scheme is defined in the | ||
27 | * interrupt controller spec. To wit: | ||
28 | * | ||
29 | * Migrated the code from ARM MP port to be more consistent | ||
30 | * with interrupt processing , the following still holds true | ||
31 | * however, all interrupts are treated the same regardless of | ||
32 | * if they are local IPI or PPI | ||
33 | * | ||
34 | * Interrupts 0-15 are IPI | ||
35 | * 16-31 are PPI | ||
36 | * (16-18 are the timers) | ||
37 | * 32-1020 are global | ||
38 | * 1021-1022 are reserved | ||
39 | * 1023 is "spurious" (no interrupt) | ||
40 | * | ||
41 | * A simple read from the controller will tell us the number of the | ||
42 | * highest priority enabled interrupt. We then just need to check | ||
43 | * whether it is in the valid range for an IRQ (0-1020 inclusive). | ||
44 | * | ||
45 | * Base ARM code assumes that the local (private) peripheral interrupts | ||
46 | * are not valid, we treat them differently, in that the privates are | ||
47 | * handled like normal shared interrupts with the exception that only | ||
48 | * one processor can register the interrupt and the handler must be | ||
49 | * the same for all processors. | ||
50 | */ | ||
51 | |||
52 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
53 | |||
54 | ldr \irqstat, [\base, #GIC_CPU_INTACK] /* bits 12-10 =srcCPU, | ||
55 | 9-0 =int # */ | ||
56 | |||
57 | bic \irqnr, \irqstat, #0x1c00 @mask src | ||
58 | cmp \irqnr, #15 | ||
59 | ldr \tmp, =1021 | ||
60 | cmpcc \irqnr, \irqnr | ||
61 | cmpne \irqnr, \tmp | ||
62 | cmpcs \irqnr, \irqnr | ||
63 | |||
64 | .endm | ||
65 | |||
66 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
67 | * register) is preserved from the macro above. | ||
68 | * If there is an IPI, we immediately signal end of interrupt on the | ||
69 | * controller, since this requires the original irqstat value which | ||
70 | * we won't easily be able to recreate later. | ||
71 | */ | ||
72 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
73 | bic \irqnr, \irqstat, #0x1c00 | ||
74 | cmp \irqnr, #16 | ||
75 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
76 | cmpcs \irqnr, \irqnr | ||
77 | .endm | ||
78 | |||
79 | /* As above, this assumes that irqstat and base are preserved.. */ | ||
80 | |||
81 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
82 | bic \irqnr, \irqstat, #0x1c00 | ||
83 | mov \tmp, #0 | ||
84 | cmp \irqnr, #16 | ||
85 | moveq \tmp, #1 | ||
86 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
87 | cmp \tmp, #0 | ||
88 | .endm | ||
diff --git a/arch/arm/mach-msm/include/mach/gpio.h b/arch/arm/mach-msm/include/mach/gpio.h index 36ad50d3bfa..40a8c178f10 100644 --- a/arch/arm/mach-msm/include/mach/gpio.h +++ b/arch/arm/mach-msm/include/mach/gpio.h | |||
@@ -1,26 +1 @@ | |||
1 | /* | /* empty */ | |
2 | * Copyright (C) 2007 Google, Inc. | ||
3 | * Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved. | ||
4 | * Author: Mike Lockwood <lockwood@android.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | #ifndef __ASM_ARCH_MSM_GPIO_H | ||
17 | #define __ASM_ARCH_MSM_GPIO_H | ||
18 | |||
19 | #include <asm-generic/gpio.h> | ||
20 | |||
21 | #define gpio_get_value __gpio_get_value | ||
22 | #define gpio_set_value __gpio_set_value | ||
23 | #define gpio_cansleep __gpio_cansleep | ||
24 | #define gpio_to_irq __gpio_to_irq | ||
25 | |||
26 | #endif /* __ASM_ARCH_MSM_GPIO_H */ | ||
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h deleted file mode 100644 index f2f8d299ba9..00000000000 --- a/arch/arm/mach-msm/include/mach/memory.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* arch/arm/mach-msm/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * | ||
5 | * This software is licensed under the terms of the GNU General Public | ||
6 | * License version 2, as published by the Free Software Foundation, and | ||
7 | * may be copied, distributed, and modified under those terms. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_MEMORY_H | ||
17 | #define __ASM_ARCH_MEMORY_H | ||
18 | |||
19 | /* physical offset of RAM */ | ||
20 | #if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A) | ||
21 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
22 | #elif defined(CONFIG_ARCH_QSD8X50) | ||
23 | #define PLAT_PHYS_OFFSET UL(0x20000000) | ||
24 | #elif defined(CONFIG_ARCH_MSM7X30) | ||
25 | #define PLAT_PHYS_OFFSET UL(0x00200000) | ||
26 | #elif defined(CONFIG_ARCH_MSM8X60) | ||
27 | #define PLAT_PHYS_OFFSET UL(0x40200000) | ||
28 | #elif defined(CONFIG_ARCH_MSM8960) | ||
29 | #define PLAT_PHYS_OFFSET UL(0x40200000) | ||
30 | #else | ||
31 | #define PLAT_PHYS_OFFSET UL(0x10000000) | ||
32 | #endif | ||
33 | |||
34 | #endif | ||
35 | |||
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 1a1af9e5625..72765952091 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
@@ -156,6 +156,12 @@ void __init smp_init_cpus(void) | |||
156 | { | 156 | { |
157 | unsigned int i, ncores = get_core_count(); | 157 | unsigned int i, ncores = get_core_count(); |
158 | 158 | ||
159 | if (ncores > nr_cpu_ids) { | ||
160 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", | ||
161 | ncores, nr_cpu_ids); | ||
162 | ncores = nr_cpu_ids; | ||
163 | } | ||
164 | |||
159 | for (i = 0; i < ncores; i++) | 165 | for (i = 0; i < ncores; i++) |
160 | set_cpu_possible(i, true); | 166 | set_cpu_possible(i, true); |
161 | 167 | ||
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 63621f152c9..afeeca52fc6 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -71,12 +71,16 @@ enum timer_location { | |||
71 | struct msm_clock { | 71 | struct msm_clock { |
72 | struct clock_event_device clockevent; | 72 | struct clock_event_device clockevent; |
73 | struct clocksource clocksource; | 73 | struct clocksource clocksource; |
74 | struct irqaction irq; | 74 | unsigned int irq; |
75 | void __iomem *regbase; | 75 | void __iomem *regbase; |
76 | uint32_t freq; | 76 | uint32_t freq; |
77 | uint32_t shift; | 77 | uint32_t shift; |
78 | void __iomem *global_counter; | 78 | void __iomem *global_counter; |
79 | void __iomem *local_counter; | 79 | void __iomem *local_counter; |
80 | union { | ||
81 | struct clock_event_device *evt; | ||
82 | struct clock_event_device __percpu **percpu_evt; | ||
83 | }; | ||
80 | }; | 84 | }; |
81 | 85 | ||
82 | enum { | 86 | enum { |
@@ -87,13 +91,10 @@ enum { | |||
87 | 91 | ||
88 | 92 | ||
89 | static struct msm_clock msm_clocks[]; | 93 | static struct msm_clock msm_clocks[]; |
90 | static struct clock_event_device *local_clock_event; | ||
91 | 94 | ||
92 | static irqreturn_t msm_timer_interrupt(int irq, void *dev_id) | 95 | static irqreturn_t msm_timer_interrupt(int irq, void *dev_id) |
93 | { | 96 | { |
94 | struct clock_event_device *evt = dev_id; | 97 | struct clock_event_device *evt = *(struct clock_event_device **)dev_id; |
95 | if (smp_processor_id() != 0) | ||
96 | evt = local_clock_event; | ||
97 | if (evt->event_handler == NULL) | 98 | if (evt->event_handler == NULL) |
98 | return IRQ_HANDLED; | 99 | return IRQ_HANDLED; |
99 | evt->event_handler(evt); | 100 | evt->event_handler(evt); |
@@ -171,13 +172,7 @@ static struct msm_clock msm_clocks[] = { | |||
171 | .mask = CLOCKSOURCE_MASK(32), | 172 | .mask = CLOCKSOURCE_MASK(32), |
172 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 173 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
173 | }, | 174 | }, |
174 | .irq = { | 175 | .irq = INT_GP_TIMER_EXP, |
175 | .name = "gp_timer", | ||
176 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_TRIGGER_RISING, | ||
177 | .handler = msm_timer_interrupt, | ||
178 | .dev_id = &msm_clocks[0].clockevent, | ||
179 | .irq = INT_GP_TIMER_EXP | ||
180 | }, | ||
181 | .freq = GPT_HZ, | 176 | .freq = GPT_HZ, |
182 | }, | 177 | }, |
183 | [MSM_CLOCK_DGT] = { | 178 | [MSM_CLOCK_DGT] = { |
@@ -196,13 +191,7 @@ static struct msm_clock msm_clocks[] = { | |||
196 | .mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)), | 191 | .mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)), |
197 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 192 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
198 | }, | 193 | }, |
199 | .irq = { | 194 | .irq = INT_DEBUG_TIMER_EXP, |
200 | .name = "dg_timer", | ||
201 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_TRIGGER_RISING, | ||
202 | .handler = msm_timer_interrupt, | ||
203 | .dev_id = &msm_clocks[1].clockevent, | ||
204 | .irq = INT_DEBUG_TIMER_EXP | ||
205 | }, | ||
206 | .freq = DGT_HZ >> MSM_DGT_SHIFT, | 195 | .freq = DGT_HZ >> MSM_DGT_SHIFT, |
207 | .shift = MSM_DGT_SHIFT, | 196 | .shift = MSM_DGT_SHIFT, |
208 | } | 197 | } |
@@ -261,10 +250,30 @@ static void __init msm_timer_init(void) | |||
261 | printk(KERN_ERR "msm_timer_init: clocksource_register " | 250 | printk(KERN_ERR "msm_timer_init: clocksource_register " |
262 | "failed for %s\n", cs->name); | 251 | "failed for %s\n", cs->name); |
263 | 252 | ||
264 | res = setup_irq(clock->irq.irq, &clock->irq); | 253 | ce->irq = clock->irq; |
254 | if (cpu_is_msm8x60() || cpu_is_msm8960()) { | ||
255 | clock->percpu_evt = alloc_percpu(struct clock_event_device *); | ||
256 | if (!clock->percpu_evt) { | ||
257 | pr_err("msm_timer_init: memory allocation " | ||
258 | "failed for %s\n", ce->name); | ||
259 | continue; | ||
260 | } | ||
261 | |||
262 | *__this_cpu_ptr(clock->percpu_evt) = ce; | ||
263 | res = request_percpu_irq(ce->irq, msm_timer_interrupt, | ||
264 | ce->name, clock->percpu_evt); | ||
265 | if (!res) | ||
266 | enable_percpu_irq(ce->irq, 0); | ||
267 | } else { | ||
268 | clock->evt = ce; | ||
269 | res = request_irq(ce->irq, msm_timer_interrupt, | ||
270 | IRQF_TIMER | IRQF_NOBALANCING | IRQF_TRIGGER_RISING, | ||
271 | ce->name, &clock->evt); | ||
272 | } | ||
273 | |||
265 | if (res) | 274 | if (res) |
266 | printk(KERN_ERR "msm_timer_init: setup_irq " | 275 | pr_err("msm_timer_init: request_irq failed for %s\n", |
267 | "failed for %s\n", cs->name); | 276 | ce->name); |
268 | 277 | ||
269 | clockevents_register_device(ce); | 278 | clockevents_register_device(ce); |
270 | } | 279 | } |
@@ -273,6 +282,7 @@ static void __init msm_timer_init(void) | |||
273 | #ifdef CONFIG_SMP | 282 | #ifdef CONFIG_SMP |
274 | int __cpuinit local_timer_setup(struct clock_event_device *evt) | 283 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
275 | { | 284 | { |
285 | static bool local_timer_inited; | ||
276 | struct msm_clock *clock = &msm_clocks[MSM_GLOBAL_TIMER]; | 286 | struct msm_clock *clock = &msm_clocks[MSM_GLOBAL_TIMER]; |
277 | 287 | ||
278 | /* Use existing clock_event for cpu 0 */ | 288 | /* Use existing clock_event for cpu 0 */ |
@@ -281,12 +291,13 @@ int __cpuinit local_timer_setup(struct clock_event_device *evt) | |||
281 | 291 | ||
282 | writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL); | 292 | writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL); |
283 | 293 | ||
284 | if (!local_clock_event) { | 294 | if (!local_timer_inited) { |
285 | writel(0, clock->regbase + TIMER_ENABLE); | 295 | writel(0, clock->regbase + TIMER_ENABLE); |
286 | writel(0, clock->regbase + TIMER_CLEAR); | 296 | writel(0, clock->regbase + TIMER_CLEAR); |
287 | writel(~0, clock->regbase + TIMER_MATCH_VAL); | 297 | writel(~0, clock->regbase + TIMER_MATCH_VAL); |
298 | local_timer_inited = true; | ||
288 | } | 299 | } |
289 | evt->irq = clock->irq.irq; | 300 | evt->irq = clock->irq; |
290 | evt->name = "local_timer"; | 301 | evt->name = "local_timer"; |
291 | evt->features = CLOCK_EVT_FEAT_ONESHOT; | 302 | evt->features = CLOCK_EVT_FEAT_ONESHOT; |
292 | evt->rating = clock->clockevent.rating; | 303 | evt->rating = clock->clockevent.rating; |
@@ -298,17 +309,17 @@ int __cpuinit local_timer_setup(struct clock_event_device *evt) | |||
298 | clockevent_delta2ns(0xf0000000 >> clock->shift, evt); | 309 | clockevent_delta2ns(0xf0000000 >> clock->shift, evt); |
299 | evt->min_delta_ns = clockevent_delta2ns(4, evt); | 310 | evt->min_delta_ns = clockevent_delta2ns(4, evt); |
300 | 311 | ||
301 | local_clock_event = evt; | 312 | *__this_cpu_ptr(clock->percpu_evt) = evt; |
302 | 313 | enable_percpu_irq(evt->irq, 0); | |
303 | gic_enable_ppi(clock->irq.irq); | ||
304 | 314 | ||
305 | clockevents_register_device(evt); | 315 | clockevents_register_device(evt); |
306 | return 0; | 316 | return 0; |
307 | } | 317 | } |
308 | 318 | ||
309 | inline int local_timer_ack(void) | 319 | void local_timer_stop(struct clock_event_device *evt) |
310 | { | 320 | { |
311 | return 1; | 321 | evt->set_mode(CLOCK_EVT_MODE_UNUSED, evt); |
322 | disable_percpu_irq(evt->irq); | ||
312 | } | 323 | } |
313 | 324 | ||
314 | #endif | 325 | #endif |