diff mbox

[13/19] ARM: s5pv210: move debug-macro.S into the common space

Message ID 1404496099-26708-14-git-send-email-t.figa@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomasz Figa July 4, 2014, 5:48 p.m. UTC
Move debug-macro.S from mach/include to include/debug where
all other common debug macros are.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
---
 arch/arm/Kconfig.debug                           | 12 +++++--
 arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
 arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
 3 files changed, 44 insertions(+), 43 deletions(-)
 create mode 100644 arch/arm/include/debug/s5pv210.S
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S

diff --git a/arch/arm/mach-s5pv210/include/mach/debug-macro.S b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
deleted file mode 100644
index 30b511a..0000000

Comments

Kim Kukjin July 15, 2014, 11:54 p.m. UTC | #1
On 07/05/14 02:48, Tomasz Figa wrote:
> Move debug-macro.S from mach/include to include/debug where
> all other common debug macros are.
>
> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
> ---
>   arch/arm/Kconfig.debug                           | 12 +++++--
>   arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
>   arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
>   3 files changed, 44 insertions(+), 43 deletions(-)
>   create mode 100644 arch/arm/include/debug/s5pv210.S
>   delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 8f90595..c2bcfcf 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -617,6 +617,7 @@ choice
>   		depends on PLAT_SAMSUNG
>   		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>   		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
> +		select DEBUG_S5PV210_UART if ARCH_S5PV210
>   		bool "Use S3C UART 0 for low-level debug"
>   		help
>   		  Say Y here if you want the debug print routines to direct
> @@ -630,6 +631,7 @@ choice
>   		depends on PLAT_SAMSUNG
>   		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>   		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
> +		select DEBUG_S5PV210_UART if ARCH_S5PV210
>   		bool "Use S3C UART 1 for low-level debug"
>   		help
>   		  Say Y here if you want the debug print routines to direct
> @@ -643,6 +645,7 @@ choice
>   		depends on PLAT_SAMSUNG
>   		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
>   		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
> +		select DEBUG_S5PV210_UART if ARCH_S5PV210
>   		bool "Use S3C UART 2 for low-level debug"
>   		help
>   		  Say Y here if you want the debug print routines to direct
> @@ -653,8 +656,9 @@ choice
>   		  by CONFIG_S3C_LOWLEVEL_UART_PORT.
>
>   	config DEBUG_S3C_UART3
> -		depends on PLAT_SAMSUNG&&  ARCH_EXYNOS
> -		select DEBUG_EXYNOS_UART
> +		depends on PLAT_SAMSUNG&&  (ARCH_EXYNOS || ARCH_S5PV210)
> +		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
> +		select DEBUG_S5PV210_UART if ARCH_S5PV210
>   		bool "Use S3C UART 3 for low-level debug"
>   		help
>   		  Say Y here if you want the debug print routines to direct
> @@ -949,6 +953,9 @@ config DEBUG_S3C2410_UART
>   config DEBUG_S3C24XX_UART
>   	bool
>
> +config DEBUG_S5PV210_UART
> +	bool
> +
>   config DEBUG_OMAP2PLUS_UART
>   	bool
>   	depends on ARCH_OMAP2PLUS
> @@ -1009,6 +1016,7 @@ config DEBUG_LL_INCLUDE
>   	default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
>   	default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
>   	default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
> +	default "debug/s5pv210.S" if DEBUG_S5PV210_UART
>   	default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
>   	default "debug/sti.S" if DEBUG_STI_UART
>   	default "debug/tegra.S" if DEBUG_TEGRA_UART
> diff --git a/arch/arm/include/debug/s5pv210.S b/arch/arm/include/debug/s5pv210.S
> new file mode 100644
> index 0000000..4f1a73e
> --- /dev/null
> +++ b/arch/arm/include/debug/s5pv210.S
> @@ -0,0 +1,34 @@
> +/*
> + * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
> + *		http://www.samsung.com
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +/* pull in the relevant register and map files. */
> +
> +#define S3C_ADDR_BASE   0xF6000000
> +#define S3C_VA_UART	S3C_ADDR_BASE + 0x01000000
> +#define S5PV210_PA_UART	0xe2900000
> +
> +	/* note, for the boot process to work we have to keep the UART
> +	 * virtual address aligned to an 1MiB boundary for the L1
> +	 * mapping the head code makes. We keep the UART virtual address
> +	 * aligned and add in the offset when we load the value here.
> +	 */
> +
> +	.macro addruart, rp, rv, tmp
> +		ldr	\rp, =S5PV210_PA_UART
> +		ldr	\rv, =S3C_VA_UART
> +#if CONFIG_DEBUG_S3C_UART != 0
> +		add	\rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART)
> +		add	\rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART)
> +#endif
> +	.endm
> +
> +#define fifo_full fifo_full_s5pv210
> +#define fifo_level fifo_level_s5pv210
> +
> +#include<debug/samsung.S>
> diff --git a/arch/arm/mach-s5pv210/include/mach/debug-macro.S b/arch/arm/mach-s5pv210/include/mach/debug-macro.S
> deleted file mode 100644
> index 30b511a..0000000

Tomasz,

I couldn't apply this one from this your series because of conflict with 
others. Can you please respin this one?

Thanks,
-Kukjin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kim Kukjin July 16, 2014, 12:53 a.m. UTC | #2
Kukjin Kim wrote:
> 
> On 07/05/14 02:48, Tomasz Figa wrote:
> > Move debug-macro.S from mach/include to include/debug where
> > all other common debug macros are.
> >
> > Signed-off-by: Tomasz Figa<t.figa@samsung.com>
> > ---
> >   arch/arm/Kconfig.debug                           | 12 +++++--
> >   arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
> >   arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
> >   3 files changed, 44 insertions(+), 43 deletions(-)
> >   create mode 100644 arch/arm/include/debug/s5pv210.S
> >   delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S

[...]

> Tomasz,
> 
> I couldn't apply this one from this your series because of conflict with
> others. Can you please respin this one?
> 
One more note, since I didn't apply this, there is a build breakage for
s5pv210_defconfig now...

arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory
compilation terminated.
make[2]: *** [arch/arm/kernel/debug.o] Error 1
make[1]: *** [arch/arm/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

- Kukjin

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa July 16, 2014, 12:56 a.m. UTC | #3
On 16.07.2014 02:53, Kukjin Kim wrote:
> Kukjin Kim wrote:
>>
>> On 07/05/14 02:48, Tomasz Figa wrote:
>>> Move debug-macro.S from mach/include to include/debug where
>>> all other common debug macros are.
>>>
>>> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
>>> ---
>>>   arch/arm/Kconfig.debug                           | 12 +++++--
>>>   arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
>>>   arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
>>>   3 files changed, 44 insertions(+), 43 deletions(-)
>>>   create mode 100644 arch/arm/include/debug/s5pv210.S
>>>   delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S
> 
> [...]
> 
>> Tomasz,
>>
>> I couldn't apply this one from this your series because of conflict with
>> others. Can you please respin this one?
>>
> One more note, since I didn't apply this, there is a build breakage for
> s5pv210_defconfig now...
> 
> arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory
> compilation terminated.
> make[2]: *** [arch/arm/kernel/debug.o] Error 1
> make[1]: *** [arch/arm/kernel] Error 2
> make[1]: *** Waiting for unfinished jobs....

Hmm? Are you sure previous patches applied correctly? I have tested this
series patch by patch on all affected configs and it built fine back
then. Maybe some conflict, I'll see tomorrow.

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kim Kukjin July 18, 2014, 7:38 p.m. UTC | #4
On 07/16/14 09:56, Tomasz Figa wrote:
> On 16.07.2014 02:53, Kukjin Kim wrote:
>> Kukjin Kim wrote:
>>>
>>> On 07/05/14 02:48, Tomasz Figa wrote:
>>>> Move debug-macro.S from mach/include to include/debug where
>>>> all other common debug macros are.
>>>>
>>>> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
>>>> ---
>>>>    arch/arm/Kconfig.debug                           | 12 +++++--
>>>>    arch/arm/include/debug/s5pv210.S                 | 34 ++++++++++++++++++++
>>>>    arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41 ------------------------
>>>>    3 files changed, 44 insertions(+), 43 deletions(-)
>>>>    create mode 100644 arch/arm/include/debug/s5pv210.S
>>>>    delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S
>>
>> [...]
>>
>>> Tomasz,
>>>
>>> I couldn't apply this one from this your series because of conflict with
>>> others. Can you please respin this one?
>>>
>> One more note, since I didn't apply this, there is a build breakage for
>> s5pv210_defconfig now...
>>
>> arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No such file or directory
>> compilation terminated.
>> make[2]: *** [arch/arm/kernel/debug.o] Error 1
>> make[1]: *** [arch/arm/kernel] Error 2
>> make[1]: *** Waiting for unfinished jobs....
>
> Hmm? Are you sure previous patches applied correctly? I have tested this
> series patch by patch on all affected configs and it built fine back
> then. Maybe some conflict, I'll see tomorrow.
>
Tomasz, I've applied this whole series including this again. Can you 
please check my branch before sending pull-request to arm-soc for 3.17?

Thanks,
Kukjin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa July 18, 2014, 11:25 p.m. UTC | #5
Hi Kukjin,

On 18.07.2014 21:38, Kukjin Kim wrote:
> On 07/16/14 09:56, Tomasz Figa wrote:
>> On 16.07.2014 02:53, Kukjin Kim wrote:
>>> Kukjin Kim wrote:
>>>>
>>>> On 07/05/14 02:48, Tomasz Figa wrote:
>>>>> Move debug-macro.S from mach/include to include/debug where
>>>>> all other common debug macros are.
>>>>>
>>>>> Signed-off-by: Tomasz Figa<t.figa@samsung.com>
>>>>> ---
>>>>>    arch/arm/Kconfig.debug                           | 12 +++++--
>>>>>    arch/arm/include/debug/s5pv210.S                 | 34
>>>>> ++++++++++++++++++++
>>>>>    arch/arm/mach-s5pv210/include/mach/debug-macro.S | 41
>>>>> ------------------------
>>>>>    3 files changed, 44 insertions(+), 43 deletions(-)
>>>>>    create mode 100644 arch/arm/include/debug/s5pv210.S
>>>>>    delete mode 100644 arch/arm/mach-s5pv210/include/mach/debug-macro.S
>>>
>>> [...]
>>>
>>>> Tomasz,
>>>>
>>>> I couldn't apply this one from this your series because of conflict
>>>> with
>>>> others. Can you please respin this one?
>>>>
>>> One more note, since I didn't apply this, there is a build breakage for
>>> s5pv210_defconfig now...
>>>
>>> arch/arm/kernel/debug.S:24:33: fatal error: mach/debug-macro.S: No
>>> such file or directory
>>> compilation terminated.
>>> make[2]: *** [arch/arm/kernel/debug.o] Error 1
>>> make[1]: *** [arch/arm/kernel] Error 2
>>> make[1]: *** Waiting for unfinished jobs....
>>
>> Hmm? Are you sure previous patches applied correctly? I have tested this
>> series patch by patch on all affected configs and it built fine back
>> then. Maybe some conflict, I'll see tomorrow.
>>
> Tomasz, I've applied this whole series including this again. Can you
> please check my branch before sending pull-request to arm-soc for 3.17?

Thanks for applying this.

A quick look through the patches didn't reveal any issues.
s5pv210_defconfig builds fine too. I don't have any s5pv210-based board
at home, though, so I can't do anything else than compile testing until
Tuesday.

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 8f90595..c2bcfcf 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -617,6 +617,7 @@  choice
 		depends on PLAT_SAMSUNG
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 0 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -630,6 +631,7 @@  choice
 		depends on PLAT_SAMSUNG
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 1 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -643,6 +645,7 @@  choice
 		depends on PLAT_SAMSUNG
 		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
 		select DEBUG_S3C24XX_UART if ARCH_S3C24XX
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 2 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -653,8 +656,9 @@  choice
 		  by CONFIG_S3C_LOWLEVEL_UART_PORT.
 
 	config DEBUG_S3C_UART3
-		depends on PLAT_SAMSUNG && ARCH_EXYNOS
-		select DEBUG_EXYNOS_UART
+		depends on PLAT_SAMSUNG && (ARCH_EXYNOS || ARCH_S5PV210)
+		select DEBUG_EXYNOS_UART if ARCH_EXYNOS
+		select DEBUG_S5PV210_UART if ARCH_S5PV210
 		bool "Use S3C UART 3 for low-level debug"
 		help
 		  Say Y here if you want the debug print routines to direct
@@ -949,6 +953,9 @@  config DEBUG_S3C2410_UART
 config DEBUG_S3C24XX_UART
 	bool
 
+config DEBUG_S5PV210_UART
+	bool
+
 config DEBUG_OMAP2PLUS_UART
 	bool
 	depends on ARCH_OMAP2PLUS
@@ -1009,6 +1016,7 @@  config DEBUG_LL_INCLUDE
 	default "debug/msm.S" if DEBUG_MSM_UART || DEBUG_QCOM_UARTDM
 	default "debug/omap2plus.S" if DEBUG_OMAP2PLUS_UART
 	default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART
+	default "debug/s5pv210.S" if DEBUG_S5PV210_UART
 	default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1
 	default "debug/sti.S" if DEBUG_STI_UART
 	default "debug/tegra.S" if DEBUG_TEGRA_UART
diff --git a/arch/arm/include/debug/s5pv210.S b/arch/arm/include/debug/s5pv210.S
new file mode 100644
index 0000000..4f1a73e
--- /dev/null
+++ b/arch/arm/include/debug/s5pv210.S
@@ -0,0 +1,34 @@ 
+/*
+ * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/* pull in the relevant register and map files. */
+
+#define S3C_ADDR_BASE   0xF6000000
+#define S3C_VA_UART	S3C_ADDR_BASE + 0x01000000
+#define S5PV210_PA_UART	0xe2900000
+
+	/* note, for the boot process to work we have to keep the UART
+	 * virtual address aligned to an 1MiB boundary for the L1
+	 * mapping the head code makes. We keep the UART virtual address
+	 * aligned and add in the offset when we load the value here.
+	 */
+
+	.macro addruart, rp, rv, tmp
+		ldr	\rp, =S5PV210_PA_UART
+		ldr	\rv, =S3C_VA_UART
+#if CONFIG_DEBUG_S3C_UART != 0
+		add	\rp, \rp, #(0x400 * CONFIG_DEBUG_S3C_UART)
+		add	\rv, \rv, #(0x400 * CONFIG_DEBUG_S3C_UART)
+#endif
+	.endm
+
+#define fifo_full fifo_full_s5pv210
+#define fifo_level fifo_level_s5pv210
+
+#include <debug/samsung.S>