[PATCH 1/4 v2] mtd: physmap_of: Add multiple regions and concatenation support
Grant Likely
grant.likely at secretlab.ca
Sun Apr 12 01:58:09 EDT 2009
On Tue, Apr 7, 2009 at 2:39 AM, Stefan Roese <sr at denx.de> wrote:
> This patch adds support to handle multiple non-identical chips in one
> flash device tree node. It also adds concat support to physmap_of. This
> makes it possible to support e.g. the Intel P30 48F4400 chips which
> internally consists of 2 non-identical NOR chips on one die. Additionally
> partitions now can span over multiple chips.
>
[...]
> Signed-off-by: Stefan Roese <sr at denx.de>
> CC: Grant Likely <grant.likely at secretlab.ca>
Looks good to me. To comments below, but neither are enough to hold back my:
Reviewd-by: Grant Likely <grant.likely at secretlab.ca>
However, I have not tested this. I'd like to hear of some larger
field testing before it is merged.
g.
> + reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * 4;
Ideally s/4/sizeof(u32)/, but not a huge deal.
> + info = kzalloc(sizeof(struct of_flash) +
> + sizeof(struct of_flash_list) * count, GFP_KERNEL);
> + if (!info)
> + goto err_out;
> +
> + mtd_list = kzalloc(sizeof(struct mtd_info) * count, GFP_KERNEL);
Typically I prefer to see a single kzalloc in a driver which allocates
all the space needed in one go because it simplifies the error/unwind
path.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the linux-mtd
mailing list