Skip to content

Commit

Permalink
mtd: physmap_of: Add non-obsolete map_rom probe
Browse files Browse the repository at this point in the history
Previously, the only way to map a NOR device as a simple ROM was to
use the obsolete "direct-mapped" compatible binding (which further
requires device_type = "nor" and probe-type = "NOR" properties).

This patch adds an "mtd-rom" compatible binding to the "map_rom"
probe type.

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Aaron Sierra authored and Brian Norris committed Sep 22, 2014
1 parent 9b07a8d commit e5bffb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/mtd/mtd-physmap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Flash chips (Memory Technology Devices) are often used for solid state
file systems on embedded devices.

- compatible : should contain the specific model of mtd chip(s)
used, if known, followed by either "cfi-flash", "jedec-flash"
or "mtd-ram".
used, if known, followed by either "cfi-flash", "jedec-flash",
"mtd-ram" or "mtd-rom".
- reg : Address range(s) of the mtd chip(s)
It's possible to (optionally) define multiple "reg" tuples so that
non-identical chips can be described in one node.
Expand Down
4 changes: 4 additions & 0 deletions drivers/mtd/maps/physmap_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ static struct of_device_id of_flash_match[] = {
.compatible = "mtd-ram",
.data = (void *)"map_ram",
},
{
.compatible = "mtd-rom",
.data = (void *)"map_rom",
},
{
.type = "rom",
.compatible = "direct-mapped"
Expand Down

0 comments on commit e5bffb5

Please sign in to comment.