Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347176
b: refs/heads/master
c: d68cbdd
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Artem Bityutskiy committed Nov 16, 2012
1 parent a5aba72 commit a0f7bf6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6ba745d0a073a0f48053fa4744ab2e86c310aad
refs/heads/master: d68cbdd4fb04d2b756ad53c22f36943167b16340
3 changes: 3 additions & 0 deletions trunk/Documentation/devicetree/bindings/mtd/mtd-physmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ file systems on embedded devices.
unaligned accesses as implemented in the JFFS2 code via memcpy().
By defining "no-unaligned-direct-access", the flash will not be
exposed directly to the MTD users (e.g. JFFS2) any more.
- linux,mtd-name: allow to specify the mtd name for retro capability with
physmap-flash drivers as boot loader pass the mtd partition via the old
device name physmap-flash.

For JEDEC compatible devices, the following additional properties
are defined:
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/mtd/maps/physmap_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ static int __devinit of_flash_probe(struct platform_device *dev)
resource_size_t res_size;
struct mtd_part_parser_data ppdata;
bool map_indirect;
const char *mtd_name;

match = of_match_device(of_flash_match, &dev->dev);
if (!match)
Expand All @@ -178,6 +179,8 @@ static int __devinit of_flash_probe(struct platform_device *dev)

reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32);

of_property_read_string(dp, "linux,mtd-name", &mtd_name);

/*
* Get number of "reg" tuples. Scan for MTD devices on area's
* described by each "reg" region. This makes it possible (including
Expand Down Expand Up @@ -234,7 +237,7 @@ static int __devinit of_flash_probe(struct platform_device *dev)
goto err_out;
}

info->list[i].map.name = dev_name(&dev->dev);
info->list[i].map.name = mtd_name ?: dev_name(&dev->dev);
info->list[i].map.phys = res.start;
info->list[i].map.size = res_size;
info->list[i].map.bankwidth = be32_to_cpup(width);
Expand Down

0 comments on commit a0f7bf6

Please sign in to comment.