From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A219C433E2 for ; Thu, 16 Jul 2020 14:21:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D35D6206F4 for ; Thu, 16 Jul 2020 14:21:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="C7kam6mT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cy8g5b53" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D35D6206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PUsXvVd/hBnhAslOyutLN4haDuvt5PWeCGPi4GmsZps=; b=C7kam6mT1lEBnaCzCB4L3ZcDK j0fRreUNstWjzhRekdtiC/CuKpUn1yki7uG/YUq+mbrG471Yo7lyHxEfOgk7KIZg+2jxQ4ATe9WK8 KXmCoLtoFDHU3zfGDaUj06yHDxKitp0GC/Equn2QBcMQY0thIEa3hG6ISatDXzo7muPiUIFeDSvwD y12kQmd5f/OpHq2G1+4ccyjTDDP/it1nUG5jqTto4tZBfQZz3+16mzSoxpHIFQfNd1bOGg+x/ietT qHu7SbGgMgVewSCpe76vGHQZW+RNcUbnms4cNIRn+kpdgtlmPoNHH2Z5PVrMBR0xdkvgoxiACyh1k 43KHEl7gw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw4kD-0004JD-Lx; Thu, 16 Jul 2020 14:20:17 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw4jJ-0003xl-Vc for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2020 14:19:23 +0000 Received: by mail-ej1-x643.google.com with SMTP id ga4so6708886ejb.11 for ; Thu, 16 Jul 2020 07:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j9bjPnYHkc1ScxpRo4KaxBbK7+DK+SRAE3wJZb7d3Do=; b=cy8g5b534FiA0iB75cl36AkRrVlXS03zM/Zp3zirVx/LHlYR3vjHPMOxYwe8JLlvOS 2c/10IL6QBBG0UC3Bo0TMovR4w1IpcO9YFN5EejG8tGSlZQtIyi6Y4vQOs9ksxmvmVaO CNhfY3mgwvkNCxQs19kPaO9Q/V5gUh5PFWoOQLye/VGWLPPega8/EXsAZdpODgmXDI6n shKmgGbYXGFA9kcZSuOA0XFa3OXj91LmQ82y+q36kFAsVYPPvlNfATQsLLuJN90hnzvO LcyyfzCcwAlIGRT6OHE5XPX8jD4eJ/3KwRxhbV2wcfz7qKq2MCAjYQp3g79cp8YQ3Qhu y8ow== 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:mime-version:content-transfer-encoding; bh=j9bjPnYHkc1ScxpRo4KaxBbK7+DK+SRAE3wJZb7d3Do=; b=PA23VZ1MWXGgqE8pUGCTlXGAXVGwhoLKYEB9clbaYWJui7G8/9JZzG1ttoLCbM6ay6 06H8ttKY6G0wuF4knPKmpAQjzX2VEjbghPELGYkmah8itY0zF9pdnHFGVUTsAJJOnBdw vAQlZV7ZeVbUGBp4MWV0PkxJ7XWCwiAeDrY0E2c2uHyw3OnTY6YsnosI4gxJ98j6Bbu9 XY5a1jyKzm51ts2SYE9RyzqHfhDOnWZeWSfSrC8Skino40IFCkBHU81KevGbqDKyLiIn 44wMgGH3mIsV0u0HHoaCDYxdAhntvp24Hj2qNU5JAETxwDvhdw8YLf3PnfepOwMHd+CI o3Ww== X-Gm-Message-State: AOAM530e9l55qiBN4U9SWo6BZnF05mFFmafdsASHWH4d8lElHo5+TWJr Ze6ClEM2WkDFCKpYwmtjFBOKop7O X-Google-Smtp-Source: ABdhPJzLMSAWmGHA5ZypciHPNCoDxd6qUqzCy2tFP13QKkOCtOi/Kgs/pLVy9hD6BNt8VFYH0VcoQA== X-Received: by 2002:a17:907:72c7:: with SMTP id du7mr3352525ejc.248.1594909160409; Thu, 16 Jul 2020 07:19:20 -0700 (PDT) Received: from localhost ([62.96.65.119]) by smtp.gmail.com with ESMTPSA id c18sm5106476eja.59.2020.07.16.07.19.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 07:19:19 -0700 (PDT) From: Thierry Reding To: Thierry Reding Subject: [PATCH 8/9] firmware: tegra: Enable BPMP support on Tegra234 Date: Thu, 16 Jul 2020 16:18:55 +0200 Message-Id: <20200716141856.544718-9-thierry.reding@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200716141856.544718-1-thierry.reding@gmail.com> References: <20200716141856.544718-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200716_101922_135557_BC388893 X-CRM114-Status: GOOD ( 15.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jon Hunter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding Enable support for the BPMP on Tegra234 to avoid relying on Tegra194 being enabled to pull in the needed OF device ID table entry. On simulation platforms the BPMP hasn't booted up yet by the time we probe the BPMP driver and the BPMP hasn't had a chance to mark the doorbell as ringable by the CCPLEX. This corresponding check in the BPMP driver will therefore fail. Work around this by disabling the check on simulation platforms. Signed-off-by: Thierry Reding --- drivers/firmware/tegra/bpmp.c | 3 ++- drivers/mailbox/tegra-hsp.c | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 4d93d8925e14..0742a90cb844 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -856,7 +856,8 @@ static const struct tegra_bpmp_soc tegra210_soc = { static const struct of_device_id tegra_bpmp_match[] = { #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \ - IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) + IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC) || \ + IS_ENABLED(CONFIG_ARCH_TEGRA_234_SOC) { .compatible = "nvidia,tegra186-bpmp", .data = &tegra186_soc }, #endif #if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index 834b35dc3b13..e07091d71986 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -13,6 +13,8 @@ #include #include +#include + #include #include "mailbox.h" @@ -322,7 +324,12 @@ static int tegra_hsp_doorbell_startup(struct mbox_chan *chan) if (!ccplex) return -ENODEV; - if (!tegra_hsp_doorbell_can_ring(db)) + /* + * On simulation platforms the BPMP hasn't had a chance yet to mark + * the doorbell as ringable by the CCPLEX, so we want to skip extra + * checks here. + */ + if (tegra_is_silicon() && !tegra_hsp_doorbell_can_ring(db)) return -ENODEV; spin_lock_irqsave(&hsp->lock, flags); -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel