From patchwork Fri Oct 23 07:42:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1386552 X-Patchwork-Delegate: monstr@monstr.eu 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=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=X5GBufYV; 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 4CHbmv6lpxz9sRk for ; Fri, 23 Oct 2020 18:42:55 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6EC8982468; Fri, 23 Oct 2020 09:42:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="X5GBufYV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C5CD82457; Fri, 23 Oct 2020 09:42:36 +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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (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 C7DCD8244B for ; Fri, 23 Oct 2020 09:42:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ed1-x543.google.com with SMTP id dg9so597396edb.12 for ; Fri, 23 Oct 2020 00:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=69YSRF82PgPJw/EQj88KH0UdzZlvxL13uLmLfX5f6Mk=; b=X5GBufYV9ZrTzIZydkOWaKLngoKfQ45yCBZubY8R5B3bZYlFvzaTk7qCUWEc80/I/g +CxktKcd2kByGj5RH2iQu4ZsEufQWcC/p7tqauDrikbBUV7vtaNtpwXwU6W05mYMFZ/z komgq64UQqC5vsoLLU9fjuEXRDHCTpS2Tbm477WtXquXrJCSpTLvfGzVHQ52xrTbzljB frTDwK1P2gT+Movtu+6FKmvyBd7dUmsipi+zGJZBz6jPsZ/0qFQea4jPQOErgeZvz9Su X8jVQ6GJn3+7I0vehhsgApXkn426loV/jXBGqEaDWEyAbpDgOansWwJ+WWNTPD8zVTzp qceA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=69YSRF82PgPJw/EQj88KH0UdzZlvxL13uLmLfX5f6Mk=; b=CNkPAuSfjNR2J6QT+qlIRGxtj0DR+mNULo5nU8A2dy/JTrB/3Ay3wNrdZ9O4TZLUnw cV2mhKOXe+yRaMZTeQ8ZHfvsk6ZdRTqqT57eds5c9pyXrpNkF2yhtg3l4usp3qPZMpHl uLKb0tRSBfi91uZYFsAjQA1Kd4wc+4J/M4SHNvayQGvqIeC13xPuseQ8kkI9ua4QnPnF fNwrhyzFnW6VJjAq/p0KBqYizzD1TdEqR9LCGLulfui2Z9MEJnXuUaSj0TeBHHKGdiCR rpVthHpGSRv/nExjDbJ94DNK8o2fnuvtEk1lqKANo274gZqYBZpia7vrWn7QpiM7e9iy qCbQ== X-Gm-Message-State: AOAM530VnrVDGGcW+M0spB6KZvc5NyhrXWicZdcVEYOFgKMkxbczg7Y1 73DcywHtWDTbYt2uHcF6otQM7ukDvOJdAwjR X-Google-Smtp-Source: ABdhPJxHDhQZ7LRYo7Ng4kHadFyPG2+mZs3sbjAjFsUg0zUtEFf4xNfLbveVgjUocBWA3ypCWJ2bOw== X-Received: by 2002:a05:6402:a4f:: with SMTP id bt15mr969873edb.345.1603438953176; Fri, 23 Oct 2020 00:42:33 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id qp17sm332262ejb.111.2020.10.23.00.42.32 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Oct 2020 00:42:32 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com, Tom Rini Subject: [PATCH 1/2] microblaze: Wire generic xilinx board_late_init_xilinx() Date: Fri, 23 Oct 2020 09:42:28 +0200 Message-Id: <8ee0b261508284c4770e54c36519fbd9d09eed55.1603438947.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: MIME-Version: 1.0 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 Call generic board_late_init_xilinx() to be aligned with the rest of xilinx platforms. Also getting rid of initrd_high/fdt_high and use bootm_low/boot_size instead. Reported-by: Tom Rini Signed-off-by: Michal Simek --- board/xilinx/common/board.c | 4 ++-- .../microblaze-generic/microblaze-generic.c | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 857a66a50407..bcdd3ae4f14a 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -373,7 +373,7 @@ int board_late_init_xilinx(void) phys_size_t bootm_size = gd->ram_size; struct bd_info *bd = gd->bd; - if (bd->bi_dram[0].start) { + if (!CONFIG_IS_ENABLED(MICROBLAZE) && bd->bi_dram[0].start) { ulong scriptaddr; scriptaddr = env_get_hex("scriptaddr", 0); @@ -381,7 +381,7 @@ int board_late_init_xilinx(void) bd->bi_dram[0].start + scriptaddr); } - if (CONFIG_IS_ENABLED(ARCH_ZYNQ)) + if (CONFIG_IS_ENABLED(ARCH_ZYNQ) || CONFIG_IS_ENABLED(MICROBLAZE)) bootm_size = min(bootm_size, (phys_size_t)(SZ_512M + SZ_256M)); ret |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index c1ae8fbfe742..e5909997690a 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -18,6 +18,7 @@ #include #include #include +#include "../common/board.h" DECLARE_GLOBAL_DATA_PTR; @@ -36,7 +37,7 @@ int dram_init(void) int board_late_init(void) { - ulong max_size, lowmem_size; + ulong max_size; u32 status = 0; #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYSRESET_MICROBLAZE) @@ -56,14 +57,6 @@ int board_late_init(void) max_size = gd->start_addr_sp - CONFIG_STACK_SIZE; max_size = round_down(max_size, SZ_16M); - /* Linux default LOWMEM_SIZE is 0x30000000 = 768MB */ - lowmem_size = gd->ram_base + 768 * 1024 * 1024; - - status |= env_set_addr("initrd_high", (void *)min_t(ulong, max_size, - lowmem_size)); - status |= env_set_addr("fdt_high", (void *)min_t(ulong, max_size, - lowmem_size)); - status |= env_set_hex("scriptaddr", max_size + SZ_2M); status |= env_set_hex("pxefile_addr_r", max_size + SZ_1M); @@ -75,10 +68,8 @@ int board_late_init(void) status |= env_set_hex("ramdisk_addr_r", gd->ram_base + SZ_32M + SZ_4M + SZ_2M); - status |= env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET); - if (status) printf("%s: Saving run time variables FAILED\n", __func__); - return 0; + return board_late_init_xilinx(); }