All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] rockchip: clean up pinctrl init code
@ 2019-07-09 13:55 Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 1/4] rockchip: rk3399: remove pinctrl init in spl_board_init Kever Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Kever Yang @ 2019-07-09 13:55 UTC (permalink / raw)
  To: u-boot


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(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/4] rockchip: rk3399: remove pinctrl init in spl_board_init
  2019-07-09 13:55 [U-Boot] [PATCH 0/4] rockchip: clean up pinctrl init code Kever Yang
@ 2019-07-09 13:55 ` Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 2/4] rockchip: rk3188: " Kever Yang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Kever Yang @ 2019-07-09 13:55 UTC (permalink / raw)
  To: u-boot

The pinctrl will default init the io while driver is probe
with new pinctrl driver.

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

 arch/arm/mach-rockchip/rk3399-board-spl.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c
index 890d80025f..2333694caa 100644
--- a/arch/arm/mach-rockchip/rk3399-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3399-board-spl.c
@@ -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);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/4] rockchip: rk3188: remove pinctrl init in spl_board_init
  2019-07-09 13:55 [U-Boot] [PATCH 0/4] rockchip: clean up pinctrl init code Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 1/4] rockchip: rk3399: remove pinctrl init in spl_board_init Kever Yang
@ 2019-07-09 13:55 ` Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 3/4] rockchip: rk3288: " Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 4/4] rockchip: remove redundant pinctrl header including Kever Yang
  3 siblings, 0 replies; 6+ messages in thread
From: Kever Yang @ 2019-07-09 13:55 UTC (permalink / raw)
  To: u-boot

The pinctrl will default init the io while driver is probe
with new pinctrl driver.

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

 arch/arm/mach-rockchip/rk3188-board-spl.c |  1 -
 arch/arm/mach-rockchip/rk3188-board.c     | 31 -----------------------
 2 files changed, 32 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c
index 77b9b36d35..84c2a5756f 100644
--- a/arch/arm/mach-rockchip/rk3188-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3188-board-spl.c
@@ -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>
diff --git a/arch/arm/mach-rockchip/rk3188-board.c b/arch/arm/mach-rockchip/rk3188-board.c
index 80d8c4241e..94fd6c01eb 100644
--- a/arch/arm/mach-rockchip/rk3188-board.c
+++ b/arch/arm/mach-rockchip/rk3188-board.c
@@ -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)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 3/4] rockchip: rk3288: remove pinctrl init in spl_board_init
  2019-07-09 13:55 [U-Boot] [PATCH 0/4] rockchip: clean up pinctrl init code Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 1/4] rockchip: rk3399: remove pinctrl init in spl_board_init Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 2/4] rockchip: rk3188: " Kever Yang
@ 2019-07-09 13:55 ` Kever Yang
  2019-07-09 13:55 ` [U-Boot] [PATCH 4/4] rockchip: remove redundant pinctrl header including Kever Yang
  3 siblings, 0 replies; 6+ messages in thread
From: Kever Yang @ 2019-07-09 13:55 UTC (permalink / raw)
  To: u-boot

The pinctrl will default init the io while driver is probe
with new pinctrl driver.

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

 arch/arm/mach-rockchip/rk3288-board-spl.c |  1 -
 arch/arm/mach-rockchip/rk3288-board.c     | 27 -----------------------
 2 files changed, 28 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3288-board-spl.c b/arch/arm/mach-rockchip/rk3288-board-spl.c
index d8d215db8a..b7fab63acf 100644
--- a/arch/arm/mach-rockchip/rk3288-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3288-board-spl.c
@@ -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>
diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index e2de5b2fdd..a250d50387 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -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;
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 4/4] rockchip: remove redundant pinctrl header including
  2019-07-09 13:55 [U-Boot] [PATCH 0/4] rockchip: clean up pinctrl init code Kever Yang
                   ` (2 preceding siblings ...)
  2019-07-09 13:55 ` [U-Boot] [PATCH 3/4] rockchip: rk3288: " Kever Yang
@ 2019-07-09 13:55 ` Kever Yang
  2019-07-09 13:59   ` Philipp Tomsich
  3 siblings, 1 reply; 6+ messages in thread
From: Kever Yang @ 2019-07-09 13:55 UTC (permalink / raw)
  To: u-boot

No code is using this header file, remove it.

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

 arch/arm/mach-rockchip/rk3036-board.c     | 1 -
 arch/arm/mach-rockchip/rk3328-board-spl.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3036-board.c b/arch/arm/mach-rockchip/rk3036-board.c
index e6ea0e9a6a..c594c4d61c 100644
--- a/arch/arm/mach-rockchip/rk3036-board.c
+++ b/arch/arm/mach-rockchip/rk3036-board.c
@@ -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;
 
diff --git a/arch/arm/mach-rockchip/rk3328-board-spl.c b/arch/arm/mach-rockchip/rk3328-board-spl.c
index 7f49d056a0..f24fd89e3f 100644
--- a/arch/arm/mach-rockchip/rk3328-board-spl.c
+++ b/arch/arm/mach-rockchip/rk3328-board-spl.c
@@ -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>
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 4/4] rockchip: remove redundant pinctrl header including
  2019-07-09 13:55 ` [U-Boot] [PATCH 4/4] rockchip: remove redundant pinctrl header including Kever Yang
@ 2019-07-09 13:59   ` Philipp Tomsich
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Tomsich @ 2019-07-09 13:59 UTC (permalink / raw)
  To: u-boot



> On 09.07.2019, at 15:55, Kever Yang <kever.yang@rock-chips.com> wrote:
> 
> No code is using this header file, remove it.

You are not removing the header file, but are simply not including it.

Thanks,
Phil.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-07-09 13:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-09 13:55 [U-Boot] [PATCH 0/4] rockchip: clean up pinctrl init code Kever Yang
2019-07-09 13:55 ` [U-Boot] [PATCH 1/4] rockchip: rk3399: remove pinctrl init in spl_board_init Kever Yang
2019-07-09 13:55 ` [U-Boot] [PATCH 2/4] rockchip: rk3188: " Kever Yang
2019-07-09 13:55 ` [U-Boot] [PATCH 3/4] rockchip: rk3288: " Kever Yang
2019-07-09 13:55 ` [U-Boot] [PATCH 4/4] rockchip: remove redundant pinctrl header including Kever Yang
2019-07-09 13:59   ` Philipp Tomsich

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.