aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt28
-rw-r--r--Documentation/devicetree/bindings/net/gpmc-eth.txt56
-rw-r--r--arch/arm/mach-omap2/gpmc.c38
3 files changed, 54 insertions, 68 deletions
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index e7f8d7ed47eb..6a983c1d87cd 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -56,20 +56,20 @@ Example for an AM33xx board:
56 nand-bus-width = <16>; 56 nand-bus-width = <16>;
57 ti,nand-ecc-opt = "bch8"; 57 ti,nand-ecc-opt = "bch8";
58 58
59 gpmc,sync-clk = <0>; 59 gpmc,sync-clk-ps = <0>;
60 gpmc,cs-on = <0>; 60 gpmc,cs-on-ns = <0>;
61 gpmc,cs-rd-off = <44>; 61 gpmc,cs-rd-off-ns = <44>;
62 gpmc,cs-wr-off = <44>; 62 gpmc,cs-wr-off-ns = <44>;
63 gpmc,adv-on = <6>; 63 gpmc,adv-on-ns = <6>;
64 gpmc,adv-rd-off = <34>; 64 gpmc,adv-rd-off-ns = <34>;
65 gpmc,adv-wr-off = <44>; 65 gpmc,adv-wr-off-ns = <44>;
66 gpmc,we-off = <40>; 66 gpmc,we-off-ns = <40>;
67 gpmc,oe-off = <54>; 67 gpmc,oe-off-ns = <54>;
68 gpmc,access = <64>; 68 gpmc,access-ns = <64>;
69 gpmc,rd-cycle = <82>; 69 gpmc,rd-cycle-ns = <82>;
70 gpmc,wr-cycle = <82>; 70 gpmc,wr-cycle-ns = <82>;
71 gpmc,wr-access = <40>; 71 gpmc,wr-access-ns = <40>;
72 gpmc,wr-data-mux-bus = <0>; 72 gpmc,wr-data-mux-bus-ns = <0>;
73 73
74 #address-cells = <1>; 74 #address-cells = <1>;
75 #size-cells = <1>; 75 #size-cells = <1>;
diff --git a/Documentation/devicetree/bindings/net/gpmc-eth.txt b/Documentation/devicetree/bindings/net/gpmc-eth.txt
index 24cb4e46f675..ace4a64b3695 100644
--- a/Documentation/devicetree/bindings/net/gpmc-eth.txt
+++ b/Documentation/devicetree/bindings/net/gpmc-eth.txt
@@ -26,16 +26,16 @@ Required properties:
26- bank-width: Address width of the device in bytes. GPMC supports 8-bit 26- bank-width: Address width of the device in bytes. GPMC supports 8-bit
27 and 16-bit devices and so must be either 1 or 2 bytes. 27 and 16-bit devices and so must be either 1 or 2 bytes.
28- compatible: Compatible string property for the ethernet child device. 28- compatible: Compatible string property for the ethernet child device.
29- gpmc,cs-on: Chip-select assertion time 29- gpmc,cs-on-ns: Chip-select assertion time
30- gpmc,cs-rd-off: Chip-select de-assertion time for reads 30- gpmc,cs-rd-off-ns: Chip-select de-assertion time for reads
31- gpmc,cs-wr-off: Chip-select de-assertion time for writes 31- gpmc,cs-wr-off-ns: Chip-select de-assertion time for writes
32- gpmc,oe-on: Output-enable assertion time 32- gpmc,oe-on-ns: Output-enable assertion time
33- gpmc,oe-off Output-enable de-assertion time 33- gpmc,oe-off-ns: Output-enable de-assertion time
34- gpmc,we-on: Write-enable assertion time 34- gpmc,we-on-ns: Write-enable assertion time
35- gpmc,we-off: Write-enable de-assertion time 35- gpmc,we-off-ns: Write-enable de-assertion time
36- gpmc,access: Start cycle to first data capture (read access) 36- gpmc,access-ns: Start cycle to first data capture (read access)
37- gpmc,rd-cycle: Total read cycle time 37- gpmc,rd-cycle-ns: Total read cycle time
38- gpmc,wr-cycle: Total write cycle time 38- gpmc,wr-cycle-ns: Total write cycle time
39- reg: Chip-select, base address (relative to chip-select) 39- reg: Chip-select, base address (relative to chip-select)
40 and size of the memory mapped for the device. 40 and size of the memory mapped for the device.
41 Note that base address will be typically 0 as this 41 Note that base address will be typically 0 as this
@@ -65,24 +65,24 @@ gpmc: gpmc@6e000000 {
65 bank-width = <2>; 65 bank-width = <2>;
66 66
67 gpmc,mux-add-data; 67 gpmc,mux-add-data;
68 gpmc,cs-on = <0>; 68 gpmc,cs-on-ns = <0>;
69 gpmc,cs-rd-off = <186>; 69 gpmc,cs-rd-off-ns = <186>;
70 gpmc,cs-wr-off = <186>; 70 gpmc,cs-wr-off-ns = <186>;
71 gpmc,adv-on = <12>; 71 gpmc,adv-on-ns = <12>;
72 gpmc,adv-rd-off = <48>; 72 gpmc,adv-rd-off-ns = <48>;
73 gpmc,adv-wr-off = <48>; 73 gpmc,adv-wr-off-ns = <48>;
74 gpmc,oe-on = <54>; 74 gpmc,oe-on-ns = <54>;
75 gpmc,oe-off = <168>; 75 gpmc,oe-off-ns = <168>;
76 gpmc,we-on = <54>; 76 gpmc,we-on-ns = <54>;
77 gpmc,we-off = <168>; 77 gpmc,we-off-ns = <168>;
78 gpmc,rd-cycle = <186>; 78 gpmc,rd-cycle-ns = <186>;
79 gpmc,wr-cycle = <186>; 79 gpmc,wr-cycle-ns = <186>;
80 gpmc,access = <114>; 80 gpmc,access-ns = <114>;
81 gpmc,page-burst-access = <6>; 81 gpmc,page-burst-access-ns = <6>;
82 gpmc,bus-turnaround = <12>; 82 gpmc,bus-turnaround-ns = <12>;
83 gpmc,cycle2cycle-delay = <18>; 83 gpmc,cycle2cycle-delay-ns = <18>;
84 gpmc,wr-data-mux-bus = <90>; 84 gpmc,wr-data-mux-bus-ns = <90>;
85 gpmc,wr-access = <186>; 85 gpmc,wr-access-ns = <186>;
86 gpmc,cycle2cycle-samecsen; 86 gpmc,cycle2cycle-samecsen;
87 gpmc,cycle2cycle-diffcsen; 87 gpmc,cycle2cycle-diffcsen;
88 88
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index ed946df5ad8a..6c4da1254f53 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1520,36 +1520,22 @@ static int gpmc_probe_dt(struct platform_device *pdev)
1520 return ret; 1520 return ret;
1521 } 1521 }
1522 1522
1523 for_each_node_by_name(child, "nand") { 1523 for_each_child_of_node(pdev->dev.of_node, child) {
1524 ret = gpmc_probe_nand_child(pdev, child);
1525 if (ret < 0) {
1526 of_node_put(child);
1527 return ret;
1528 }
1529 }
1530 1524
1531 for_each_node_by_name(child, "onenand") { 1525 if (!child->name)
1532 ret = gpmc_probe_onenand_child(pdev, child); 1526 continue;
1533 if (ret < 0) {
1534 of_node_put(child);
1535 return ret;
1536 }
1537 }
1538 1527
1539 for_each_node_by_name(child, "nor") { 1528 if (of_node_cmp(child->name, "nand") == 0)
1540 ret = gpmc_probe_generic_child(pdev, child); 1529 ret = gpmc_probe_nand_child(pdev, child);
1541 if (ret < 0) { 1530 else if (of_node_cmp(child->name, "onenand") == 0)
1542 of_node_put(child); 1531 ret = gpmc_probe_onenand_child(pdev, child);
1543 return ret; 1532 else if (of_node_cmp(child->name, "ethernet") == 0 ||
1544 } 1533 of_node_cmp(child->name, "nor") == 0)
1545 } 1534 ret = gpmc_probe_generic_child(pdev, child);
1546 1535
1547 for_each_node_by_name(child, "ethernet") { 1536 if (WARN(ret < 0, "%s: probing gpmc child %s failed\n",
1548 ret = gpmc_probe_generic_child(pdev, child); 1537 __func__, child->full_name))
1549 if (ret < 0) {
1550 of_node_put(child); 1538 of_node_put(child);
1551 return ret;
1552 }
1553 } 1539 }
1554 1540
1555 return 0; 1541 return 0;