diff options
author | Aaron Sierra <asierra@xes-inc.com> | 2014-09-17 14:08:28 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-09-22 13:13:13 -0400 |
commit | e5bffb59cfbb3371ff00a165a5a48c1f3fdf125a (patch) | |
tree | 3c7f6d2207538c72571587e13b51957ec1616830 | |
parent | 9b07a8d1ab85ccacaceb9f704c361119348aabab (diff) |
mtd: physmap_of: Add non-obsolete map_rom probe
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>
-rw-r--r-- | Documentation/devicetree/bindings/mtd/mtd-physmap.txt | 4 | ||||
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt index 61c5ec850f2f..6b9f680cb579 100644 --- a/Documentation/devicetree/bindings/mtd/mtd-physmap.txt +++ b/Documentation/devicetree/bindings/mtd/mtd-physmap.txt | |||
@@ -4,8 +4,8 @@ Flash chips (Memory Technology Devices) are often used for solid state | |||
4 | file systems on embedded devices. | 4 | file systems on embedded devices. |
5 | 5 | ||
6 | - compatible : should contain the specific model of mtd chip(s) | 6 | - compatible : should contain the specific model of mtd chip(s) |
7 | used, if known, followed by either "cfi-flash", "jedec-flash" | 7 | used, if known, followed by either "cfi-flash", "jedec-flash", |
8 | or "mtd-ram". | 8 | "mtd-ram" or "mtd-rom". |
9 | - reg : Address range(s) of the mtd chip(s) | 9 | - reg : Address range(s) of the mtd chip(s) |
10 | It's possible to (optionally) define multiple "reg" tuples so that | 10 | It's possible to (optionally) define multiple "reg" tuples so that |
11 | non-identical chips can be described in one node. | 11 | non-identical chips can be described in one node. |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 63d82dae4a78..c1d21cb501ca 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -340,6 +340,10 @@ static struct of_device_id of_flash_match[] = { | |||
340 | .data = (void *)"map_ram", | 340 | .data = (void *)"map_ram", |
341 | }, | 341 | }, |
342 | { | 342 | { |
343 | .compatible = "mtd-rom", | ||
344 | .data = (void *)"map_rom", | ||
345 | }, | ||
346 | { | ||
343 | .type = "rom", | 347 | .type = "rom", |
344 | .compatible = "direct-mapped" | 348 | .compatible = "direct-mapped" |
345 | }, | 349 | }, |