All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@st.com>
To: Alain Volmat <avolmat@me.com>,
	Russell King <linux@armlinux.org.uk>,
	"Arnd Bergmann" <arnd@arndb.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"Olof Johansson" <olof@lixom.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	"Nathan Huckleberry" <nhuck15@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Enrico Weigelt <info@metux.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Kate Stewart" <kstewart@linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] arm: use DEBUG_UART_PHYS and DEBUG_UART_VIRT for sti LL_UART
Date: Tue, 6 Oct 2020 07:06:47 +0000	[thread overview]
Message-ID: <63b485cb-664d-f00f-8319-ad860f9e69c9@st.com> (raw)
In-Reply-To: <20200830195748.30221-2-avolmat@me.com>

Hi Alain

On 8/30/20 9:57 PM, Alain Volmat wrote:
> Update the sti platform LL_UART support to rely on
> CONFIG_DEBUG_UART_PHYS and CONFIG_DEBUG_UART_VIRT from Kconfig
>
> Signed-off-by: Alain Volmat <avolmat@me.com>
> ---
>  arch/arm/Kconfig.debug       | 23 ++++++++++++-----------
>  arch/arm/include/debug/sti.S | 26 ++------------------------
>  2 files changed, 14 insertions(+), 35 deletions(-)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 80000a66a4e3..e97d6e5c8898 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1184,10 +1184,9 @@ choice
>  		  Say Y here if you want kernel low-level debugging support
>  		  on ST SPEAr13xx based platforms.
>  
> -	config STIH41X_DEBUG_ASC2
> +	config DEBUG_STIH41X_ASC2
>  		bool "Use StiH415/416 ASC2 UART for low-level debug"
>  		depends on ARCH_STI
> -		select DEBUG_STI_UART
>  		help
>  		  Say Y here if you want kernel low-level debugging support
>  		  on STiH415/416 based platforms like b2000, which has
> @@ -1195,10 +1194,9 @@ choice
>  
>  		  If unsure, say N.
>  
> -	config STIH41X_DEBUG_SBC_ASC1
> +	config DEBUG_STIH41X_SBC_ASC1
>  		bool "Use StiH415/416 SBC ASC1 UART for low-level debug"
>  		depends on ARCH_STI
> -		select DEBUG_STI_UART
>  		help
>  		  Say Y here if you want kernel low-level debugging support
>  		  on STiH415/416 based platforms like b2020. which has
> @@ -1534,10 +1532,6 @@ config DEBUG_TEGRA_UART
>  	bool
>  	depends on ARCH_TEGRA
>  
> -config DEBUG_STI_UART
> -	bool
> -	depends on ARCH_STI
> -
>  config DEBUG_STM32_UART
>  	bool
>  	depends on ARCH_STM32
> @@ -1591,7 +1585,8 @@ config DEBUG_LL_INCLUDE
>  	default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART || DEBUG_S3C64XX_UART
>  	default "debug/s5pv210.S" if DEBUG_S5PV210_UART
>  	default "debug/sirf.S" if DEBUG_SIRFSOC_UART
> -	default "debug/sti.S" if DEBUG_STI_UART
> +	default "debug/sti.S" if DEBUG_STIH41X_ASC2
> +	default "debug/sti.S" if DEBUG_STIH41X_SBC_ASC1
>  	default "debug/stm32.S" if DEBUG_STM32_UART
>  	default "debug/tegra.S" if DEBUG_TEGRA_UART
>  	default "debug/ux500.S" if DEBUG_UX500_UART
> @@ -1723,7 +1718,9 @@ config DEBUG_UART_PHYS
>  	default 0xfc00c000 if DEBUG_AT91_SAMA5D4_USART3
>  	default 0xfcb00000 if DEBUG_HI3620_UART
>  	default 0xfd883000 if DEBUG_ALPINE_UART0
> +	default 0xfe531000 if DEBUG_STIH41X_SBC_ASC1
>  	default 0xfe800000 if ARCH_IOP32X
> +	default 0xfed32000 if DEBUG_STIH41X_ASC2
>  	default 0xff690000 if DEBUG_RK32_UART2
>  	default 0xffc02000 if DEBUG_SOCFPGA_UART0
>  	default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
> @@ -1752,7 +1749,8 @@ config DEBUG_UART_PHYS
>  		DEBUG_S3C64XX_UART || \
>  		DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
>  		DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \
> -		DEBUG_AT91_UART || DEBUG_STM32_UART
> +		DEBUG_AT91_UART || DEBUG_STM32_UART || \
> +		DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1
>  
>  config DEBUG_UART_VIRT
>  	hex "Virtual base address of debug UART"
> @@ -1817,7 +1815,9 @@ config DEBUG_UART_VIRT
>  	default 0xfc705000 if DEBUG_ZTE_ZX
>  	default 0xfcfe8600 if DEBUG_BCM63XX_UART
>  	default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX
> +	default 0xfd531000 if DEBUG_STIH41X_SBC_ASC1
>  	default 0xfd883000 if DEBUG_ALPINE_UART0
> +	default 0xfdd32000 if DEBUG_STIH41X_ASC2
>  	default 0xfe010000 if STM32MP1_DEBUG_UART
>  	default 0xfe017000 if DEBUG_MMP_UART2
>  	default 0xfe018000 if DEBUG_MMP_UART3
> @@ -1863,7 +1863,8 @@ config DEBUG_UART_VIRT
>  		DEBUG_S3C64XX_UART || \
>  		DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
>  		DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \
> -		DEBUG_AT91_UART || DEBUG_STM32_UART
> +		DEBUG_AT91_UART || DEBUG_STM32_UART || \
> +		DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1
>  
>  config DEBUG_UART_8250_SHIFT
>  	int "Register offset shift for the 8250 debug UART"
> diff --git a/arch/arm/include/debug/sti.S b/arch/arm/include/debug/sti.S
> index 6b42c91f217d..a903a60b81c6 100644
> --- a/arch/arm/include/debug/sti.S
> +++ b/arch/arm/include/debug/sti.S
> @@ -6,28 +6,6 @@
>   * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
>   */
>  
> -#define STIH41X_COMMS_BASE              0xfed00000
> -#define STIH41X_ASC2_BASE               (STIH41X_COMMS_BASE+0x32000)
> -
> -#define STIH41X_SBC_LPM_BASE            0xfe400000
> -#define STIH41X_SBC_COMMS_BASE          (STIH41X_SBC_LPM_BASE + 0x100000)
> -#define STIH41X_SBC_ASC1_BASE           (STIH41X_SBC_COMMS_BASE + 0x31000)
> -
> -
> -#define VIRT_ADDRESS(x)		(x - 0x1000000)
> -
> -#if IS_ENABLED(CONFIG_STIH41X_DEBUG_ASC2)
> -#define DEBUG_LL_UART_BASE	STIH41X_ASC2_BASE
> -#endif
> -
> -#if IS_ENABLED(CONFIG_STIH41X_DEBUG_SBC_ASC1)
> -#define DEBUG_LL_UART_BASE	STIH41X_SBC_ASC1_BASE
> -#endif
> -
> -#ifndef DEBUG_LL_UART_BASE
> -#error "DEBUG UART is not Configured"
> -#endif
> -
>  #define ASC_TX_BUF_OFF  0x04
>  #define ASC_CTRL_OFF    0x0c
>  #define ASC_STA_OFF     0x14
> @@ -37,8 +15,8 @@
>  
>  
>  		.macro	addruart, rp, rv, tmp
> -		ldr	\rp,      =DEBUG_LL_UART_BASE	@ physical base
> -		ldr	\rv,      =VIRT_ADDRESS(DEBUG_LL_UART_BASE) @ virt base
> +		ldr	\rp,      =CONFIG_DEBUG_UART_PHYS	@ physical base
> +		ldr	\rv,      =CONFIG_DEBUG_UART_VIRT	@ virt base
>  		.endm
>  
>                  .macro  senduart,rd,rx

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

Patrice

WARNING: multiple messages have this Message-ID (diff)
From: Patrice CHOTARD <patrice.chotard@st.com>
To: Alain Volmat <avolmat@me.com>,
	Russell King <linux@armlinux.org.uk>,
	"Arnd Bergmann" <arnd@arndb.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"Olof Johansson" <olof@lixom.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	"Nathan Huckleberry" <nhuck15@gmail.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Enrico Weigelt <info@metux.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Kate Stewart" <kstewart@linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] arm: use DEBUG_UART_PHYS and DEBUG_UART_VIRT for sti LL_UART
Date: Tue, 6 Oct 2020 07:06:47 +0000	[thread overview]
Message-ID: <63b485cb-664d-f00f-8319-ad860f9e69c9@st.com> (raw)
In-Reply-To: <20200830195748.30221-2-avolmat@me.com>

Hi Alain

On 8/30/20 9:57 PM, Alain Volmat wrote:
> Update the sti platform LL_UART support to rely on
> CONFIG_DEBUG_UART_PHYS and CONFIG_DEBUG_UART_VIRT from Kconfig
>
> Signed-off-by: Alain Volmat <avolmat@me.com>
> ---
>  arch/arm/Kconfig.debug       | 23 ++++++++++++-----------
>  arch/arm/include/debug/sti.S | 26 ++------------------------
>  2 files changed, 14 insertions(+), 35 deletions(-)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 80000a66a4e3..e97d6e5c8898 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -1184,10 +1184,9 @@ choice
>  		  Say Y here if you want kernel low-level debugging support
>  		  on ST SPEAr13xx based platforms.
>  
> -	config STIH41X_DEBUG_ASC2
> +	config DEBUG_STIH41X_ASC2
>  		bool "Use StiH415/416 ASC2 UART for low-level debug"
>  		depends on ARCH_STI
> -		select DEBUG_STI_UART
>  		help
>  		  Say Y here if you want kernel low-level debugging support
>  		  on STiH415/416 based platforms like b2000, which has
> @@ -1195,10 +1194,9 @@ choice
>  
>  		  If unsure, say N.
>  
> -	config STIH41X_DEBUG_SBC_ASC1
> +	config DEBUG_STIH41X_SBC_ASC1
>  		bool "Use StiH415/416 SBC ASC1 UART for low-level debug"
>  		depends on ARCH_STI
> -		select DEBUG_STI_UART
>  		help
>  		  Say Y here if you want kernel low-level debugging support
>  		  on STiH415/416 based platforms like b2020. which has
> @@ -1534,10 +1532,6 @@ config DEBUG_TEGRA_UART
>  	bool
>  	depends on ARCH_TEGRA
>  
> -config DEBUG_STI_UART
> -	bool
> -	depends on ARCH_STI
> -
>  config DEBUG_STM32_UART
>  	bool
>  	depends on ARCH_STM32
> @@ -1591,7 +1585,8 @@ config DEBUG_LL_INCLUDE
>  	default "debug/s3c24xx.S" if DEBUG_S3C24XX_UART || DEBUG_S3C64XX_UART
>  	default "debug/s5pv210.S" if DEBUG_S5PV210_UART
>  	default "debug/sirf.S" if DEBUG_SIRFSOC_UART
> -	default "debug/sti.S" if DEBUG_STI_UART
> +	default "debug/sti.S" if DEBUG_STIH41X_ASC2
> +	default "debug/sti.S" if DEBUG_STIH41X_SBC_ASC1
>  	default "debug/stm32.S" if DEBUG_STM32_UART
>  	default "debug/tegra.S" if DEBUG_TEGRA_UART
>  	default "debug/ux500.S" if DEBUG_UX500_UART
> @@ -1723,7 +1718,9 @@ config DEBUG_UART_PHYS
>  	default 0xfc00c000 if DEBUG_AT91_SAMA5D4_USART3
>  	default 0xfcb00000 if DEBUG_HI3620_UART
>  	default 0xfd883000 if DEBUG_ALPINE_UART0
> +	default 0xfe531000 if DEBUG_STIH41X_SBC_ASC1
>  	default 0xfe800000 if ARCH_IOP32X
> +	default 0xfed32000 if DEBUG_STIH41X_ASC2
>  	default 0xff690000 if DEBUG_RK32_UART2
>  	default 0xffc02000 if DEBUG_SOCFPGA_UART0
>  	default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
> @@ -1752,7 +1749,8 @@ config DEBUG_UART_PHYS
>  		DEBUG_S3C64XX_UART || \
>  		DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
>  		DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \
> -		DEBUG_AT91_UART || DEBUG_STM32_UART
> +		DEBUG_AT91_UART || DEBUG_STM32_UART || \
> +		DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1
>  
>  config DEBUG_UART_VIRT
>  	hex "Virtual base address of debug UART"
> @@ -1817,7 +1815,9 @@ config DEBUG_UART_VIRT
>  	default 0xfc705000 if DEBUG_ZTE_ZX
>  	default 0xfcfe8600 if DEBUG_BCM63XX_UART
>  	default 0xfd000000 if DEBUG_SPEAR3XX || DEBUG_SPEAR13XX
> +	default 0xfd531000 if DEBUG_STIH41X_SBC_ASC1
>  	default 0xfd883000 if DEBUG_ALPINE_UART0
> +	default 0xfdd32000 if DEBUG_STIH41X_ASC2
>  	default 0xfe010000 if STM32MP1_DEBUG_UART
>  	default 0xfe017000 if DEBUG_MMP_UART2
>  	default 0xfe018000 if DEBUG_MMP_UART3
> @@ -1863,7 +1863,8 @@ config DEBUG_UART_VIRT
>  		DEBUG_S3C64XX_UART || \
>  		DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
>  		DEBUG_SIRFSOC_UART || DEBUG_DIGICOLOR_UA0 || \
> -		DEBUG_AT91_UART || DEBUG_STM32_UART
> +		DEBUG_AT91_UART || DEBUG_STM32_UART || \
> +		DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1
>  
>  config DEBUG_UART_8250_SHIFT
>  	int "Register offset shift for the 8250 debug UART"
> diff --git a/arch/arm/include/debug/sti.S b/arch/arm/include/debug/sti.S
> index 6b42c91f217d..a903a60b81c6 100644
> --- a/arch/arm/include/debug/sti.S
> +++ b/arch/arm/include/debug/sti.S
> @@ -6,28 +6,6 @@
>   * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
>   */
>  
> -#define STIH41X_COMMS_BASE              0xfed00000
> -#define STIH41X_ASC2_BASE               (STIH41X_COMMS_BASE+0x32000)
> -
> -#define STIH41X_SBC_LPM_BASE            0xfe400000
> -#define STIH41X_SBC_COMMS_BASE          (STIH41X_SBC_LPM_BASE + 0x100000)
> -#define STIH41X_SBC_ASC1_BASE           (STIH41X_SBC_COMMS_BASE + 0x31000)
> -
> -
> -#define VIRT_ADDRESS(x)		(x - 0x1000000)
> -
> -#if IS_ENABLED(CONFIG_STIH41X_DEBUG_ASC2)
> -#define DEBUG_LL_UART_BASE	STIH41X_ASC2_BASE
> -#endif
> -
> -#if IS_ENABLED(CONFIG_STIH41X_DEBUG_SBC_ASC1)
> -#define DEBUG_LL_UART_BASE	STIH41X_SBC_ASC1_BASE
> -#endif
> -
> -#ifndef DEBUG_LL_UART_BASE
> -#error "DEBUG UART is not Configured"
> -#endif
> -
>  #define ASC_TX_BUF_OFF  0x04
>  #define ASC_CTRL_OFF    0x0c
>  #define ASC_STA_OFF     0x14
> @@ -37,8 +15,8 @@
>  
>  
>  		.macro	addruart, rp, rv, tmp
> -		ldr	\rp,      =DEBUG_LL_UART_BASE	@ physical base
> -		ldr	\rv,      =VIRT_ADDRESS(DEBUG_LL_UART_BASE) @ virt base
> +		ldr	\rp,      =CONFIG_DEBUG_UART_PHYS	@ physical base
> +		ldr	\rv,      =CONFIG_DEBUG_UART_VIRT	@ virt base
>  		.endm
>  
>                  .macro  senduart,rd,rx

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

Patrice
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-06  7:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30 19:57 [PATCH v2 0/2] arm: sti: LL_UART updates & STiH418 addition Alain Volmat
2020-08-30 19:57 ` Alain Volmat
2020-08-30 19:57 ` [PATCH v2 1/2] arm: use DEBUG_UART_PHYS and DEBUG_UART_VIRT for sti LL_UART Alain Volmat
2020-08-30 19:57   ` Alain Volmat
2020-10-06  7:06   ` Patrice CHOTARD [this message]
2020-10-06  7:06     ` Patrice CHOTARD
2020-08-30 19:57 ` [PATCH v2 2/2] arm: sti LL_UART: add STiH418 SBC UART0 support Alain Volmat
2020-08-30 19:57   ` Alain Volmat
2020-10-06  7:07   ` Patrice CHOTARD
2020-10-06  7:07     ` Patrice CHOTARD
2020-09-12 10:13 ` [PATCH v2 0/2] arm: sti: LL_UART updates & STiH418 addition Linus Walleij
2020-09-12 10:13   ` Linus Walleij
2020-09-18 20:28   ` Alain Volmat
2020-09-18 20:28     ` Alain Volmat
2020-10-06  5:04   ` Alain Volmat
2020-10-06  5:04     ` Alain Volmat
2020-10-06  8:29     ` Linus Walleij
2020-10-06  8:29       ` Linus Walleij
2020-11-19  8:08 ` Patrice CHOTARD
2020-11-19  8:08   ` Patrice CHOTARD
2020-11-19  8:26   ` Linus Walleij
2020-11-19  8:26     ` Linus Walleij
2020-11-19  9:57     ` Patrice CHOTARD
2020-11-19  9:57       ` Patrice CHOTARD
2020-11-19 10:23       ` Patrice CHOTARD
2020-11-19 10:23         ` Patrice CHOTARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63b485cb-664d-f00f-8319-ad860f9e69c9@st.com \
    --to=patrice.chotard@st.com \
    --cc=arnd@arndb.de \
    --cc=avolmat@me.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=info@metux.net \
    --cc=kstewart@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=nhuck15@gmail.com \
    --cc=olof@lixom.net \
    --cc=s.hauer@pengutronix.de \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.