From patchwork Wed May 16 15:42:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 914707 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="alZEZfjD"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40mJkD6t3lz9s33 for ; Thu, 17 May 2018 01:48:20 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8D3ACC21FBA; Wed, 16 May 2018 15:45:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 01CF6C21FC0; Wed, 16 May 2018 15:43:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 375DDC21F9A; Wed, 16 May 2018 15:43:07 +0000 (UTC) Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by lists.denx.de (Postfix) with ESMTPS id 73670C21FAC for ; Wed, 16 May 2018 15:42:57 +0000 (UTC) Received: by mail-it0-f65.google.com with SMTP id q72-v6so3138985itc.0 for ; Wed, 16 May 2018 08:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=98gc/ByP4IMrSXdki/xlJTJmk2/lav2O+3qUE2ZzbyQ=; b=alZEZfjD6w4LxzEh4wUaKQWh5NXUsEyHi0CnbyKbMqj3EDNTEoeuH5AGZQRQk4GrEO YmGBiamyqU17dfu273bwXJwoasi/JgUsuLnHKRWdzwCi794keFEP5CYlJBpcQf67z+Bc T8y7aOYE2yJrfKOARCQqtZ4/3lfGj28qSnzbWBOFWbkHQnK1tZUxOHXvyK7SgcOw9ec6 vtantGAjRHnKnvc7jDsSvvGlRtm9+2yDzR3mxS27H9sRu5kXYuV/nCMCabFfdgoBB9pg jnaInVYwLx3fmXXOgAAGqQjr1dmwVQGdpVYKcgK+sPSWSocwZGoT8+OJZjIHKBwreuin 22cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=98gc/ByP4IMrSXdki/xlJTJmk2/lav2O+3qUE2ZzbyQ=; b=IFyOrnr1mvAywbNv2BlebUyr23O54dVhbvpfiX4vM1qS1sDvPwT0y6MEUdxnEYooFe 9LiHPUJKrZqCoENklTYojYJPnYpzxgjPes4s2CuvkQBS5bhalel2UPE/289aC6+sOZGd tpw0iPmr6CkTJPfnvj5pUtlBh1Ets2qbTM8rEr0J8yi3dzHvEIQyBI79EiRosL6ausbz CkXkL81yPboj46B1a3O2yonLSnGG4R4cvnoe3mR4vm4jGbxubX0potHqPkwmD3N//imZ IR/GbXWFPME1SA2C1KrGcU+IGcjwQBPoZ8/Uhyx10nh1I6am8Hkj3E1QPMs/uPegELXh 8Nag== X-Gm-Message-State: ALKqPwdH/10SWONBA30mNLuUeIMpSZAdFE4yOfgBFFcPKjCcXSyqTGgV 4KE1xQPp0eXAgSGKbePffVuHVA== X-Google-Smtp-Source: AB8JxZq543WJdsHLetjQ2RdQVMgTW6XvDSqyWrMk3XdeEySSKaNRcguEe89W7Es/Ts2D/qSnLUfcnQ== X-Received: by 2002:a6b:c9d8:: with SMTP id z207-v6mr1704075iof.266.1526485375995; Wed, 16 May 2018 08:42:55 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id t123-v6sm1712715itb.20.2018.05.16.08.42.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 May 2018 08:42:54 -0700 (PDT) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id 3F309140208; Wed, 16 May 2018 09:42:54 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Wed, 16 May 2018 09:42:25 -0600 Message-Id: <20180516154233.21457-9-sjg@chromium.org> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog In-Reply-To: <20180516154233.21457-1-sjg@chromium.org> References: <20180516154233.21457-1-sjg@chromium.org> Cc: Andy Shevchenko , Heinrich Schuchardt , Alexander Graf Subject: [U-Boot] [PATCH v4 08/16] Define board_quiesce_devices() in a shared location X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" This undocumented function relies on arch-specific code to declare a nop weak version. Add the weak function in common code instead to avoid having to duplicate the same function in each arch. Signed-off-by: Simon Glass --- Changes in v4: None Changes in v3: None Changes in v2: None arch/arm/include/asm/u-boot-arm.h | 1 - arch/x86/include/asm/u-boot-x86.h | 1 - arch/x86/lib/bootm.c | 4 ---- common/bootm.c | 4 ++++ include/bootm.h | 2 ++ 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/u-boot-arm.h b/arch/arm/include/asm/u-boot-arm.h index 01c3ba87c3f..cc828c45045 100644 --- a/arch/arm/include/asm/u-boot-arm.h +++ b/arch/arm/include/asm/u-boot-arm.h @@ -37,7 +37,6 @@ int arch_early_init_r(void); /* board/.../... */ int board_init(void); -void board_quiesce_devices(void); /* cpu/.../interrupt.c */ int arch_interrupt_init (void); diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h index 9be45846a53..2340ef83323 100644 --- a/arch/x86/include/asm/u-boot-x86.h +++ b/arch/x86/include/asm/u-boot-x86.h @@ -84,7 +84,6 @@ static inline __attribute__((no_instrument_function)) uint64_t rdtsc(void) /* board/... */ void timer_set_tsc_base(uint64_t new_base); uint64_t timer_get_tsc(void); -void board_quiesce_devices(void); void quick_ram_check(void); diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c index 533ba075bb1..54c22fe6de3 100644 --- a/arch/x86/lib/bootm.c +++ b/arch/x86/lib/bootm.c @@ -27,10 +27,6 @@ DECLARE_GLOBAL_DATA_PTR; #define COMMAND_LINE_OFFSET 0x9000 -__weak void board_quiesce_devices(void) -{ -} - void bootm_announce_and_cleanup(void) { printf("\nStarting kernel ...\n\n"); diff --git a/common/bootm.c b/common/bootm.c index a0ffc1cd679..e789f6818aa 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -46,6 +46,10 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], bootm_headers_t *images, ulong *os_data, ulong *os_len); +__weak void board_quiesce_devices(void) +{ +} + #ifdef CONFIG_LMB static void boot_start_lmb(bootm_headers_t *images) { diff --git a/include/bootm.h b/include/bootm.h index 9e42e179878..9f7956d2e35 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -72,4 +72,6 @@ int bootm_decomp_image(int comp, ulong load, ulong image_start, int type, void *load_buf, void *image_buf, ulong image_len, uint unc_len, ulong *load_end); +void board_quiesce_devices(void); + #endif