diff options
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r-- | arch/arm/mach-msm/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-halibut.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-msm7x30.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-qsd8x50.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-trout.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-msm/devices-msm7x00.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-msm/devices-msm7x30.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-msm/devices-qsd8x50.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-msm/devices.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-msm/dma.c | 26 | ||||
-rw-r--r-- | arch/arm/mach-msm/hotplug.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/cpu.h | 54 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/dma.h | 26 | ||||
-rw-r--r-- | arch/arm/mach-msm/include/mach/uncompress.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/last_radio_log.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-msm/platsmp.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-msm/timer.c | 110 |
17 files changed, 185 insertions, 173 deletions
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index b61908594b47..fceb093b9494 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -44,10 +44,10 @@ endchoice | |||
44 | 44 | ||
45 | config ARCH_MSM8X60 | 45 | config ARCH_MSM8X60 |
46 | bool "MSM8X60" | 46 | bool "MSM8X60" |
47 | select ARCH_MSM_SCORPIONMP | ||
48 | select ARM_GIC | 47 | select ARM_GIC |
49 | select CPU_V7 | 48 | select CPU_V7 |
50 | select GPIO_MSM_V2 | 49 | select GPIO_MSM_V2 |
50 | select HAVE_SMP | ||
51 | select MSM_GPIOMUX | 51 | select MSM_GPIOMUX |
52 | select MSM_SCM if SMP | 52 | select MSM_SCM if SMP |
53 | select MSM_V2_TLMM | 53 | select MSM_V2_TLMM |
@@ -55,9 +55,9 @@ config ARCH_MSM8X60 | |||
55 | 55 | ||
56 | config ARCH_MSM8960 | 56 | config ARCH_MSM8960 |
57 | bool "MSM8960" | 57 | bool "MSM8960" |
58 | select ARCH_MSM_SCORPIONMP | ||
59 | select ARM_GIC | 58 | select ARM_GIC |
60 | select CPU_V7 | 59 | select CPU_V7 |
60 | select HAVE_SMP | ||
61 | select MSM_GPIOMUX | 61 | select MSM_GPIOMUX |
62 | select MSM_SCM if SMP | 62 | select MSM_SCM if SMP |
63 | select MSM_V2_TLMM | 63 | select MSM_V2_TLMM |
@@ -68,9 +68,6 @@ config MSM_HAS_DEBUG_UART_HS | |||
68 | 68 | ||
69 | config MSM_SOC_REV_A | 69 | config MSM_SOC_REV_A |
70 | bool | 70 | bool |
71 | config ARCH_MSM_SCORPIONMP | ||
72 | bool | ||
73 | select HAVE_SMP | ||
74 | 71 | ||
75 | config ARCH_MSM_ARM11 | 72 | config ARCH_MSM_ARM11 |
76 | bool | 73 | bool |
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 84d720af34ab..82eaf88d2026 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -59,6 +59,7 @@ static struct platform_device smc91x_device = { | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct platform_device *devices[] __initdata = { | 61 | static struct platform_device *devices[] __initdata = { |
62 | &msm_device_gpio_7201, | ||
62 | &msm_device_uart3, | 63 | &msm_device_uart3, |
63 | &msm_device_smd, | 64 | &msm_device_smd, |
64 | &msm_device_nand, | 65 | &msm_device_nand, |
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c index 7bc3f82e3ec9..520c141acd03 100644 --- a/arch/arm/mach-msm/board-msm7x30.c +++ b/arch/arm/mach-msm/board-msm7x30.c | |||
@@ -89,6 +89,7 @@ struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS] = { | |||
89 | }; | 89 | }; |
90 | 90 | ||
91 | static struct platform_device *devices[] __initdata = { | 91 | static struct platform_device *devices[] __initdata = { |
92 | &msm_device_gpio_7x30, | ||
92 | #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER) | 93 | #if defined(CONFIG_SERIAL_MSM) || defined(CONFIG_MSM_SERIAL_DEBUGGER) |
93 | &msm_device_uart2, | 94 | &msm_device_uart2, |
94 | #endif | 95 | #endif |
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c index 686e7949a73a..38a532d6937c 100644 --- a/arch/arm/mach-msm/board-qsd8x50.c +++ b/arch/arm/mach-msm/board-qsd8x50.c | |||
@@ -89,6 +89,7 @@ static struct msm_otg_platform_data msm_otg_pdata = { | |||
89 | }; | 89 | }; |
90 | 90 | ||
91 | static struct platform_device *devices[] __initdata = { | 91 | static struct platform_device *devices[] __initdata = { |
92 | &msm_device_gpio_8x50, | ||
92 | &msm_device_uart3, | 93 | &msm_device_uart3, |
93 | &msm_device_smd, | 94 | &msm_device_smd, |
94 | &msm_device_otg, | 95 | &msm_device_otg, |
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c index 919bfa32871a..80fe1c5ff5c1 100644 --- a/arch/arm/mach-msm/board-trout.c +++ b/arch/arm/mach-msm/board-trout.c | |||
@@ -36,6 +36,7 @@ | |||
36 | extern int trout_init_mmc(unsigned int); | 36 | extern int trout_init_mmc(unsigned int); |
37 | 37 | ||
38 | static struct platform_device *devices[] __initdata = { | 38 | static struct platform_device *devices[] __initdata = { |
39 | &msm_device_gpio_7201, | ||
39 | &msm_device_uart3, | 40 | &msm_device_uart3, |
40 | &msm_device_smd, | 41 | &msm_device_smd, |
41 | &msm_device_nand, | 42 | &msm_device_nand, |
diff --git a/arch/arm/mach-msm/devices-msm7x00.c b/arch/arm/mach-msm/devices-msm7x00.c index f66ee6ea8720..1a0a2306b115 100644 --- a/arch/arm/mach-msm/devices-msm7x00.c +++ b/arch/arm/mach-msm/devices-msm7x00.c | |||
@@ -29,6 +29,37 @@ | |||
29 | #include "clock-pcom.h" | 29 | #include "clock-pcom.h" |
30 | #include <linux/platform_data/mmc-msm_sdcc.h> | 30 | #include <linux/platform_data/mmc-msm_sdcc.h> |
31 | 31 | ||
32 | static struct resource msm_gpio_resources[] = { | ||
33 | { | ||
34 | .start = 32 + 0, | ||
35 | .end = 32 + 0, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | { | ||
39 | .start = 32 + 1, | ||
40 | .end = 32 + 1, | ||
41 | .flags = IORESOURCE_IRQ, | ||
42 | }, | ||
43 | { | ||
44 | .start = 0xa9200800, | ||
45 | .end = 0xa9200800 + SZ_4K - 1, | ||
46 | .flags = IORESOURCE_MEM, | ||
47 | .name = "gpio1" | ||
48 | }, | ||
49 | { | ||
50 | .start = 0xa9300C00, | ||
51 | .end = 0xa9300C00 + SZ_4K - 1, | ||
52 | .flags = IORESOURCE_MEM, | ||
53 | .name = "gpio2" | ||
54 | }, | ||
55 | }; | ||
56 | |||
57 | struct platform_device msm_device_gpio_7201 = { | ||
58 | .name = "gpio-msm-7201", | ||
59 | .num_resources = ARRAY_SIZE(msm_gpio_resources), | ||
60 | .resource = msm_gpio_resources, | ||
61 | }; | ||
62 | |||
32 | static struct resource resources_uart1[] = { | 63 | static struct resource resources_uart1[] = { |
33 | { | 64 | { |
34 | .start = INT_UART1, | 65 | .start = INT_UART1, |
diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c index e90ab5938c5f..12f482c07740 100644 --- a/arch/arm/mach-msm/devices-msm7x30.c +++ b/arch/arm/mach-msm/devices-msm7x30.c | |||
@@ -33,6 +33,37 @@ | |||
33 | 33 | ||
34 | #include <linux/platform_data/mmc-msm_sdcc.h> | 34 | #include <linux/platform_data/mmc-msm_sdcc.h> |
35 | 35 | ||
36 | static struct resource msm_gpio_resources[] = { | ||
37 | { | ||
38 | .start = 32 + 18, | ||
39 | .end = 32 + 18, | ||
40 | .flags = IORESOURCE_IRQ, | ||
41 | }, | ||
42 | { | ||
43 | .start = 32 + 19, | ||
44 | .end = 32 + 19, | ||
45 | .flags = IORESOURCE_IRQ, | ||
46 | }, | ||
47 | { | ||
48 | .start = 0xac001000, | ||
49 | .end = 0xac001000 + SZ_4K - 1, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | .name = "gpio1" | ||
52 | }, | ||
53 | { | ||
54 | .start = 0xac101400, | ||
55 | .end = 0xac101400 + SZ_4K - 1, | ||
56 | .flags = IORESOURCE_MEM, | ||
57 | .name = "gpio2" | ||
58 | }, | ||
59 | }; | ||
60 | |||
61 | struct platform_device msm_device_gpio_7x30 = { | ||
62 | .name = "gpio-msm-7x30", | ||
63 | .num_resources = ARRAY_SIZE(msm_gpio_resources), | ||
64 | .resource = msm_gpio_resources, | ||
65 | }; | ||
66 | |||
36 | static struct resource resources_uart2[] = { | 67 | static struct resource resources_uart2[] = { |
37 | { | 68 | { |
38 | .start = INT_UART2, | 69 | .start = INT_UART2, |
diff --git a/arch/arm/mach-msm/devices-qsd8x50.c b/arch/arm/mach-msm/devices-qsd8x50.c index 4db61d5fe317..2e1b3ec9dfc7 100644 --- a/arch/arm/mach-msm/devices-qsd8x50.c +++ b/arch/arm/mach-msm/devices-qsd8x50.c | |||
@@ -30,6 +30,37 @@ | |||
30 | #include <linux/platform_data/mmc-msm_sdcc.h> | 30 | #include <linux/platform_data/mmc-msm_sdcc.h> |
31 | #include "clock-pcom.h" | 31 | #include "clock-pcom.h" |
32 | 32 | ||
33 | static struct resource msm_gpio_resources[] = { | ||
34 | { | ||
35 | .start = 64 + 165 + 9, | ||
36 | .end = 64 + 165 + 9, | ||
37 | .flags = IORESOURCE_IRQ, | ||
38 | }, | ||
39 | { | ||
40 | .start = 64 + 165 + 10, | ||
41 | .end = 64 + 165 + 10, | ||
42 | .flags = IORESOURCE_IRQ, | ||
43 | }, | ||
44 | { | ||
45 | .start = 0xa9000800, | ||
46 | .end = 0xa9000800 + SZ_4K - 1, | ||
47 | .flags = IORESOURCE_MEM, | ||
48 | .name = "gpio1" | ||
49 | }, | ||
50 | { | ||
51 | .start = 0xa9100C00, | ||
52 | .end = 0xa9100C00 + SZ_4K - 1, | ||
53 | .flags = IORESOURCE_MEM, | ||
54 | .name = "gpio2" | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | struct platform_device msm_device_gpio_8x50 = { | ||
59 | .name = "gpio-msm-8x50", | ||
60 | .num_resources = ARRAY_SIZE(msm_gpio_resources), | ||
61 | .resource = msm_gpio_resources, | ||
62 | }; | ||
63 | |||
33 | static struct resource resources_uart3[] = { | 64 | static struct resource resources_uart3[] = { |
34 | { | 65 | { |
35 | .start = INT_UART3, | 66 | .start = INT_UART3, |
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h index 9545c196c6e8..da902cf51161 100644 --- a/arch/arm/mach-msm/devices.h +++ b/arch/arm/mach-msm/devices.h | |||
@@ -20,6 +20,10 @@ | |||
20 | 20 | ||
21 | #include "clock.h" | 21 | #include "clock.h" |
22 | 22 | ||
23 | extern struct platform_device msm_device_gpio_7201; | ||
24 | extern struct platform_device msm_device_gpio_7x30; | ||
25 | extern struct platform_device msm_device_gpio_8x50; | ||
26 | |||
23 | extern struct platform_device msm_device_uart1; | 27 | extern struct platform_device msm_device_uart1; |
24 | extern struct platform_device msm_device_uart2; | 28 | extern struct platform_device msm_device_uart2; |
25 | extern struct platform_device msm_device_uart3; | 29 | extern struct platform_device msm_device_uart3; |
diff --git a/arch/arm/mach-msm/dma.c b/arch/arm/mach-msm/dma.c index 354b91d4c3ac..b279fd8a31b1 100644 --- a/arch/arm/mach-msm/dma.c +++ b/arch/arm/mach-msm/dma.c | |||
@@ -19,9 +19,35 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/completion.h> | 20 | #include <linux/completion.h> |
21 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
22 | #include <mach/msm_iomap.h> | ||
22 | 23 | ||
23 | #define MSM_DMOV_CHANNEL_COUNT 16 | 24 | #define MSM_DMOV_CHANNEL_COUNT 16 |
24 | 25 | ||
26 | #define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2)) | ||
27 | #define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2)) | ||
28 | #define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2)) | ||
29 | #define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2)) | ||
30 | |||
31 | #if defined(CONFIG_ARCH_MSM7X30) | ||
32 | #define DMOV_SD_AARM DMOV_SD2 | ||
33 | #else | ||
34 | #define DMOV_SD_AARM DMOV_SD3 | ||
35 | #endif | ||
36 | |||
37 | #define DMOV_CMD_PTR(ch) DMOV_SD_AARM(0x000, ch) | ||
38 | #define DMOV_RSLT(ch) DMOV_SD_AARM(0x040, ch) | ||
39 | #define DMOV_FLUSH0(ch) DMOV_SD_AARM(0x080, ch) | ||
40 | #define DMOV_FLUSH1(ch) DMOV_SD_AARM(0x0C0, ch) | ||
41 | #define DMOV_FLUSH2(ch) DMOV_SD_AARM(0x100, ch) | ||
42 | #define DMOV_FLUSH3(ch) DMOV_SD_AARM(0x140, ch) | ||
43 | #define DMOV_FLUSH4(ch) DMOV_SD_AARM(0x180, ch) | ||
44 | #define DMOV_FLUSH5(ch) DMOV_SD_AARM(0x1C0, ch) | ||
45 | |||
46 | #define DMOV_STATUS(ch) DMOV_SD_AARM(0x200, ch) | ||
47 | #define DMOV_ISR DMOV_SD_AARM(0x380, 0) | ||
48 | |||
49 | #define DMOV_CONFIG(ch) DMOV_SD_AARM(0x300, ch) | ||
50 | |||
25 | enum { | 51 | enum { |
26 | MSM_DMOV_PRINT_ERRORS = 1, | 52 | MSM_DMOV_PRINT_ERRORS = 1, |
27 | MSM_DMOV_PRINT_IO = 2, | 53 | MSM_DMOV_PRINT_IO = 2, |
diff --git a/arch/arm/mach-msm/hotplug.c b/arch/arm/mach-msm/hotplug.c index 750446feb444..326a87261f9a 100644 --- a/arch/arm/mach-msm/hotplug.c +++ b/arch/arm/mach-msm/hotplug.c | |||
@@ -10,16 +10,12 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
12 | 12 | ||
13 | #include <asm/cacheflush.h> | ||
14 | #include <asm/smp_plat.h> | 13 | #include <asm/smp_plat.h> |
15 | 14 | ||
16 | #include "common.h" | 15 | #include "common.h" |
17 | 16 | ||
18 | static inline void cpu_enter_lowpower(void) | 17 | static inline void cpu_enter_lowpower(void) |
19 | { | 18 | { |
20 | /* Just flush the cache. Changing the coherency is not yet | ||
21 | * available on msm. */ | ||
22 | flush_cache_all(); | ||
23 | } | 19 | } |
24 | 20 | ||
25 | static inline void cpu_leave_lowpower(void) | 21 | static inline void cpu_leave_lowpower(void) |
diff --git a/arch/arm/mach-msm/include/mach/cpu.h b/arch/arm/mach-msm/include/mach/cpu.h deleted file mode 100644 index a9481b08d5c7..000000000000 --- a/arch/arm/mach-msm/include/mach/cpu.h +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 and | ||
5 | * only version 2 as published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
15 | * 02110-1301, USA. | ||
16 | */ | ||
17 | |||
18 | #ifndef __ARCH_ARM_MACH_MSM_CPU_H__ | ||
19 | #define __ARCH_ARM_MACH_MSM_CPU_H__ | ||
20 | |||
21 | /* TODO: For now, only one CPU can be compiled at a time. */ | ||
22 | |||
23 | #define cpu_is_msm7x01() 0 | ||
24 | #define cpu_is_msm7x30() 0 | ||
25 | #define cpu_is_qsd8x50() 0 | ||
26 | #define cpu_is_msm8x60() 0 | ||
27 | #define cpu_is_msm8960() 0 | ||
28 | |||
29 | #ifdef CONFIG_ARCH_MSM7X00A | ||
30 | # undef cpu_is_msm7x01 | ||
31 | # define cpu_is_msm7x01() 1 | ||
32 | #endif | ||
33 | |||
34 | #ifdef CONFIG_ARCH_MSM7X30 | ||
35 | # undef cpu_is_msm7x30 | ||
36 | # define cpu_is_msm7x30() 1 | ||
37 | #endif | ||
38 | |||
39 | #ifdef CONFIG_ARCH_QSD8X50 | ||
40 | # undef cpu_is_qsd8x50 | ||
41 | # define cpu_is_qsd8x50() 1 | ||
42 | #endif | ||
43 | |||
44 | #ifdef CONFIG_ARCH_MSM8X60 | ||
45 | # undef cpu_is_msm8x60 | ||
46 | # define cpu_is_msm8x60() 1 | ||
47 | #endif | ||
48 | |||
49 | #ifdef CONFIG_ARCH_MSM8960 | ||
50 | # undef cpu_is_msm8960 | ||
51 | # define cpu_is_msm8960() 1 | ||
52 | #endif | ||
53 | |||
54 | #endif | ||
diff --git a/arch/arm/mach-msm/include/mach/dma.h b/arch/arm/mach-msm/include/mach/dma.h index 05583f569524..a72d48d42342 100644 --- a/arch/arm/mach-msm/include/mach/dma.h +++ b/arch/arm/mach-msm/include/mach/dma.h | |||
@@ -16,7 +16,6 @@ | |||
16 | #ifndef __ASM_ARCH_MSM_DMA_H | 16 | #ifndef __ASM_ARCH_MSM_DMA_H |
17 | 17 | ||
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | #include <mach/msm_iomap.h> | ||
20 | 19 | ||
21 | struct msm_dmov_errdata { | 20 | struct msm_dmov_errdata { |
22 | uint32_t flush[6]; | 21 | uint32_t flush[6]; |
@@ -45,48 +44,23 @@ static inline | |||
45 | int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr) { return -EIO; } | 44 | int msm_dmov_exec_cmd(unsigned id, unsigned int cmdptr) { return -EIO; } |
46 | #endif | 45 | #endif |
47 | 46 | ||
48 | |||
49 | #define DMOV_SD0(off, ch) (MSM_DMOV_BASE + 0x0000 + (off) + ((ch) << 2)) | ||
50 | #define DMOV_SD1(off, ch) (MSM_DMOV_BASE + 0x0400 + (off) + ((ch) << 2)) | ||
51 | #define DMOV_SD2(off, ch) (MSM_DMOV_BASE + 0x0800 + (off) + ((ch) << 2)) | ||
52 | #define DMOV_SD3(off, ch) (MSM_DMOV_BASE + 0x0C00 + (off) + ((ch) << 2)) | ||
53 | |||
54 | #if defined(CONFIG_ARCH_MSM7X30) | ||
55 | #define DMOV_SD_AARM DMOV_SD2 | ||
56 | #else | ||
57 | #define DMOV_SD_AARM DMOV_SD3 | ||
58 | #endif | ||
59 | |||
60 | #define DMOV_CMD_PTR(ch) DMOV_SD_AARM(0x000, ch) | ||
61 | #define DMOV_CMD_LIST (0 << 29) /* does not work */ | 47 | #define DMOV_CMD_LIST (0 << 29) /* does not work */ |
62 | #define DMOV_CMD_PTR_LIST (1 << 29) /* works */ | 48 | #define DMOV_CMD_PTR_LIST (1 << 29) /* works */ |
63 | #define DMOV_CMD_INPUT_CFG (2 << 29) /* untested */ | 49 | #define DMOV_CMD_INPUT_CFG (2 << 29) /* untested */ |
64 | #define DMOV_CMD_OUTPUT_CFG (3 << 29) /* untested */ | 50 | #define DMOV_CMD_OUTPUT_CFG (3 << 29) /* untested */ |
65 | #define DMOV_CMD_ADDR(addr) ((addr) >> 3) | 51 | #define DMOV_CMD_ADDR(addr) ((addr) >> 3) |
66 | 52 | ||
67 | #define DMOV_RSLT(ch) DMOV_SD_AARM(0x040, ch) | ||
68 | #define DMOV_RSLT_VALID (1 << 31) /* 0 == host has empties result fifo */ | 53 | #define DMOV_RSLT_VALID (1 << 31) /* 0 == host has empties result fifo */ |
69 | #define DMOV_RSLT_ERROR (1 << 3) | 54 | #define DMOV_RSLT_ERROR (1 << 3) |
70 | #define DMOV_RSLT_FLUSH (1 << 2) | 55 | #define DMOV_RSLT_FLUSH (1 << 2) |
71 | #define DMOV_RSLT_DONE (1 << 1) /* top pointer done */ | 56 | #define DMOV_RSLT_DONE (1 << 1) /* top pointer done */ |
72 | #define DMOV_RSLT_USER (1 << 0) /* command with FR force result */ | 57 | #define DMOV_RSLT_USER (1 << 0) /* command with FR force result */ |
73 | 58 | ||
74 | #define DMOV_FLUSH0(ch) DMOV_SD_AARM(0x080, ch) | ||
75 | #define DMOV_FLUSH1(ch) DMOV_SD_AARM(0x0C0, ch) | ||
76 | #define DMOV_FLUSH2(ch) DMOV_SD_AARM(0x100, ch) | ||
77 | #define DMOV_FLUSH3(ch) DMOV_SD_AARM(0x140, ch) | ||
78 | #define DMOV_FLUSH4(ch) DMOV_SD_AARM(0x180, ch) | ||
79 | #define DMOV_FLUSH5(ch) DMOV_SD_AARM(0x1C0, ch) | ||
80 | |||
81 | #define DMOV_STATUS(ch) DMOV_SD_AARM(0x200, ch) | ||
82 | #define DMOV_STATUS_RSLT_COUNT(n) (((n) >> 29)) | 59 | #define DMOV_STATUS_RSLT_COUNT(n) (((n) >> 29)) |
83 | #define DMOV_STATUS_CMD_COUNT(n) (((n) >> 27) & 3) | 60 | #define DMOV_STATUS_CMD_COUNT(n) (((n) >> 27) & 3) |
84 | #define DMOV_STATUS_RSLT_VALID (1 << 1) | 61 | #define DMOV_STATUS_RSLT_VALID (1 << 1) |
85 | #define DMOV_STATUS_CMD_PTR_RDY (1 << 0) | 62 | #define DMOV_STATUS_CMD_PTR_RDY (1 << 0) |
86 | 63 | ||
87 | #define DMOV_ISR DMOV_SD_AARM(0x380, 0) | ||
88 | |||
89 | #define DMOV_CONFIG(ch) DMOV_SD_AARM(0x300, ch) | ||
90 | #define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2) | 64 | #define DMOV_CONFIG_FORCE_TOP_PTR_RSLT (1 << 2) |
91 | #define DMOV_CONFIG_FORCE_FLUSH_RSLT (1 << 1) | 65 | #define DMOV_CONFIG_FORCE_FLUSH_RSLT (1 << 1) |
92 | #define DMOV_CONFIG_IRQ_EN (1 << 0) | 66 | #define DMOV_CONFIG_IRQ_EN (1 << 0) |
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h index fa97a10d8695..94324870fb04 100644 --- a/arch/arm/mach-msm/include/mach/uncompress.h +++ b/arch/arm/mach-msm/include/mach/uncompress.h | |||
@@ -37,7 +37,7 @@ static void putc(int c) | |||
37 | * Wait for TX_READY to be set; but skip it if we have a | 37 | * Wait for TX_READY to be set; but skip it if we have a |
38 | * TX underrun. | 38 | * TX underrun. |
39 | */ | 39 | */ |
40 | if (UART_DM_SR & 0x08) | 40 | if (!(UART_DM_SR & 0x08)) |
41 | while (!(UART_DM_ISR & 0x80)) | 41 | while (!(UART_DM_ISR & 0x80)) |
42 | cpu_relax(); | 42 | cpu_relax(); |
43 | 43 | ||
diff --git a/arch/arm/mach-msm/last_radio_log.c b/arch/arm/mach-msm/last_radio_log.c index 1e243f46a969..7777767ee89a 100644 --- a/arch/arm/mach-msm/last_radio_log.c +++ b/arch/arm/mach-msm/last_radio_log.c | |||
@@ -31,20 +31,8 @@ extern void *smem_item(unsigned id, unsigned *size); | |||
31 | static ssize_t last_radio_log_read(struct file *file, char __user *buf, | 31 | static ssize_t last_radio_log_read(struct file *file, char __user *buf, |
32 | size_t len, loff_t *offset) | 32 | size_t len, loff_t *offset) |
33 | { | 33 | { |
34 | loff_t pos = *offset; | 34 | return simple_read_from_buffer(buf, len, offset, |
35 | ssize_t count; | 35 | radio_log_base, radio_log_size); |
36 | |||
37 | if (pos >= radio_log_size) | ||
38 | return 0; | ||
39 | |||
40 | count = min(len, (size_t)(radio_log_size - pos)); | ||
41 | if (copy_to_user(buf, radio_log_base + pos, count)) { | ||
42 | pr_err("%s: copy to user failed\n", __func__); | ||
43 | return -EFAULT; | ||
44 | } | ||
45 | |||
46 | *offset += count; | ||
47 | return count; | ||
48 | } | 36 | } |
49 | 37 | ||
50 | static struct file_operations last_radio_log_fops = { | 38 | static struct file_operations last_radio_log_fops = { |
@@ -67,7 +55,8 @@ void msm_init_last_radio_log(struct module *owner) | |||
67 | return; | 55 | return; |
68 | } | 56 | } |
69 | 57 | ||
70 | entry = create_proc_entry("last_radio_log", S_IFREG | S_IRUGO, NULL); | 58 | entry = proc_create("last_radio_log", S_IRUGO, NULL, |
59 | &last_radio_log_fops); | ||
71 | if (!entry) { | 60 | if (!entry) { |
72 | pr_err("%s: could not create proc entry for radio log\n", | 61 | pr_err("%s: could not create proc entry for radio log\n", |
73 | __func__); | 62 | __func__); |
@@ -77,7 +66,6 @@ void msm_init_last_radio_log(struct module *owner) | |||
77 | pr_err("%s: last radio log is %d bytes long\n", __func__, | 66 | pr_err("%s: last radio log is %d bytes long\n", __func__, |
78 | radio_log_size); | 67 | radio_log_size); |
79 | last_radio_log_fops.owner = owner; | 68 | last_radio_log_fops.owner = owner; |
80 | entry->proc_fops = &last_radio_log_fops; | ||
81 | entry->size = radio_log_size; | 69 | entry->size = radio_log_size; |
82 | } | 70 | } |
83 | EXPORT_SYMBOL(msm_init_last_radio_log); | 71 | EXPORT_SYMBOL(msm_init_last_radio_log); |
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c index 42932865416a..00cdb0a5dac8 100644 --- a/arch/arm/mach-msm/platsmp.c +++ b/arch/arm/mach-msm/platsmp.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/jiffies.h> | 15 | #include <linux/jiffies.h> |
16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/irqchip/arm-gic.h> | ||
19 | 18 | ||
20 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
21 | #include <asm/cputype.h> | 20 | #include <asm/cputype.h> |
@@ -42,13 +41,6 @@ static inline int get_core_count(void) | |||
42 | static void __cpuinit msm_secondary_init(unsigned int cpu) | 41 | static void __cpuinit msm_secondary_init(unsigned int cpu) |
43 | { | 42 | { |
44 | /* | 43 | /* |
45 | * if any interrupts are already enabled for the primary | ||
46 | * core (e.g. timer irq), then they will not have been enabled | ||
47 | * for us: do so | ||
48 | */ | ||
49 | gic_secondary_init(0); | ||
50 | |||
51 | /* | ||
52 | * let the primary processor know we're out of the | 44 | * let the primary processor know we're out of the |
53 | * pen, then head off into the C entry point | 45 | * pen, then head off into the C entry point |
54 | */ | 46 | */ |
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index f9fd77e8f1f5..284313f3e02c 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c | |||
@@ -30,19 +30,22 @@ | |||
30 | 30 | ||
31 | #include "common.h" | 31 | #include "common.h" |
32 | 32 | ||
33 | #define TIMER_MATCH_VAL 0x0000 | 33 | #define TIMER_MATCH_VAL 0x0000 |
34 | #define TIMER_COUNT_VAL 0x0004 | 34 | #define TIMER_COUNT_VAL 0x0004 |
35 | #define TIMER_ENABLE 0x0008 | 35 | #define TIMER_ENABLE 0x0008 |
36 | #define TIMER_ENABLE_CLR_ON_MATCH_EN BIT(1) | 36 | #define TIMER_ENABLE_CLR_ON_MATCH_EN BIT(1) |
37 | #define TIMER_ENABLE_EN BIT(0) | 37 | #define TIMER_ENABLE_EN BIT(0) |
38 | #define TIMER_CLEAR 0x000C | 38 | #define TIMER_CLEAR 0x000C |
39 | #define DGT_CLK_CTL_DIV_4 0x3 | 39 | #define DGT_CLK_CTL 0x10 |
40 | #define DGT_CLK_CTL_DIV_4 0x3 | ||
41 | #define TIMER_STS_GPT0_CLR_PEND BIT(10) | ||
40 | 42 | ||
41 | #define GPT_HZ 32768 | 43 | #define GPT_HZ 32768 |
42 | 44 | ||
43 | #define MSM_DGT_SHIFT 5 | 45 | #define MSM_DGT_SHIFT 5 |
44 | 46 | ||
45 | static void __iomem *event_base; | 47 | static void __iomem *event_base; |
48 | static void __iomem *sts_base; | ||
46 | 49 | ||
47 | static irqreturn_t msm_timer_interrupt(int irq, void *dev_id) | 50 | static irqreturn_t msm_timer_interrupt(int irq, void *dev_id) |
48 | { | 51 | { |
@@ -67,6 +70,11 @@ static int msm_timer_set_next_event(unsigned long cycles, | |||
67 | 70 | ||
68 | writel_relaxed(ctrl, event_base + TIMER_CLEAR); | 71 | writel_relaxed(ctrl, event_base + TIMER_CLEAR); |
69 | writel_relaxed(cycles, event_base + TIMER_MATCH_VAL); | 72 | writel_relaxed(cycles, event_base + TIMER_MATCH_VAL); |
73 | |||
74 | if (sts_base) | ||
75 | while (readl_relaxed(sts_base) & TIMER_STS_GPT0_CLR_PEND) | ||
76 | cpu_relax(); | ||
77 | |||
70 | writel_relaxed(ctrl | TIMER_ENABLE_EN, event_base + TIMER_ENABLE); | 78 | writel_relaxed(ctrl | TIMER_ENABLE_EN, event_base + TIMER_ENABLE); |
71 | return 0; | 79 | return 0; |
72 | } | 80 | } |
@@ -137,9 +145,6 @@ static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt) | |||
137 | if (!smp_processor_id()) | 145 | if (!smp_processor_id()) |
138 | return 0; | 146 | return 0; |
139 | 147 | ||
140 | writel_relaxed(0, event_base + TIMER_ENABLE); | ||
141 | writel_relaxed(0, event_base + TIMER_CLEAR); | ||
142 | writel_relaxed(~0, event_base + TIMER_MATCH_VAL); | ||
143 | evt->irq = msm_clockevent.irq; | 148 | evt->irq = msm_clockevent.irq; |
144 | evt->name = "local_timer"; | 149 | evt->name = "local_timer"; |
145 | evt->features = msm_clockevent.features; | 150 | evt->features = msm_clockevent.features; |
@@ -177,9 +182,6 @@ static void __init msm_timer_init(u32 dgt_hz, int sched_bits, int irq, | |||
177 | struct clocksource *cs = &msm_clocksource; | 182 | struct clocksource *cs = &msm_clocksource; |
178 | int res; | 183 | int res; |
179 | 184 | ||
180 | writel_relaxed(0, event_base + TIMER_ENABLE); | ||
181 | writel_relaxed(0, event_base + TIMER_CLEAR); | ||
182 | writel_relaxed(~0, event_base + TIMER_MATCH_VAL); | ||
183 | ce->cpumask = cpumask_of(0); | 185 | ce->cpumask = cpumask_of(0); |
184 | ce->irq = irq; | 186 | ce->irq = irq; |
185 | 187 | ||
@@ -217,13 +219,9 @@ err: | |||
217 | } | 219 | } |
218 | 220 | ||
219 | #ifdef CONFIG_OF | 221 | #ifdef CONFIG_OF |
220 | static const struct of_device_id msm_dgt_match[] __initconst = { | 222 | static const struct of_device_id msm_timer_match[] __initconst = { |
221 | { .compatible = "qcom,msm-dgt" }, | 223 | { .compatible = "qcom,kpss-timer" }, |
222 | { }, | 224 | { .compatible = "qcom,scss-timer" }, |
223 | }; | ||
224 | |||
225 | static const struct of_device_id msm_gpt_match[] __initconst = { | ||
226 | { .compatible = "qcom,msm-gpt" }, | ||
227 | { }, | 225 | { }, |
228 | }; | 226 | }; |
229 | 227 | ||
@@ -234,33 +232,29 @@ void __init msm_dt_timer_init(void) | |||
234 | int irq; | 232 | int irq; |
235 | struct resource res; | 233 | struct resource res; |
236 | u32 percpu_offset; | 234 | u32 percpu_offset; |
237 | void __iomem *dgt_clk_ctl; | 235 | void __iomem *base; |
236 | void __iomem *cpu0_base; | ||
238 | 237 | ||
239 | np = of_find_matching_node(NULL, msm_gpt_match); | 238 | np = of_find_matching_node(NULL, msm_timer_match); |
240 | if (!np) { | 239 | if (!np) { |
241 | pr_err("Can't find GPT DT node\n"); | 240 | pr_err("Can't find msm timer DT node\n"); |
242 | return; | 241 | return; |
243 | } | 242 | } |
244 | 243 | ||
245 | event_base = of_iomap(np, 0); | 244 | base = of_iomap(np, 0); |
246 | if (!event_base) { | 245 | if (!base) { |
247 | pr_err("Failed to map event base\n"); | 246 | pr_err("Failed to map event base\n"); |
248 | return; | 247 | return; |
249 | } | 248 | } |
250 | 249 | ||
251 | irq = irq_of_parse_and_map(np, 0); | 250 | /* We use GPT0 for the clockevent */ |
251 | irq = irq_of_parse_and_map(np, 1); | ||
252 | if (irq <= 0) { | 252 | if (irq <= 0) { |
253 | pr_err("Can't get irq\n"); | 253 | pr_err("Can't get irq\n"); |
254 | return; | 254 | return; |
255 | } | 255 | } |
256 | of_node_put(np); | ||
257 | |||
258 | np = of_find_matching_node(NULL, msm_dgt_match); | ||
259 | if (!np) { | ||
260 | pr_err("Can't find DGT DT node\n"); | ||
261 | return; | ||
262 | } | ||
263 | 256 | ||
257 | /* We use CPU0's DGT for the clocksource */ | ||
264 | if (of_property_read_u32(np, "cpu-offset", &percpu_offset)) | 258 | if (of_property_read_u32(np, "cpu-offset", &percpu_offset)) |
265 | percpu_offset = 0; | 259 | percpu_offset = 0; |
266 | 260 | ||
@@ -269,45 +263,43 @@ void __init msm_dt_timer_init(void) | |||
269 | return; | 263 | return; |
270 | } | 264 | } |
271 | 265 | ||
272 | source_base = ioremap(res.start + percpu_offset, resource_size(&res)); | 266 | cpu0_base = ioremap(res.start + percpu_offset, resource_size(&res)); |
273 | if (!source_base) { | 267 | if (!cpu0_base) { |
274 | pr_err("Failed to map source base\n"); | 268 | pr_err("Failed to map source base\n"); |
275 | return; | 269 | return; |
276 | } | 270 | } |
277 | 271 | ||
278 | if (!of_address_to_resource(np, 1, &res)) { | ||
279 | dgt_clk_ctl = ioremap(res.start + percpu_offset, | ||
280 | resource_size(&res)); | ||
281 | if (!dgt_clk_ctl) { | ||
282 | pr_err("Failed to map DGT control base\n"); | ||
283 | return; | ||
284 | } | ||
285 | writel_relaxed(DGT_CLK_CTL_DIV_4, dgt_clk_ctl); | ||
286 | iounmap(dgt_clk_ctl); | ||
287 | } | ||
288 | |||
289 | if (of_property_read_u32(np, "clock-frequency", &freq)) { | 272 | if (of_property_read_u32(np, "clock-frequency", &freq)) { |
290 | pr_err("Unknown frequency\n"); | 273 | pr_err("Unknown frequency\n"); |
291 | return; | 274 | return; |
292 | } | 275 | } |
293 | of_node_put(np); | 276 | of_node_put(np); |
294 | 277 | ||
278 | event_base = base + 0x4; | ||
279 | sts_base = base + 0x88; | ||
280 | source_base = cpu0_base + 0x24; | ||
281 | freq /= 4; | ||
282 | writel_relaxed(DGT_CLK_CTL_DIV_4, source_base + DGT_CLK_CTL); | ||
283 | |||
295 | msm_timer_init(freq, 32, irq, !!percpu_offset); | 284 | msm_timer_init(freq, 32, irq, !!percpu_offset); |
296 | } | 285 | } |
297 | #endif | 286 | #endif |
298 | 287 | ||
299 | static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) | 288 | static int __init msm_timer_map(phys_addr_t addr, u32 event, u32 source, |
289 | u32 sts) | ||
300 | { | 290 | { |
301 | event_base = ioremap(event, SZ_64); | 291 | void __iomem *base; |
302 | if (!event_base) { | 292 | |
303 | pr_err("Failed to map event base\n"); | 293 | base = ioremap(addr, SZ_256); |
304 | return 1; | 294 | if (!base) { |
305 | } | 295 | pr_err("Failed to map timer base\n"); |
306 | source_base = ioremap(source, SZ_64); | 296 | return -ENOMEM; |
307 | if (!source_base) { | ||
308 | pr_err("Failed to map source base\n"); | ||
309 | return 1; | ||
310 | } | 297 | } |
298 | event_base = base + event; | ||
299 | source_base = base + source; | ||
300 | if (sts) | ||
301 | sts_base = base + sts; | ||
302 | |||
311 | return 0; | 303 | return 0; |
312 | } | 304 | } |
313 | 305 | ||
@@ -315,7 +307,7 @@ void __init msm7x01_timer_init(void) | |||
315 | { | 307 | { |
316 | struct clocksource *cs = &msm_clocksource; | 308 | struct clocksource *cs = &msm_clocksource; |
317 | 309 | ||
318 | if (msm_timer_map(0xc0100000, 0xc0100010)) | 310 | if (msm_timer_map(0xc0100000, 0x0, 0x10, 0x0)) |
319 | return; | 311 | return; |
320 | cs->read = msm_read_timer_count_shift; | 312 | cs->read = msm_read_timer_count_shift; |
321 | cs->mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)); | 313 | cs->mask = CLOCKSOURCE_MASK((32 - MSM_DGT_SHIFT)); |
@@ -326,14 +318,14 @@ void __init msm7x01_timer_init(void) | |||
326 | 318 | ||
327 | void __init msm7x30_timer_init(void) | 319 | void __init msm7x30_timer_init(void) |
328 | { | 320 | { |
329 | if (msm_timer_map(0xc0100004, 0xc0100024)) | 321 | if (msm_timer_map(0xc0100000, 0x4, 0x24, 0x80)) |
330 | return; | 322 | return; |
331 | msm_timer_init(24576000 / 4, 32, 1, false); | 323 | msm_timer_init(24576000 / 4, 32, 1, false); |
332 | } | 324 | } |
333 | 325 | ||
334 | void __init qsd8x50_timer_init(void) | 326 | void __init qsd8x50_timer_init(void) |
335 | { | 327 | { |
336 | if (msm_timer_map(0xAC100000, 0xAC100010)) | 328 | if (msm_timer_map(0xAC100000, 0x0, 0x10, 0x34)) |
337 | return; | 329 | return; |
338 | msm_timer_init(19200000 / 4, 32, 7, false); | 330 | msm_timer_init(19200000 / 4, 32, 7, false); |
339 | } | 331 | } |