aboutsummaryrefslogtreecommitdiff
path: root/drivers/ram/bmips_ram.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-08-08 20:02:39 -0400
committerTom Rini <trini@konsulko.com>2018-08-08 20:02:39 -0400
commit9d17682a57bcc290a2584d81a47537aa0b6b17c1 (patch)
tree6e2a721fe4a95eabe38fc0ebe579d95e8313fb11 /drivers/ram/bmips_ram.c
parente96647156235844adfcf112a010c6c652e6985e1 (diff)
parent990cebf0a2c2e4dd9033c56acf7b1404a0c0f698 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-mips
Diffstat (limited to 'drivers/ram/bmips_ram.c')
-rw-r--r--drivers/ram/bmips_ram.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c
index cc37dfa08c..b5f19c983c 100644
--- a/drivers/ram/bmips_ram.c
+++ b/drivers/ram/bmips_ram.c
@@ -43,6 +43,7 @@ struct bmips_ram_hw {
struct bmips_ram_priv {
void __iomem *regs;
+ u32 force_size;
const struct bmips_ram_hw *hw;
};
@@ -104,7 +105,10 @@ static int bmips_ram_get_info(struct udevice *dev, struct ram_info *info)
const struct bmips_ram_hw *hw = priv->hw;
info->base = 0x80000000;
- info->size = hw->get_ram_size(priv);
+ if (priv->force_size)
+ info->size = priv->force_size;
+ else
+ info->size = hw->get_ram_size(priv);
return 0;
}
@@ -155,6 +159,8 @@ static int bmips_ram_probe(struct udevice *dev)
if (!priv->regs)
return -EINVAL;
+ dev_read_u32(dev, "force-size", &priv->force_size);
+
priv->hw = hw;
return 0;