提交 25485584 编写于 作者: M Michal Simek 提交者: Grant Likely

of: MTD: Fix OF probing on little-endian systems

Convert big-endian DTB to little-endian if necessary.
Signed-off-by: NMichal Simek <monstr@monstr.eu>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 a04e78b8
......@@ -294,7 +294,7 @@ static int __devinit of_flash_probe(struct platform_device *dev,
info->list[i].map.name = dev_name(&dev->dev);
info->list[i].map.phys = res.start;
info->list[i].map.size = res_size;
info->list[i].map.bankwidth = *width;
info->list[i].map.bankwidth = be32_to_cpup(width);
err = -ENOMEM;
info->list[i].map.virt = ioremap(info->list[i].map.phys,
......
......@@ -53,8 +53,8 @@ int __devinit of_mtd_parse_partitions(struct device *dev,
continue;
}
(*pparts)[i].offset = reg[0];
(*pparts)[i].size = reg[1];
(*pparts)[i].offset = be32_to_cpu(reg[0]);
(*pparts)[i].size = be32_to_cpu(reg[1]);
partname = of_get_property(pp, "label", &len);
if (!partname)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册