From patchwork Wed Nov 23 15:12:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Six X-Patchwork-Id: 698374 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3tP5TJ6hnQz9sXx for ; Thu, 24 Nov 2016 02:13:56 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 84515A7550; Wed, 23 Nov 2016 16:13:39 +0100 (CET) X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hGz628VH812o; Wed, 23 Nov 2016 16:13:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 03D77A759C; Wed, 23 Nov 2016 16:13:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 868FE4A039 for ; Wed, 23 Nov 2016 16:13:13 +0100 (CET) X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZaZ13xSN_Bjk for ; Wed, 23 Nov 2016 16:13:13 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.31.26]) by theia.denx.de (Postfix) with ESMTPS id 47AF54B9AD for ; Wed, 23 Nov 2016 16:13:08 +0100 (CET) Received: from [195.243.218.178] (helo=bob3.testumgebung.local) by smtprelay03.ispgateway.de with esmtpa (Exim 4.84) (envelope-from ) id 1c9ZES-0006Yn-36; Wed, 23 Nov 2016 16:13:08 +0100 From: Mario Six To: U-Boot Mailing List , Prafulla Wadaskar , Luka Perkov , Stefan Roese , Tom Rini , Reinhard Pfau , Dirk Eibach Date: Wed, 23 Nov 2016 16:12:22 +0100 Message-Id: X-Mailer: git-send-email 2.9.0 In-Reply-To: References: In-Reply-To: References: X-Df-Sender: bWFyaW8uc2l4QGdkc3lzLmNj Subject: [U-Boot] [PATCH 04/17] mvebu: Add board_pex_config() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Allow boards to do some initialization when PCIe comes up. Signed-off-by: Dirk Eibach --- arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c | 10 ++++++++++ arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c index 98c447c..2b85e6e 100644 --- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c +++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.c @@ -13,6 +13,13 @@ #include "ctrl_pex.h" #include "sys_env_lib.h" +void __board_pex_config(void) +{ + /* nothing in this weak default implementation */ +} +void board_pex_config(void) + __attribute__((weak, alias("__board_pex_config"))); + int hws_pex_config(const struct serdes_map *serdes_map, u8 count) { u32 pex_idx, tmp, next_busno, first_busno, temp_pex_reg, @@ -77,6 +84,9 @@ int hws_pex_config(const struct serdes_map *serdes_map, u8 count) /* Support gen1/gen2 */ DEBUG_INIT_FULL_S("Support gen1/gen2\n"); + + board_pex_config(); + next_busno = 0; mdelay(150); diff --git a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h index 5f7e2c7..ca8a4d2 100644 --- a/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h +++ b/arch/arm/mach-mvebu/serdes/a38x/ctrl_pex.h @@ -83,4 +83,6 @@ int pex_local_bus_num_set(u32 pex_if, u32 bus_num); int pex_local_dev_num_set(u32 pex_if, u32 dev_num); u32 pex_config_read(u32 pex_if, u32 bus, u32 dev, u32 func, u32 reg_off); +void board_pex_config(void); + #endif