rockchip: clean up pinctrl init code
Subsystems (3)
cover rockchip: clean up pinctrl init code
After the common pinctrl driver use the dts node to init per-driver iomux, we are not able to use the legacy interface, clean all related code.
Kever Yang (4):
rockchip: rk3399: remove pinctrl init in spl_board_init
rockchip: rk3188: remove pinctrl init in spl_board_init
rockchip: rk3288: remove pinctrl init in spl_board_init
rockchip: remove redundant pinctrl header including
arch/arm/mach-rockchip/rk3036-board.c | 1 - arch/arm/mach-rockchip/rk3188-board-spl.c | 1 - arch/arm/mach-rockchip/rk3188-board.c | 31 ----------------------- arch/arm/mach-rockchip/rk3288-board-spl.c | 1 - arch/arm/mach-rockchip/rk3288-board.c | 27 -------------------- arch/arm/mach-rockchip/rk3328-board-spl.c | 1 - arch/arm/mach-rockchip/rk3399-board-spl.c | 8 ------ 7 files changed, 70 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/4 rockchip: rk3399: remove pinctrl init in spl_board_init
The pinctrl will default init the io while driver is probe with new pinctrl driver.
---
arch/arm/mach-rockchip/rk3399-board-spl.c | 8 -------- 1 file changed, 8 deletions(-)
arch/arm/mach-rockchip/rk3399-board-spl.c +0 -8
@@ -21,7 +21,6 @@#include <asm/arch-rockchip/periph.h> #include <asm/arch-rockchip/sys_proto.h> #include <power/regulator.h> -#include <dm/pinctrl.h> void board_return_to_bootrom (void ) {
@@ -133,7 +132,6 @@ void secure_timer_init(void)void board_init_f (ulong dummy) { -struct udevice *pinctrl;struct udevice *dev;struct rk3399_pmusgrf_regs *sgrf;struct rk3399_grf_regs *grf;
@@ -192,12 +190,6 @@ void board_init_f(ulong dummy)secure_timer_init (); - ret =uclass_get_device (UCLASS_PINCTRL ,0 , &pinctrl); -if (ret) { -pr_err ("Pinctrl init failed: %d\n" , ret); -return ; - } - ret =uclass_get_device (UCLASS_RAM ,0 , &dev);if (ret) {pr_err ("DRAM init failed: %d\n" , ret);
Signature · 1 line
2.17.1
PATCH 2/4 rockchip: rk3188: remove pinctrl init in spl_board_init
In reply to Kever YangThe pinctrl will default init the io while driver is probe with new pinctrl driver.
---
arch/arm/mach-rockchip/rk3188-board-spl.c | 1 - arch/arm/mach-rockchip/rk3188-board.c | 31 ----------------------- 2 files changed, 32 deletions(-)
arch/arm/mach-rockchip/rk3188-board-spl.c +0 -1
@@ -23,7 +23,6 @@#include <asm/arch-rockchip/pmu_rk3188.h> #include <asm/arch-rockchip/sdram.h> #include <asm/arch-rockchip/timer.h> -#include <dm/pinctrl.h> #include <dm/root.h> #include <dm/test.h> #include <dm/util.h>
arch/arm/mach-rockchip/rk3188-board.c +0 -31
@@ -15,7 +15,6 @@#include <asm/arch-rockchip/periph.h> #include <asm/arch-rockchip/pmu_rk3288.h> #include <asm/arch-rockchip/boot_mode.h> -#include <dm/pinctrl.h> __weak int rk_board_late_init (void ) {
@@ -42,37 +41,7 @@ int board_late_init(void)int board_init (void ) { -#if CONFIG_IS_ENABLED (ROCKCHIP_BACK_TO_BROM ) -struct udevice *pinctrl; -int ret; - -/* -* We need to implement sdcard iomux here for the further -* initialization, otherwise, it'll hit sdcard command sending -* timeout exception. -*/ - ret =uclass_get_device (UCLASS_PINCTRL ,0 , &pinctrl); -if (ret) { -debug ("%s: Cannot find pinctrl device\n" , __func__); - goto err; - } - ret =pinctrl_request_noflags (pinctrl,PERIPH_ID_SDCARD ); -if (ret) { -debug ("%s: Failed to set up SD card\n" , __func__); - goto err; - } -return 0 ; -err: -printf ("board_init: Error %d\n" , ret); - -/* No way to report error here */ -hang (); - -return -1 ; -#else -return 0 ; -#endif }#if !CONFIG_IS_ENABLED (SYS_DCACHE_OFF )
Signature · 1 line
2.17.1
PATCH 3/4 rockchip: rk3288: remove pinctrl init in spl_board_init
In reply to Kever YangThe pinctrl will default init the io while driver is probe with new pinctrl driver.
---
arch/arm/mach-rockchip/rk3288-board-spl.c | 1 - arch/arm/mach-rockchip/rk3288-board.c | 27 ----------------------- 2 files changed, 28 deletions(-)
arch/arm/mach-rockchip/rk3288-board-spl.c +0 -1
@@ -23,7 +23,6 @@#include <asm/arch-rockchip/sdram_common.h> #include <asm/arch-rockchip/sys_proto.h> #include <asm/arch-rockchip/timer.h> -#include <dm/pinctrl.h> #include <dm/root.h> #include <dm/test.h> #include <dm/util.h>
arch/arm/mach-rockchip/rk3288-board.c +0 -27
@@ -16,7 +16,6 @@#include <asm/arch-rockchip/qos_rk3288.h> #include <asm/arch-rockchip/boot_mode.h> #include <asm/gpio.h> -#include <dm/pinctrl.h> #include <dt-bindings/clock/rk3288-cru.h> #include <power/regulator.h>
@@ -145,33 +144,7 @@ static int veyron_init(void)int board_init (void ) {#if CONFIG_IS_ENABLED (ROCKCHIP_BACK_TO_BROM ) -struct udevice *pinctrl; -int ret; - -/* -* We need to implement sdcard iomux here for the further -* initlization, otherwise, it'll hit sdcard command sending -* timeout exception. -*/ - ret =uclass_get_device (UCLASS_PINCTRL ,0 , &pinctrl); -if (ret) { -debug ("%s: Cannot find pinctrl device\n" , __func__); - goto err; - } - ret =pinctrl_request_noflags (pinctrl,PERIPH_ID_SDCARD ); -if (ret) { -debug ("%s: Failed to set up SD card\n" , __func__); - goto err; - } -return 0 ; -err: -printf ("board_init: Error %d\n" , ret); - -/* No way to report error here */ -hang (); - -return -1 ;#else int ret;
Signature · 1 line
2.17.1
PATCH 4/4 rockchip: remove redundant pinctrl header including
In reply to Kever YangNo code is using this header file, remove it.
---
arch/arm/mach-rockchip/rk3036-board.c | 1 - arch/arm/mach-rockchip/rk3328-board-spl.c | 1 - 2 files changed, 2 deletions(-)
arch/arm/mach-rockchip/rk3036-board.c +0 -1
@@ -14,7 +14,6 @@#include <asm/arch-rockchip/grf_rk3036.h> #include <asm/arch-rockchip/boot_mode.h> #include <asm/arch-rockchip/sdram_rk3036.h> -#include <dm/pinctrl.h> DECLARE_GLOBAL_DATA_PTR ;
arch/arm/mach-rockchip/rk3328-board-spl.c +0 -1
@@ -7,7 +7,6 @@#include <common.h> #include <debug_uart.h> #include <dm.h> -#include <dm/pinctrl.h> #include <ram.h> #include <spl.h> #include <asm/io.h>
Signature · 1 line
2.17.1
PATCH 4/4 rockchip: remove redundant pinctrl header including
Quoted 5 lines · Kever Yang
No code is using this header file, remove it.
You are not removing the header file, but are simply not including it.
Thanks,
Phil.