From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kever Yang Date: Tue, 22 Jan 2019 17:11:42 +0800 Subject: [U-Boot] [PATCH v2 2/9] ARM: rockchip: rk3188: Remove the pinctrl setup and enable uart at SPL In-Reply-To: <20190102125105.25734-3-david.wu@rock-chips.com> References: <20190102125105.25734-1-david.wu@rock-chips.com> <20190102125105.25734-3-david.wu@rock-chips.com> Message-ID: <74c98bca-551a-a3f4-c6e4-116a5f7e52f3@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/02/2019 08:50 PM, David Wu wrote: > When the boot ROM sets up MMC we don't need to do it again. Remove the > MMC setup code entirely, but we also need to enable uart for debug message. > > Signed-off-by: David Wu Reviewed-by: Kever Yang Thanks, - Kever > --- > > Changes in v2: None > > arch/arm/mach-rockchip/rk3188-board-spl.c | 41 ++--------------------- > 1 file changed, 2 insertions(+), 39 deletions(-) > > diff --git a/arch/arm/mach-rockchip/rk3188-board-spl.c b/arch/arm/mach-rockchip/rk3188-board-spl.c > index 3c6c3d3c09..a5e4d39cb7 100644 > --- a/arch/arm/mach-rockchip/rk3188-board-spl.c > +++ b/arch/arm/mach-rockchip/rk3188-board-spl.c > @@ -120,7 +120,7 @@ void board_debug_uart_init(void) > > void board_init_f(ulong dummy) > { > - struct udevice *pinctrl, *dev; > + struct udevice *dev; > int ret; > > #define EARLY_UART > @@ -134,10 +134,7 @@ void board_init_f(ulong dummy) > * printascii("string"); > */ > debug_uart_init(); > - printch('s'); > - printch('p'); > - printch('l'); > - printch('\n'); > + printascii("U-Boot SPL board init"); > #endif > > #ifdef CONFIG_ROCKCHIP_USB_UART > @@ -171,12 +168,6 @@ void board_init_f(ulong dummy) > return; > } > > - ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); > - if (ret) { > - debug("Pinctrl init failed: %d\n", ret); > - return; > - } > - > ret = uclass_get_device(UCLASS_RAM, 0, &dev); > if (ret) { > debug("DRAM init failed: %d\n", ret); > @@ -214,7 +205,6 @@ static int setup_led(void) > > void spl_board_init(void) > { > - struct udevice *pinctrl; > int ret; > > ret = setup_led(); > @@ -223,36 +213,9 @@ void spl_board_init(void) > hang(); > } > > - ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); > - if (ret) { > - debug("%s: Cannot find pinctrl device\n", __func__); > - goto err; > - } > - > -#ifdef CONFIG_SPL_MMC_SUPPORT > - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_SDCARD); > - if (ret) { > - debug("%s: Failed to set up SD card\n", __func__); > - goto err; > - } > -#endif > - > - /* Enable debug UART */ > - ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG); > - if (ret) { > - debug("%s: Failed to set up console UART\n", __func__); > - goto err; > - } > - > preloader_console_init(); > #if CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM) > back_to_bootrom(BROM_BOOT_NEXTSTAGE); > #endif > return; > - > -err: > - printf("spl_board_init: Error %d\n", ret); > - > - /* No way to report error here */ > - hang(); > }