From patchwork Wed Jul 15 17:27:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 1329734 Return-Path: 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=) 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=bgJ2S+eG; 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 4B6PTn6ySlz9sTM for ; Thu, 16 Jul 2020 03:27:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 48CE381BA5; Wed, 15 Jul 2020 19:27:38 +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="bgJ2S+eG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D8EA281BBF; Wed, 15 Jul 2020 19:27:35 +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-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 42DCA819EA for ; Wed, 15 Jul 2020 19:27:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=rayagonda.kokatanur@broadcom.com Received: by mail-wm1-x341.google.com with SMTP id f139so6586207wmf.5 for ; Wed, 15 Jul 2020 10:27:33 -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; bh=6LZayfaCuumLvExcxvyHLHZxv3r2XC+dt9un57CM+7o=; b=bgJ2S+eGbmvxnm3PdxOO7G8tkVpf+uC9FpuvrydgNRWF4vpMCqbJWmWWxjBZCHrxEh jGABF3xPm0mxJ6m6EXSn/E27UvSAZL0aERRbj8ZbxbygHUWHTlDui83x/EeNxrurybRc Ccp7U7HnE3m7utxtwvdbwnPTT4PPl3wJlxjY4= 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; bh=6LZayfaCuumLvExcxvyHLHZxv3r2XC+dt9un57CM+7o=; b=XgPwZzBwBDYaG/sp5yL+xpF9ry0EvQtg9s9uuYzpp/c3A1eqapSmjkvJgiU8o+9WkN ciJPrDk+4MgXnA5ooHemccZ+VeyDQJBsfw5dpSZAOO/DUaTCiZ7eaH72VkEsN3UOjRVv WvI7xT6KHnexJiIc801GSldCRZkHQJNqs9RxhV3lsEaK8oKxwbUumo2ISdeKCaj+NxSI 53LW4/v/pEZJ/t73Z5PX/MQvBZtu076WJmvKn9ZZ2b4PzwWY5IBdPNpif03iZVU4ETsL Mb7xKekjq3ShJbwAixGO19q3juXiUJx0wxI/jwiNLnqvk7F2di/F3njLn+Gp5Nm55aMt UxWg== X-Gm-Message-State: AOAM532j2wtBjyjWTTT0Mo+tJDlzPLxtX4oo0NTTbUW2lOwSyalUiS1b hw927TFfGFqDBDG1bEUQJ9gESX3HG+QkuiUSZG7UW0AJKuwVwiZffLZJ7rub32SZe2UPlzyRyqI miolQsP8f8TMpk2+xMRSA+Roq5GvD0StXOmTYdWqwpx+tEn9+8bssIYoHZf1SUf80R4Q7E/6ZWK su/nM= X-Google-Smtp-Source: ABdhPJzos6/N+A4Aw22U7M/rkYHw9Hw2JkDc1lg89KdMY5KgYzkQUfnXhcVMIHDXC5G3A0Z6uxjllg== X-Received: by 2002:a1c:2805:: with SMTP id o5mr480517wmo.25.1594834052371; Wed, 15 Jul 2020 10:27:32 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 78sm4548749wma.31.2020.07.15.10.27.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 10:27:31 -0700 (PDT) From: Rayagonda Kokatanur To: u-boot@lists.denx.de, Simon Glass , Bharat Gooty , Thomas Fitzsimmons , Vikas Gupta Cc: Rayagonda Kokatanur Subject: [PATCH v5 0/2] add optee support for broadcom NS3 soc Date: Wed, 15 Jul 2020 22:57:18 +0530 Message-Id: <20200715172720.26276-1-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean This is fourth patch set series prepared on top of third patch set ("add FIT image support for broadcom NS3 soc"). This patch adds optee support. Changes from v4: -Address review comments from Simon, Add blank line before return. Changes from v3: -Address review comments from Simon, Rearrange code and remove while loop, Add comments for function. Changes from v2: -Address review comments from Simon, Remove own return code and use standard error code. Take out common lines from different functions and move them into common static function. Remove include as its not required. Move functions with printf from header file into c file. -Address slef review comments, Remove optee dt node as this file is no longer in sync with linux. Changes from v1: -Address review comments from Thomas Fitzsimmons, Expand the bnxt full form. -Address review comments from Simon Glass, Move c file from board/broadcom/bcmns3/chimp_optee.c to drivers/tee/broadcom, Move header file from include/brcm/chimp.h to include/broadcom/chimp.h Rayagonda Kokatanur (1): configs: ns3: enable tee and optee driver Vikas Gupta (1): drivers: tee: broadcom: add optee based bnxt fw load driver configs/bcm_ns3_defconfig | 5 +- drivers/tee/Kconfig | 1 + drivers/tee/Makefile | 1 + drivers/tee/broadcom/Kconfig | 7 ++ drivers/tee/broadcom/Makefile | 3 + drivers/tee/broadcom/chimp_optee.c | 183 +++++++++++++++++++++++++++++ include/broadcom/chimp.h | 43 +++++++ 7 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 drivers/tee/broadcom/Kconfig create mode 100644 drivers/tee/broadcom/Makefile create mode 100644 drivers/tee/broadcom/chimp_optee.c create mode 100644 include/broadcom/chimp.h