From patchwork Mon Dec 7 07:14:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priyanka Jain X-Patchwork-Id: 339155 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp2576220jai; Sun, 6 Dec 2020 23:15:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZ49c5lMEezKlomysUI/ml/RbfgLuPEY8prOAmjfyuIRPvGBF//VJ+EQwTgKVGPVo5d5ZZ X-Received: by 2002:aa7:c3d3:: with SMTP id l19mr3035032edr.366.1607325304576; Sun, 06 Dec 2020 23:15:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1607325304; cv=pass; d=google.com; s=arc-20160816; b=fj4Zorwzui5ePgaYHQ+GH+AYRrXgx0Web3l7mv0WvKZ9V0OsyK3RtiO1hJ3jA7exO+ hUf32Eo+Lh4dw0QfkVpt15lMukakpCw8GduUxI9aQ0DLYtPdScU9d049vKeD15Y/hYfz UMb9xH7vS1RYYl9ljNdH7TKG2ZnraB6y4ttPUKsNuMTzjq0rz+DZUgSw3EXfRz38BPzM TBiSKLyDd8VUfpkgQo6m6Nb2fuZbDPpJKfik0bzcMpgEEGRW71RYhG4/Jo9n7b5PLMCs JtGkjn8hNFh/e+9AlL2hzf39I0MA5SdE/Wry21bjg7cjJy0lP1CjbayW0GS4C8x81mA8 R+eQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :subject:cc:to:from:dkim-signature; bh=QDI70IwNIz2VgyZMCbpGFJP2naloOlXWrEA8+xxpI/I=; b=m2rh9/PKfsmbVjoJfCYNiT3mcVrulBnZjCKT8RdIygzTBFivyvFVtsZmtTkMKIeUCe JCl1CpMXg/OubOO20yEG8SmIEWZmuhiyllyJBDgDraMEkHlCQFwxSCigdcyrrbsJX9ZE At9GoMP6bYzEodYHbBKbS86Pi8x0lbJ9SF5s5r10k1vVGqd/LhM85hSONhSiF20s4s5m tdx4bSlMV7/p1j4F+5FTskaePmO4H2vLFC3JZI7HdorZEy0Z+zzxQcUmK46aaEVVLisM 5uu7Ra/ZQlie+6yPg6v4KMxdAsPaTntlVLRmyuFrCqLlMn8o/WhGRPT0ArqUF34HWz5c 6Kug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bv1eXHkZ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id s15si6126642ejb.157.2020.12.06.23.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2020 23:15:04 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bv1eXHkZ; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D647F82659; Mon, 7 Dec 2020 08:15:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.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=nxp.com header.i=@nxp.com header.b="bv1eXHkZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A7F308265E; Mon, 7 Dec 2020 08:15:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2062f.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::62f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3F03C8263F for ; Mon, 7 Dec 2020 08:14:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=priyanka.jain@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XWzGrqae648JflLFF5Mg/QGvEoUCg2p2KFKS9yGSXtXoA5OXFV8ADKjPG9hkhHvWGlh1qFXfZBt4rx2xETjVdRTcO98GqfXfSZMgV+omgjvNrEn93IsRz1Lb4J9EVo6F6nWzoEJY+UR+siT0qsMdSn5a2Rg3FAjUUYHVNOkuClcb+FOBHnH67yvX93PloNKipL6yI5z1bDunJM/ulATzZPoidb3683UNK7i/T9zLtHBIz6y3TaUG+z+Lvc8RLnlTT4ZyuUcpPg2KvSuhbx7Ktvd72B5QUrDnTFQuu6Ukz2QyPyIgr0UJU9mHnT+qdoKbCg45zsspfX4tVxKSEDhIlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QDI70IwNIz2VgyZMCbpGFJP2naloOlXWrEA8+xxpI/I=; b=GJwSfQPQQFadblW6Sz+bSG2e/aniqzy5xb7lSnKEp/Swqn16N8yQa1o2zfSr9Bl7L11BGJ9dX+1CEJXxmm2/TkhyU1UyiMlKY8Ce20YV/1BJp/AHUHKlnDeFMP/HS5EtSK1BLtx2tjQRNy9jrtBXjKMcJcn8AO+6WpL6OdrwWufB+VIr40f8D+TzDlOGD3a3KFr74U9+KwRu0RZKaNWA8BOW3aIHQavd6UZ/xlW8NE+Kx5A8p/kS1+8+T/8YHkI1QMZqRUPj5QlNMwbl701cSTAr8XcfLr5WFFJnreFDqBPQkJEjUulUVkU6Xn+DfS/MK6Rcgyqcz073L4ZzkS0gYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QDI70IwNIz2VgyZMCbpGFJP2naloOlXWrEA8+xxpI/I=; b=bv1eXHkZCP4rAqxtDbZdU3WgNeHglv8GUoF9jBgFbuplkyHU8GN7zcDwtCfFWIgs+urSihFF/8vvQbbUkbFMM+qPrcoaRnT8n9B/MXiy9TINn77QMIckYBJ2knFGEUk1BX63lhXlVwYp1mIpkAuJfLIHw10MUWRDd58xmEbH+n0= Authentication-Results: lists.denx.de; dkim=none (message not signed) header.d=none; lists.denx.de; dmarc=none action=none header.from=nxp.com; Received: from VE1PR04MB6494.eurprd04.prod.outlook.com (2603:10a6:803:127::15) by VI1PR04MB5630.eurprd04.prod.outlook.com (2603:10a6:803:e6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Mon, 7 Dec 2020 07:14:56 +0000 Received: from VE1PR04MB6494.eurprd04.prod.outlook.com ([fe80::d111:348:551a:a762]) by VE1PR04MB6494.eurprd04.prod.outlook.com ([fe80::d111:348:551a:a762%5]) with mapi id 15.20.3632.023; Mon, 7 Dec 2020 07:14:56 +0000 From: Priyanka Jain To: u-boot@lists.denx.de Cc: Nikhil Gupta , Priyanka Jain Subject: [PATC 1/2H] board: fsl: ls2088ardb: Program GIC LPI configuration table Date: Mon, 7 Dec 2020 12:44:36 +0530 Message-Id: <20201207071436.22320-1-priyanka.jain@nxp.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [14.142.151.118] X-ClientProxiedBy: SG2PR0601CA0011.apcprd06.prod.outlook.com (2603:1096:3::21) To VE1PR04MB6494.eurprd04.prod.outlook.com (2603:10a6:803:127::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03169.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR0601CA0011.apcprd06.prod.outlook.com (2603:1096:3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Mon, 7 Dec 2020 07:14:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 82970ca7-df0f-4862-ceef-08d89a7fcd26 X-MS-TrafficTypeDiagnostic: VI1PR04MB5630: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2150; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lvq3h6MNxcAZcKRRa4nCPzzzi9pvWO5AjrK4v9Cs/H8PXLpVf2s42sfj9y9ZrQB67LDW5QV8S2lZEJf9dSyngCNSefyFuUqUpWmn596pr8nwwRXKepCQGZex6gOMwFd4yrzWuKmCwSt8aODLGCIPjI3bYL3PxVIM1oeSLVTZnP54JWKG2T3TJB4jlvAt70Zrk1wJ1tZM4ai2qCzHSqmCUh4lrZHjUB8m+xlIb+/NbYHXGqXvfat6nq+cgGTBsehPwjDtKvd2vUI3EL6spWMqNW5q4hA3ID5H9jaWAAdIIGkN2dNjVP8pFpPzxzEmoi8drILtcc9oHgA74tkVzzyFZIfgk3+SMI5BadtM+eOWgUAbTVGesi0yThZYl+gkQ0gq X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6494.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(346002)(39860400002)(376002)(52116002)(55236004)(8676002)(2906002)(26005)(8936002)(36756003)(316002)(83380400001)(186003)(6916009)(16526019)(478600001)(1006002)(6486002)(5660300002)(956004)(1076003)(54906003)(44832011)(6666004)(2616005)(66556008)(7696005)(66946007)(86362001)(4326008)(66476007)(110426006); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: otN08JtbweDIk+z9i8xaTYoMmrowJhu1HDZt3FVs9fbLPnB8chhj7I3mDpi3ghzhQXsa6GuMpBTNznwoo/7kSPKJ4zbWem7dlN/Fx6ADrJDEw1wJuVimJS+E8Ux2j9FTmCSQeccGrktHRcBxaIAywFZwnfZxpF8Wl9lu/R2EOYUd1Xv+w4hJ2v38nd6buUEkUKfDQH+sRZFr6Wd/LaK0B2kFuNinV8F8J1foIfwSyNdD6rAW/gmanlLMzh38JitAWjJsKRljkt+iKqKMHD+gBOCg6w58GuLh+q9/h8Y9u5nwZVgOV15ZYF0+G60zrAAdeJvCYGcd8AE9yX2i1BZjVnA7vDkLRnq95BOOBc4WHD7iZSh9y3qlvf3K6QwgPKb+r97S0QTe5ZYHxde8Lxlx2dmSbfNuEibu5bEqxo/SGWCtVIzLCmimxTQOo2wPuLm4/i/LhbQoCcBReRQK8lsRongB+J/UgVOhCUfZfLflWSUSg/uJpVRRidJBLh66ufx7j74vM8eoYuZ/xcUfuJzgGhcCHqP9czavVA6WnDZLfuHGKTLQRFFUShj+VGWjj5Hv29VkDCGpm6jR8kXXczo8B/MWe+gpdDNCdl19NWhW0nKfLRA96Y9FGddJ9LcOulOfXzRwRPP8OJbVY+KhXdsE6QoX698sztP7imdeMQev7KAMUwMUbfI3w0wBxNF/lkHyP6zn3ig8jC0SAXvXIhwFes0Yg0HFGsODIDBnt0N0mZwZrlG5PBocSL06SPW83qDikndWNo7vx4YY41rmE/9oH1SJtg+iJgR/Nj21zxVJvQtl8LQdcHdqYBtBbRICUdaEqQTOi/t9lpM4YxfuoiIoDKZaTbYPTJakYwnJ0CmoQ0hkFgWIO5Oky7fZKBsyiFLya3z4+2ZVMj+W6vSLpRiitpQhJYnyYiqzN/0x/XcL7VyTril5jIeS95AiuqeqJtYhZ1ZXaZJENMJKGtx+WGqzY6lgA3hjMew0VEhKfCXQS82GMPbeu/P3pvwymgY6F37X X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82970ca7-df0f-4862-ceef-08d89a7fcd26 X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6494.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2020 07:14:56.8260 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7JAc+byBQHKJu3ZCc9ixG01nzJ2ZbzJZxf0cotyh9420xFIteodQ9l+3iRZlMM/tHP7aVREwn/BH9JhRgscEYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5630 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 From: Nikhil Gupta Add programming of GIC LPI configuration table: 1. Program Redistributor PROCBASER configuration table which is common for all redistributors. 2. Program Redistributor pending table (PENDBASER), for all the available redistributors. 3. Reserve DDR memory region used for GIC LPI configuration table. Signed-off-by: Nikhil Gupta Signed-off-by: Priyanka Jain --- board/freescale/ls2080ardb/ls2080ardb.c | 27 ++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c index c7e9c1dacf..1c54bac529 100644 --- a/board/freescale/ls2080ardb/ls2080ardb.c +++ b/board/freescale/ls2080ardb/ls2080ardb.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2015 Freescale Semiconductor - * Copyright 2017 NXP + * Copyright 2017-2020 NXP */ #include #include @@ -24,7 +24,10 @@ #include #include #include +#include +#include +#define GIC_LPI_SIZE 0x200000 #ifdef CONFIG_FSL_QIXIS #include "../common/qixis.h" #include "ls2080ardb_qixis.h" @@ -352,6 +355,21 @@ void board_quiesce_devices(void) } #endif +#ifdef CONFIG_GIC_V3_ITS +void fdt_fixup_gic_lpi_memory(void *blob, u64 gic_lpi_base) +{ + u32 phandle; + int err; + struct fdt_memory gic_lpi; + + gic_lpi.start = gic_lpi_base; + gic_lpi.end = gic_lpi_base + GIC_LPI_SIZE - 1; + err = fdtdec_add_reserved_memory(blob, "gic-lpi", &gic_lpi, &phandle); + if (err < 0) + debug("failed to add reserved memory: %d\n", err); +} +#endif + #ifdef CONFIG_OF_BOARD_SETUP void fsl_fdt_fixup_flash(void *fdt) { @@ -426,6 +444,7 @@ int ft_board_setup(void *blob, struct bd_info *bd) u64 mc_memory_base = 0; u64 mc_memory_size = 0; u16 total_memory_banks; + u64 gic_lpi_base; ft_cpu_setup(blob, bd); @@ -445,6 +464,12 @@ int ft_board_setup(void *blob, struct bd_info *bd) base[1] = gd->bd->bi_dram[1].start; size[1] = gd->bd->bi_dram[1].size; +#ifdef CONFIG_GIC_V3_ITS + gic_lpi_base = gd->arch.resv_ram - GIC_LPI_SIZE; + gic_lpi_tables_init(gic_lpi_base, cpu_numcores()); + fdt_fixup_gic_lpi_memory(blob, gic_lpi_base); +#endif + #ifdef CONFIG_RESV_RAM /* reduce size if reserved memory is within this bank */ if (gd->arch.resv_ram >= base[0] &&