public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marty E. Plummer <hanetzer@startmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] rockchip: fix incorrect detection of ram size
Date: Thu, 13 Sep 2018 16:55:32 -0500	[thread overview]
Message-ID: <20180913215532.30347-2-hanetzer@startmail.com> (raw)
In-Reply-To: <20180913215532.30347-1-hanetzer@startmail.com>

Taken from coreboot's src/soc/rockchip/rk3288/sdram.c

Without this change, my u-boot build for the asus c201 chromebook (4GiB)
is incorrectly detected as 0 Bytes of ram.

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
---
 arch/arm/mach-rockchip/sdram_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-rockchip/sdram_common.c b/arch/arm/mach-rockchip/sdram_common.c
index 650d53e4d9..194dc74b9f 100644
--- a/arch/arm/mach-rockchip/sdram_common.c
+++ b/arch/arm/mach-rockchip/sdram_common.c
@@ -48,6 +48,8 @@ size_t rockchip_sdram_size(phys_addr_t reg)
 		      rank, col, bk, cs0_row, bw, row_3_4);
 	}
 
+	size_mb = min(size_mb, SDRAM_MAX_SIZE/SZ_1M);
+
 	return (size_t)size_mb << 20;
 }
 
-- 
2.18.0

  reply	other threads:[~2018-09-13 21:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 21:55 [U-Boot] [PATCH v2 1/2] rockchip: add support for veyron-speedy (ASUS Chromebook C201) Marty E. Plummer
2018-09-13 21:55 ` Marty E. Plummer [this message]
2018-09-14 10:55   ` [U-Boot] [PATCH v2 2/2] rockchip: fix incorrect detection of ram size Simon Glass
2018-09-14 18:33     ` Marty E. Plummer
2018-11-14 23:37   ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
2018-11-15 14:05   ` [U-Boot] [PATCH v2 " Philipp Tomsich
2018-11-30 21:05   ` [U-Boot] [U-Boot, v2, " Philipp Tomsich
2018-11-30 21:08     ` Philipp Tomsich
2019-01-06  0:55       ` Marty E. Plummer
2019-01-06  2:12       ` [U-Boot] [PATCH v3] rockchip: add support for veyron-speedy (ASUS Chromebook C201) Marty E. Plummer
2019-01-31 10:15         ` [U-Boot] [U-Boot, " Philipp Tomsich
2019-01-31 21:12         ` Philipp Tomsich
2018-09-14 10:55 ` [U-Boot] [PATCH v2 1/2] " Simon Glass
2018-09-14 18:33   ` Marty E. Plummer
2018-11-13 19:58 ` [U-Boot] [U-Boot, v2, " Vagrant Cascadian
2018-11-13 21:35   ` Simon Glass
2018-11-24 15:01     ` Marty E. Plummer
2018-11-14 23:37 ` Philipp Tomsich
2018-11-30 21:05 ` Philipp Tomsich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180913215532.30347-2-hanetzer@startmail.com \
    --to=hanetzer@startmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox