From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CAE5C4332F for ; Wed, 19 Oct 2022 09:19:08 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC2C484EA3; Wed, 19 Oct 2022 11:19:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D4CF184EA3; Wed, 19 Oct 2022 11:19:04 +0200 (CEST) Received: from mail-m11879.qiye.163.com (mail-m11879.qiye.163.com [115.236.118.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 53ADF84F2E for ; Wed, 19 Oct 2022 11:18:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [192.168.60.65] (unknown [103.29.142.67]) by mail-m11879.qiye.163.com (Hmail) with ESMTPA id 437A16809BE; Wed, 19 Oct 2022 17:18:43 +0800 (CST) Message-ID: <5ec59d75-034f-e590-e5ba-e891747fa419@rock-chips.com> Date: Wed, 19 Oct 2022 17:18:41 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1] rockchip: phycore_rk3288: remove phycore_init() function Content-Language: en-US To: Johan Jonker Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, w.egorov@phytec.de, u-boot@lists.denx.de References: <42876044-e20f-81fd-2bc7-96ff2268d19d@gmail.com> From: Kever Yang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlCQk1MVklNHxpMS00dSxkaSFUTARMWGhIXJBQOD1 lXWRgSC1lBWUpLSFVJQlVKT0lVTUxZV1kWGg8SFR0UWUFZT0tIVUpKS0hKTFVKS0tVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Nwg6Izo4Mj0iISgWNTg#OEtI GSpPCwxVSlVKTU1NSkxKSklPS05MVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlKS0hVSUJVSk9JVU1MWVdZCAFZQUhCQk43Bg++ X-HM-Tid: 0a83ef89b79e2eb5kusn437a16809be X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 2022/10/18 19:25, Johan Jonker wrote: > The phycore_rk3288 board has a SPL size problem, > so remove phycore_init() function to stay within the limits. This patch can reduce enough size to make the build pass. Reviewed-by: Kever Yang Thanks, - Kever > > Signed-off-by: Johan Jonker > --- > arch/arm/mach-rockchip/rk3288/Kconfig | 1 - > board/phytec/phycore_rk3288/phycore-rk3288.c | 46 -------------------- > 2 files changed, 47 deletions(-) > > diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig > index e8c57843..1be2b585 100644 > --- a/arch/arm/mach-rockchip/rk3288/Kconfig > +++ b/arch/arm/mach-rockchip/rk3288/Kconfig > @@ -89,7 +89,6 @@ config TARGET_MIQI_RK3288 > config TARGET_PHYCORE_RK3288 > bool "phyCORE-RK3288" > select BOARD_LATE_INIT > - select SPL_BOARD_INIT if SPL > help > Add basic support for the PCM-947 carrier board, a RK3288 based > development board made by PHYTEC. This board works in a combination > diff --git a/board/phytec/phycore_rk3288/phycore-rk3288.c b/board/phytec/phycore_rk3288/phycore-rk3288.c > index 17b987f6..3f49f39e 100644 > --- a/board/phytec/phycore_rk3288/phycore-rk3288.c > +++ b/board/phytec/phycore_rk3288/phycore-rk3288.c > @@ -19,8 +19,6 @@ > #include > #include > #include "som.h" > -#include > -#include > > static int valid_rk3288_som(struct rk3288_som *som) > { > @@ -77,47 +75,3 @@ int rk3288_board_late_init(void) > > return 0; > } > - > -#ifdef CONFIG_SPL_BUILD > -#if !defined(CONFIG_SPL_OF_PLATDATA) > -static int phycore_init(void) > -{ > - struct udevice *pmic; > - int ret; > - > - ret = uclass_first_device_err(UCLASS_PMIC, &pmic); > - if (ret) > - return ret; > - > -#if defined(CONFIG_SPL_POWER) > - /* Increase USB input current to 2A */ > - ret = rk818_spl_configure_usb_input_current(pmic, 2000); > - if (ret) > - return ret; > - > - /* Close charger when USB lower then 3.26V */ > - ret = rk818_spl_configure_usb_chrg_shutdown(pmic, 3260000); > - if (ret) > - return ret; > -#endif > - > - return 0; > -} > -#endif > - > -void spl_board_init(void) > -{ > -#if !defined(CONFIG_SPL_OF_PLATDATA) > - int ret; > - > - if (of_machine_is_compatible("phytec,rk3288-phycore-som")) { > - ret = phycore_init(); > - if (ret) { > - debug("Failed to set up phycore power settings: %d\n", > - ret); > - return; > - } > - } > -#endif > -} > -#endif