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 13379C4332F for ; Wed, 21 Dec 2022 13:55:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EB3AA85479; Wed, 21 Dec 2022 14:54:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=mistralsolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=mistralsolutions.com header.i=@mistralsolutions.com header.b="IoOTTMT8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EDEC98547E; Wed, 21 Dec 2022 14:53:52 +0100 (CET) Received: from egress-ip4a.ess.de.barracuda.com (egress-ip4a.ess.de.barracuda.com [18.184.203.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5B8998546E for ; Wed, 21 Dec 2022 14:53:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=mistralsolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sinthu.raja@mistralsolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx-outbound40-158.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Dec 2022 13:53:32 +0000 Received: by mail-pg1-f200.google.com with SMTP id h185-20020a636cc2000000b004820a10a57bso8968922pgc.22 for ; Wed, 21 Dec 2022 05:53:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mistralsolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KM/jgH1uLnBtVnXZiL5lT6Nv/ejpM0hcGRgYv1gsuIo=; b=IoOTTMT8BQtyPWhtI8r0P/qB3bXWwpm4M465B4l7lAQl9G8sKSxwVc3RfzGHvqHpEd mzRDL1TuhxbqYWZNWkZIdhdiASguyTWeIugV6VAuzxdTS7tVGFJi7AtYyjQa4u+6mk0W SjfJg00x3/+4qbUvvYUIbqrm83/9Q6w6CAM6o= 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:message-id:reply-to; bh=KM/jgH1uLnBtVnXZiL5lT6Nv/ejpM0hcGRgYv1gsuIo=; b=BFoUn+aDaS9qT2C4IeiEQ4L/WmRTVl4ddavgL6pjTbTfzg4JFsj9bnRqrEJ72odkNo 6UBjvOVaeEUGb8xFKWXvhebHS8DOGzJ8KYtLDtQDe5DOqeVMVpeeE0+VwI9Fu5EczWfK yKueD838nXAHMji81uABI9M1Dvmgai7gtElGsLLIwXsOJEndQ9lOSIMMa+Tn8yHMid+2 7KVocO1igwBB40YWHnBK0Lr/IZqlsk5Ez/ouJUNhcJMHeF3IP1wbyDt6/i6XK2j8Wvyy ycE0DdE8148SBrEmFlXRhkrT1BAJdq75JCSHxU39N+ukOXME97xm2X/PBlVzW8OA2aOg UoXA== X-Gm-Message-State: AFqh2kp/Hrde+jMeGP6l+oi/XS9VULPiF51CwqkOvm2bjj2wUHR6gy0D VVABZVL2XIqdk/E3skZn3NN9jDgkCqxhQqRYv1WeaCIoQyfThjqi+OBo5pCR409EsmmCTfA2Xmf VgvuzKTmGOy+aqEIxqG571wrflby/GqA7+WBOwYN57d+yReTuvQ== X-Received: by 2002:a17:903:24a:b0:185:441f:70a1 with SMTP id j10-20020a170903024a00b00185441f70a1mr2475357plh.38.1671630822382; Wed, 21 Dec 2022 05:53:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXttDk6oAucV805zoiJKFbSTQHMs3Ldz5g9cosWayEgiWBB3i7kP0zi0MOFEr6CL9JepnljOEw== X-Received: by 2002:a17:903:24a:b0:185:441f:70a1 with SMTP id j10-20020a170903024a00b00185441f70a1mr2475337plh.38.1671630822092; Wed, 21 Dec 2022 05:53:42 -0800 (PST) Received: from LAP568U.mistral.in ([106.51.227.150]) by smtp.gmail.com with ESMTPSA id n15-20020a170902d2cf00b00189f2fdc178sm11474891plc.177.2022.12.21.05.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 05:53:41 -0800 (PST) From: Sinthu Raja X-Google-Original-From: Sinthu Raja To: u-boot@lists.denx.de, Tom Rini , Marcel Ziswiler , Marek Vasut , Vignesh Raghavendra Cc: Sinthu Raja Subject: [PATCH V2 07/12] arch: mach-k3: Update board specific API name to K3 generic API name Date: Wed, 21 Dec 2022 19:22:14 +0530 Message-Id: <20221221135219.24702-8-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221221135219.24702-1-sinthu.raja@ti.com> References: <20221221135219.24702-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1671630811-310398-5382-9990-2 X-BESS-VER: 2019.1_20221214.2106 X-BESS-Apparent-Source-IP: 209.85.215.200 X-BESS-Outbound-Spam-Score: 0.60 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.244945 [from cloudscan12-219.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.60 MARKETING_SUBJECT META: Subject contains popular marketing words 0.00 BSF_SC0_MISMATCH_TO META: Envelope rcpt doesn't match header X-BESS-Outbound-Spam-Status: SCORE=0.60 using account:ESS91090 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, MARKETING_SUBJECT, BSF_SC0_MISMATCH_TO X-BESS-BRTS-Status: 1 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 From: Sinthu Raja Although the board_init_f API initialises the SoC, the API name is incorrectly specified and misleads the functionality. This file should only include k3-specific functionality. Change the API's name to something more K3-specific and separate the function to make it more modular. Signed-off-by: Sinthu Raja --- arch/arm/mach-k3/include/mach/sys_proto.h | 3 +++ arch/arm/mach-k3/j721s2_init.c | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/include/mach/sys_proto.h b/arch/arm/mach-k3/include/mach/sys_proto.h index 60287b261c..3d3d90d02d 100644 --- a/arch/arm/mach-k3/include/mach/sys_proto.h +++ b/arch/arm/mach-k3/include/mach/sys_proto.h @@ -19,4 +19,7 @@ int fdt_disable_node(void *blob, char *node_path); bool soc_is_j721e(void); bool soc_is_j7200(void); +void k3_spl_init(void); +void k3_mem_init(void); +bool check_rom_loaded_sysfw(void); #endif diff --git a/arch/arm/mach-k3/j721s2_init.c b/arch/arm/mach-k3/j721s2_init.c index 0206b01d9e..60fbbce683 100644 --- a/arch/arm/mach-k3/j721s2_init.c +++ b/arch/arm/mach-k3/j721s2_init.c @@ -93,7 +93,7 @@ static void store_boot_info_from_rom(void) sizeof(struct rom_extended_boot_data)); } -void board_init_f(ulong dummy) +void k3_spl_init() { struct udevice *dev; int ret; @@ -154,6 +154,17 @@ void board_init_f(ulong dummy) /* Output System Firmware version info */ k3_sysfw_print_ver(); +} + +bool check_rom_loaded_sysfw(void) +{ + return is_rom_loaded_sysfw(&bootdata); +} + +void k3_mem_init() +{ + struct udevice *dev; + int ret; if (IS_ENABLED(CONFIG_TARGET_J721S2_R5_EVM)) { ret = uclass_get_device_by_name(UCLASS_MISC, "msmc", &dev); -- 2.36.1