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 821DDC54EBC for ; Tue, 10 Jan 2023 15:50:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0790E85543; Tue, 10 Jan 2023 16:49:32 +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="EbBPVATL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0B4A855B2; Tue, 10 Jan 2023 16:49:16 +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 7B7BF85546 for ; Tue, 10 Jan 2023 16:48:34 +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-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx-outbound22-122.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 10 Jan 2023 15:48:27 +0000 Received: by mail-pj1-f69.google.com with SMTP id lk5-20020a17090b33c500b00228cb369d7aso1826909pjb.5 for ; Tue, 10 Jan 2023 07:48: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=3oNxauo+n5ucxMQ41u6i4N8ePW7UZWQBebpANsnERyg=; b=EbBPVATLLwOovcKjA6aW/nxnTSjMB9gC7N9VwAhVN62bUaVwPf8zeDCGi3n1XpzTle N7SSFXAVxzR1fHVrXs/fUybLdBljuC0LXhIrnvhWpZDs3UvojVaau4+SzF7hkvHPM6L5 oBZP06eJ+2MKrh0T8Je/7qd7mc0Qufw4DGBWU= 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=t5mDPiPTbG2Qv2yMgOoRS1yl1u08gjo8/OfJBPGQcy76BnN4Rby2zGaT3y6ch4h2GF f+ewJnKWtV0BS1uG0qdqCRvZXbo5hGQmdjsV650nA7N5AzgW/c3mVtK7Z4DpxgaZQmAp Ho6iqYlsijnmCtArjaa1tNXNv8zghMXKiMepLx7Okkuy9my3CFTejpFTJmvDzd5vFruB ft0cGD5XYiZu9RbsqmTrJ8DhWai9a4tb4FY49remCHMS62TRxzAyrPFRmBaWqcJEDKox B/Y7fmSzduxHsYf3KL8nNfYDBI2Z7cKUiPDOrkYBgGjAEdy+EmvCWgxRzwfriqGkymbM I+Wg== X-Gm-Message-State: AFqh2kr9H6ZISfdiFnj/50zOdGA/hPjh9jn2MgBMI9f9jb1SQmU2VvGp qclWxTYUdwaVp3+yopmnlrjHRBhlvkldjJxeHzxhi97/m2QtwmLer1N/fZvdkv2N5Etq4oTLIfw rG2dxp6jb6Sfn1HKlaBaGoA1OfaPWtlO4/fAhag2+jFOkWdNdQA== X-Received: by 2002:a17:903:228a:b0:191:cd3:aa74 with SMTP id b10-20020a170903228a00b001910cd3aa74mr92151153plh.24.1673365706274; Tue, 10 Jan 2023 07:48:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXuDNUPpf6XM/xPyWZw4w7SiFSy1Z1nhk1RWui98ruBSP5NJA+v0s1kud55/iZ1K6h5sXtieeA== X-Received: by 2002:a17:903:228a:b0:191:cd3:aa74 with SMTP id b10-20020a170903228a00b001910cd3aa74mr92151129plh.24.1673365705954; Tue, 10 Jan 2023 07:48:25 -0800 (PST) Received: from localhost.localdomain ([49.207.204.53]) by smtp.gmail.com with ESMTPSA id z18-20020a63e112000000b004767bc37e03sm7047976pgh.39.2023.01.10.07.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 07:48:25 -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: [RESEND PATCH V5 07/12] arch: mach-k3: Update board specific API name to K3 generic API name Date: Tue, 10 Jan 2023 21:17:53 +0530 Message-Id: <20230110154758.16256-8-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230110154758.16256-1-sinthu.raja@ti.com> References: <20230110154758.16256-1-sinthu.raja@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BESS-ID: 1673365707-305754-5400-16493-1 X-BESS-VER: 2019.1_20221214.2106 X-BESS-Apparent-Source-IP: 209.85.216.69 X-BESS-Outbound-Spam-Score: 0.60 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.245375 [from cloudscan18-81.eu-central-1b.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 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