Hervé Fache b2a2a84d35 mtd: phram: dot not crash when built-in and passing boot param
This patch is based on Ville Herva's similar patch to block2mtd.

Trying to pass a parameter through the kernel command line when built-in would
crash the kernel, as phram_setup() was called so early that kmalloc() was not
functional yet.

This patch only saves the parameter string at the early boot stage, and parses
it later when init_phram() is called. The same happens in both module and
built-in cases.

With this patch, I can boot with a statically-compiled phram, and mount a
ext2 root fs from physical RAM, without the need for a initrd.

This has been tested in built-in and module cases, with and without a
parameter string.

Artem: amended comments a bit

Signed-off-by: Hervé Fache <h-fache@ti.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:57:11 +01:00
..
2012-03-27 00:53:20 +01:00
2012-03-27 00:29:11 +01:00
2012-01-09 18:25:19 +00:00
2012-01-09 18:25:19 +00:00
2012-01-09 18:26:21 +00:00
2011-09-11 15:02:13 +03:00
2012-03-27 00:23:53 +01:00
2012-03-27 00:56:46 +01:00
2011-09-11 15:02:14 +03:00
2012-03-27 00:24:14 +01:00
2012-01-09 18:26:21 +00:00
2012-01-09 18:26:08 +00:00