From patchwork Tue Dec 27 12:15:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinthu Raja X-Patchwork-Id: 1719653 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=mistralsolutions.com header.i=@mistralsolutions.com header.a=rsa-sha256 header.s=google header.b=ePxjuWzg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NhDFL4gmwz23dZ for ; Tue, 27 Dec 2022 23:17:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 301228552F; Tue, 27 Dec 2022 13:16:43 +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="ePxjuWzg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3565A85532; Tue, 27 Dec 2022 13:16:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 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 676358552B for ; Tue, 27 Dec 2022 13:16:29 +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-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx-outbound40-137.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Dec 2022 12:16:28 +0000 Received: by mail-pj1-f72.google.com with SMTP id o8-20020a17090a9f8800b002260d01b221so977802pjp.8 for ; Tue, 27 Dec 2022 04:16:28 -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=Z6CyBtsJ9Qw79WH4VFeFau7SSShXifEPRjMGVOJCwuw=; b=ePxjuWzgqIksx9StoyIRiwpvsPw476kq8e6B5qzuwffkvzqnGeHrVIgYDnJ34zKdrV CRbESzFh/bNdzA5v5CZWXAIn16hz8EIEHiYkhl8EFLmeghBUCvN7B4XD2FQrlncuQzqS sll1HloAB8WmJZwZcY5lMt8Ou/JzsuQA9vFLI= 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=Z6CyBtsJ9Qw79WH4VFeFau7SSShXifEPRjMGVOJCwuw=; b=rNMc8npadMxabALBnLHn53UFjzLHwv3hqNaqC7Ta+8cKFQPI3hLPxsK+9dpsCuqZIv TkhyhRwTzVGlWGMD4z7QIOX2yBKxv5GgG24egUJc6rybzAX0XY2q9lOMJQUQ+aVm7+rq sD7mS5K5hFdXydWUdbtv8/Jqg642Siw4C2+pC+kY54dLbUuWpjq0Y9ZYGEelSMot0Wj5 spz7tJQw6+rpnX0wim4gwyZbzMJDhODWCA7x8L6R3mUooLSUa3bxLD+C8pv3glDQ39to XqYBYy1mbWEFhzBG/g1Ya4f2T4E3IGaN0+B4xSDWmIsrPohJXaverX6Fl+d/JGYmuYTv cj6g== X-Gm-Message-State: AFqh2kpenOMgtd9nqMvN/VG/8Npj6Rh5Zv8BjkrpGHj0HIy2g8tLvjCF hk2ht+S2pWz4BM2JbTkaIqmHBjmQ53y5CKhoApM42OJwGDKqCVJnnoomisgdCsggx7NrB1TWRti 1IR3mDfkZ2DB1G3KrnA3QADm3zqtt1SBBW9QI7fu3FLtIVwfFRg== X-Received: by 2002:a17:90a:5b05:b0:225:d190:f16c with SMTP id o5-20020a17090a5b0500b00225d190f16cmr12926394pji.21.1672143387533; Tue, 27 Dec 2022 04:16:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXuGkY3i5QeOo2yAMLIyvFUS1SxZe0PdqMILi1Sg3b/y/xHZCw8rzDugmqR29kE0uh9jcMtdQQ== X-Received: by 2002:a17:90a:5b05:b0:225:d190:f16c with SMTP id o5-20020a17090a5b0500b00225d190f16cmr12926371pji.21.1672143387243; Tue, 27 Dec 2022 04:16:27 -0800 (PST) Received: from LAP568U.mistral.in ([106.51.227.150]) by smtp.gmail.com with ESMTPSA id h19-20020a17090adb9300b0021806f631ccsm7975892pjv.30.2022.12.27.04.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Dec 2022 04:16:26 -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 V3 07/12] arch: mach-k3: Update board specific API name to K3 generic API name Date: Tue, 27 Dec 2022 17:45:38 +0530 Message-Id: <20221227121543.22306-8-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20221227121543.22306-1-sinthu.raja@ti.com> References: <20221227121543.22306-1-sinthu.raja@ti.com> MIME-Version: 1.0 X-BESS-ID: 1672143374-310377-5586-144125-2 X-BESS-VER: 2019.1_20221214.2106 X-BESS-Apparent-Source-IP: 209.85.216.72 X-BESS-Outbound-Spam-Score: 0.60 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.245076 [from cloudscan15-128.eu-central-1a.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 --- 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);