This adds an option to force the size of the ram, and
avoid the detection of ram size.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
struct bmips_ram_priv {
void __iomem *regs;
+ u32 force_size;
const struct bmips_ram_hw *hw;
};
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;
}
if (!priv->regs)
return -EINVAL;
+ dev_read_u32(dev, "force-size", &priv->force_size);
+
priv->hw = hw;
return 0;