From patchwork Wed Jun 10 10:41:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rayagonda Kokatanur X-Patchwork-Id: 1306749 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=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; secure) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=HLi1l/Q4; 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 49hk9R1yQKz9sQx for ; Wed, 10 Jun 2020 20:43:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C40381CD0; Wed, 10 Jun 2020 12:42:19 +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; secure) header.d=broadcom.com header.i=@broadcom.com header.b="HLi1l/Q4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE3CD81C78; Wed, 10 Jun 2020 12:42:15 +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-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) (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 73B8B8168D for ; Wed, 10 Jun 2020 12:42:07 +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-x1043.google.com with SMTP id d6so726090pjs.3 for ; Wed, 10 Jun 2020 03:42:07 -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=uumFBpOEYQV2KcmisRjEAzyfnqQRxabiciGOCQulEcM=; b=HLi1l/Q4WQGYPPPlmx7lLJiifWPBqnjUthjftPYB5TwDEv3CQr35E5JIZc/hRPjRN5 sq91dQyBSkNAdE+ZrloBteF2fov6nQ86sT6XU0A7hk6C0vu5uys00PNdMjjl4ymOo/tF YTee5+BNeKq1SwOZ8AotcJVDPYYmbJhi5dPmY= 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=uumFBpOEYQV2KcmisRjEAzyfnqQRxabiciGOCQulEcM=; b=YARRCLMdIDg6/8Hh5vnWDj1VP7tdAr1MOKinQP8hQN2jigC/ImwfKY5bLSrEsJC8us U3VHYUFCEzkAD10ZPKQJwxHSfEmutupbNy+YXvd8GOPpdXN06fshevq4kUifXPI6uOM0 vP2rJYsOoO8db40UoJcGA/H6ncYbAJlLODi0kXA0WAI/KSzcNmxWZKhhSco8drZl2ZCi E774h8s+uroVv7Pgzc9MMS2oAF5aCbCFjQj5krg8HTE0rq9ZB2skatd12FqAhZDvu7ba pU7sqt8oDWScp167Aj7HqNdSE0mgUGnLnTPgOsg9bK7dStnK6g15iufK5OleICVsZkVj La/A== X-Gm-Message-State: AOAM533j/OxSD9tBx32UIaXX75zvGsWY7qwvcUnj/nhEQMKjacsJ6msu /04mToHjcy1DZHvS/3TRAoHq3ROiZe86Sw4cUXzo3YJIz0RXdw6F81WGHWNVGevwL/FFCjhV07H 4a+ZjpIuxH6hjQN096DbntyJfOoYCQVucWGZlSDsCBVRr2jqi1iGVnLythecotinwCwM+QKpzyM uS7hg= X-Google-Smtp-Source: ABdhPJyIoMHuPIH784395+j0vrkFGAHNYEyr7WGKqK8c0JL10adwr9FzmEq96IrKBfJ3U9Pj1QC52Q== X-Received: by 2002:a17:90a:c695:: with SMTP id n21mr2582426pjt.206.1591785725242; Wed, 10 Jun 2020 03:42:05 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id d22sm10760050pgh.64.2020.06.10.03.42.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 03:42:04 -0700 (PDT) From: Rayagonda Kokatanur To: u-boot@lists.denx.de, Simon Glass , Marek Vasut , Bharat Kumar Reddy Gooty Cc: Rayagonda Kokatanur Subject: [PATCH v3 08/15] board: ns3: program GIC LPI tables Date: Wed, 10 Jun 2020 16:11:13 +0530 Message-Id: <20200610104120.30668-9-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200610104120.30668-1-rayagonda.kokatanur@broadcom.com> References: <20200610104120.30668-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 1221f26ddc..d4f374a7c6 100644 --- a/board/broadcom/bcmns3/ns3.c +++ b/board/broadcom/bcmns3/ns3.c @@ -6,9 +6,12 @@ #include #include +#include +#include #include #include #include +#include static struct mm_region ns3_mem_map[] = { { @@ -88,3 +91,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 */