[PATCH] Do not oops when configured flash size is less then chip size

Leon Woestenberg leon.woestenberg at gmail.com
Fri May 12 18:40:32 EDT 2006


Hello all,

On 5/12/06, David Woodhouse <dwmw2 at infradead.org> wrote:
> On Thu, 2006-05-11 at 16:52 +0100, David Vrabel wrote:
> > This sounds like a valid, if unlikely, board configuration.  e.g., a
> > board with chips fitted that are larger than the chip-select memory
> > window.
>
> An alternative plan is to (warn and) artificially reduce mtd->size so
> that it fits in the map. That way, you at least get to use the region of
> the flash that you can address.
>
Thanks for reviewing my problem description and patch.

I did indeed try a few things to make this automagically work, but
then decided that this clashed with the definition of the 'fixed flash
size configuration' in the kernel configuration.
(And I am not familiar enough with the MTD code to just twiddle with
variables of which I have no idea about subtle assumptions and/or
interdependencies within MTD.)

Instead, I think just warning the user properly is the best solution.

Regards,

Leon.




More information about the linux-mtd mailing list