diff mbox series

[U-Boot,v2,1/2] rockchip: enable SYS_NS16550 for all SoCs by default

Message ID 1524109030-21187-1-git-send-email-kever.yang@rock-chips.com
State Accepted
Delegated to: Philipp Tomsich
Headers show
Series [U-Boot,v2,1/2] rockchip: enable SYS_NS16550 for all SoCs by default | expand

Commit Message

Kever Yang April 19, 2018, 3:37 a.m. UTC
All rockchip SoCs can use ns16550 driver, enable it for all
and set SYS_NS16550_MEM32 for all SoCs.

Version-changes: 2
- use imply instead of select

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

Changes in v2: None

 arch/arm/Kconfig                  | 1 +
 arch/arm/mach-rockchip/Kconfig    | 1 -
 include/configs/rk3036_common.h   | 3 ---
 include/configs/rk3128_common.h   | 2 --
 include/configs/rk3188_common.h   | 2 --
 include/configs/rk322x_common.h   | 1 -
 include/configs/rk3288_common.h   | 2 --
 include/configs/rk3328_common.h   | 2 --
 include/configs/rk3368_common.h   | 2 --
 include/configs/rk3399_common.h   | 2 --
 include/configs/rockchip-common.h | 2 ++
 include/configs/rv1108_common.h   | 3 ---
 12 files changed, 3 insertions(+), 20 deletions(-)

Comments

Philipp Tomsich April 25, 2018, 10:29 a.m. UTC | #1
> All rockchip SoCs can use ns16550 driver, enable it for all
> and set SYS_NS16550_MEM32 for all SoCs.
> 
> Version-changes: 2
> - use imply instead of select
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/Kconfig                  | 1 +
>  arch/arm/mach-rockchip/Kconfig    | 1 -
>  include/configs/rk3036_common.h   | 3 ---
>  include/configs/rk3128_common.h   | 2 --
>  include/configs/rk3188_common.h   | 2 --
>  include/configs/rk322x_common.h   | 1 -
>  include/configs/rk3288_common.h   | 2 --
>  include/configs/rk3328_common.h   | 2 --
>  include/configs/rk3368_common.h   | 2 --
>  include/configs/rk3399_common.h   | 2 --
>  include/configs/rockchip-common.h | 2 ++
>  include/configs/rv1108_common.h   | 3 ---
>  12 files changed, 3 insertions(+), 20 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich April 25, 2018, 10:29 a.m. UTC | #2
> All rockchip SoCs can use ns16550 driver, enable it for all
> and set SYS_NS16550_MEM32 for all SoCs.
> 
> Version-changes: 2
> - use imply instead of select
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/Kconfig                  | 1 +
>  arch/arm/mach-rockchip/Kconfig    | 1 -
>  include/configs/rk3036_common.h   | 3 ---
>  include/configs/rk3128_common.h   | 2 --
>  include/configs/rk3188_common.h   | 2 --
>  include/configs/rk322x_common.h   | 1 -
>  include/configs/rk3288_common.h   | 2 --
>  include/configs/rk3328_common.h   | 2 --
>  include/configs/rk3368_common.h   | 2 --
>  include/configs/rk3399_common.h   | 2 --
>  include/configs/rockchip-common.h | 2 ++
>  include/configs/rv1108_common.h   | 3 ---
>  12 files changed, 3 insertions(+), 20 deletions(-)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich April 26, 2018, 7:05 a.m. UTC | #3
> All rockchip SoCs can use ns16550 driver, enable it for all
> and set SYS_NS16550_MEM32 for all SoCs.
> 
> Version-changes: 2
> - use imply instead of select
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/Kconfig                  | 1 +
>  arch/arm/mach-rockchip/Kconfig    | 1 -
>  include/configs/rk3036_common.h   | 3 ---
>  include/configs/rk3128_common.h   | 2 --
>  include/configs/rk3188_common.h   | 2 --
>  include/configs/rk322x_common.h   | 1 -
>  include/configs/rk3288_common.h   | 2 --
>  include/configs/rk3328_common.h   | 2 --
>  include/configs/rk3368_common.h   | 2 --
>  include/configs/rk3399_common.h   | 2 --
>  include/configs/rockchip-common.h | 2 ++
>  include/configs/rv1108_common.h   | 3 ---
>  12 files changed, 3 insertions(+), 20 deletions(-)
> 

Applied to u-boot-rockchip, thanks!
Jonathan Gray May 8, 2018, 7:30 a.m. UTC | #4
On Thu, Apr 26, 2018 at 09:05:37AM +0200, Philipp Tomsich wrote:
> > All rockchip SoCs can use ns16550 driver, enable it for all
> > and set SYS_NS16550_MEM32 for all SoCs.
> > 
> > Version-changes: 2
> > - use imply instead of select
> > 
> > Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> > Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> > Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> > ---
> > 
> > Changes in v2: None
> > 
> >  arch/arm/Kconfig                  | 1 +
> >  arch/arm/mach-rockchip/Kconfig    | 1 -
> >  include/configs/rk3036_common.h   | 3 ---
> >  include/configs/rk3128_common.h   | 2 --
> >  include/configs/rk3188_common.h   | 2 --
> >  include/configs/rk322x_common.h   | 1 -
> >  include/configs/rk3288_common.h   | 2 --
> >  include/configs/rk3328_common.h   | 2 --
> >  include/configs/rk3368_common.h   | 2 --
> >  include/configs/rk3399_common.h   | 2 --
> >  include/configs/rockchip-common.h | 2 ++
> >  include/configs/rv1108_common.h   | 3 ---
> >  12 files changed, 3 insertions(+), 20 deletions(-)
> > 
> 
> Applied to u-boot-rockchip, thanks!

With U-Boot 2018.05 there is no serial console output on tinker-rk3288,
a regression from 2018.03.  I have bisected it to this commit.

Reverting c3c0331db1fb7b1f4ff41e144fc04353b37c785c and
eb3d707e99fcd2213d5f8f0fe4ae53ad416b377e restores serial output with
2018.05.

c3c0331db1fb7b1f4ff41e144fc04353b37c785c is the first bad commit
commit c3c0331db1fb7b1f4ff41e144fc04353b37c785c
Author: Kever Yang <kever.yang@rock-chips.com>
Date:   Thu Apr 19 11:37:09 2018 +0800

    rockchip: enable SYS_NS16550 for all SoCs by default
    
    All rockchip SoCs can use ns16550 driver, enable it for all
    and set SYS_NS16550_MEM32 for all SoCs.
    
    Version-changes: 2
    - use imply instead of select
    
    Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
    Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
    Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

:040000 040000 f7cc8b28ae8179fdc15896bbb55279f205a54008 d07108bbf467735f31f31c083a9068dff71da247 M      arch
:040000 040000 d0a0422fc55afdcb5abb82f24b9a0af8de3d39a6 33c7fcf6f28f44a8c416f95313e7a30b2f73f8f0 M      include
Philipp Tomsich May 8, 2018, 7:41 a.m. UTC | #5
Kever,

Could you analyse and provide (against master) a patch for this?
We’ll need to catch any left-overs from your changes at the start of the cycle
before we try to merge any of the more invasive changes you have in-flight.

Thanks,
Philipp.

> On 8 May 2018, at 09:30, Jonathan Gray <jsg@jsg.id.au> wrote:
> 
> On Thu, Apr 26, 2018 at 09:05:37AM +0200, Philipp Tomsich wrote:
>>> All rockchip SoCs can use ns16550 driver, enable it for all
>>> and set SYS_NS16550_MEM32 for all SoCs.
>>> 
>>> Version-changes: 2
>>> - use imply instead of select
>>> 
>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>>> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
>>> ---
>>> 
>>> Changes in v2: None
>>> 
>>> arch/arm/Kconfig                  | 1 +
>>> arch/arm/mach-rockchip/Kconfig    | 1 -
>>> include/configs/rk3036_common.h   | 3 ---
>>> include/configs/rk3128_common.h   | 2 --
>>> include/configs/rk3188_common.h   | 2 --
>>> include/configs/rk322x_common.h   | 1 -
>>> include/configs/rk3288_common.h   | 2 --
>>> include/configs/rk3328_common.h   | 2 --
>>> include/configs/rk3368_common.h   | 2 --
>>> include/configs/rk3399_common.h   | 2 --
>>> include/configs/rockchip-common.h | 2 ++
>>> include/configs/rv1108_common.h   | 3 ---
>>> 12 files changed, 3 insertions(+), 20 deletions(-)
>>> 
>> 
>> Applied to u-boot-rockchip, thanks!
> 
> With U-Boot 2018.05 there is no serial console output on tinker-rk3288,
> a regression from 2018.03.  I have bisected it to this commit.
> 
> Reverting c3c0331db1fb7b1f4ff41e144fc04353b37c785c and
> eb3d707e99fcd2213d5f8f0fe4ae53ad416b377e restores serial output with
> 2018.05.
> 
> c3c0331db1fb7b1f4ff41e144fc04353b37c785c is the first bad commit
> commit c3c0331db1fb7b1f4ff41e144fc04353b37c785c
> Author: Kever Yang <kever.yang@rock-chips.com <mailto:kever.yang@rock-chips.com>>
> Date:   Thu Apr 19 11:37:09 2018 +0800
> 
>    rockchip: enable SYS_NS16550 for all SoCs by default
> 
>    All rockchip SoCs can use ns16550 driver, enable it for all
>    and set SYS_NS16550_MEM32 for all SoCs.
> 
>    Version-changes: 2
>    - use imply instead of select
> 
>    Signed-off-by: Kever Yang <kever.yang@rock-chips.com <mailto:kever.yang@rock-chips.com>>
>    Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com <mailto:philipp.tomsich@theobroma-systems.com>>
>    Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com <mailto:philipp.tomsich@theobroma-systems.com>>
> 
> :040000 040000 f7cc8b28ae8179fdc15896bbb55279f205a54008 d07108bbf467735f31f31c083a9068dff71da247 M      arch
> :040000 040000 d0a0422fc55afdcb5abb82f24b9a0af8de3d39a6 33c7fcf6f28f44a8c416f95313e7a30b2f73f8f0 M      include
Jonathan Gray May 8, 2018, 10:31 a.m. UTC | #6
On Tue, May 08, 2018 at 09:41:32AM +0200, Dr. Philipp Tomsich wrote:
> Kever,
> 
> Could you analyse and provide (against master) a patch for this?
> We???ll need to catch any left-overs from your changes at the start of the cycle
> before we try to merge any of the more invasive changes you have in-flight.
> 
> Thanks,
> Philipp.

The patch in https://patchwork.ozlabs.org/patch/900546/ had a change in
include/configs/rockchip-common.h which was not included in the commit
that made it into to tree as c3c0331db1fb7b1f4ff41e144fc04353b37c785c.

After adding that back it works.

diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index dee82ca99d..68e1105a4b 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -7,6 +7,8 @@
 #define _ROCKCHIP_COMMON_H_
 #include <linux/sizes.h>
 
+#define CONFIG_SYS_NS16550_MEM32
+
 #ifndef CONFIG_SPL_BUILD
 
 /* First try to boot from SD (index 0), then eMMC (index 1) */
Philipp Tomsich May 8, 2018, 10:47 a.m. UTC | #7
Good catch.  I had a few merge-conflicts when merging that series.
That one might have gotten lost.

> On 8 May 2018, at 12:31, Jonathan Gray <jsg@jsg.id.au> wrote:
> 
> On Tue, May 08, 2018 at 09:41:32AM +0200, Dr. Philipp Tomsich wrote:
>> Kever,
>> 
>> Could you analyse and provide (against master) a patch for this?
>> We???ll need to catch any left-overs from your changes at the start of the cycle
>> before we try to merge any of the more invasive changes you have in-flight.
>> 
>> Thanks,
>> Philipp.
> 
> The patch in https://patchwork.ozlabs.org/patch/900546/ had a change in
> include/configs/rockchip-common.h which was not included in the commit
> that made it into to tree as c3c0331db1fb7b1f4ff41e144fc04353b37c785c.
> 
> After adding that back it works.
> 
> diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
> index dee82ca99d..68e1105a4b 100644
> --- a/include/configs/rockchip-common.h
> +++ b/include/configs/rockchip-common.h
> @@ -7,6 +7,8 @@
> #define _ROCKCHIP_COMMON_H_
> #include <linux/sizes.h>
> 
> +#define CONFIG_SYS_NS16550_MEM32
> +
> #ifndef CONFIG_SPL_BUILD
> 
> /* First try to boot from SD (index 0), then eMMC (index 1) */
diff mbox series

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 068ea1e..a90f870 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1199,6 +1199,7 @@  config ARCH_ROCKCHIP
 	imply TPL_SYSRESET
 	imply ADC
 	imply SARADC_ROCKCHIP
+	imply SYS_NS16550
 
 config TARGET_THUNDERX_88XX
 	bool "Support ThunderX 88xx"
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index 55d3d5c..15b3ab5 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -103,7 +103,6 @@  config ROCKCHIP_RK3368
 	imply SPL_SERIAL_SUPPORT
 	imply TPL_SERIAL_SUPPORT
 	select DEBUG_UART_BOARD_INIT
-	select SYS_NS16550
 	help
 	  The Rockchip RK3368 is a ARM-based SoC with a octa-core (organised
 	  into a big and little cluster with 4 cores each) Cortex-A53 including
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index 7d83f81..effc74f 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -18,9 +18,6 @@ 
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
 
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_MEM32
-
 #define CONFIG_SYS_INIT_SP_ADDR		0x60100000
 #define CONFIG_SYS_LOAD_ADDR		0x60800800
 #define CONFIG_SPL_STACK		0x10081fff
diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h
index e7e137b..5643873 100644
--- a/include/configs/rk3128_common.h
+++ b/include/configs/rk3128_common.h
@@ -19,8 +19,6 @@ 
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
 
-#define CONFIG_SYS_NS16550_MEM32
-
 #define CONFIG_SYS_INIT_SP_ADDR		0x60100000
 #define CONFIG_SYS_LOAD_ADDR		0x60800800
 
diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h
index e07facd..4f51f40 100644
--- a/include/configs/rk3188_common.h
+++ b/include/configs/rk3188_common.h
@@ -17,8 +17,6 @@ 
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
 #define CONFIG_SYS_CBSIZE		1024
 
-#define CONFIG_SYS_NS16550_MEM32
-
 #ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
 /* Bootrom will load u-boot binary to 0x60000000 once return from SPL */
 #endif
diff --git a/include/configs/rk322x_common.h b/include/configs/rk322x_common.h
index 8f8a1ef..2549d41 100644
--- a/include/configs/rk322x_common.h
+++ b/include/configs/rk322x_common.h
@@ -18,7 +18,6 @@ 
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
 
-#define CONFIG_SYS_NS16550_MEM32
 #define CONFIG_SYS_INIT_SP_ADDR		0x60100000
 #define CONFIG_SYS_LOAD_ADDR		0x60800800
 #define CONFIG_SPL_STACK		0x10088000
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 98cc9be..92ad203 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -19,8 +19,6 @@ 
 #define CONFIG_SYS_ARCH_TIMER
 #define CONFIG_SYS_HZ_CLOCK		24000000
 
-#define CONFIG_SYS_NS16550_MEM32
-
 #ifdef CONFIG_SPL_ROCKCHIP_BACK_TO_BROM
 /* Bootrom will load u-boot binary to 0x0 once return from SPL */
 #endif
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index 517d058..b6c3cc0 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -13,8 +13,6 @@ 
 #define CONFIG_SYS_CBSIZE		1024
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
-#define CONFIG_SYS_NS16550_MEM32
-
 #define CONFIG_SYS_INIT_SP_ADDR		0x00300000
 #define CONFIG_SYS_LOAD_ADDR		0x00800800
 
diff --git a/include/configs/rk3368_common.h b/include/configs/rk3368_common.h
index 10f643f..f85b76f 100644
--- a/include/configs/rk3368_common.h
+++ b/include/configs/rk3368_common.h
@@ -24,8 +24,6 @@ 
 
 #define COUNTER_FREQUENCY               24000000
 
-#define CONFIG_SYS_NS16550_MEM32
-
 #define CONFIG_SYS_INIT_SP_ADDR		0x00300000
 #define CONFIG_SYS_LOAD_ADDR		0x00280000
 
diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index f0e550d..f43dc7e 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -19,8 +19,6 @@ 
 
 #define COUNTER_FREQUENCY               24000000
 
-#define CONFIG_SYS_NS16550_MEM32
-
 #define CONFIG_SYS_INIT_SP_ADDR		0x00300000
 #define CONFIG_SYS_LOAD_ADDR		0x00800800
 #define CONFIG_SPL_STACK		0xff8effff
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 26d41b5..72333e2 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -8,6 +8,8 @@ 
 #define _ROCKCHIP_COMMON_H_
 #include <linux/sizes.h>
 
+#define CONFIG_SYS_NS16550_MEM32
+
 #ifndef CONFIG_SPL_BUILD
 
 /* First try to boot from SD (index 0), then eMMC (index 1) */
diff --git a/include/configs/rv1108_common.h b/include/configs/rv1108_common.h
index 349c53c..cd204e9 100644
--- a/include/configs/rv1108_common.h
+++ b/include/configs/rv1108_common.h
@@ -18,9 +18,6 @@ 
 #define CONFIG_SYS_TIMER_BASE		0x10350020
 #define CONFIG_SYS_TIMER_COUNTER	(CONFIG_SYS_TIMER_BASE + 8)
 
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_MEM32
-
 #define CONFIG_SYS_SDRAM_BASE		0x60000000
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE + 0x100000)