Message ID | 20200427105207.5659-49-rayagonda.kokatanur@broadcom.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=cfHy22e5; 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 499kbW1N4nz9sSK for <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2020 22:28:54 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 763C081E78; Mon, 27 Apr 2020 14:22:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.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=broadcom.com header.i=@broadcom.com header.b="cfHy22e5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0EEB81E1A; Mon, 27 Apr 2020 13:06:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (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 B2D6281E0A for <u-boot@lists.denx.de>; Mon, 27 Apr 2020 13:06:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rayagonda.kokatanur@broadcom.com Received: by mail-pj1-x1042.google.com with SMTP id a32so7383208pje.5 for <u-boot@lists.denx.de>; Mon, 27 Apr 2020 04:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gC9lJKAMdyc/In+M7s2CfATXaMCAzXTk/su5ldxqGvI=; b=cfHy22e5O0EK6mzAUzvh1nm5g5Ry8Mw7shEKJbTUj9Sr1eiBK3nApzgOWW5DZTpa85 NTVDYLkW9NEbcS+RjJQK8DV+p+LSsd1z54UU9tlu1pVqQqWA6kl38AjVmFFpHe35xz5e GrYuBY2EXwsMZKsrGdCxpzJJhwjPe1qDRb+yA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gC9lJKAMdyc/In+M7s2CfATXaMCAzXTk/su5ldxqGvI=; b=AyRHI2v8rQJ9FzyEKnHx+O+TJrmadPumZ/e/M0eKdqAUZR2VAYK+p25HYfg+ncolDr 2XoVrN3EtHB9PlyhKB1hl+exCccib56pjk/BG4mwYeX3y5XbsUNpveQPY4yHKKhVHShL gI6NEFDXYIyc/hG5+6MA09XyXMSpLwHXnQUitsFX2QKym7LYFaKMauNRdi738qyNkTN0 NUAjSGiq4DkkJrZ9awBChOpmTCh6Iw1boOvwnasIO9iRV6OKCCVzryDpIU0NKQRg6GoK Zi9Q4VXxXQPDa4DPfo8y6c1oXzAD1yxl7lw2OZ9oDgt2+KVzkXhlFN2f4oixWgRAtvvW 0Yxg== X-Gm-Message-State: AGi0PuZUSk2KzhXb/PPohs+Cr7KtDYeVNKiWNYYU38Z8iqC/cmjMK9AU 00OpCyuf+euYMkCoi59oJUmc4bGw6FYnIcmbi7JK/IHtdlIdTJ+QmGAHYkpM1tcGTFnVRz3Bobx 3LXD9VBMUkO2iN0D2EaZ5NKYPLFbGz9Ur0J8R6KYis1YBCBt2Ww7M0SxyK4ACNBb6IauBgzQ6C4 8XAh4fzxyg X-Google-Smtp-Source: APiQypKLczW79ZY4r5NpVjyzuLpXmBeCMrkcImQz+JCu5v4W0pd4xypbS0uJ3DKfhIFyD24/O0y0gQ== X-Received: by 2002:a17:90a:fa0e:: with SMTP id cm14mr22521645pjb.92.1587985566642; Mon, 27 Apr 2020 04:06:06 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id u3sm11996430pfn.217.2020.04.27.04.05.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 04:06:05 -0700 (PDT) From: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> To: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>, Kever Yang <kever.yang@rock-chips.com>, Michal Simek <michal.simek@xilinx.com>, Jagan Teki <jagan@amarulasolutions.com>, Marek Vasut <marex@denx.de>, Fabio Estevam <festevam@gmail.com>, Baruch Siach <baruch@tkos.co.il>, Troy Kisky <troy.kisky@boundarydevices.com>, Josip Kelecic <josip.kelecic@sartura.hr>, Priyanka Jain <priyanka.jain@nxp.com>, Biwen Li <biwen.li@nxp.com>, Jason Li <jason.li@cortina-access.com>, Philippe Reynes <philippe.reynes@softathome.com>, Eddie James <eajames@linux.ibm.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Sam Protsenko <joe.skb7@gmail.com>, Lukasz Majewski <lukma@denx.de>, Miquel Raynal <miquel.raynal@bootlin.com>, Ramon Fried <rfried.dev@gmail.com>, Anup Patel <Anup.Patel@wdc.com>, AKASHI Takahiro <takahiro.akashi@linaro.org>, Patrice Chotard <patrice.chotard@st.com>, Eugeniu Rosca <roscaeugeniu@gmail.com>, Joe Hershberger <joe.hershberger@ni.com>, Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>, Boris Brezillon <bbrezillon@kernel.org>, Simon South <simon@simonsouth.net>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Marek Bykowski <marek.bykowski@gmail.com>, Lokesh Vutla <lokeshvutla@ti.com>, Patrick Delaunay <patrick.delaunay@st.com>, Rajesh Ravi <rajesh.ravi@broadcom.com>, Abhishek Shah <abhishek.shah@broadcom.com>, Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>, Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>, Srinath Mannam <srinath.mannam@broadcom.com>, Pramod Kumar <pramod.kumar_1@nxp.com>, Ray Jui <ray.jui@broadcom.com>, Vikas Gupta <vikas.gupta@broadcom.com>, Trac Hoang <trac.hoang@broadcom.com>, Corneliu Doban <cdoban@broadcom.com>, Sheetal Tigadoli <sheetal.tigadoli@broadcom.com> Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Subject: [PATCH v1 48/49] cmd: bcm: add command for chimp hand shake Date: Mon, 27 Apr 2020 16:22:06 +0530 Message-Id: <20200427105207.5659-49-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427105207.5659-1-rayagonda.kokatanur@broadcom.com> References: <20200427105207.5659-1-rayagonda.kokatanur@broadcom.com> X-Mailman-Approved-At: Mon, 27 Apr 2020 14:18:25 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
add support for broadcom NS3 soc
|
expand
|
diff --git a/cmd/bcm/Makefile b/cmd/bcm/Makefile index 671c0fbd43..49a3f38357 100644 --- a/cmd/bcm/Makefile +++ b/cmd/bcm/Makefile @@ -3,4 +3,5 @@ obj-$(CONFIG_CMD_BCM_LOGSETUP) += logsetup.o obj-y += chimp_boot.o +obj-y += chimp_handshake.o obj-y += nitro_image_load.o diff --git a/cmd/bcm/chimp_handshake.c b/cmd/bcm/chimp_handshake.c new file mode 100644 index 0000000000..7b9c766dd3 --- /dev/null +++ b/cmd/bcm/chimp_handshake.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2020 Broadcom + */ + +#include <brcm/chimp.h> +#include <common.h> + +/* This command should be called after loading the nitro binaries */ +static int do_chimp_hs(cmd_tbl_t *cmdtp, int flag, int argc, + char *const argv[]) +{ + int ret = CMD_RET_USAGE; + u32 hstatus; + + /* Returns 1, if handshake call is success */ + if (chimp_handshake_status_optee(0, &hstatus) == BCM_CHIMP_SUCCESS) + ret = CMD_RET_SUCCESS; + + if (hstatus == CHIMP_HANDSHAKE_SUCCESS) + printf("ChiMP Handshake successful\n"); + else + printf("ERROR: ChiMP Handshake status 0x%x\n", hstatus); + + return ret; +} + +U_BOOT_CMD + (chimp_hs, 1, 1, do_chimp_hs, + "Command to verify the Chimp hand shake", + "chimp_hs\n" +); diff --git a/include/brcm/chimp.h b/include/brcm/chimp.h index 9099a70ef5..f384603dc7 100644 --- a/include/brcm/chimp.h +++ b/include/brcm/chimp.h @@ -15,6 +15,12 @@ #define BCM_CHIMP_RUNNIG_GOOD 0x8000 +enum { + CHIMP_HANDSHAKE_SUCCESS = 0, + CHIMP_HANDSHAKE_WAIT_ERROR, + CHIMP_HANDSHAKE_WAIT_TIMEOUT, +}; + #ifdef CONFIG_CHIMP_OPTEE int chimp_fastboot_optee(void); int chimp_health_status_optee(u32 *status);