diff options
| author | Ivan T. Ivanov <iivanov@mm-sol.com> | 2014-04-14 09:47:34 -0400 |
|---|---|---|
| committer | Kumar Gala <galak@codeaurora.org> | 2014-05-22 12:50:15 -0400 |
| commit | 7098cff2a3f4db5f844607b8a09bd191618c769e (patch) | |
| tree | c67c56a970a0aa458dac8fd9e629314aceec2ba0 /arch/arm/include/debug | |
| parent | 7831c4b2a11b35cde9bc548b600ec047aac7f98f (diff) | |
ARM: debug: qcom: make UART address selection configuration option
Separate Qualcomm low-level debugging UART to two options.
DEBUG_MSM_UART is used in earlier non-multi platform arches,
like MSM7X00A, QSD8X50 and MSM7X30.
DEBUG_QCOM_UARTDM is used in multi-plafrom arches and have
embedded data mover.
Make DEBUG_UART_PHYS and DEBUG_UART_BASE user adjustable by
Kconfig menu.
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
Diffstat (limited to 'arch/arm/include/debug')
| -rw-r--r-- | arch/arm/include/debug/msm.S | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/arch/arm/include/debug/msm.S b/arch/arm/include/debug/msm.S index 9d653d475903..9ef57612811d 100644 --- a/arch/arm/include/debug/msm.S +++ b/arch/arm/include/debug/msm.S | |||
| @@ -15,51 +15,15 @@ | |||
| 15 | * | 15 | * |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_QSD8X50) | ||
| 19 | #define MSM_UART1_PHYS 0xA9A00000 | ||
| 20 | #define MSM_UART2_PHYS 0xA9B00000 | ||
| 21 | #define MSM_UART3_PHYS 0xA9C00000 | ||
| 22 | #elif defined(CONFIG_ARCH_MSM7X30) | ||
| 23 | #define MSM_UART1_PHYS 0xACA00000 | ||
| 24 | #define MSM_UART2_PHYS 0xACB00000 | ||
| 25 | #define MSM_UART3_PHYS 0xACC00000 | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #if defined(CONFIG_DEBUG_MSM_UART1) | ||
| 29 | #define MSM_DEBUG_UART_BASE 0xE1000000 | ||
| 30 | #define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS | ||
| 31 | #elif defined(CONFIG_DEBUG_MSM_UART2) | ||
| 32 | #define MSM_DEBUG_UART_BASE 0xE1000000 | ||
| 33 | #define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS | ||
| 34 | #elif defined(CONFIG_DEBUG_MSM_UART3) | ||
| 35 | #define MSM_DEBUG_UART_BASE 0xE1000000 | ||
| 36 | #define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #ifdef CONFIG_DEBUG_MSM8660_UART | ||
| 40 | #define MSM_DEBUG_UART_BASE 0xF0040000 | ||
| 41 | #define MSM_DEBUG_UART_PHYS 0x19C40000 | ||
| 42 | #endif | ||
| 43 | |||
| 44 | #ifdef CONFIG_DEBUG_MSM8960_UART | ||
| 45 | #define MSM_DEBUG_UART_BASE 0xF0040000 | ||
| 46 | #define MSM_DEBUG_UART_PHYS 0x16440000 | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #ifdef CONFIG_DEBUG_MSM8974_UART | ||
| 50 | #define MSM_DEBUG_UART_BASE 0xFA71E000 | ||
| 51 | #define MSM_DEBUG_UART_PHYS 0xF991E000 | ||
| 52 | #endif | ||
| 53 | |||
| 54 | .macro addruart, rp, rv, tmp | 18 | .macro addruart, rp, rv, tmp |
| 55 | #ifdef MSM_DEBUG_UART_PHYS | 19 | #ifdef CONFIG_DEBUG_UART_PHYS |
| 56 | ldr \rp, =MSM_DEBUG_UART_PHYS | 20 | ldr \rp, =CONFIG_DEBUG_UART_PHYS |
| 57 | ldr \rv, =MSM_DEBUG_UART_BASE | 21 | ldr \rv, =CONFIG_DEBUG_UART_VIRT |
| 58 | #endif | 22 | #endif |
| 59 | .endm | 23 | .endm |
| 60 | 24 | ||
| 61 | .macro senduart, rd, rx | 25 | .macro senduart, rd, rx |
| 62 | #ifdef CONFIG_MSM_HAS_DEBUG_UART_HS | 26 | #ifdef CONFIG_DEBUG_QCOM_UARTDM |
| 63 | @ Write the 1 character to UARTDM_TF | 27 | @ Write the 1 character to UARTDM_TF |
| 64 | str \rd, [\rx, #0x70] | 28 | str \rd, [\rx, #0x70] |
| 65 | #else | 29 | #else |
| @@ -68,7 +32,7 @@ | |||
| 68 | .endm | 32 | .endm |
| 69 | 33 | ||
| 70 | .macro waituart, rd, rx | 34 | .macro waituart, rd, rx |
| 71 | #ifdef CONFIG_MSM_HAS_DEBUG_UART_HS | 35 | #ifdef CONFIG_DEBUG_QCOM_UARTDM |
| 72 | @ check for TX_EMT in UARTDM_SR | 36 | @ check for TX_EMT in UARTDM_SR |
| 73 | ldr \rd, [\rx, #0x08] | 37 | ldr \rd, [\rx, #0x08] |
| 74 | tst \rd, #0x08 | 38 | tst \rd, #0x08 |
