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 E6494C54EBC for ; Tue, 10 Jan 2023 13:12:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BDA0A85553; Tue, 10 Jan 2023 14:11: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=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="EkJjfYft"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35BC185524; Tue, 10 Jan 2023 14:11:18 +0100 (CET) Received: from egress-ip4b.ess.de.barracuda.com (egress-ip4b.ess.de.barracuda.com [18.185.115.208]) (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 A7A4E854E7 for ; Tue, 10 Jan 2023 14:10:54 +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-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx-outbound46-71.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jan 2023 13:10:53 +0000 Received: by mail-pg1-f198.google.com with SMTP id a33-20020a630b61000000b00429d91cc649so5142863pgl.8 for ; Tue, 10 Jan 2023 05:10:53 -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=3oNxauo+n5ucxMQ41u6i4N8ePW7UZWQBebpANsnERyg=; b=EkJjfYft0iA5bb/HcA4Yq6e4Drg/oyLMjY2fV0qWJtvXLWhIfF4xvkDvkFi9r5SQI5 unLFL0hX2sdHskqyd3b++2YYi2X0IUookpMQcjSzk4RFx+QHu48HfAeB5rgEADCBCGsQ avGEWEmWY9nweMIetObVoCZ8fqdYmy5ekCvLg= 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=3oNxauo+n5ucxMQ41u6i4N8ePW7UZWQBebpANsnERyg=; b=B6lV7/yZwFZWQ1ULSZrkxTu7M/uFiPjCZX2ZvuuqOnTtJ8EPyjf3ovB2eLW8ZRViK0 EerttbwzCppI+Sxool3VZFtlt88R3ehPOZzI4qx26sah3+6szxKIdfvsqMUvBnM68uhw d+Q4WKVGOJDozuwMQ9FAFBqJ4hRbMfcQCsUV0FdyZd8EnrFNOS/OjNnO1O81B68j6NtO olQli37bc7LYXWVAlrtvanyV3MpzILr2gdi0P69bsQRgXxlpM054dAKCfiy10wlXm2lb q/deNtMr/uDl0o+jxZGgJsZErwxWqF8EycSg5WBKgViOslg+PyivSVUvoYSFIKEZjMH9 UzIA== X-Gm-Message-State: AFqh2krIW+aIdgSRINk6PAXdxV626riH9ukcfqHTW/a+SmhT8hbi6LYG Rr8AgMSrDZpOYT1BpQMiZc85JgQI9A4Jeg5tcUw1n9j/QNZcCxjjCeTW8rIyio6oVLFUtTybvHY MFzKAQiDPSvCUlSKD4BRu+hUSwX7ERrIygr3NpUVoYKp7XQm4bw== X-Received: by 2002:a17:90b:280d:b0:21a:1f5f:e798 with SMTP id qb13-20020a17090b280d00b0021a1f5fe798mr72871330pjb.48.1673356252289; Tue, 10 Jan 2023 05:10:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXtqWtGF2ByC6QVzhl4DQyLBr1T24YMHqAEGr17dVqDN6om6nBN7gsFJ8hsU7Y9KS9VgwP1G2g== X-Received: by 2002:a17:90b:280d:b0:21a:1f5f:e798 with SMTP id qb13-20020a17090b280d00b0021a1f5fe798mr72871310pjb.48.1673356251979; Tue, 10 Jan 2023 05:10:51 -0800 (PST) Received: from LAP568U.mistral.in ([106.51.227.150]) by smtp.gmail.com with ESMTPSA id 14-20020a630c4e000000b00478f87eaa44sm6654907pgm.35.2023.01.10.05.10.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 05:10:51 -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 V5 07/12] arch: mach-k3: Update board specific API name to K3 generic API name Date: Tue, 10 Jan 2023 18:40:11 +0530 Message-Id: <20230110131016.12480-8-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230110131016.12480-1-sinthu.raja@ti.com> References: <20230110131016.12480-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1673356216-311847-5640-6399-2 X-BESS-VER: 2019.1_20221214.2106 X-BESS-Apparent-Source-IP: 209.85.215.198 X-BESS-Outbound-Spam-Score: 0.60 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.245374 [from cloudscan16-56.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_SC0_MISMATCH_TO META: Envelope rcpt doesn't match header 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.60 MARKETING_SUBJECT META: Subject contains popular marketing words X-BESS-Outbound-Spam-Status: SCORE=0.60 using account:ESS91090 scores of KILL_LEVEL=7.0 tests=BSF_SC0_MISMATCH_TO, BSF_BESS_OUTBOUND, MARKETING_SUBJECT 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 Reviewed-by: Tom Rini --- Changes in V5: ============= Add Reviewed-by tag 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..09e55ed456 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(void) { 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(void) +{ + 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