[PATCH 05/17] mtd: nand_mrvl_nfc: Remove keep_config

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Fri Oct 9 12:32:43 PDT 2015


On 09.10.2015 21:16, Robert Jarzmik wrote:
> Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com> writes:
>
>> keep_config and it's corresponding DT property is meant for the
>> Linux kernel to keep the config setup by a boot-loader. As we
>> are the bootloader and it is not used at all, get rid of it.
>
> NAK on this one.
> We're the "secondary bootloader". The first code running is the pxa3xx ROM code,
> which initialized the NAND, read the OBMI, then read barebox, and transfered
> control.

Well, you are right with the secondary bootloader, but I doubt that
BootROM will _always_ have the optimal timings set but rather the
most conservative.

Also, as we are reusing the dts files that were made for Linux, it
may prevent barebox to pick more optimized settings.

Anyway, I am fine with keeping the keep-config parsing and remove
the property on some boards with using the barebox's dts overlays.

> It can be assumed that for stacked NAND, the ROM code's timings are more
> accurate than the generic ones, hence keep_config.

There is more issues here: Currently the binding of the nand
_controller_ also contains properties of the nand _device_, e.g.
mtd partitions are direct sub-nodes of the controller.

For the long run, i.e. including Linux rework, we should have
nand device sub-nodes, e.g.

nfc: nand at foo {
	compatible = "marvell,armada-370-nand";
	reg = <foo bar>;
	#address-cells = <1>;
	#size-cells = <0>;
	num-cs = <2>;

	flash at 0 {
		reg = <0>; /* reg == CSn line */

		ecc-strength = <bla>;
		...

		partition at 0 { ... };
	};

	flash at 1 {
		reg = <1>;
		...
	};
};

Sebastian



More information about the barebox mailing list