Remove msm_iomap for 8x60 and 8960
Subsystems (3)
v2 cover Remove msm_iomap for 8x60 and 8960
This patchset moves the MSM code over to DEBUG_LL_INCLUDE as well as removes the rest of the static mappings made on 8x60 and 8960. This allows us to remove the msm_iomap-8x60.h msm_iomap-8960.h. Note that debug_ll_io_init() will
be the default in 3.11 so we'll have to make a sweep in the merge window or after to remove those two.
Patches are based on David Brown's MSM for-next tree.
git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git for-next
Changes since v1:
* Fixed mapping on 7x00
* Fixed compile on 7k where uart mappings are used by devices files
Stephen Boyd (3):
ARM: msm: Move debug-macro.S to include/debug
ARM: msm: Remove TMR and TMR0 static mappings
ARM: msm: Don't compile __msm_ioremap_caller() unless used
arch/arm/Kconfig.debug | 9 ++-
.../mach/debug-macro.S => include/debug/msm.S} | 32 ++++++++++-
arch/arm/mach-msm/board-dt-8660.c | 3 +-
arch/arm/mach-msm/board-dt-8960.c | 3 +-
arch/arm/mach-msm/common.h | 2 -
arch/arm/mach-msm/include/mach/msm_iomap-8960.h | 46 ----------------
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h | 49 -----------------
arch/arm/mach-msm/include/mach/msm_iomap.h | 17 ------
arch/arm/mach-msm/include/mach/uncompress.h | 63 ---------------------
arch/arm/mach-msm/io.c | 64 +++++++---------------
10 files changed, 62 insertions(+), 226 deletions(-)
rename arch/arm/{mach-msm/include/mach/debug-macro.S => include/debug/msm.S} (61%)
delete mode 100644 arch/arm/mach-msm/include/mach/msm_iomap-8960.h
delete mode 100644 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
delete mode 100644 arch/arm/mach-msm/include/mach/uncompress.hSignature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
PATCH v2 1/3 ARM: msm: Move debug-macro.S to include/debug
One more step to allowing MSM to participate in the multi-platform defconfig.
---
arch/arm/Kconfig.debug | 9 +++-
.../mach/debug-macro.S => include/debug/msm.S} | 32 ++++++++++-
arch/arm/mach-msm/include/mach/msm_iomap-8960.h | 5 --
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h | 5 --
arch/arm/mach-msm/include/mach/msm_iomap.h | 12 -----
arch/arm/mach-msm/include/mach/uncompress.h | 63 ----------------------
arch/arm/mach-msm/io.c | 40 +++++++-------
7 files changed, 58 insertions(+), 108 deletions(-)
rename arch/arm/{mach-msm/include/mach/debug-macro.S => include/debug/msm.S} (61%)
delete mode 100644 arch/arm/mach-msm/include/mach/uncompress.harch/arm/Kconfig.debug +7 -2
@@ -632,6 +632,11 @@ config DEBUG_LL_INCLUDE DEBUG_IMX51_UART || \ DEBUG_IMX53_UART ||\ DEBUG_IMX6Q_UART + default "debug/msm.S" if DEBUG_MSM_UART1 || \ + DEBUG_MSM_UART2 || \ + DEBUG_MSM_UART3 || \ + DEBUG_MSM8660_UART || \ + DEBUG_MSM8960_UART default "debug/mvebu.S" if DEBUG_MVEBU_UART default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART default "debug/nomadik.S" if DEBUG_NOMADIK_UART
@@ -652,13 +657,13 @@ config DEBUG_LL_INCLUDE config DEBUG_UNCOMPRESS bool - default y if ARCH_MULTIPLATFORM && DEBUG_LL && \ + default y if (ARCH_MULTIPLATFORM || ARCH_MSM) && DEBUG_LL && \ !DEBUG_OMAP2PLUS_UART && \ !DEBUG_TEGRA_UART config UNCOMPRESS_INCLUDE string - default "debug/uncompress.h" if ARCH_MULTIPLATFORM + default "debug/uncompress.h" if ARCH_MULTIPLATFORM || ARCH_MSM default "mach/uncompress.h" config EARLY_PRINTK
arch/arm/include/debug/msm.S renamed from arch/arm/mach-msm/include/mach/debug-macro.S +30 -2
@@ -15,8 +15,36 @@ * */ -#include <mach/hardware.h> -#include <mach/msm_iomap.h> +#if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_QSD8X50) +#define MSM_UART1_PHYS 0xA9A00000 +#define MSM_UART2_PHYS 0xA9B00000 +#define MSM_UART3_PHYS 0xA9C00000 +#elif defined(CONFIG_ARCH_MSM7X30) +#define MSM_UART1_PHYS 0xACA00000 +#define MSM_UART2_PHYS 0xACB00000 +#define MSM_UART3_PHYS 0xACC00000 +#endif + +#if defined(CONFIG_DEBUG_MSM_UART1) +#define MSM_DEBUG_UART_BASE 0xE1000000 +#define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS +#elif defined(CONFIG_DEBUG_MSM_UART2) +#define MSM_DEBUG_UART_BASE 0xE1000000 +#define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS +#elif defined(CONFIG_DEBUG_MSM_UART3) +#define MSM_DEBUG_UART_BASE 0xE1000000 +#define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS +#endif + +#ifdef CONFIG_DEBUG_MSM8660_UART +#define MSM_DEBUG_UART_BASE 0xF0040000 +#define MSM_DEBUG_UART_PHYS 0x19C40000 +#endif + +#ifdef CONFIG_DEBUG_MSM8960_UART +#define MSM_DEBUG_UART_BASE 0xF0040000 +#define MSM_DEBUG_UART_PHYS 0x16440000 +#endif .macro addruart, rp, rv, tmp #ifdef MSM_DEBUG_UART_PHYS
arch/arm/mach-msm/include/mach/msm_iomap-8960.h +0 -5
@@ -38,9 +38,4 @@#define MSM8960_TMR0_PHYS 0x0208A000#define MSM8960_TMR0_SIZE SZ_4K -#ifdef CONFIG_DEBUG_MSM8960_UART -#define MSM_DEBUG_UART_BASE 0xF0040000 -#define MSM_DEBUG_UART_PHYS 0x16440000 -#endif -#endif
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h +0 -5
@@ -41,9 +41,4 @@#define MSM8X60_TMR0_PHYS 0x02040000#define MSM8X60_TMR0_SIZE SZ_4K -#ifdef CONFIG_DEBUG_MSM8660_UART -#define MSM_DEBUG_UART_BASE 0xF0040000 -#define MSM_DEBUG_UART_PHYS 0x19C40000 -#endif -#endif
arch/arm/mach-msm/include/mach/msm_iomap.h +0 -12
@@ -48,18 +48,6 @@#include "msm_iomap-8x60.h" #include "msm_iomap-8960.h" -#define MSM_DEBUG_UART_SIZE SZ_4K -#if defined(CONFIG_DEBUG_MSM_UART1 ) -#define MSM_DEBUG_UART_BASE 0xE1000000 -#define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS -#elif defined(CONFIG_DEBUG_MSM_UART2 ) -#define MSM_DEBUG_UART_BASE 0xE1000000 -#define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS -#elif defined(CONFIG_DEBUG_MSM_UART3 ) -#define MSM_DEBUG_UART_BASE 0xE1000000 -#define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS -#endif -/* Virtual addresses shared across all MSM targets. */ #define MSM_CSR_BASE IOMEM(0xE0001000)#define MSM_TMR_BASE IOMEM(0xF0200000)
arch/arm/mach-msm/include/mach/uncompress.h deleted +0 -63
63 lines not on this page · raw message
arch/arm/mach-msm/io.c +21 -19
@@ -52,26 +52,38 @@ static struct map_desc msm_io_desc[] __initdata = { MSM_CHIP_DEVICE_TYPE(GPIO1, MSM7X00, MT_DEVICE_NONSHARED), MSM_CHIP_DEVICE_TYPE(GPIO2, MSM7X00, MT_DEVICE_NONSHARED), MSM_DEVICE_TYPE(CLK_CTL, MT_DEVICE_NONSHARED), -#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ - defined(CONFIG_DEBUG_MSM_UART3 ) - MSM_DEVICE_TYPE(DEBUG_UART, MT_DEVICE_NONSHARED), -#endif { .virtual = (unsigned long) MSM_SHARED_RAM_BASE, .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), .length = MSM_SHARED_RAM_SIZE, .type = MT_DEVICE, }, +#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ + defined(CONFIG_DEBUG_MSM_UART3 ) + { +/* virtual and pfn filled in by debug_ll_addr() */ + .length = SZ_4K, + .type = MT_DEVICE_NONSHARED, + } +#endif };void __init msm_map_common_io (void ) { +size_t size =ARRAY_SIZE (msm_io_desc); +/* Make sure the peripheral register window is closed, since * we will use PTE flags (TEX[1]=1,B=0,C=1) to determine which * pages are peripheral interface or not. */ asm("mcr p15, 0, %0, c15, c2, 4" : :"r" (0 )); -iotable_init (msm_io_desc,ARRAY_SIZE (msm_io_desc)); +#if defined(CONFIG_DEBUG_MSM_UART1 ) || defined(CONFIG_DEBUG_MSM_UART2 ) || \ + defined(CONFIG_DEBUG_MSM_UART3 ) +debug_ll_addr (&msm_io_desc[size -1 ].pfn, + &msm_io_desc[size -1 ].virtual); + msm_io_desc[size -1 ].pfn =__phys_to_pfn (msm_io_desc[size -1 ].pfn); +#endif +iotable_init (msm_io_desc, size); }#endif
@@ -87,10 +99,6 @@ static struct map_desc qsd8x50_io_desc[] __initdata = {MSM_DEVICE (SCPLL ),MSM_DEVICE (AD5 ), MSM_DEVICE(MDC), -#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ - defined(CONFIG_DEBUG_MSM_UART3) - MSM_DEVICE(DEBUG_UART), -#endif { .virtual = (unsigned long )MSM_SHARED_RAM_BASE , .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
@@ -101,6 +109,7 @@ static struct map_desc qsd8x50_io_desc[] __initdata = {void __init msm_map_qsd8x50_io (void ) { +debug_ll_io_init ();iotable_init (qsd8x50_io_desc,ARRAY_SIZE (qsd8x50_io_desc)); }#endif /* CONFIG_ARCH_QSD8X50 */
@@ -109,13 +118,11 @@ void __init msm_map_qsd8x50_io(void)static struct map_desc msm8x60_io_desc[]__initdata = {MSM_CHIP_DEVICE (TMR ,MSM8X60 ),MSM_CHIP_DEVICE (TMR0 ,MSM8X60 ), -#ifdef CONFIG_DEBUG_MSM8660_UART -MSM_DEVICE (DEBUG_UART ), -#endif };void __init msm_map_msm8x60_io (void ) { +debug_ll_io_init ();iotable_init (msm8x60_io_desc,ARRAY_SIZE (msm8x60_io_desc)); }#endif /* CONFIG_ARCH_MSM8X60 */
@@ -124,13 +131,11 @@ void __init msm_map_msm8x60_io(void)static struct map_desc msm8960_io_desc[]__initdata = {MSM_CHIP_DEVICE (TMR ,MSM8960 ),MSM_CHIP_DEVICE (TMR0 ,MSM8960 ), -#ifdef CONFIG_DEBUG_MSM8960_UART -MSM_DEVICE (DEBUG_UART ), -#endif };void __init msm_map_msm8960_io (void ) { +debug_ll_io_init ();iotable_init (msm8960_io_desc,ARRAY_SIZE (msm8960_io_desc)); }#endif /* CONFIG_ARCH_MSM8960 */
@@ -150,10 +155,6 @@ static struct map_desc msm7x30_io_desc[] __initdata = {MSM_DEVICE (SAW ),MSM_DEVICE (GCC ), MSM_DEVICE(TCSR), -#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ - defined(CONFIG_DEBUG_MSM_UART3) - MSM_DEVICE(DEBUG_UART), -#endif { .virtual = (unsigned long )MSM_SHARED_RAM_BASE , .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS),
@@ -164,6 +165,7 @@ static struct map_desc msm7x30_io_desc[] __initdata = {void __init msm_map_msm7x30_io (void ) { +debug_ll_io_init ();iotable_init (msm7x30_io_desc,ARRAY_SIZE (msm7x30_io_desc)); }#endif /* CONFIG_ARCH_MSM7X30 */
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
PATCH v2 2/3 ARM: msm: Remove TMR and TMR0 static mappings
In reply to Stephen BoydNobody is using these mappings so just drop them. of_iomap() in the timer driver will take care of it for us. Doing this allows us to remove the 8x60 and 8960 iomap files completely.
--- arch/arm/mach-msm/board-dt-8660.c | 3 +- arch/arm/mach-msm/board-dt-8960.c | 3 +- arch/arm/mach-msm/common.h | 2 -- arch/arm/mach-msm/include/mach/msm_iomap-8960.h | 41 ----------------------- arch/arm/mach-msm/include/mach/msm_iomap-8x60.h | 44 ------------------------- arch/arm/mach-msm/include/mach/msm_iomap.h | 5 --- arch/arm/mach-msm/io.c | 26 --------------- 7 files changed, 4 insertions(+), 120 deletions(-) delete mode 100644 arch/arm/mach-msm/include/mach/msm_iomap-8960.h delete mode 100644 arch/arm/mach-msm/include/mach/msm_iomap-8x60.h
arch/arm/mach-msm/board-dt-8660.c +2 -1
@@ -15,6 +15,7 @@#include <linux/of_platform.h> #include <asm/mach/arch.h> +#include <asm/mach/map.h> #include <mach/board.h> #include "common.h"
@@ -42,7 +43,7 @@ static const char *msm8x60_fluid_match[] __initdata = {DT_MACHINE_START (MSM_DT ,"Qualcomm MSM (Flattened Device Tree)" ) .smp = smp_ops(msm_smp_ops), - .map_io = msm_map_msm8x60_io, + .map_io = debug_ll_io_init, .init_machine = msm8x60_dt_init, .init_late = msm8x60_init_late, .init_time = msm_dt_timer_init,
arch/arm/mach-msm/board-dt-8960.c +2 -1
@@ -14,6 +14,7 @@#include <linux/of_platform.h> #include <asm/mach/arch.h> +#include <asm/mach/map.h> #include "common.h"
@@ -29,7 +30,7 @@ static const char * const msm8960_dt_match[] __initconst = {DT_MACHINE_START (MSM8960_DT ,"Qualcomm MSM (Flattened Device Tree)" ) .smp = smp_ops(msm_smp_ops), - .map_io = msm_map_msm8960_io, + .map_io = debug_ll_io_init, .init_time = msm_dt_timer_init, .init_machine = msm_dt_init, .dt_compat = msm8960_dt_match,
arch/arm/mach-msm/common.h +0 -2
@@ -19,8 +19,6 @@ extern void qsd8x50_timer_init(void);extern void msm_map_common_io (void );extern void msm_map_msm7x30_io (void ); -extern void msm_map_msm8x60_io (void ); -extern void msm_map_msm8960_io (void );extern void msm_map_qsd8x50_io (void ); extern void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size,
arch/arm/mach-msm/include/mach/msm_iomap-8960.h deleted +0 -41
41 lines not on this page · raw message
arch/arm/mach-msm/include/mach/msm_iomap-8x60.h deleted +0 -44
44 lines not on this page · raw message
arch/arm/mach-msm/include/mach/msm_iomap.h +0 -5
@@ -45,13 +45,8 @@#include "msm_iomap-7x00.h" #endif -#include "msm_iomap-8x60.h" -#include "msm_iomap-8960.h" -/* Virtual addresses shared across all MSM targets. */ #define MSM_CSR_BASE IOMEM(0xE0001000) -#define MSM_TMR_BASE IOMEM(0xF0200000) -#define MSM_TMR0_BASE IOMEM(0xF0201000)#define MSM_GPIO1_BASE IOMEM(0xE0003000)#define MSM_GPIO2_BASE IOMEM(0xE0004000)
arch/arm/mach-msm/io.c +0 -26
@@ -114,32 +114,6 @@ void __init msm_map_qsd8x50_io(void) }#endif /* CONFIG_ARCH_QSD8X50 */ -#ifdef CONFIG_ARCH_MSM8X60 -static struct map_desc msm8x60_io_desc[]__initdata = { -MSM_CHIP_DEVICE (TMR ,MSM8X60 ), -MSM_CHIP_DEVICE (TMR0 ,MSM8X60 ), -}; - -void __init msm_map_msm8x60_io (void ) -{ -debug_ll_io_init (); -iotable_init (msm8x60_io_desc,ARRAY_SIZE (msm8x60_io_desc)); -} -#endif /* CONFIG_ARCH_MSM8X60 */ - -#ifdef CONFIG_ARCH_MSM8960 -static struct map_desc msm8960_io_desc[]__initdata = { -MSM_CHIP_DEVICE (TMR ,MSM8960 ), -MSM_CHIP_DEVICE (TMR0 ,MSM8960 ), -}; - -void __init msm_map_msm8960_io (void ) -{ -debug_ll_io_init (); -iotable_init (msm8960_io_desc,ARRAY_SIZE (msm8960_io_desc)); -} -#endif /* CONFIG_ARCH_MSM8960 */ -#ifdef CONFIG_ARCH_MSM7X30 static struct map_desc msm7x30_io_desc[]__initdata = { MSM_DEVICE(VIC),
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
PATCH v2 3/3 ARM: msm: Don't compile __msm_ioremap_caller() unless used
In reply to Stephen BoydThis function is only used on MSM7x00A so only compile the function if the build includes support for that platform.
--- arch/arm/mach-msm/io.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-msm/io.c +2 -0
@@ -144,6 +144,7 @@ void __init msm_map_msm7x30_io(void) }#endif /* CONFIG_ARCH_MSM7X30 */ +#ifdef CONFIG_ARCH_MSM7X00A void __iomem *__msm_ioremap_caller (unsigned long phys_addr,size_t size,unsigned int mtype,void *caller) {
@@ -158,3 +159,4 @@ void __iomem *__msm_ioremap_caller(unsigned long phys_addr, size_t size, return __arm_ioremap_caller(phys_addr, size, mtype, caller); } +#endif
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation