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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F7B8C2B9F4 for ; Fri, 25 Jun 2021 19:23:52 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 91F056193F for ; Fri, 25 Jun 2021 19:23:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91F056193F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E49182C74; Fri, 25 Jun 2021 21:23:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KnLioTgk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A4BB82C60; Fri, 25 Jun 2021 21:23:25 +0200 (CEST) Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 95C4582C49 for ; Fri, 25 Jun 2021 21:23:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aford173@gmail.com Received: by mail-io1-xd33.google.com with SMTP id h2so13766739iob.11 for ; Fri, 25 Jun 2021 12:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b5XNRp/p/GkGABsVp5qSdF8z+CXggKsuudhAVALo7+s=; b=KnLioTgkcSEGDSEs6lExQjJfmNw4l6DPk2xyVwBuHTqqerjlf9CANLctf0IIPXRQgq hwqtBsrnXxH8y6XE+4yzFzinGVAqNJyPpiN7rP1186iD589mOLJZU5gE1oiSYwEPLxSU 51XoYH+H/f0+KGswKOlw4QmhQNCOmlCQF75NYIasI2l0e/KNVuE2gJoQwIS88gHo+5GL eSMUZL0u0ZLibSHwVEh4xbx/ftCOenAIsykmThAcQuBWvgnNECXJiJa5XOe+qAQ+0DyV zU5AcdOP5KOLRMKB4wi2gc8VDaqk7lVr/8g+p4U95nrmYhdSnugcE2J8hB6t2Rn4uGD4 cIEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b5XNRp/p/GkGABsVp5qSdF8z+CXggKsuudhAVALo7+s=; b=eYq7mpVI+T7yl7klHBSy3SdmykXrWgqyXytyVd7MSdyNsU3H8uMVRRYUY8qrQSODH9 9d14E4tV981hIDg0z7724ZzimRbEe+3OgeUiL8WgipvsJyX5i+ip9dVhWW1kfLSjrRuz EGeCUF3h4zmgO6xkxzpEfBE06HB2eGZCdZwtYQoF8bFkZBuF2U17/xkt3nGO/nQGHuCz l0DQygFxTMDs7APawVMXas/4mHLXBoKa7+oryTbIb+dWDE7SmT3AWrIthLxPytWvzDlJ lqzT0PbM+eTfSPzNFSH9O4jjVkQcISAJenZXr/lADhPG5poFkF5NrE4RDxSOhquWN9m0 Ekrg== X-Gm-Message-State: AOAM533ozqpWCHM6geKjih3nzWh+OdtPNmxRfQsinQWTumZorIf0frU0 2Y4O7777TKT6lRqFv0fswinYOEFw2RZEXg== X-Google-Smtp-Source: ABdhPJyo22q2bI8gb7HBzuLYAai9JSz+KAJuSQt6dkLU4zaHp/SA2OkSERGf8/1NVOsP4+PMxWFBHw== X-Received: by 2002:a05:6602:219a:: with SMTP id b26mr9864905iob.69.1624648998069; Fri, 25 Jun 2021 12:23:18 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan (c-73-37-219-234.hsd1.mn.comcast.net. [73.37.219.234]) by smtp.gmail.com with ESMTPSA id n20sm3826136ioo.23.2021.06.25.12.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 12:23:17 -0700 (PDT) From: Adam Ford To: u-boot@lists.denx.de Cc: lukma@denx.de, pavel@ucw.cz, pali@kernel.org, lokeshvutla@ti.com, aford@beaconembedded.com, Adam Ford Subject: [PATCH V2 1/3] arm: omap3: Make try_unlock_memory() static Date: Fri, 25 Jun 2021 14:23:06 -0500 Message-Id: <20210625192308.277136-2-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210625192308.277136-1-aford173@gmail.com> References: <20210625192308.277136-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean try_unlock_memory() is only used in one file, so make it static in that file,remove it from the sys_proto header file, and relocate it into the #ifdef section that call it. This will make it only built under the conditions when it is called, and it may help with some further optimization in the future. Signed-off-by: Adam Ford diff --git a/arch/arm/include/asm/arch-omap3/sys_proto.h b/arch/arm/include/asm/arch-omap3/sys_proto.h index 32ac033515..656f848a73 100644 --- a/arch/arm/include/asm/arch-omap3/sys_proto.h +++ b/arch/arm/include/asm/arch-omap3/sys_proto.h @@ -60,7 +60,6 @@ u32 is_running_in_sram(void); u32 is_running_in_flash(void); u32 get_device_type(void); void secureworld_exit(void); -void try_unlock_memory(void); u32 get_boot_type(void); void invalidate_dcache(u32); u32 wait_on_value(u32, u32, void *, u32); diff --git a/arch/arm/mach-omap2/omap3/board.c b/arch/arm/mach-omap2/omap3/board.c index 029bd54595..ef4fa80c7b 100644 --- a/arch/arm/mach-omap2/omap3/board.c +++ b/arch/arm/mach-omap2/omap3/board.c @@ -140,12 +140,20 @@ void secureworld_exit(void) __asm__ __volatile__("mcr p15, 0, %0, c1, c1, 0":"=r"(i)); } +void early_system_init(void) +{ + hw_data_init(); +} + +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) + /****************************************************************************** * Routine: try_unlock_sram() * Description: If chip is GP/EMU(special) type, unlock the SRAM for * general use. *****************************************************************************/ -void try_unlock_memory(void) +static void try_unlock_memory(void) { int mode; int in_sdram = is_running_in_sdram(); @@ -174,13 +182,6 @@ void try_unlock_memory(void) return; } -void early_system_init(void) -{ - hw_data_init(); -} - -#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \ - !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) /****************************************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks. -- 2.25.1