Message ID | 20200427105207.5659-30-rayagonda.kokatanur@broadcom.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) 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=UKZ6gb6c; 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 499kWG33j9z9sSc for <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2020 22:25:14 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 91B0F81E4F; Mon, 27 Apr 2020 14:19:58 +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="UKZ6gb6c"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0007081E1A; Mon, 27 Apr 2020 13:01:03 +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-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (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 645DC81E0A for <u-boot@lists.denx.de>; Mon, 27 Apr 2020 13:01:00 +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-pg1-x541.google.com with SMTP id d17so8553536pgo.0 for <u-boot@lists.denx.de>; Mon, 27 Apr 2020 04:01:00 -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=8XuCotwaSM6/b37oXwc31bYiVTnJXbthxLTVsbSFrvo=; b=UKZ6gb6cIvn+/3IfvRM9mMQntKnxxS4Nh2eiWJsi4ZUZaqqzWkrwScenaqC2fQ0y3f W5ZYcEmfMpMpe/6FjeeCOIK08mhdXVWxxTGo+fqsoocWjf9kRiW2CmCiNGJjgt5InTo6 G00ZSFtjoDlyP8agNVSr4FaTZVxHuCSH8vrR8= 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=8XuCotwaSM6/b37oXwc31bYiVTnJXbthxLTVsbSFrvo=; b=OyP0jYPUib3lFOjxh/jNYH56qkKhBcqiUyZiPkU4wy1OAnPNmlJjOJZ1l/f/Ji1YEe Fl+xG7JDEGIDz883LF4gLlb2JyVsyicqY8gHVOneoYASS8ptDv+a4WWpi+oxziegGvru FMs+q2UbzIzMZFv3sWgLCP/G0NDl89zsdK4gcqcKO9LgnSxBScf1IO9apsF0cAviJve+ fkaf+oNEuQrgq1eyGnaLaG2auBigD+QSeyAgSlQgZGCrSr/AqNrsYDC5+EYpXB+rj/6z pdBkZX55lKmW9zH84nJ9qC6aq5WBW+D8KPcTdb5jZhPlP7jmOPVjsoj2QumpnaVkXlsS ZY5Q== X-Gm-Message-State: AGi0PuZBT0jNP4W0tgMym1D/6cEWE1sdV00Cx1WWZXCEPjxVGz2vDOhD kxLN6Si3nMGWb8VkKJ2EGyzFkH1YTmnKrAf0A8xXWlIk9XUSTRvTbhzBQc3fdl7bq6GOiUPhdeC 8d9f4BF6jaFxTB9aYF8lDEgikPiXTaD7mNhY0S830Tnvb7flqTS4MWfLCDnEEFVO3V0+TcFVLSz /oU0gOnFn/ X-Google-Smtp-Source: APiQypJc/wRySWacFS0aEuLPSIVP/FypVtpkOtPKX8ULRsVrvdJzXDp4g7SPFIQ1m9sILl53HwYPAw== X-Received: by 2002:a62:6dc3:: with SMTP id i186mr22266093pfc.273.1587985257759; Mon, 27 Apr 2020 04:00:57 -0700 (PDT) Received: from rayagonda.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id u3sm11996430pfn.217.2020.04.27.04.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 04:00:57 -0700 (PDT) From: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> To: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>, Kever Yang <kever.yang@rock-chips.com>, Michal Simek <michal.simek@xilinx.com>, Jagan Teki <jagan@amarulasolutions.com>, Marek Vasut <marex@denx.de>, Fabio Estevam <festevam@gmail.com>, Baruch Siach <baruch@tkos.co.il>, Troy Kisky <troy.kisky@boundarydevices.com>, Josip Kelecic <josip.kelecic@sartura.hr>, Priyanka Jain <priyanka.jain@nxp.com>, Biwen Li <biwen.li@nxp.com>, Jason Li <jason.li@cortina-access.com>, Philippe Reynes <philippe.reynes@softathome.com>, Eddie James <eajames@linux.ibm.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Sam Protsenko <joe.skb7@gmail.com>, Lukasz Majewski <lukma@denx.de>, Miquel Raynal <miquel.raynal@bootlin.com>, Ramon Fried <rfried.dev@gmail.com>, Anup Patel <Anup.Patel@wdc.com>, AKASHI Takahiro <takahiro.akashi@linaro.org>, Patrice Chotard <patrice.chotard@st.com>, Eugeniu Rosca <roscaeugeniu@gmail.com>, Joe Hershberger <joe.hershberger@ni.com>, Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>, Boris Brezillon <bbrezillon@kernel.org>, Simon South <simon@simonsouth.net>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Marek Bykowski <marek.bykowski@gmail.com>, Lokesh Vutla <lokeshvutla@ti.com>, Patrick Delaunay <patrick.delaunay@st.com>, Rajesh Ravi <rajesh.ravi@broadcom.com>, Abhishek Shah <abhishek.shah@broadcom.com>, Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>, Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>, Srinath Mannam <srinath.mannam@broadcom.com>, Pramod Kumar <pramod.kumar_1@nxp.com>, Ray Jui <ray.jui@broadcom.com>, Vikas Gupta <vikas.gupta@broadcom.com>, Trac Hoang <trac.hoang@broadcom.com>, Corneliu Doban <cdoban@broadcom.com>, Sheetal Tigadoli <sheetal.tigadoli@broadcom.com> Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Subject: [PATCH v1 29/49] board: ns3: limit U-boot relocation within 16MB memory Date: Mon, 27 Apr 2020 16:21:47 +0530 Message-Id: <20200427105207.5659-30-rayagonda.kokatanur@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200427105207.5659-1-rayagonda.kokatanur@broadcom.com> References: <20200427105207.5659-1-rayagonda.kokatanur@broadcom.com> X-Mailman-Approved-At: Mon, 27 Apr 2020 14:18:25 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
add support for broadcom NS3 soc
|
expand
|
diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c index c4e36a61d2..e8f1d1b199 100644 --- a/board/broadcom/bcmns3/ns3.c +++ b/board/broadcom/bcmns3/ns3.c @@ -124,6 +124,11 @@ static void mem_info_parse_fixup(void *fdt) int board_init(void) { + /* Setup memory using "memory" node from DTB */ + if (fdtdec_setup_mem_size_base() != 0) + return -EINVAL; + fdtdec_setup_memory_banksize(); + if (bl33_info->version != BL33_INFO_VERSION) printf("*** warning: ATF BL31 and u-boot not in sync! ***\n"); @@ -144,19 +149,30 @@ int board_late_init(void) int dram_init(void) { - if (fdtdec_setup_mem_size_base() != 0) - return -EINVAL; + /* + * Mark ram base as the last 16MB of 2GB DDR, which is 0xFF00_0000. + * So that relocation happens with in the last 16MB memory. + */ + gd->ram_base = (phys_size_t)(BCM_NS3_MEM_END - SZ_16M); + gd->ram_size = (unsigned long)SZ_16M; return 0; } int dram_init_banksize(void) { - fdtdec_setup_memory_banksize(); + gd->bd->bi_dram[0].start = (BCM_NS3_MEM_END - SZ_16M); + gd->bd->bi_dram[0].size = SZ_16M; return 0; } +/* Limit RAM used by U-Boot to the DDR first bank End region */ +ulong board_get_usable_ram_top(ulong total_size) +{ + return BCM_NS3_MEM_END; +} + void reset_cpu(ulong level) { #define L3_RESET 30