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 | |
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>
-rw-r--r-- | arch/arm/Kconfig.debug | 81 | ||||
-rw-r--r-- | arch/arm/include/debug/msm.S | 46 | ||||
-rw-r--r-- | arch/arm/mach-msm/Kconfig | 3 |
3 files changed, 38 insertions, 92 deletions
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index 4a2fc0bf6fc9..cdbfd8b0efc7 100644 --- a/arch/arm/Kconfig.debug +++ b/arch/arm/Kconfig.debug | |||
@@ -349,56 +349,39 @@ choice | |||
349 | Say Y here if you want kernel low-level debugging support | 349 | Say Y here if you want kernel low-level debugging support |
350 | on MMP UART3. | 350 | on MMP UART3. |
351 | 351 | ||
352 | config DEBUG_MSM_UART1 | 352 | config DEBUG_MSM_UART |
353 | bool "Kernel low-level debugging messages via MSM UART1" | 353 | bool "Kernel low-level debugging messages via MSM UART" |
354 | depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 | 354 | depends on ARCH_MSM |
355 | select DEBUG_MSM_UART | ||
356 | help | 355 | help |
357 | Say Y here if you want the debug print routines to direct | 356 | Say Y here if you want the debug print routines to direct |
358 | their output to the first serial port on MSM devices. | 357 | their output to the serial port on MSM devices. |
359 | 358 | ||
360 | config DEBUG_MSM_UART2 | 359 | ARCH DEBUG_UART_PHYS DEBUG_UART_BASE # |
361 | bool "Kernel low-level debugging messages via MSM UART2" | 360 | MSM7X00A, QSD8X50 0xa9a00000 0xe1000000 UART1 |
362 | depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 | 361 | MSM7X00A, QSD8X50 0xa9b00000 0xe1000000 UART2 |
363 | select DEBUG_MSM_UART | 362 | MSM7X00A, QSD8X50 0xa9c00000 0xe1000000 UART3 |
364 | help | ||
365 | Say Y here if you want the debug print routines to direct | ||
366 | their output to the second serial port on MSM devices. | ||
367 | 363 | ||
368 | config DEBUG_MSM_UART3 | 364 | MSM7X30 0xaca00000 0xe1000000 UART1 |
369 | bool "Kernel low-level debugging messages via MSM UART3" | 365 | MSM7X30 0xacb00000 0xe1000000 UART2 |
370 | depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50 | 366 | MSM7X30 0xacc00000 0xe1000000 UART3 |
371 | select DEBUG_MSM_UART | ||
372 | help | ||
373 | Say Y here if you want the debug print routines to direct | ||
374 | their output to the third serial port on MSM devices. | ||
375 | 367 | ||
376 | config DEBUG_MSM8660_UART | 368 | Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration |
377 | bool "Kernel low-level debugging messages via MSM 8660 UART" | 369 | options based on your needs. |
378 | depends on ARCH_MSM8X60 | ||
379 | select MSM_HAS_DEBUG_UART_HS | ||
380 | select DEBUG_MSM_UART | ||
381 | help | ||
382 | Say Y here if you want the debug print routines to direct | ||
383 | their output to the serial port on MSM 8660 devices. | ||
384 | 370 | ||
385 | config DEBUG_MSM8960_UART | 371 | config DEBUG_QCOM_UARTDM |
386 | bool "Kernel low-level debugging messages via MSM 8960 UART" | 372 | bool "Kernel low-level debugging messages via QCOM UARTDM" |
387 | depends on ARCH_MSM8960 | 373 | depends on ARCH_QCOM |
388 | select MSM_HAS_DEBUG_UART_HS | ||
389 | select DEBUG_MSM_UART | ||
390 | help | 374 | help |
391 | Say Y here if you want the debug print routines to direct | 375 | Say Y here if you want the debug print routines to direct |
392 | their output to the serial port on MSM 8960 devices. | 376 | their output to the serial port on Qualcomm devices. |
393 | 377 | ||
394 | config DEBUG_MSM8974_UART | 378 | ARCH DEBUG_UART_PHYS DEBUG_UART_BASE |
395 | bool "Kernel low-level debugging messages via MSM 8974 UART" | 379 | MSM8X60 0x19c40000 0xf0040000 |
396 | depends on ARCH_MSM8974 | 380 | MSM8960 0x16440000 0xf0040000 |
397 | select MSM_HAS_DEBUG_UART_HS | 381 | MSM8974 0xf991e000 0xfa71e000 |
398 | select DEBUG_MSM_UART | 382 | |
399 | help | 383 | Please adjust DEBUG_UART_PHYS and DEBUG_UART_BASE configuration |
400 | Say Y here if you want the debug print routines to direct | 384 | options based on your needs. |
401 | their output to the serial port on MSM 8974 devices. | ||
402 | 385 | ||
403 | config DEBUG_MVEBU_UART | 386 | config DEBUG_MVEBU_UART |
404 | bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)" | 387 | bool "Kernel low-level debugging messages via MVEBU UART (old bootloaders)" |
@@ -950,10 +933,6 @@ config DEBUG_STI_UART | |||
950 | bool | 933 | bool |
951 | depends on ARCH_STI | 934 | depends on ARCH_STI |
952 | 935 | ||
953 | config DEBUG_MSM_UART | ||
954 | bool | ||
955 | depends on ARCH_MSM || ARCH_QCOM | ||
956 | |||
957 | config DEBUG_LL_INCLUDE | 936 | config DEBUG_LL_INCLUDE |
958 | string | 937 | string |
959 | default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 | 938 | default "debug/8250.S" if DEBUG_LL_UART_8250 || DEBUG_UART_8250 |
@@ -971,7 +950,7 @@ config DEBUG_LL_INCLUDE | |||
971 | DEBUG_IMX53_UART ||\ | 950 | DEBUG_IMX53_UART ||\ |
972 | DEBUG_IMX6Q_UART || \ | 951 | DEBUG_IMX6Q_UART || \ |
973 | DEBUG_IMX6SL_UART | 952 | DEBUG_IMX6SL_UART |
974 | default "debug/msm.S" if DEBUG_MSM_UART | 953 | default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM |
975 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART | 954 | default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART |
976 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 | 955 | default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 |
977 | default "debug/sti.S" if DEBUG_STI_UART | 956 | default "debug/sti.S" if DEBUG_STI_UART |
@@ -1035,6 +1014,7 @@ config DEBUG_UART_PHYS | |||
1035 | default 0x80074000 if DEBUG_IMX28_UART | 1014 | default 0x80074000 if DEBUG_IMX28_UART |
1036 | default 0x808c0000 if ARCH_EP93XX | 1015 | default 0x808c0000 if ARCH_EP93XX |
1037 | default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART | 1016 | default 0x90020000 if DEBUG_NSPIRE_CLASSIC_UART || DEBUG_NSPIRE_CX_UART |
1017 | default 0xa9a00000 if DEBUG_MSM_UART | ||
1038 | default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX | 1018 | default 0xb0090000 if DEBUG_VEXPRESS_UART0_CRX |
1039 | default 0xc0013000 if DEBUG_U300_UART | 1019 | default 0xc0013000 if DEBUG_U300_UART |
1040 | default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN | 1020 | default 0xc8000000 if ARCH_IXP4XX && !CPU_BIG_ENDIAN |
@@ -1050,6 +1030,7 @@ config DEBUG_UART_PHYS | |||
1050 | ARCH_ORION5X | 1030 | ARCH_ORION5X |
1051 | default 0xf7fc9000 if DEBUG_BERLIN_UART | 1031 | default 0xf7fc9000 if DEBUG_BERLIN_UART |
1052 | default 0xf8b00000 if DEBUG_HI3716_UART | 1032 | default 0xf8b00000 if DEBUG_HI3716_UART |
1033 | default 0xf991e000 if DEBUG_QCOM_UARTDM | ||
1053 | default 0xfcb00000 if DEBUG_HI3620_UART | 1034 | default 0xfcb00000 if DEBUG_HI3620_UART |
1054 | default 0xfe800000 if ARCH_IOP32X | 1035 | default 0xfe800000 if ARCH_IOP32X |
1055 | default 0xffc02000 if DEBUG_SOCFPGA_UART | 1036 | default 0xffc02000 if DEBUG_SOCFPGA_UART |
@@ -1058,11 +1039,13 @@ config DEBUG_UART_PHYS | |||
1058 | default 0xfffff700 if ARCH_IOP33X | 1039 | default 0xfffff700 if ARCH_IOP33X |
1059 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ | 1040 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ |
1060 | DEBUG_LL_UART_EFM32 || \ | 1041 | DEBUG_LL_UART_EFM32 || \ |
1061 | DEBUG_UART_8250 || DEBUG_UART_PL01X | 1042 | DEBUG_UART_8250 || DEBUG_UART_PL01X || \ |
1043 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM | ||
1062 | 1044 | ||
1063 | config DEBUG_UART_VIRT | 1045 | config DEBUG_UART_VIRT |
1064 | hex "Virtual base address of debug UART" | 1046 | hex "Virtual base address of debug UART" |
1065 | default 0xe0010fe0 if ARCH_RPC | 1047 | default 0xe0010fe0 if ARCH_RPC |
1048 | default 0xe1000000 if DEBUG_MSM_UART | ||
1066 | default 0xf0000be0 if ARCH_EBSA110 | 1049 | default 0xf0000be0 if ARCH_EBSA110 |
1067 | default 0xf0009000 if DEBUG_CNS3XXX | 1050 | default 0xf0009000 if DEBUG_CNS3XXX |
1068 | default 0xf01fb000 if DEBUG_NOMADIK_UART | 1051 | default 0xf01fb000 if DEBUG_NOMADIK_UART |
@@ -1078,6 +1061,7 @@ config DEBUG_UART_VIRT | |||
1078 | default 0xf7fc9000 if DEBUG_BERLIN_UART | 1061 | default 0xf7fc9000 if DEBUG_BERLIN_UART |
1079 | default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 | 1062 | default 0xf8009000 if DEBUG_VEXPRESS_UART0_CA9 |
1080 | default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 | 1063 | default 0xf8090000 if DEBUG_VEXPRESS_UART0_RS1 |
1064 | default 0xfa71e000 if DEBUG_QCOM_UARTDM | ||
1081 | default 0xfb009000 if DEBUG_REALVIEW_STD_PORT | 1065 | default 0xfb009000 if DEBUG_REALVIEW_STD_PORT |
1082 | default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT | 1066 | default 0xfb10c000 if DEBUG_REALVIEW_PB1176_PORT |
1083 | default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX | 1067 | default 0xfd000000 if ARCH_SPEAR3XX || ARCH_SPEAR6XX |
@@ -1116,7 +1100,8 @@ config DEBUG_UART_VIRT | |||
1116 | default 0xff003000 if DEBUG_U300_UART | 1100 | default 0xff003000 if DEBUG_U300_UART |
1117 | default DEBUG_UART_PHYS if !MMU | 1101 | default DEBUG_UART_PHYS if !MMU |
1118 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ | 1102 | depends on DEBUG_LL_UART_8250 || DEBUG_LL_UART_PL01X || \ |
1119 | DEBUG_UART_8250 || DEBUG_UART_PL01X | 1103 | DEBUG_UART_8250 || DEBUG_UART_PL01X || \ |
1104 | DEBUG_MSM_UART || DEBUG_QCOM_UARTDM | ||
1120 | 1105 | ||
1121 | config DEBUG_UART_8250_SHIFT | 1106 | config DEBUG_UART_8250_SHIFT |
1122 | int "Register offset shift for the 8250 debug UART" | 1107 | int "Register offset shift for the 8250 debug UART" |
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 |
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index a7f959e58c3d..9b26976fb084 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -42,9 +42,6 @@ config ARCH_QSD8X50 | |||
42 | 42 | ||
43 | endchoice | 43 | endchoice |
44 | 44 | ||
45 | config MSM_HAS_DEBUG_UART_HS | ||
46 | bool | ||
47 | |||
48 | config MSM_SOC_REV_A | 45 | config MSM_SOC_REV_A |
49 | bool | 46 | bool |
50 | 47 | ||