[PATCH][02/03] nandsim default values in Kconfig

Thomas Gleixner tglx at linutronix.de
Tue May 24 09:42:40 EDT 2005


Hi Patrik,

On Mon, 2005-05-23 at 09:40 +0200, Kluba Patrik wrote:
> Nandsim uses several module parameters for specifying what chip to simulate. 
> Some default values are in the source itself. It's much convenient to have them 
> in Kconfig so you don't need to specify module parameters every time you load 
> it.

I'm not too happy to add two dozen config options for a driver which is
used for development and research only. 

If you want to experiment with various chip types, parameters... it
makes not much sense to me to compile the settings into the module. 

I'd prefer to have them available as module parameters, so I can change
the settings without recompiling on module load.

> With this patch you can easily construct a NAND geometry for nandsim from within 
> Kconfig. The main purpose is to make testing on large page chips possible on 
> low-memory systems like mine (eg. test on a 256Mbit chip with large pages) or 

Can be solved by module parameters too. You even can use the id of e.g.
a 16GiB chip. Simply limit the max. memory allocation for that chip and
declare all blocks which exceed the available memory as bad blocks so
nothing will ever access them. You can also use partitions for that
purpose.

> test on a chip you do not have and don't know the ID values for it 

If you do not have chip ID's handy, then simply supply the device size,
page size, buswidth and let nandsim scan the id table for a matching
chip. 

To create a new chip id with handcrafted parameters you can even change
a table entry from nandsim.

As I said yesterday I prefer to have such things nicely hidden in the
nandsim module which should have sane default values for the module so
the average Joe User does not run into trouble.

Having those config switches around provokes wrong assumptions about the
real world usage of the nand driver subsystem. It's scary enough to
imagine them, I dont want to read them :)

tglx






More information about the linux-mtd mailing list