msm: msm_iomap: Fix DEBUG_UART for 7x27a/7x30
We have moved to unification of IO address map for 7x27a/7x30 with 8k.
This now means that the header files(msm_iomap-7x30.h and
msm_iomap-7xxx.h) will included whichever target gets compiled,
so now we cannot keep the macro MSM_DEBUG_UART_PHYS in both the
files which has different physical address.
Thus moving to CONFIG_MSM_DEBUG_UART_PHYS which gets selected
from Kconfig based on the target selected.
Change-Id: I024e685d7ce2f5df0db49c482cd5d8541884e054
Signed-off-by: Taniya Das <tdas@codeaurora.org>
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index ed2b9ad..023d289 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -874,27 +874,38 @@
Say Y here if you want the debug print routines to direct
their output to the serial port on MSM 8930 devices.
+config MSM_DEBUG_UART_PHYS
+ hex
+ default 0xA9A00000 if (ARCH_MSM7X27 || ARCH_QSD8X50) && DEBUG_MSM_UART1
+ default 0xACA00000 if ARCH_MSM7X30 && DEBUG_MSM_UART1
+ default 0x94000000 if ARCH_FSM9XXX && DEBUG_MSM_UART1
+ default 0xA9B00000 if (ARCH_MSM7X27 || ARCH_QSD8X50) && DEBUG_MSM_UART2
+ default 0xACB00000 if ARCH_MSM7X30 && DEBUG_MSM_UART2
+ default 0x94100000 if ARCH_FSM9XXX && DEBUG_MSM_UART2
+ default 0xA9C00000 if (ARCH_MSM7X27 || ARCH_QSD8X50) && DEBUG_MSM_UART3
+ default 0xACC00000 if ARCH_MSM7X30 && DEBUG_MSM_UART3
+
choice
prompt "Debug UART"
depends on DEBUG_LL
config DEBUG_MSM_UART1
bool "Kernel low-level debugging messages via MSM UART1"
- depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+ depends on ARCH_MSM7X27 || ARCH_MSM7X30 || ARCH_QSD8X50 || ARCH_FSM9XXX
help
Say Y here if you want the debug print routines to direct
their output to the first serial port on MSM devices.
config DEBUG_MSM_UART2
bool "Kernel low-level debugging messages via MSM UART2"
- depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+ depends on ARCH_MSM7X27 || ARCH_MSM7X30 || ARCH_QSD8X50 || ARCH_FSM9XXX
help
Say Y here if you want the debug print routines to direct
their output to the second serial port on MSM devices.
config DEBUG_MSM_UART3
bool "Kernel low-level debugging messages via MSM UART3"
- depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
+ depends on ARCH_MSM7X27 || ARCH_MSM7X30 || ARCH_QSD8X50
help
Say Y here if you want the debug print routines to direct
their output to the third serial port on MSM devices.
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h
index 382ea5b..8f5d673 100644
--- a/arch/arm/mach-msm/include/mach/msm_iomap.h
+++ b/arch/arm/mach-msm/include/mach/msm_iomap.h
@@ -45,6 +45,13 @@
#define MSM_DEBUG_UART_SIZE SZ_4K
+#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) \
+ || defined(CONFIG_DEBUG_MSM_UART3)
+#define MSM_DEBUG_UART_BASE 0xFC000000
+#define MSM_DEBUG_UART_PHYS CONFIG_MSM_DEBUG_UART_PHYS
+#endif
+
+
#if defined(CONFIG_ARCH_MSM8960) || defined(CONFIG_ARCH_APQ8064) || \
defined(CONFIG_ARCH_MSM8930) || defined(CONFIG_ARCH_MSM9615) || \
defined(CONFIG_ARCH_MSMCOPPER) || defined(CONFIG_ARCH_MSM7X27) || \
@@ -125,17 +132,6 @@
#error "Target compiled without IO map\n"
#endif
-#if defined(CONFIG_DEBUG_MSM_UART1)
-#define MSM_DEBUG_UART_BASE 0xFB000000
-#define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS
-#elif defined(CONFIG_DEBUG_MSM_UART2)
-#define MSM_DEBUG_UART_BASE 0xFB000000
-#define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS
-#elif defined(CONFIG_DEBUG_MSM_UART3)
-#define MSM_DEBUG_UART_BASE 0xFB000000
-#define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS
-#endif
-
#endif
#endif
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 063f6bd..7c0de57 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -68,7 +68,7 @@
MSM_CHIP_DEVICE(MDC, MSM7XXX),
#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
defined(CONFIG_DEBUG_MSM_UART3)
- MSM_CHIP_DEVICE(DEBUG_UART, MSM7XXX),
+ MSM_DEVICE(DEBUG_UART),
#endif
#ifdef CONFIG_CACHE_L2X0
{
@@ -424,7 +424,7 @@
MSM_CHIP_DEVICE(MDC, MSM7XXX),
#if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \
defined(CONFIG_DEBUG_MSM_UART3)
- MSM_CHIP_DEVICE(DEBUG_UART, MSM7XXX),
+ MSM_DEVICE(DEBUG_UART),
#endif
#ifdef CONFIG_CACHE_L2X0
{