Prepare RK3066 U-boot support
Subsystems (4)
v5 cover Prepare RK3066 U-boot support
This patch serie combines a number of cleanups and fixes that are needed in preparation of Rockchip RK3066 U-boot support.
The common TPL/SPL files contain support for 2 timers that are not used in the early models. Change there call condition. As we are there also increase the build coverage.
The existing timer driver is not prepared for OF_PLATDATA. Code was added to make it work for RK3066.
Early Rockchip SoCs don't have MMC internal dma support. Add code to enable the fifo-mode and OF_PLATDATA support. Fix clock ID's when calling the clock driver.
Rockchip serial driver support is split up between SYS_NS16550 for full U-boot and ROCKCHIP_SERIAL init in TPL/SPL. Make it work for more SoC models and OF_PLATDATA.
Changed V5:
TPL/SPL:
remove IS_ENABLED condition for rockchip_stimer_init() call
MMC:
add OF_PLATDATA u_boot_spl_fifo_mode requirement
SERIAL:
rename U_BOOT_DRIVER name to rockchip_uart
allow ROCKCHIP_SERIAL enabled in TPL
Changed V4:
combine series
rebase
style fixes
===
Johan Jonker (13):
rockchip: move ROCKCHIP_STIMER_BASE to Kconfig
rockchip: spl: change call condition rockchip_stimer_init()
rockchip: tpl: change call condition rockchip_stimer_init()
rockchip: tpl: use IS_ENABLED for timer_init() call condition
rockchip: timer: add OF_PLATDATA support for dw-apb-timer
rockchip: timer: dw-apb-timer: fix whitespace in U_BOOT_DRIVER
structure
rockchip: mmc: rockchip_dw_mmc: fix ciu clock index
rockchip: mmc: rockchip_dw_mmc: add rk3066/rk3188 support
rockchip: serial: restyle the serial_rockchip.c driver
rockchip: serial: move driver alias to serial_rockchip.c
rockchip: serial: rename U_BOOT_DRIVER name to rockchip_uart
rockchip: serial: Kconfig: add select SYS_NS16550 to config
ROCKCHIP_SERIAL
rockchip: serial: Kconfig: allow ROCKCHIP_SERIAL enabled in TPL
arch/arm/mach-rockchip/Kconfig | 10 ++++++ arch/arm/mach-rockchip/px30/Kconfig | 3 ++ arch/arm/mach-rockchip/rk3036/Kconfig | 3 ++ arch/arm/mach-rockchip/rk3128/Kconfig | 3 ++ arch/arm/mach-rockchip/rk322x/Kconfig | 3 ++ arch/arm/mach-rockchip/rk3288/Kconfig | 3 ++ arch/arm/mach-rockchip/rk3308/Kconfig | 10 +++--- arch/arm/mach-rockchip/rk3328/Kconfig | 3 ++ arch/arm/mach-rockchip/rk3368/Kconfig | 3 ++ arch/arm/mach-rockchip/rk3399/Kconfig | 3 ++ arch/arm/mach-rockchip/rk3568/Kconfig | 3 ++ arch/arm/mach-rockchip/spl.c | 8 ++--- arch/arm/mach-rockchip/tpl.c | 9 +++-- configs/rock_defconfig | 3 +- drivers/mmc/rockchip_dw_mmc.c | 7 ++-- drivers/serial/Kconfig | 5 +-- drivers/serial/Makefile | 2 -- drivers/serial/ns16550.c | 2 -- drivers/serial/serial_rockchip.c | 46 +++++++++++------------- drivers/timer/dw-apb-timer.c | 52 +++++++++++++++++++-------- include/configs/px30_common.h | 1 - include/configs/rk3036_common.h | 1 - include/configs/rk3128_common.h | 1 - include/configs/rk322x_common.h | 1 - include/configs/rk3288_common.h | 1 - include/configs/rk3308_common.h | 1 - include/configs/rk3328_common.h | 1 - include/configs/rk3368_common.h | 1 - include/configs/rk3399_common.h | 1 - include/configs/rk3568_common.h | 1 - 30 files changed, 122 insertions(+), 69 deletions(-)
Signature · 1 line
2.20.1
PATCH v5 1/13 rockchip: move ROCKCHIP_STIMER_BASE to Kconfig
Move ROCKCHIP_STIMER_BASE to Kconfig.
---
Changed V4:
rebase
remove depends on
rk3188/rk3066 must now disable ROCKCHIP_STIMER in defconfig with defconfig there is more flexibility for other SoC types
Changed V3:
add ROCKCHIP_STIMER
--- arch/arm/mach-rockchip/Kconfig | 10 ++++++++++ arch/arm/mach-rockchip/px30/Kconfig | 3 +++ arch/arm/mach-rockchip/rk3036/Kconfig | 3 +++ arch/arm/mach-rockchip/rk3128/Kconfig | 3 +++ arch/arm/mach-rockchip/rk322x/Kconfig | 3 +++ arch/arm/mach-rockchip/rk3288/Kconfig | 3 +++ arch/arm/mach-rockchip/rk3308/Kconfig | 10 ++++++---- arch/arm/mach-rockchip/rk3328/Kconfig | 3 +++ arch/arm/mach-rockchip/rk3368/Kconfig | 3 +++ arch/arm/mach-rockchip/rk3399/Kconfig | 3 +++ arch/arm/mach-rockchip/rk3568/Kconfig | 3 +++ configs/rock_defconfig | 3 ++- include/configs/px30_common.h | 1 - include/configs/rk3036_common.h | 1 - include/configs/rk3128_common.h | 1 - include/configs/rk322x_common.h | 1 - include/configs/rk3288_common.h | 1 - include/configs/rk3308_common.h | 1 - include/configs/rk3328_common.h | 1 - include/configs/rk3368_common.h | 1 - include/configs/rk3399_common.h | 1 - include/configs/rk3568_common.h | 1 - 22 files changed, 45 insertions(+), 15 deletions(-)
arch/arm/mach-rockchip/Kconfig +10 -0
@@ -339,6 +339,16 @@ config ROCKCHIP_BOOT_MODE_REG The Soc will enter to different boot mode(defined in asm/arch-rockchip/boot_mode.h) according to the value from this register. +config ROCKCHIP_STIMER + bool "Rockchip STIMER support" + default y + help + Enable Rockchip STIMER support. + +config ROCKCHIP_STIMER_BASE + hex + depends on ROCKCHIP_STIMER + config ROCKCHIP_SPL_RESERVE_IRAM hex "Size of IRAM reserved in SPL" default 0
arch/arm/mach-rockchip/px30/Kconfig +3 -0
@@ -38,6 +38,9 @@ config TARGET_PX30_CORE config ROCKCHIP_BOOT_MODE_REG default 0xff010200 +config ROCKCHIP_STIMER_BASE + default 0xff220020 + config SYS_SOC default "px30"
arch/arm/mach-rockchip/rk3036/Kconfig +3 -0
@@ -16,6 +16,9 @@ endchoice config ROCKCHIP_BOOT_MODE_REG default 0x200081c8 +config ROCKCHIP_STIMER_BASE + default 0x200440a0 + config SYS_SOC default "rk3036"
arch/arm/mach-rockchip/rk3128/Kconfig +3 -0
@@ -16,6 +16,9 @@ endchoice config ROCKCHIP_BOOT_MODE_REG default 0x100a0038 +config ROCKCHIP_STIMER_BASE + default 0x200440a0 + config SYS_SOC default "rk3128"
arch/arm/mach-rockchip/rk322x/Kconfig +3 -0
@@ -8,6 +8,9 @@ config TARGET_EVB_RK3229 config ROCKCHIP_BOOT_MODE_REG default 0x110005c8 +config ROCKCHIP_STIMER_BASE + default 0x110d0020 + config SYS_SOC default "rk322x"
arch/arm/mach-rockchip/rk3288/Kconfig +3 -0
@@ -148,6 +148,9 @@ config ROCKCHIP_FAST_SPL config ROCKCHIP_BOOT_MODE_REG default 0xff730094 +config ROCKCHIP_STIMER_BASE + default 0xff810020 + config SYS_SOC default "rk3288"
arch/arm/mach-rockchip/rk3308/Kconfig +6 -4
@@ -8,6 +8,12 @@ config TARGET_ROC_RK3308_CC bool "Firefly roc-rk3308-cc" select BOARD_LATE_INIT +config ROCKCHIP_BOOT_MODE_REG + default 0xff000500 + +config ROCKCHIP_STIMER_BASE + default 0xff1b00a0 + config SYS_SOC default "rk3308"
@@ -17,10 +23,6 @@ config SYS_MALLOC_F_LEN config SPL_SERIAL default y -config ROCKCHIP_BOOT_MODE_REG - default 0xff000500 - - source "board/rockchip/evb_rk3308/Kconfig" source "board/firefly/firefly-rk3308/Kconfig"
arch/arm/mach-rockchip/rk3328/Kconfig +3 -0
@@ -15,6 +15,9 @@ endchoice config ROCKCHIP_BOOT_MODE_REG default 0xff1005c8 +config ROCKCHIP_STIMER_BASE + default 0xff1d0020 + config SYS_SOC default "rk3328"
arch/arm/mach-rockchip/rk3368/Kconfig +3 -0
@@ -45,6 +45,9 @@ endchoice config ROCKCHIP_BOOT_MODE_REG default 0xff738200 +config ROCKCHIP_STIMER_BASE + default 0xff830020 + config SYS_SOC default "rk3368"
arch/arm/mach-rockchip/rk3399/Kconfig +3 -0
@@ -125,6 +125,9 @@ endchoice config ROCKCHIP_BOOT_MODE_REG default 0xff320300 +config ROCKCHIP_STIMER_BASE + default 0xff8680a0 + config SYS_SOC default "rk3399"
arch/arm/mach-rockchip/rk3568/Kconfig +3 -0
@@ -9,6 +9,9 @@ config TARGET_EVB_RK3568 config ROCKCHIP_BOOT_MODE_REG default 0xfdc20200 +config ROCKCHIP_STIMER_BASE + default 0xfdd1c020 + config SYS_SOC default "rk3568"
configs/rock_defconfig +2 -1
@@ -11,12 +11,13 @@ CONFIG_ENV_OFFSET=0x3F8000 CONFIG_DEFAULT_DEVICE_TREE="rk3188-radxarock" CONFIG_SPL_TEXT_BASE=0x10080800 CONFIG_ROCKCHIP_RK3188=y +# CONFIG_ROCKCHIP_STIMER is not set CONFIG_TARGET_ROCK=y CONFIG_SPL_STACK_R_ADDR=0x60080000 CONFIG_DEBUG_UART_BASE=0x20064000 CONFIG_DEBUG_UART_CLOCK=24000000 -CONFIG_DEBUG_UART=y CONFIG_SYS_LOAD_ADDR=0x60800800 +CONFIG_DEBUG_UART=y CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="rk3188-radxarock.dtb" # CONFIG_DISPLAY_CPUINFO is not set
include/configs/px30_common.h +0 -1
@@ -12,7 +12,6 @@#define CONFIG_SYS_NS16550_MEM32 -#define CONFIG_ROCKCHIP_STIMER_BASE 0xff220020#define COUNTER_FREQUENCY 24000000/* FIXME: ff020000 is pmu_mem (10k), while ff0e0000 is regular int_mem */
include/configs/rk3036_common.h +0 -1
@@ -10,7 +10,6 @@#define CONFIG_SYS_CBSIZE 1024 -#define CONFIG_ROCKCHIP_STIMER_BASE 0x200440a0#define COUNTER_FREQUENCY 24000000#define CONFIG_SYS_HZ_CLOCK 24000000
include/configs/rk3128_common.h +0 -1
@@ -11,7 +11,6 @@#define CONFIG_SYS_MAXARGS 16#define CONFIG_SYS_CBSIZE 1024 -#define CONFIG_ROCKCHIP_STIMER_BASE 0x200440a0#define COUNTER_FREQUENCY 24000000#define CONFIG_SYS_HZ_CLOCK 24000000
include/configs/rk322x_common.h +0 -1
@@ -11,7 +11,6 @@#define CONFIG_SYS_CBSIZE 1024#define CONFIG_SYS_BOOTM_LEN (64 << 20)/* 64M */ -#define CONFIG_ROCKCHIP_STIMER_BASE 0x110d0020#define COUNTER_FREQUENCY 24000000#define CONFIG_SYS_HZ_CLOCK 24000000
include/configs/rk3288_common.h +0 -1
@@ -13,7 +13,6 @@#define CONFIG_SYS_CBSIZE 1024 -#define CONFIG_ROCKCHIP_STIMER_BASE 0xff810020#define COUNTER_FREQUENCY 24000000#define CONFIG_SYS_HZ_CLOCK 24000000
include/configs/rk3308_common.h +0 -1
@@ -15,7 +15,6 @@#define CONFIG_SYS_NS16550_MEM32 -#define CONFIG_ROCKCHIP_STIMER_BASE 0xff1b00a0#define CONFIG_IRAM_BASE 0xfff80000#define CONFIG_SYS_INIT_SP_ADDR 0x00800000#define CONFIG_SPL_STACK 0x00400000
include/configs/rk3328_common.h +0 -1
@@ -10,7 +10,6 @@#define CONFIG_IRAM_BASE 0xff090000 -#define CONFIG_ROCKCHIP_STIMER_BASE 0xff1d0020#define COUNTER_FREQUENCY 24000000#define CONFIG_SYS_CBSIZE 1024
include/configs/rk3368_common.h +0 -1
@@ -15,7 +15,6 @@#define SDRAM_MAX_SIZE 0xff000000#define CONFIG_SYS_CBSIZE 1024 -#define CONFIG_ROCKCHIP_STIMER_BASE 0xff830020#define COUNTER_FREQUENCY 24000000#define CONFIG_IRAM_BASE 0xff8c0000
include/configs/rk3399_common.h +0 -1
@@ -11,7 +11,6 @@#define CONFIG_SYS_CBSIZE 1024#define COUNTER_FREQUENCY 24000000 -#define CONFIG_ROCKCHIP_STIMER_BASE 0xff8680a0#define CONFIG_IRAM_BASE 0xff8c0000
include/configs/rk3568_common.h +0 -1
@@ -11,7 +11,6 @@#define CONFIG_SYS_CBSIZE 1024#define COUNTER_FREQUENCY 24000000 -#define CONFIG_ROCKCHIP_STIMER_BASE 0xfdd1c020#define CONFIG_IRAM_BASE 0xfdcc0000
Signature · 1 line
2.20.1
PATCH v5 2/13 rockchip: spl: change call condition rockchip_stimer_init()
In reply to Johan JonkerThe Rockchip SoCs rk3066/rk3188 have no CONFIG_ROCKCHIP_STIMER_BASE defined. Currently only rk3188 has an exception in SPL. Make this more generic and compile code inside the function rockchip_stimer_init() only when CONFIG_ROCKCHIP_STIMER_BASE is available.
---
Changed V5:
reword
remove IS_ENABLED
remove include kconfig.h
Changed V3:
use CONFIG_ROCKCHIP_STIMER
Changed V2:
use IS_ENABLED
add include kconfig.h
move define location so that rockchip_stimer_init() is always visible to the compiler
--- arch/arm/mach-rockchip/spl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-rockchip/spl.c +4 -4
@@ -71,7 +71,6 @@ u32 spl_mmc_boot_mode(const u32 boot_device)return MMCSD_MODE_RAW ; } -#if !defined(CONFIG_ROCKCHIP_RK3188 )#define TIMER_LOAD_COUNT_L 0x00#define TIMER_LOAD_COUNT_H 0x04#define TIMER_CONTROL_REG 0x10
@@ -81,6 +80,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device)__weak void rockchip_stimer_init (void ) { +#if defined(CONFIG_ROCKCHIP_STIMER_BASE )/* If Timer already enabled, don't re-init it */ u32 reg =readl (CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG );
@@ -95,8 +95,8 @@ __weak void rockchip_stimer_init(void)writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE +4 );writel (TIMER_EN |TIMER_FMODE ,CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); -}#endif +}__weak int board_early_init_f (void ) {
@@ -133,9 +133,9 @@ void board_init_f(ulong dummy)hang (); }arch_cpu_init (); -#if !defined(CONFIG_ROCKCHIP_RK3188 ) +rockchip_stimer_init (); -#endif +#ifdef CONFIG_SYS_ARCH_TIMER /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ timer_init ();
Signature · 1 line
2.20.1
Re: [PATCH v5 02/13] rockchip: spl: change call condition rockchip_stimer_init()
Quoted 6 lines · Johan Jonker
The Rockchip SoCs rk3066/rk3188 have no
CONFIG_ROCKCHIP_STIMER_BASEdefined. Currently only rk3188 has an exception in SPL. Make this more generic and compile code inside the functionrockchip_stimer_init()only whenCONFIG_ROCKCHIP_STIMER_BASEis available.Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 61 lines
---
Changed V5:
reword
removeIS_ENABLED
remove includekconfig.hChanged V3:
useCONFIG_ROCKCHIP_STIMERChanged V2:
useIS_ENABLED
add includekconfig.h
move define location so thatrockchip_stimer_init()is always visible to the compiler--- arch/arm/mach-rockchip/spl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/arm/mach-rockchip/spl.c +4
-4@@ -71,7 +71,6 @@ u32 spl_mmc_boot_mode(const u32 boot_device)return MMCSD_MODE_RAW ; } -#if !defined(CONFIG_ROCKCHIP_RK3188 )#define TIMER_LOAD_COUNT_L 0x00#define TIMER_LOAD_COUNT_H 0x04#define TIMER_CONTROL_REG 0x10@@ -81,6 +80,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device)__weak void rockchip_stimer_init (void ) { +#if defined(CONFIG_ROCKCHIP_STIMER_BASE )/* If Timer already enabled, don't re-init it */ u32 reg =readl (CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG );@@ -95,8 +95,8 @@ __weak void rockchip_stimer_init(void)writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE +4 );writel (TIMER_EN |TIMER_FMODE ,CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); -}#endif +}__weak int board_early_init_f (void ) {@@ -133,9 +133,9 @@ void board_init_f(ulong dummy)hang (); }arch_cpu_init (); -#if !defined(CONFIG_ROCKCHIP_RK3188 ) +rockchip_stimer_init (); -#endif +#ifdef CONFIG_SYS_ARCH_TIMER /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ timer_init ();
PATCH v5 3/13 rockchip: tpl: change call condition rockchip_stimer_init()
In reply to Johan JonkerThe Rockchip SoCs rk3066/rk3188 have no CONFIG_ROCKCHIP_STIMER_BASE defined. Currently there's no exception in TPL. Make this more generic and compile the code inside the function rockchip_stimer_init() only when CONFIG_ROCKCHIP_STIMER_BASE is available.
---
Changed V5:
reword
remove IS_ENABLED
remove include kconfig.h
Changed V3:
use CONFIG_ROCKCHIP_STIMER
Changed V2:
use IS_ENABLED
add include kconfig.h
move define location so that rockchip_stimer_init() is always visible to the compiler
--- arch/arm/mach-rockchip/tpl.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-rockchip/tpl.c +2 -0
@@ -29,6 +29,7 @@__weak void rockchip_stimer_init (void ) { +#if defined(CONFIG_ROCKCHIP_STIMER_BASE )/* If Timer already enabled, don't re-init it */ u32 reg =readl (CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG );
@@ -45,6 +46,7 @@ __weak void rockchip_stimer_init(void)writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE +4 );writel (TIMER_EN |TIMER_FMODE ,CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); +#endif }void board_init_f (ulong dummy)
Signature · 1 line
2.20.1
Re: [PATCH v5 03/13] rockchip: tpl: change call condition rockchip_stimer_init()
Quoted 6 lines · Johan Jonker
The Rockchip SoCs rk3066/rk3188 have no
CONFIG_ROCKCHIP_STIMER_BASEdefined. Currently there's no exception in TPL. Make this more generic and compile the code inside the functionrockchip_stimer_init()only whenCONFIG_ROCKCHIP_STIMER_BASEis available.Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 39 lines
---
Changed V5:
reword
removeIS_ENABLED
remove includekconfig.hChanged V3:
useCONFIG_ROCKCHIP_STIMERChanged V2:
useIS_ENABLED
add includekconfig.h
move define location so thatrockchip_stimer_init()is always visible to the compiler--- arch/arm/mach-rockchip/tpl.c | 2 ++ 1 file changed, 2 insertions(+)arch/arm/mach-rockchip/tpl.c +2
-0@@ -29,6 +29,7 @@__weak void rockchip_stimer_init (void ) { +#if defined(CONFIG_ROCKCHIP_STIMER_BASE )/* If Timer already enabled, don't re-init it */ u32 reg =readl (CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG );@@ -45,6 +46,7 @@ __weak void rockchip_stimer_init(void)writel (0xffffffff ,CONFIG_ROCKCHIP_STIMER_BASE +4 );writel (TIMER_EN |TIMER_FMODE ,CONFIG_ROCKCHIP_STIMER_BASE +TIMER_CONTROL_REG ); +#endif }void board_init_f (ulong dummy)
PATCH v5 4/13 rockchip: tpl: use IS_ENABLED for timer_init() call condition
In reply to Johan JonkerNot all Rockchip SoC models use the ARM arch timer. Call the function timer_init() only when CONFIG_SYS_ARCH_TIMER is available.
Use the call condition IS_ENABLED to increase build coverage and make the code easier to read.
---
Changed V5:
rebase
add include kconfig.h
--- arch/arm/mach-rockchip/tpl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-rockchip/tpl.c +5 -2
@@ -15,6 +15,7 @@#include <asm/io.h> #include <asm/arch-rockchip/bootrom.h> #include <linux/bitops.h> +#include <linux/kconfig.h> #if CONFIG_IS_ENABLED (BANNER_PRINT )#include <timestamp.h>
@@ -77,8 +78,10 @@ void board_init_f(ulong dummy)/* Init secure timer */ rockchip_stimer_init (); -/* Init ARM arch timer in arch/arm/cpu/ */ -timer_init (); + +/* Init ARM arch timer */ +if (IS_ENABLED (CONFIG_SYS_ARCH_TIMER )) +timer_init (); ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret) {
Signature · 1 line
2.20.1
PATCH v5 5/13 rockchip: timer: add OF_PLATDATA support for dw-apb-timer
In reply to Johan JonkerThe Rockchip rk3066 SoC has 3 dw-apb-timer nodes. U-boot is compiled with OF_PLATDATA TPL/SPL options, so add OF_PLATDATA support for the dw-apb-timer. Also change driver name to be able to compile with U-boot scripts. No reset OF_PLATDATA support was added, because the rk3066 nodes don't need/have them.
---
Changed V3:
use if (CONFIG_IS_ENABLED(OF_REAL))
remove white space fix
Changed V2:
use #if CONFIG_IS_ENABLED(OF_REAL)
--- drivers/timer/dw-apb-timer.c | 50 ++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 13 deletions(-)
drivers/timer/dw-apb-timer.c +37 -13
@@ -8,10 +8,12 @@#include <common.h> #include <dm.h> #include <clk.h> +#include <dt-structs.h> #include <malloc.h> #include <reset.h> #include <timer.h> #include <dm/device_compat.h> +#include <linux/kconfig.h> #include <asm/io.h> #include <asm/arch/timer.h>
@@ -25,6 +27,12 @@ struct dw_apb_timer_priv {struct reset_ctl_bulk resets; }; +struct dw_apb_timer_plat { +#if CONFIG_IS_ENABLED (OF_PLATDATA ) +struct dtd_snps_dw_apb_timer dtplat; +#endif +}; +static u64 dw_apb_timer_get_count (struct udevice *dev) {struct dw_apb_timer_priv *priv =dev_get_priv (dev);
@@ -43,20 +51,33 @@ static int dw_apb_timer_probe(struct udevice *dev)struct dw_apb_timer_priv *priv =dev_get_priv (dev);struct clk clk;int ret; +#if CONFIG_IS_ENABLED (OF_PLATDATA ) +struct dw_apb_timer_plat *plat =dev_get_plat (dev); +struct dtd_snps_dw_apb_timer *dtplat = &plat->dtplat; - ret =reset_get_bulk (dev, &priv->resets); -if (ret) -dev_warn (dev,"Can't get reset: %d\n" , ret); -else -reset_deassert_bulk (&priv->resets); + priv->regs = dtplat->reg[0 ]; - ret =clk_get_by_index (dev,0 , &clk); -if (ret) + ret =clk_get_by_phandle (dev, &dtplat->clocks[0 ], &clk); +if (ret <0 )return ret; - uc_priv->clock_rate =clk_get_rate (&clk); + uc_priv->clock_rate = dtplat->clock_frequency; +#endif +if (CONFIG_IS_ENABLED (OF_REAL )) { + ret =reset_get_bulk (dev, &priv->resets); +if (ret) +dev_warn (dev,"Can't get reset: %d\n" , ret); +else +reset_deassert_bulk (&priv->resets); + + ret =clk_get_by_index (dev,0 , &clk); +if (ret) +return ret; -clk_free (&clk); + uc_priv->clock_rate =clk_get_rate (&clk); + +clk_free (&clk); + }/* init timer */ writel (0xffffffff , priv->regs +DW_APB_LOAD_VAL );
@@ -68,9 +89,11 @@ static int dw_apb_timer_probe(struct udevice *dev)static int dw_apb_timer_of_to_plat (struct udevice *dev) { -struct dw_apb_timer_priv *priv =dev_get_priv (dev); +if (CONFIG_IS_ENABLED (OF_REAL )) { +struct dw_apb_timer_priv *priv =dev_get_priv (dev); - priv->regs =dev_read_addr (dev); + priv->regs =dev_read_addr (dev); + }return 0 ; }
@@ -91,8 +114,8 @@ static const struct udevice_id dw_apb_timer_ids[] = { {} }; -U_BOOT_DRIVER (dw_apb_timer) = { - .name ="dw_apb_timer" , +U_BOOT_DRIVER (snps_dw_apb_timer) = { + .name ="snps_dw_apb_timer" , .id =UCLASS_TIMER , .ops = &dw_apb_timer_ops, .probe = dw_apb_timer_probe,
@@ -100,4 +123,5 @@ U_BOOT_DRIVER(dw_apb_timer) = { .of_to_plat = dw_apb_timer_of_to_plat, .remove = dw_apb_timer_remove, .priv_auto = sizeof(struct dw_apb_timer_priv), + .plat_auto = sizeof(struct dw_apb_timer_plat), };
Signature · 1 line
2.20.1
PATCH v5 6/13 rockchip: timer: dw-apb-timer: fix whitespace in U_BOOT_DRIVER structure
In reply to Johan JonkerThe line with .of_to_plat in the U_BOOT_DRIVER structure of dw-apb-timer.c is not aligned with the rest. Add an extra TAB to fix the whitespace.
--- drivers/timer/dw-apb-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/timer/dw-apb-timer.c +1 -1
@@ -120,7 +120,7 @@ U_BOOT_DRIVER(snps_dw_apb_timer) = { .ops = &dw_apb_timer_ops, .probe = dw_apb_timer_probe, .of_match = dw_apb_timer_ids, - .of_to_plat = dw_apb_timer_of_to_plat, + .of_to_plat = dw_apb_timer_of_to_plat, .remove = dw_apb_timer_remove, .priv_auto = sizeof(struct dw_apb_timer_priv), .plat_auto = sizeof(struct dw_apb_timer_plat),
Signature · 1 line
2.20.1
PATCH v5 7/13 rockchip: mmc: rockchip_dw_mmc: fix ciu clock index
In reply to Johan JonkerThe document rockchip-dw-mshc.yaml decribes a maximum of 4 clocks. In the rockchip_dw_mmc driver the clock name in use was "fixed" to "ciu" with index 1, but later reverted back to index 0. The clock drivers can handle both, but the calling driver should submit correct data as a standard practice.
Fix the "ciu" clock index by setting it back to 1.
clock-names:
minItems: 2
items:
- const: biu
- const: ciu
- const: ciu-drive
- const: ciu-sample
--- drivers/mmc/rockchip_dw_mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/rockchip_dw_mmc.c +2 -2
@@ -123,11 +123,11 @@ static int rockchip_dwmmc_probe(struct udevice *dev) priv->minmax[0 ] =400000 ;/* 400 kHz */ priv->minmax[1 ] = dtplat->max_frequency; - ret =clk_get_by_phandle (dev, dtplat->clocks, &priv->clk); + ret =clk_get_by_phandle (dev, &dtplat->clocks[1 ], &priv->clk);if (ret <0 )return ret;#else - ret =clk_get_by_index (dev,0 , &priv->clk); + ret =clk_get_by_index (dev,1 , &priv->clk);if (ret <0 )return ret;#endif
Signature · 1 line
2.20.1
PATCH v5 8/13 rockchip: mmc: rockchip_dw_mmc: add rk3066/rk3188 support
In reply to Johan JonkerThe Rockchip SoCs rk3066/rk3188 have MMC DT nodes with as compatible string "rockchip,rk2928-dw-mshc". Add OF_PLATDATA support to the existing driver with help of a DM_DRIVER_ALIAS.
This type needs a permanent enabled fifo. The other Rockchip SoCs always have the property "u-boot,spl-fifo-mode" in the MMC DT nodes, because MMC to SRAM can't do DMA.
Make this property a requirement for MMC OF_PLATDATA structures. The property "fifo-mode" must be added for all other compile modes.
---
Changed V5:
reword
remove driver_data
add OF_PLATDATA u_boot_spl_fifo_mode requirement
Changed V4:
use boolean
--- drivers/mmc/rockchip_dw_mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/rockchip_dw_mmc.c +2 -1
@@ -119,7 +119,7 @@ static int rockchip_dwmmc_probe(struct udevice *dev) host->priv = dev; host->dev_index =0 ; priv->fifo_depth = dtplat->fifo_depth; - priv->fifo_mode =0 ; + priv->fifo_mode = dtplat->u_boot_spl_fifo_mode; priv->minmax[0 ] =400000 ;/* 400 kHz */ priv->minmax[1 ] = dtplat->max_frequency;
@@ -180,5 +180,6 @@ U_BOOT_DRIVER(rockchip_rk3288_dw_mshc) = { .plat_auto = sizeof(struct rockchip_mmc_plat), }; +DM_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk2928_dw_mshc) DM_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk3328_dw_mshc)DM_DRIVER_ALIAS (rockchip_rk3288_dw_mshc, rockchip_rk3368_dw_mshc)
Signature · 1 line
2.20.1
Re: [PATCH v5 08/13] rockchip: mmc: rockchip_dw_mmc: add rk3066/rk3188 support
Quoted 13 lines · Johan Jonker
The Rockchip SoCs rk3066/rk3188 have MMC DT nodes with as compatible string "rockchip,rk2928-dw-mshc". Add
OF_PLATDATAsupport to the existing driver with help of aDM_DRIVER_ALIAS.This type needs a permanent enabled fifo. The other Rockchip SoCs always have the property "u-boot,spl-fifo-mode" in the MMC DT nodes, because MMC to SRAM can't do DMA.
Make this property a requirement for MMCOF_PLATDATAstructures. The property "fifo-mode" must be added for all other compile modes.
Quoted 1 line
Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 33 lines
---
Changed V5:
reword
removedriver_data
addOF_PLATDATAu_boot_spl_fifo_moderequirementChanged V4:
use boolean--- drivers/mmc/rockchip_dw_mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mmc/rockchip_dw_mmc.c +2
-1@@ -119,7 +119,7 @@ static int rockchip_dwmmc_probe(struct udevice *dev) host->priv = dev; host->dev_index =0 ; priv->fifo_depth = dtplat->fifo_depth; - priv->fifo_mode =0 ; + priv->fifo_mode = dtplat->u_boot_spl_fifo_mode; priv->minmax[0 ] =400000 ;/* 400 kHz */ priv->minmax[1 ] = dtplat->max_frequency;@@ -180,5 +180,6 @@ U_BOOT_DRIVER(rockchip_rk3288_dw_mshc) = { .plat_auto = sizeof(struct rockchip_mmc_plat), }; +DM_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk2928_dw_mshc) DM_DRIVER_ALIAS(rockchip_rk3288_dw_mshc, rockchip_rk3328_dw_mshc)DM_DRIVER_ALIAS (rockchip_rk3288_dw_mshc, rockchip_rk3368_dw_mshc)
PATCH v5 9/13 rockchip: serial: restyle the serial_rockchip.c driver
In reply to Johan JonkerThe ns16550.c driver has the following conditions for .of_match:
CONFIG_IS_ENABLED(OF_REAL)
For Rockchip SoCs with TPL/SPL and platform data that need serial support the serial_rockchip.c driver was made. It copies this data and then calls ns16550_serial_probe(). With the addition of yet an other SoC type this driver is in need for a little restyle. Simplify struct rockchip_uart_plat and add extra SoCs with DM_DRIVER_ALIAS(). Return -ENODEV when the ns16550.c driver probe function is available.
---
Changed V4:
add empty line
--- drivers/serial/serial_rockchip.c | 37 +++++++++++++------------------- 1 file changed, 15 insertions(+), 22 deletions(-)
drivers/serial/serial_rockchip.c +15 -22
@@ -12,22 +12,20 @@#include <asm/arch-rockchip/clock.h> #include <dm/device-internal.h> -#if defined(CONFIG_ROCKCHIP_RK3188 ) -struct rockchip_uart_plat { -struct dtd_rockchip_rk3188_uart dtplat; -struct ns16550_plat plat; -}; -struct dtd_rockchip_rk3188_uart *dtplat, s_dtplat; -#elif defined(CONFIG_ROCKCHIP_RK3288 )struct rockchip_uart_plat { +#if CONFIG_IS_ENABLED (OF_PLATDATA )struct dtd_rockchip_rk3288_uart dtplat; +#endif struct ns16550_plat plat; }; + +#if CONFIG_IS_ENABLED (OF_PLATDATA )struct dtd_rockchip_rk3288_uart *dtplat, s_dtplat;#endif static int rockchip_serial_probe (struct udevice *dev) { +#if CONFIG_IS_ENABLED (OF_PLATDATA )struct rockchip_uart_plat *plat =dev_get_plat (dev);/* Create some new platform data for the standard driver */
@@ -38,24 +36,19 @@ static int rockchip_serial_probe(struct udevice *dev)dev_set_plat (dev, &plat->plat);return ns16550_serial_probe (dev); +#else +return -ENODEV ; +#endif } -U_BOOT_DRIVER (rockchip_rk3188_uart) = { - .name ="rockchip_rk3188_uart" , - .id =UCLASS_SERIAL , - .priv_auto =sizeof (struct ns16550 ), - .plat_auto =sizeof (struct rockchip_uart_plat ), - .probe = rockchip_serial_probe, - .ops = &ns16550_serial_ops, - .flags =DM_FLAG_PRE_RELOC , -}; -U_BOOT_DRIVER (rockchip_rk3288_uart) = { - .name ="rockchip_rk3288_uart" , - .id =UCLASS_SERIAL , + .name ="rockchip_rk3288_uart" , + .id =UCLASS_SERIAL , .priv_auto =sizeof (struct ns16550 ), .plat_auto =sizeof (struct rockchip_uart_plat ), - .probe = rockchip_serial_probe, - .ops = &ns16550_serial_ops, - .flags =DM_FLAG_PRE_RELOC , + .probe = rockchip_serial_probe, + .ops = &ns16550_serial_ops, + .flags =DM_FLAG_PRE_RELOC , }; +DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3066_uart) +DM_DRIVER_ALIAS (rockchip_rk3288_uart, rockchip_rk3188_uart)
Signature · 1 line
2.20.1
PATCH v5 10/13 rockchip: serial: move driver alias to serial_rockchip.c
In reply to Johan JonkerThe Rockchip uart DT nodes have "snps,dw-apb-uart" as
fall back string. The driver ns16550.c has CONFIG_IS_ENABLED(OF_REAL) as condition to of_match and does not copy dtplat data. For TPL/SPL the driver serial_rockchip.c
is used. Move driver alias to correct driver.
--- drivers/serial/ns16550.c | 2 -- drivers/serial/serial_rockchip.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/serial/ns16550.c +0 -2
@@ -624,8 +624,6 @@ U_BOOT_DRIVER(ns16550_serial) = {#endif }; -DM_DRIVER_ALIAS(ns16550_serial, rockchip_rk3328_uart) -DM_DRIVER_ALIAS(ns16550_serial, rockchip_rk3368_uart) DM_DRIVER_ALIAS(ns16550_serial, ti_da830_uart)#endif #endif /* SERIAL_PRESENT */
drivers/serial/serial_rockchip.c +2 -0
@@ -52,3 +52,5 @@ U_BOOT_DRIVER(rockchip_rk3288_uart) = { }; DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3066_uart) DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3188_uart) +DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3328_uart) +DM_DRIVER_ALIAS (rockchip_rk3288_uart, rockchip_rk3368_uart)
Signature · 1 line
2.20.1
PATCH v5 11/13 rockchip: serial: rename U_BOOT_DRIVER name to rockchip_uart
In reply to Johan JonkerWhen a defconfig for rk3288 is compiled it gives the warning:
rockchip_rk3288_uart: Missing .compatible in
./drivers/serial/serial_rockchip.c
: WARNING: the driver rockchip_rk3288_uart
was not found in the driver list
Fix by renaming U_BOOT_DRIVER name of serial_rockchip.c to rockchip_uart. Add rk3288 serial support with a DM_DRIVER_ALIAS define.
--- drivers/serial/serial_rockchip.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/serial/serial_rockchip.c +9 -8
@@ -14,13 +14,13 @@struct rockchip_uart_plat {#if CONFIG_IS_ENABLED (OF_PLATDATA ) -struct dtd_rockchip_rk3288_uart dtplat; +struct dtd_rockchip_uart dtplat;#endif struct ns16550_plat plat; };#if CONFIG_IS_ENABLED (OF_PLATDATA ) -struct dtd_rockchip_rk3288_uart *dtplat, s_dtplat; +struct dtd_rockchip_uart *dtplat, s_dtplat;#endif static int rockchip_serial_probe (struct udevice *dev)
@@ -41,8 +41,8 @@ static int rockchip_serial_probe(struct udevice *dev)#endif } -U_BOOT_DRIVER (rockchip_rk3288_uart) = { - .name ="rockchip_rk3288_uart" , +U_BOOT_DRIVER (rockchip_uart) = { + .name ="rockchip_uart" , .id =UCLASS_SERIAL , .priv_auto =sizeof (struct ns16550 ), .plat_auto =sizeof (struct rockchip_uart_plat ),
@@ -50,7 +50,8 @@ U_BOOT_DRIVER(rockchip_rk3288_uart) = { .ops = &ns16550_serial_ops, .flags = DM_FLAG_PRE_RELOC, }; -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3066_uart) -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3188_uart) -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3328_uart) -DM_DRIVER_ALIAS (rockchip_rk3288_uart, rockchip_rk3368_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3066_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3188_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3288_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3328_uart) +DM_DRIVER_ALIAS (rockchip_uart, rockchip_rk3368_uart)
Signature · 1 line
2.20.1
Re: [PATCH v5 11/13] rockchip: serial: rename U_BOOT_DRIVER name to rockchip_uart
Quoted 7 lines · Johan Jonker
When a defconfig for rk3288 is compiled it gives the warning:
rockchip_rk3288_uart: Missing .compatible in
./drivers/serial/serial_rockchip.c
: WARNING: the driverrockchip_rk3288_uart
was not found in the driver list
Quoted 5 lines
Fix by renaming
U_BOOT_DRIVERname ofserial_rockchip.ctorockchip_uart. Add rk3288 serial support with aDM_DRIVER_ALIASdefine.Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 48 lines
--- drivers/serial/serial_rockchip.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)drivers/serial/serial_rockchip.c +9
-8@@ -14,13 +14,13 @@struct rockchip_uart_plat {#if CONFIG_IS_ENABLED (OF_PLATDATA ) -struct dtd_rockchip_rk3288_uart dtplat; +struct dtd_rockchip_uart dtplat;#endif struct ns16550_plat plat; };#if CONFIG_IS_ENABLED (OF_PLATDATA ) -struct dtd_rockchip_rk3288_uart *dtplat, s_dtplat; +struct dtd_rockchip_uart *dtplat, s_dtplat;#endif static int rockchip_serial_probe (struct udevice *dev)@@ -41,8 +41,8 @@ static int rockchip_serial_probe(struct udevice *dev)#endif } -U_BOOT_DRIVER (rockchip_rk3288_uart) = { - .name ="rockchip_rk3288_uart" , +U_BOOT_DRIVER (rockchip_uart) = { + .name ="rockchip_uart" , .id =UCLASS_SERIAL , .priv_auto =sizeof (struct ns16550 ), .plat_auto =sizeof (struct rockchip_uart_plat ),@@ -50,7 +50,8 @@ U_BOOT_DRIVER(rockchip_rk3288_uart) = { .ops = &ns16550_serial_ops, .flags = DM_FLAG_PRE_RELOC, }; -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3066_uart) -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3188_uart) -DM_DRIVER_ALIAS(rockchip_rk3288_uart, rockchip_rk3328_uart) -DM_DRIVER_ALIAS (rockchip_rk3288_uart, rockchip_rk3368_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3066_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3188_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3288_uart) +DM_DRIVER_ALIAS(rockchip_uart, rockchip_rk3328_uart) +DM_DRIVER_ALIAS (rockchip_uart, rockchip_rk3368_uart)
PATCH v5 12/13 rockchip: serial: Kconfig: add select SYS_NS16550 to config ROCKCHIP_SERIAL
In reply to Johan JonkerThe Rockchip serial driver depends on an enabled NS16550 driver, so add select SYS_NS16550 to config ROCKCHIP_SERIAL.
--- drivers/serial/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/serial/Kconfig +1 -0
@@ -763,6 +763,7 @@ config PL01X_SERIAL config ROCKCHIP_SERIAL bool "Rockchip on-chip UART support" depends on DM_SERIAL && SPL_OF_PLATDATA + select SYS_NS16550 help Select this to enable a debug UART for Rockchip devices when using CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
Signature · 1 line
2.20.1
PATCH v5 13/13 rockchip: serial: Kconfig: allow ROCKCHIP_SERIAL enabled in TPL
In reply to Johan JonkerThe serial_rockchip.c driver converts platdata to the data structure used in the ns16550.c file and then calls the function ns16550_serial_probe().
When compiled with OF_REAL the serial_rockchip.c driver returns now -ENODEV when probed and does no harm.
The config ROCKCHIP_SERIAL is currently depends on SPL_OF_PLATDATA. Allow serial port use for both SPL and TPL by removing this dependency and SPL_BUILD restriction.
--- drivers/serial/Kconfig | 4 ++-- drivers/serial/Makefile | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/serial/Kconfig +2 -2
@@ -762,11 +762,11 @@ config PL01X_SERIAL config ROCKCHIP_SERIAL bool "Rockchip on-chip UART support" - depends on DM_SERIAL && SPL_OF_PLATDATA + depends on DM_SERIAL select SYS_NS16550 help Select this to enable a debug UART for Rockchip devices when using - CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt). + OF_PLATDATA (i.e. a compiled-in device tree replacemenmt). This uses the ns16550 driver, converting the platdata from of-platdata to the ns16550 format.
drivers/serial/Makefile +0 -2
@@ -46,9 +46,7 @@ obj-$(CONFIG_MXC_UART) += serial_mxc.o obj-$(CONFIG_PXA_SERIAL) += serial_pxa.o obj-$(CONFIG_MESON_SERIAL) += serial_meson.o obj-$(CONFIG_INTEL_MID_SERIAL) += serial_intel_mid.o -ifdef CONFIG_SPL_BUILD obj-$(CONFIG_ROCKCHIP_SERIAL) += serial_rockchip.o -endif obj-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o obj-$(CONFIG_SANDBOX_SERIAL) += sandbox.o obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
Signature · 1 line
2.20.1
Re: [PATCH v5 13/13] rockchip: serial: Kconfig: allow ROCKCHIP_SERIAL enabled in TPL
Quoted 10 lines · Johan Jonker
The
serial_rockchip.cdriver converts platdata to the data structure used in thens16550.cfile and then calls the functionns16550_serial_probe().
When compiled withOF_REALtheserial_rockchip.cdriver returns now-ENODEVwhen probed and does no harm.
The configROCKCHIP_SERIALis currently depends onSPL_OF_PLATDATA. Allow serial port use for both SPL and TPL by removing this dependency andSPL_BUILDrestriction.Signed-off-by Johan Jonker <[email protected]>
Thanks,
- Kever
Quoted 37 lines
--- drivers/serial/Kconfig | 4 ++-- drivers/serial/Makefile | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)drivers/serial/Kconfig +2
-2@@ -762,11 +762,11 @@ config PL01X_SERIAL config ROCKCHIP_SERIAL bool "Rockchip on-chip UART support" - depends on DM_SERIAL && SPL_OF_PLATDATA + depends on DM_SERIAL select SYS_NS16550 help Select this to enable a debug UART for Rockchip devices when using - CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt). + OF_PLATDATA (i.e. a compiled-in device tree replacemenmt). This uses the ns16550 driver, converting the platdata from of-platdata to the ns16550 format.drivers/serial/Makefile +0
-2@@ -46,9 +46,7 @@ obj-$(CONFIG_MXC_UART) += serial_mxc.o obj-$(CONFIG_PXA_SERIAL) += serial_pxa.o obj-$(CONFIG_MESON_SERIAL) += serial_meson.o obj-$(CONFIG_INTEL_MID_SERIAL) += serial_intel_mid.o -ifdef CONFIG_SPL_BUILD obj-$(CONFIG_ROCKCHIP_SERIAL) += serial_rockchip.o -endif obj-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o obj-$(CONFIG_SANDBOX_SERIAL) += sandbox.o obj-$(CONFIG_SCIF_CONSOLE) += serial_sh.o