From patchwork Thu Aug 17 07:17:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 9905119 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1F76E60386 for ; Thu, 17 Aug 2017 07:20:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11EF028A77 for ; Thu, 17 Aug 2017 07:20:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06A0B28ABF; Thu, 17 Aug 2017 07:20:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,URIBL_SBL autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E2B228A77 for ; Thu, 17 Aug 2017 07:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lQUrQYfaNn7l18C1qpL4O2k9Z+Juok6cJhhYVoC6GWM=; b=AMqVSCNRroWP1LLjGd8h86FvTf LmXOYNG1zGkIMK7eQbd0PEVnzzUGkdenMprxNMbTYF7IgTLL+eEPxWjtMui7hQOD4d0NBA40Jf7gT KYEvujc8LDgCpurotWcpzE0OIw3C3h5tGph1zIeEIE7ofh0nqRh7hQoNw3/roKBus4H17Ii9ETLPz LLMUhmRL2vMRcLw9t9EOLtZBY/0Add0zaJ8XeRJluel1ddFiyAgWd1h8apM5l3ktwBer8B5lOHM9y q2IAEqecXSOBHj2gOykP5J7Y8F6n1/XRmpuFNl0LkvQdSuq+oYAo1Qg1l9wge0EIOultah/P2utxp 6KD+dg7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1diF6W-0003GB-Ur; Thu, 17 Aug 2017 07:20:32 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1diF6U-0003Fa-QQ for linux-rockchip@bombadil.infradead.org; Thu, 17 Aug 2017 07:20:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nQLKkSxbjQJ6QZqIgxronxGcTg+KcQwtf2VgLPCenoM=; b=LwpxWgvRP0+0xyV9k5BDOZ4Pn d+IQ1fgMP8Xn5dCAZZhP0Wsi9rezmPYKADEiadbJdzu3p151nBAumjr40SVIrsc2QTkSHHb7EbSX6 a0D7OYfKaXQm/HF7Q1pqoIEH0/ozheu8RM4otK92PNrd7zZqaF1hmMkORg+v2Bnk2752wbccczgxw MX0Yr9W5cSjzk4qFPPdCtvcVHQg7sVod/pNjMf953E9FQeGIW7cdCUikkHO8lfPw1wxkP+BgTevP1 wPAbb44I5GWDEB+Umh7SaULm5rx6m4m/Lo4xHymQAWmJlzw8GAQfPWIQ8MsvCSHbb7oRDiIC7aIHm yRppRgU4g==; Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1diF4K-0003CG-7k for linux-rockchip@lists.infradead.org; Thu, 17 Aug 2017 07:18:17 +0000 Received: by mail-pg0-x244.google.com with SMTP id y192so8471807pgd.1 for ; Thu, 17 Aug 2017 00:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=nQLKkSxbjQJ6QZqIgxronxGcTg+KcQwtf2VgLPCenoM=; b=es5fbSsfdCq5UfxmgWuIk2QUHMjuRUxd+5vxvnAZvzwFbbwjPi3TJu3ZX9EbptptkU p4dQnn1LT8zuhCj49eMBfSC0x9BLXSOh9s1IWnsAZFovq4r9bYZs6yHu+tOB3vdoyA0u fKDJT1uKBsdlx1aVRWyI2Dj32zj4C3HdvllWxBOM6eHqHAABR5bX38qNHGdtRdp0xfzo /qbLMUQwkcLOC+zJPZDLX4U1UKAbObF2APqe2SLpRXt92XUcC5Nfm+okpIKH+TGHfiIg L0ZLFxVWgbEmVNRUrJduRgYDgZ481BYi0JgnqJ84+F3q7jkqP4gwlr8eMQ30ZAsXJqsR oJNQ== 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:cc:subject:date:message-id :in-reply-to:references; bh=nQLKkSxbjQJ6QZqIgxronxGcTg+KcQwtf2VgLPCenoM=; b=EKmpsSoONHDcu3oykq1JZXzAImT3mBfHAXaJp5U46FsU0wK/KqOrGcDWOre57JynI+ cjQM05RdZRNdmxnVpvXltBNcJ+CWdTfkvJdmSpWSAnCvuhY8wcDdE92J9S7sU+URsWlc hXaY0ftyXKRQA5dEjdBHCh9zVDEGrlHE+DU1J+Xr3JghpjDSWuHIg6RrzXM3hy8uB5HQ DwyJf3K+sbcXbyKvIPyn95l/2rkHfW3mxlIDg4jmV1ut9jl9WfnQ41aNg8UL+OypQmQ/ fEnDARmLKWJVfsREpoXUV6a6vziraKsQodqg6Npd3a5dLSttp8O7qES2hM+cmR2Bl1Nq J3RA== X-Gm-Message-State: AHYfb5joiWmf/IAykW1WPAa2ftW8xAWBtmko+94zQFf0OY6DInAnHZ6L inophmzWBCYaxMAb X-Received: by 10.99.109.77 with SMTP id i74mr4340681pgc.438.1502954270965; Thu, 17 Aug 2017 00:17:50 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id x29sm6100293pff.2.2017.08.17.00.17.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Aug 2017 00:17:50 -0700 (PDT) From: Kever Yang To: heiko@sntech.de Subject: [PATCH v2 1/5] rockchip: rk322x: update dram bank size Date: Thu, 17 Aug 2017 15:17:33 +0800 Message-Id: <1502954257-7256-2-git-send-email-kever.yang@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502954257-7256-1-git-send-email-kever.yang@rock-chips.com> References: <1502954257-7256-1-git-send-email-kever.yang@rock-chips.com> X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Albert Aribaud , u-boot@lists.denx.de, Simon Glass , Kever Yang , linux-rockchip@lists.infradead.org, Philipp Tomsich MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The DRAM start address is not 0, so need to update the last bank size as: DRAM start addr + DRAM_SIZE - last bank start addr Signed-off-by: Kever Yang Acked-by: Philipp Tomsich Reviewed-by: Philipp Tomsich Reviewed-by: Simon Glass --- Changes in v2: None arch/arm/mach-rockchip/rk322x-board.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c index b6543a5..f93bd33 100644 --- a/arch/arm/mach-rockchip/rk322x-board.c +++ b/arch/arm/mach-rockchip/rk322x-board.c @@ -72,11 +72,13 @@ int board_init(void) int dram_init_banksize(void) { - /* Reserve 0x200000 for OPTEE */ - gd->bd->bi_dram[0].start = 0x60000000; + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = 0x8400000; - gd->bd->bi_dram[1].start = 0x6a400000; - gd->bd->bi_dram[1].size = gd->ram_size - gd->bd->bi_dram[1].start; + /* Reserve 14M for OPTEE and TA */ + gd->bd->bi_dram[1].start = CONFIG_SYS_SDRAM_BASE + + gd->bd->bi_dram[0].size + 0xe00000; + gd->bd->bi_dram[1].size = gd->bd->bi_dram[0].start + + gd->ram_size - gd->bd->bi_dram[1].start; return 0; }