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 5902FECAAD8 for ; Tue, 13 Sep 2022 18:32:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D79DE84809; Tue, 13 Sep 2022 20:31:52 +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="SwRRmllL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 84F0F84AF5; Tue, 13 Sep 2022 20:31:48 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 BFFF584A92 for ; Tue, 13 Sep 2022 20:31:44 +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=ovpanait@gmail.com Received: by mail-wr1-x436.google.com with SMTP id bz13so22198093wrb.2 for ; Tue, 13 Sep 2022 11:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=tSG3SDK2uLn3PxQQt4t5AUTGLz+/hcps9oUlLLxsw3g=; b=SwRRmllLHFktIruF1/7CAWeFP8hPNwWa+MzP2YRC2RR9KDA+vio4XGqcWIwmVLqhB1 28X777uWL3SyUfLLoBakvb6G7IKo/fK7qxjTgahhjaKIVk4of2xcOBdKzkN6+Ilv6kiC UM4FDjrnCuoTIWd+eUdRpfyDG7BfMFBhZTzbMi6ZSLJMT1AMfqk9Tz9ag7bv+k6w5/8u 6HYB0xyVnDf1Mk/cBQdhGxgkB6db7KCON8i0ZSm5XErVN+LBSfi/M3byNnj/qB8ZU918 538FwLdixIf0s8lZo8i7nAPzmnl2K6vrNgm3aHn/xXu5c0MTMlxhFlaJYQzFV1cJD+3p fpCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=tSG3SDK2uLn3PxQQt4t5AUTGLz+/hcps9oUlLLxsw3g=; b=SkRwFDL/DB/zHcBX3Q1wOpC4EB51fnT9WOr+vxPZEpbrXz8KuwWGK5wWSEETKvBOmD b8R179XG8z/nNjNyt53ZTxWbU9XwHj+Gg8bKH37egmwvk4vOEvdeH06ji69U2LSHqW5e 6h53ltioxI8vPxoZzJgDR5PmK3duRag94qM1UPgoqzQy/QRVX0W2NJCle+QsvIbr7K9w 6Y2BKXYDF+6wayPX7LxZsh6aiEYXy9N0yjWAJumEL81Sh9DR9moiCPj4isJbjfq8rkwa Cx8m503qz9qeBjl/ymYoWj/asKTXeWISEiy/bfNoJF02S+rY5Gj9ig5jhHZUWWfQxlZP DKcQ== X-Gm-Message-State: ACgBeo3PiBfYKzU+omjwgJf1ncPTHoSC7MFHMBTcn6DdftdcDCWY0kNu NsDrh1nmOXdJmzlsemuyc3sXSRs3jbg= X-Google-Smtp-Source: AA6agR5lwoRO2dVQmHRhgGHlbxvK5DsTWjEzmjV0E/OjzldZHOjJirMHfu1gPQyHW6yd4E7WE8fLHw== X-Received: by 2002:a5d:47a9:0:b0:22a:4746:cfa7 with SMTP id 9-20020a5d47a9000000b0022a4746cfa7mr10755444wrb.368.1663093904251; Tue, 13 Sep 2022 11:31:44 -0700 (PDT) Received: from localhost.localdomain ([2a02:2f0e:c700:bc00:2edf:22a1:3a82:86b4]) by smtp.gmail.com with ESMTPSA id o14-20020a5d684e000000b002287d99b455sm11156044wrw.15.2022.09.13.11.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 11:31:43 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Simon Glass , Marek Vasut , Michal Simek , Rick Chen Subject: [PATCH v2 2/4] common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.c Date: Tue, 13 Sep 2022 21:31:27 +0300 Message-Id: <20220913183129.14184-2-ovpanait@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913183129.14184-1-ovpanait@gmail.com> References: <20220913183129.14184-1-ovpanait@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 asm/mach_type.h header and CONFIG_MACH_TYPE macro are arm-specific, so move related bdinfo logic to arch_setup_bdinfo() in arch/arm/lib/bdinfo.c. Reviewed-by: Simon Glass Signed-off-by: Ovidiu Panait --- Changes in v2: - add "Reviewed-by" tag from Simon arch/arm/lib/bdinfo.c | 12 ++++++++++++ common/board_f.c | 7 ------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c index b22ee07b85..826e09e72c 100644 --- a/arch/arm/lib/bdinfo.c +++ b/arch/arm/lib/bdinfo.c @@ -9,9 +9,21 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; +int arch_setup_bdinfo(void) +{ +#ifdef CONFIG_MACH_TYPE + struct bd_info *bd = gd->bd; + + bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ +#endif + + return 0; +} + void arch_print_bdinfo(void) { struct bd_info *bd = gd->bd; diff --git a/common/board_f.c b/common/board_f.c index f4238d4c90..3789708a30 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -45,9 +45,6 @@ #include #include #include -#ifdef CONFIG_MACH_TYPE -#include -#endif #if defined(CONFIG_MP) && defined(CONFIG_PPC) #include #endif @@ -588,10 +585,6 @@ int setup_bdinfo(void) bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */ } -#ifdef CONFIG_MACH_TYPE - bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */ -#endif - return arch_setup_bdinfo(); } -- 2.25.1