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 7369CC54EE9 for ; Sun, 11 Sep 2022 16:12:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 865F884BA3; Sun, 11 Sep 2022 18:11:24 +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="dIbD+5m1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4538D84B9F; Sun, 11 Sep 2022 18:11:09 +0200 (CEST) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 4177584B85 for ; Sun, 11 Sep 2022 18:11:01 +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-x433.google.com with SMTP id e16so11661160wrx.7 for ; Sun, 11 Sep 2022 09:11:01 -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=p61DfNPxYu09SWI9Kb6KZmmO4VUVQ1jtKyAZsS8FV4o=; b=dIbD+5m1moyTVSVi/x0kdUgGp91WvbU03QUeO6CToFgxPFgGbuBnRAWvbsZYht3ObE kBKqZDx7sGHadvgUvaiFt9Vus24Uo7D+yuZJ6vuRF0j0PEC7Ob9YOOOD8XE4GjgSPY9X LmXe6UfJWz6SBFd6RBaILS0bLbczx8whVX2IB7ozaAP8J15ngQKEaeDlZGNOyqNe8+4Y vDnDsRrFIMwtsxNw5pK0OyqYh4edCqacQp49dmUlSbRmGW7csY6j/UGHe0cn7eWqS+23 tRcBZosdD8n5terhEQSdSC7hIaX63fQgjHvOiCMFADNcCqj0vi8j39jN9vAj/5mmekg7 dKtQ== 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=p61DfNPxYu09SWI9Kb6KZmmO4VUVQ1jtKyAZsS8FV4o=; b=2eCGgJfm6K6IYWb4kzqE3mC1qOP/qO6Q9UzQy62F4RSmOVFSizqQHy1Ezd115kNsdG UnHUdEsZfIj6Kp0Zw/zzMLPqWZxOd+cGfOg4odD8knp1J2+9cEENAxKQ0a5e3Pnc1P51 KbI4pi9WDAKJAKQzdr6OhmPbRr92ruypPCihQ3JSsdz04clvG2qyPQw9eFUTeyleWa+v gqZjPwCu5F3STFBmWPN26r44IC+ED4dBXeLVdUDbcKS8NoBsVA37jhjNbSbrO1ypUsEQ 8zXr7DUoUfZ7ntbo3lRlOveB10OErcyhkUWYQ5IIodIdRPTq7JoxhE16onXM3HDfST9p UaFw== X-Gm-Message-State: ACgBeo0J85hxM2wlsUT5xnhkQP09RAcZXvwPJganZj4zmn8cmxwFWHNU VISdpNQH6noxxkslrwLlNNdtNBsco18= X-Google-Smtp-Source: AA6agR7VOWSakgaxa1ShslRIbAlN3cT8w30AVhusxXQPvNs5JiW/aWwucbRg0RSIFKToUpQ+LL+law== X-Received: by 2002:a5d:6088:0:b0:228:e0c5:da5f with SMTP id w8-20020a5d6088000000b00228e0c5da5fmr12371922wrt.221.1662912660749; Sun, 11 Sep 2022 09:11:00 -0700 (PDT) Received: from localhost.localdomain ([2a02:2f07:610e:db00:f58e:2331:88f2:f78b]) by smtp.gmail.com with ESMTPSA id h8-20020a05600c350800b003a608d69a64sm7446779wmq.21.2022.09.11.09.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 09:11:00 -0700 (PDT) From: Ovidiu Panait To: u-boot@lists.denx.de Cc: Ovidiu Panait , Marek Vasut , Michal Simek , Rick Chen , Simon Glass Subject: [PATCH 2/4] common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.c Date: Sun, 11 Sep 2022 19:10:49 +0300 Message-Id: <20220911161052.2986264-2-ovpanait@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220911161052.2986264-1-ovpanait@gmail.com> References: <20220911161052.2986264-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. Signed-off-by: Ovidiu Panait --- 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