From patchwork Mon May 4 11:44:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 1282486 X-Patchwork-Delegate: trini@ti.com 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=85.214.62.61; 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=Pd5HDVeh; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 49G1KY6QjSz9sP7 for ; Mon, 4 May 2020 21:46:41 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06ECD81FBF; Mon, 4 May 2020 13:45:37 +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="Pd5HDVeh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7B66C81FAA; Mon, 4 May 2020 13:45: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-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) (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 1342781FBA for ; Mon, 4 May 2020 13:45:32 +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-pf1-x442.google.com with SMTP id y25so5362284pfn.5 for ; Mon, 04 May 2020 04:45:32 -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=SF1/uk8YSGl58CtFPkfFFKsbYCs2Ig0EaC9WVOrc8FE=; b=Pd5HDVeh929sLKaGXk3VvIToCImrXbUMDNupU+aX193e42nhW7IYjBKD0ZmuMpK7JK BMJR0nqlr3lMqBZvE+uUr3Hx79eUE1HlTXhv4E8QdGkj9KyP5bIXV7zsR7a8g3pEi4FN AaX5qlVzZtbK6n/gDTjqEysNhKl/+yAKQJ810= 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=SF1/uk8YSGl58CtFPkfFFKsbYCs2Ig0EaC9WVOrc8FE=; b=KnlqeO5rf6YuX0uSs6qN0/9liBULtvX7mQzuCjcXfcciAlRyo2654gGHPEwLxvWjM6 Lb1xbf2g9e05K+AlO4vdVNXRqafP1AI8lcTS99xc5Y09lys5AOtmhpXJp1HY0POI0J95 wLyv15ttU9cKL/yg4meQSQhx2WJRksoFPBAaKKoOUJcReOTmPMYe+cTr7huH2IFYN3Lr IRZKWoE8wAbyn9oH1m5mklVsP7eTfXca8h6VQH5aKTsln0kOPvK139IsmJgm7UTsiGxq 7koGMHuGO8EAMLXwwdyXg+1x+tUtAIVcugWiyj/ydI5T23hRdbFBc+H3DnPJyGvb7hJs fOig== X-Gm-Message-State: AGi0PuaRFPkVr1WtEC6Q1NjvtW1UaPWFS+Axy56fZjxSKzJVyl+FkIh3 9jaZRK00PklJrKQuJAXoS2MWAIIL8ET/Q8VB1sNflmbLVXd7w8TXuzuCw+LN31LFHXm8SCBV4JA xObErQvwvo+2nByeknXXf+V+iou6OEDSpkDDFEgCFySGyEf4UIB1/PCgsEP6qQceLiaGn7kXybg CU5wLAnQ== X-Google-Smtp-Source: APiQypIZyEo452ZzR0YhALowV/hnQAVh+7Ozvf1Mzo8gsgc6u2Jdh3xYXvXfKS66UPRPtem+OgY3sg== X-Received: by 2002:a63:4d11:: with SMTP id a17mr15503429pgb.392.1588592727735; Mon, 04 May 2020 04:45:27 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id t20sm6712962pjo.13.2020.05.04.04.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 04:45:27 -0700 (PDT) From: Rayagonda Kokatanur To: u-boot@lists.denx.de, Simon Glass , Marek Vasut , Bharat Kumar Reddy Gooty Cc: Rayagonda Kokatanur Subject: [PATCH v2 09/16] board: ns3: program GIC LPI tables Date: Mon, 4 May 2020 17:14:25 +0530 Message-Id: <20200504114432.10886-10-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504114432.10886-1-rayagonda.kokatanur@broadcom.com> References: <20200504114432.10886-1-rayagonda.kokatanur@broadcom.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean U-boot programs the GIC LPI configuration tables and enables the LPI table. Signed-off-by: Bharat Kumar Reddy Gooty Signed-off-by: Rayagonda Kokatanur --- board/broadcom/bcmns3/ns3.c | 12 ++++++++++++ include/configs/bcm_ns3.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c index 6687028d19..7b93c53d9e 100644 --- a/board/broadcom/bcmns3/ns3.c +++ b/board/broadcom/bcmns3/ns3.c @@ -8,7 +8,10 @@ #include #include #include +#include +#include #include +#include #include static struct mm_region ns3_mem_map[] = { @@ -89,3 +92,12 @@ void reset_cpu(ulong level) psci_system_reset(); } } + +#ifdef CONFIG_OF_BOARD_SETUP +int ft_board_setup(void *fdt, bd_t *bd) +{ + gic_lpi_tables_init(BCM_NS3_GIC_LPI_BASE, MAX_GIC_REDISTRIBUTORS); + + return 0; +} +#endif /* CONFIG_OF_BOARD_SETUP */ diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h index 02a736456a..a17b9d51c0 100644 --- a/include/configs/bcm_ns3.h +++ b/include/configs/bcm_ns3.h @@ -37,4 +37,10 @@ #define CONFIG_SYS_MAXARGS 64 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +/* Generic Interrupt Controller Definitions */ +#define GICD_BASE 0x63C00000 +#define GICR_BASE 0x63E00000 +/* Number of GIC re-distributors */ +#define MAX_GIC_REDISTRIBUTORS 8 + #endif /* __BCM_NS3_H */