From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ovidiu Panait Date: Thu, 5 Nov 2020 11:09:45 +0200 Subject: [PATCH 08/18] common: board_r: Drop initr_pci_ep wrapper In-Reply-To: <20201105090955.29641-1-ovidiu.panait@windriver.com> References: <20201105090955.29641-1-ovidiu.panait@windriver.com> Message-ID: <20201105090955.29641-9-ovidiu.panait@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add a return value to pci_ep_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Signed-off-by: Ovidiu Panait --- common/board_r.c | 11 +---------- drivers/pci_endpoint/pci_ep-uclass.c | 4 +++- include/init.h | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 7a06627ba9..d86ff0cb5e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -214,15 +214,6 @@ static int initr_unlock_ram_in_cache(void) } #endif -#ifdef CONFIG_PCI_ENDPOINT -static int initr_pci_ep(void) -{ - pci_ep_init(); - - return 0; -} -#endif - #ifdef CONFIG_PCI static int initr_pci(void) { @@ -836,7 +827,7 @@ static init_fnc_t init_sequence_r[] = { initr_bbmii, #endif #ifdef CONFIG_PCI_ENDPOINT - initr_pci_ep, + pci_ep_init, #endif #ifdef CONFIG_CMD_NET INIT_FUNC_WATCHDOG_RESET diff --git a/drivers/pci_endpoint/pci_ep-uclass.c b/drivers/pci_endpoint/pci_ep-uclass.c index 38a5f08376..aa89701de8 100644 --- a/drivers/pci_endpoint/pci_ep-uclass.c +++ b/drivers/pci_endpoint/pci_ep-uclass.c @@ -210,7 +210,7 @@ UCLASS_DRIVER(pci_ep) = { .flags = DM_UC_FLAG_SEQ_ALIAS, }; -void pci_ep_init(void) +int pci_ep_init(void) { struct udevice *dev; @@ -219,4 +219,6 @@ void pci_ep_init(void) uclass_next_device_check(&dev)) { ; } + + return 0; } diff --git a/include/init.h b/include/init.h index 0f48ccb57a..a887c2b4fc 100644 --- a/include/init.h +++ b/include/init.h @@ -235,7 +235,7 @@ int set_cpu_clk_info(void); int update_flash_size(int flash_size); int arch_early_init_r(void); void pci_init(void); -void pci_ep_init(void); +int pci_ep_init(void); int misc_init_r(void); #if defined(CONFIG_VID) int init_func_vid(void); -- 2.17.1