aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-05-13 00:14:24 -0400
committerArnd Bergmann <arnd@arndb.de>2012-05-15 07:29:42 -0400
commit7f217794ffa72f208a250b79ab0b7ea3de19677f (patch)
treee158792f6662bc7cad4e55a62f4efe7426215141
parente6511df4f25607e2e6d60062eb69c28c057329fa (diff)
mmc: dt: Consolidate DT bindings
This patch unifies the current DT MMC bindings documentation and code, adds generic MMC DT bindings documentation, and updates .dts files for consistency. [cjb: typo fixes, addition of max-frequency property] Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-esdhc.txt6
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt3
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc.txt27
-rw-r--r--Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt4
-rw-r--r--Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt4
-rw-r--r--arch/arm/boot/dts/imx53-smd.dts4
-rw-r--r--arch/arm/boot/dts/imx6q-arm2.dts2
-rw-r--r--arch/arm/boot/dts/omap3-beagle.dts2
-rw-r--r--arch/arm/boot/dts/omap4-panda.dts4
-rw-r--r--arch/arm/boot/dts/omap4-sdp.dts6
-rw-r--r--arch/arm/boot/dts/tegra-cardhu.dts2
-rw-r--r--arch/arm/boot/dts/tegra-harmony.dts2
-rw-r--r--arch/arm/boot/dts/tegra-paz00.dts2
-rw-r--r--arch/arm/boot/dts/tegra-seaboard.dts2
-rw-r--r--arch/arm/boot/dts/tegra-ventana.dts2
-rw-r--r--arch/powerpc/boot/dts/mpc8569mds.dts1
-rw-r--r--drivers/mmc/host/omap_hsmmc.c2
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c2
-rw-r--r--drivers/mmc/host/sdhci-pltfm.c8
20 files changed, 66 insertions, 21 deletions
diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
index 64bcb8be973c..0d93b4b0e0e3 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
@@ -11,9 +11,11 @@ Required properties:
11 - interrupt-parent : interrupt source phandle. 11 - interrupt-parent : interrupt source phandle.
12 - clock-frequency : specifies eSDHC base clock frequency. 12 - clock-frequency : specifies eSDHC base clock frequency.
13 - sdhci,wp-inverted : (optional) specifies that eSDHC controller 13 - sdhci,wp-inverted : (optional) specifies that eSDHC controller
14 reports inverted write-protect state; 14 reports inverted write-protect state; New devices should use
15 the generic "wp-inverted" property.
15 - sdhci,1-bit-only : (optional) specifies that a controller can 16 - sdhci,1-bit-only : (optional) specifies that a controller can
16 only handle 1-bit data transfers. 17 only handle 1-bit data transfers. New devices should use the
18 generic "bus-width = <1>" property.
17 - sdhci,auto-cmd12: (optional) specifies that a controller can 19 - sdhci,auto-cmd12: (optional) specifies that a controller can
18 only handle auto CMD12. 20 only handle auto CMD12.
19 21
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index ab22fe6e73ab..c7e404b3ef05 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -9,7 +9,7 @@ Required properties:
9- interrupts : Should contain eSDHC interrupt 9- interrupts : Should contain eSDHC interrupt
10 10
11Optional properties: 11Optional properties:
12- fsl,card-wired : Indicate the card is wired to host permanently 12- non-removable : Indicate the card is wired to host permanently
13- fsl,cd-internal : Indicate to use controller internal card detection 13- fsl,cd-internal : Indicate to use controller internal card detection
14- fsl,wp-internal : Indicate to use controller internal write protection 14- fsl,wp-internal : Indicate to use controller internal write protection
15- cd-gpios : Specify GPIOs for card detection 15- cd-gpios : Specify GPIOs for card detection
diff --git a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
index 89a0084df2f7..d64aea5a4203 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
@@ -10,7 +10,8 @@ Required properties:
10 10
11Optional properties: 11Optional properties:
12- gpios : may specify GPIOs in this order: Card-Detect GPIO, 12- gpios : may specify GPIOs in this order: Card-Detect GPIO,
13 Write-Protect GPIO. 13 Write-Protect GPIO. Note that this does not follow the
14 binding from mmc.txt, for historic reasons.
14- interrupts : the interrupt of a card detect interrupt. 15- interrupts : the interrupt of a card detect interrupt.
15- interrupt-parent : the phandle for the interrupt controller that 16- interrupt-parent : the phandle for the interrupt controller that
16 services interrupts for this device. 17 services interrupts for this device.
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
new file mode 100644
index 000000000000..6e70dcde0a71
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -0,0 +1,27 @@
1These properties are common to multiple MMC host controllers. Any host
2that requires the respective functionality should implement them using
3these definitions.
4
5Required properties:
6- bus-width: Number of data lines, can be <1>, <4>, or <8>
7
8Optional properties:
9- cd-gpios : Specify GPIOs for card detection, see gpio binding
10- wp-gpios : Specify GPIOs for write protection, see gpio binding
11- cd-inverted: when present, polarity on the wp gpio line is inverted
12- wp-inverted: when present, polarity on the wp gpio line is inverted
13- non-removable: non-removable slot (like eMMC)
14- max-frequency: maximum operating clock frequency
15
16Example:
17
18sdhci@ab000000 {
19 compatible = "sdhci";
20 reg = <0xab000000 0x200>;
21 interrupts = <23>;
22 bus-width = <4>;
23 cd-gpios = <&gpio 69 0>;
24 cd-inverted;
25 wp-gpios = <&gpio 70 0>;
26 max-frequency = <50000000>;
27}
diff --git a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt b/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt
index 7e51154679a6..f77c3031607f 100644
--- a/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/nvidia-sdhci.txt
@@ -7,12 +7,12 @@ Required properties:
7- compatible : Should be "nvidia,<chip>-sdhci" 7- compatible : Should be "nvidia,<chip>-sdhci"
8- reg : Should contain SD/MMC registers location and length 8- reg : Should contain SD/MMC registers location and length
9- interrupts : Should contain SD/MMC interrupt 9- interrupts : Should contain SD/MMC interrupt
10- bus-width : Number of data lines, can be <1>, <4>, or <8>
10 11
11Optional properties: 12Optional properties:
12- cd-gpios : Specify GPIOs for card detection 13- cd-gpios : Specify GPIOs for card detection
13- wp-gpios : Specify GPIOs for write protection 14- wp-gpios : Specify GPIOs for write protection
14- power-gpios : Specify GPIOs for power control 15- power-gpios : Specify GPIOs for power control
15- support-8bit : Boolean, indicates if 8-bit mode should be used.
16 16
17Example: 17Example:
18 18
@@ -23,5 +23,5 @@ sdhci@c8000200 {
23 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 23 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
24 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 24 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
25 power-gpios = <&gpio 155 0>; /* gpio PT3 */ 25 power-gpios = <&gpio 155 0>; /* gpio PT3 */
26 support-8bit; 26 bus-width = <8>;
27}; 27};
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
index dbd4368ab8cc..8a53958c9a9f 100644
--- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
+++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt
@@ -15,7 +15,7 @@ Optional properties:
15ti,dual-volt: boolean, supports dual voltage cards 15ti,dual-volt: boolean, supports dual voltage cards
16<supply-name>-supply: phandle to the regulator device tree node 16<supply-name>-supply: phandle to the regulator device tree node
17"supply-name" examples are "vmmc", "vmmc_aux" etc 17"supply-name" examples are "vmmc", "vmmc_aux" etc
18ti,bus-width: Number of data lines, default assumed is 1 if the property is missing. 18bus-width: Number of data lines, default assumed is 1 if the property is missing.
19cd-gpios: GPIOs for card detection 19cd-gpios: GPIOs for card detection
20wp-gpios: GPIOs for write protection 20wp-gpios: GPIOs for write protection
21ti,non-removable: non-removable slot (like eMMC) 21ti,non-removable: non-removable slot (like eMMC)
@@ -27,7 +27,7 @@ Example:
27 reg = <0x4809c000 0x400>; 27 reg = <0x4809c000 0x400>;
28 ti,hwmods = "mmc1"; 28 ti,hwmods = "mmc1";
29 ti,dual-volt; 29 ti,dual-volt;
30 ti,bus-width = <4>; 30 bus-width = <4>;
31 vmmc-supply = <&vmmc>; /* phandle to regulator node */ 31 vmmc-supply = <&vmmc>; /* phandle to regulator node */
32 ti,non-removable; 32 ti,non-removable;
33 }; 33 };
diff --git a/arch/arm/boot/dts/imx53-smd.dts b/arch/arm/boot/dts/imx53-smd.dts
index c7ee86c2dfb5..139138a556b0 100644
--- a/arch/arm/boot/dts/imx53-smd.dts
+++ b/arch/arm/boot/dts/imx53-smd.dts
@@ -35,7 +35,7 @@
35 }; 35 };
36 36
37 esdhc@50008000 { /* ESDHC2 */ 37 esdhc@50008000 { /* ESDHC2 */
38 fsl,card-wired; 38 non-removable;
39 status = "okay"; 39 status = "okay";
40 }; 40 };
41 41
@@ -76,7 +76,7 @@
76 }; 76 };
77 77
78 esdhc@50020000 { /* ESDHC3 */ 78 esdhc@50020000 { /* ESDHC3 */
79 fsl,card-wired; 79 non-removable;
80 status = "okay"; 80 status = "okay";
81 }; 81 };
82 }; 82 };
diff --git a/arch/arm/boot/dts/imx6q-arm2.dts b/arch/arm/boot/dts/imx6q-arm2.dts
index ce1c8238c897..d2eaf521c9fd 100644
--- a/arch/arm/boot/dts/imx6q-arm2.dts
+++ b/arch/arm/boot/dts/imx6q-arm2.dts
@@ -41,7 +41,7 @@
41 }; 41 };
42 42
43 usdhc@0219c000 { /* uSDHC4 */ 43 usdhc@0219c000 { /* uSDHC4 */
44 fsl,card-wired; 44 non-removable;
45 vmmc-supply = <&reg_3p3v>; 45 vmmc-supply = <&reg_3p3v>;
46 status = "okay"; 46 status = "okay";
47 }; 47 };
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 8c756be4d7ad..5b4506c0a8c4 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -57,7 +57,7 @@
57&mmc1 { 57&mmc1 {
58 vmmc-supply = <&vmmc1>; 58 vmmc-supply = <&vmmc1>;
59 vmmc_aux-supply = <&vsim>; 59 vmmc_aux-supply = <&vsim>;
60 ti,bus-width = <8>; 60 bus-width = <8>;
61}; 61};
62 62
63&mmc2 { 63&mmc2 {
diff --git a/arch/arm/boot/dts/omap4-panda.dts b/arch/arm/boot/dts/omap4-panda.dts
index ea6f5bb8a120..31fb4218d3ae 100644
--- a/arch/arm/boot/dts/omap4-panda.dts
+++ b/arch/arm/boot/dts/omap4-panda.dts
@@ -55,7 +55,7 @@
55 55
56&mmc1 { 56&mmc1 {
57 vmmc-supply = <&vmmc>; 57 vmmc-supply = <&vmmc>;
58 ti,bus-width = <8>; 58 bus-width = <8>;
59}; 59};
60 60
61&mmc2 { 61&mmc2 {
@@ -72,5 +72,5 @@
72 72
73&mmc5 { 73&mmc5 {
74 ti,non-removable; 74 ti,non-removable;
75 ti,bus-width = <4>; 75 bus-width = <4>;
76}; 76};
diff --git a/arch/arm/boot/dts/omap4-sdp.dts b/arch/arm/boot/dts/omap4-sdp.dts
index 67b2e98074c6..a1dd873425fc 100644
--- a/arch/arm/boot/dts/omap4-sdp.dts
+++ b/arch/arm/boot/dts/omap4-sdp.dts
@@ -94,12 +94,12 @@
94 94
95&mmc1 { 95&mmc1 {
96 vmmc-supply = <&vmmc>; 96 vmmc-supply = <&vmmc>;
97 ti,bus-width = <8>; 97 bus-width = <8>;
98}; 98};
99 99
100&mmc2 { 100&mmc2 {
101 vmmc-supply = <&vaux1>; 101 vmmc-supply = <&vaux1>;
102 ti,bus-width = <8>; 102 bus-width = <8>;
103 ti,non-removable; 103 ti,non-removable;
104}; 104};
105 105
@@ -112,6 +112,6 @@
112}; 112};
113 113
114&mmc5 { 114&mmc5 {
115 ti,bus-width = <4>; 115 bus-width = <4>;
116 ti,non-removable; 116 ti,non-removable;
117}; 117};
diff --git a/arch/arm/boot/dts/tegra-cardhu.dts b/arch/arm/boot/dts/tegra-cardhu.dts
index ac3fb7558459..67c6511f6372 100644
--- a/arch/arm/boot/dts/tegra-cardhu.dts
+++ b/arch/arm/boot/dts/tegra-cardhu.dts
@@ -54,6 +54,7 @@
54 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 54 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
55 wp-gpios = <&gpio 155 0>; /* gpio PT3 */ 55 wp-gpios = <&gpio 155 0>; /* gpio PT3 */
56 power-gpios = <&gpio 31 0>; /* gpio PD7 */ 56 power-gpios = <&gpio 31 0>; /* gpio PD7 */
57 bus-width = <4>;
57 }; 58 };
58 59
59 sdhci@78000200 { 60 sdhci@78000200 {
@@ -66,5 +67,6 @@
66 67
67 sdhci@78000400 { 68 sdhci@78000400 {
68 support-8bit; 69 support-8bit;
70 bus-width = <8>;
69 }; 71 };
70}; 72};
diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts
index 6e8447dc0202..e9cae68861de 100644
--- a/arch/arm/boot/dts/tegra-harmony.dts
+++ b/arch/arm/boot/dts/tegra-harmony.dts
@@ -100,6 +100,7 @@
100 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 100 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
101 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 101 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
102 power-gpios = <&gpio 155 0>; /* gpio PT3 */ 102 power-gpios = <&gpio 155 0>; /* gpio PT3 */
103 bus-width = <4>;
103 }; 104 };
104 105
105 sdhci@c8000400 { 106 sdhci@c8000400 {
@@ -111,5 +112,6 @@
111 wp-gpios = <&gpio 59 0>; /* gpio PH3 */ 112 wp-gpios = <&gpio 59 0>; /* gpio PH3 */
112 power-gpios = <&gpio 70 0>; /* gpio PI6 */ 113 power-gpios = <&gpio 70 0>; /* gpio PI6 */
113 support-8bit; 114 support-8bit;
115 bus-width = <8>;
114 }; 116 };
115}; 117};
diff --git a/arch/arm/boot/dts/tegra-paz00.dts b/arch/arm/boot/dts/tegra-paz00.dts
index 6c02abb469d4..03d3d7994da7 100644
--- a/arch/arm/boot/dts/tegra-paz00.dts
+++ b/arch/arm/boot/dts/tegra-paz00.dts
@@ -97,6 +97,7 @@
97 cd-gpios = <&gpio 173 0>; /* gpio PV5 */ 97 cd-gpios = <&gpio 173 0>; /* gpio PV5 */
98 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 98 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
99 power-gpios = <&gpio 169 0>; /* gpio PV1 */ 99 power-gpios = <&gpio 169 0>; /* gpio PV1 */
100 bus-width = <4>;
100 }; 101 };
101 102
102 sdhci@c8000200 { 103 sdhci@c8000200 {
@@ -109,6 +110,7 @@
109 110
110 sdhci@c8000600 { 111 sdhci@c8000600 {
111 support-8bit; 112 support-8bit;
113 bus-width = <8>;
112 }; 114 };
113 115
114 gpio-keys { 116 gpio-keys {
diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts
index dbf1c5a171c2..8decf7229973 100644
--- a/arch/arm/boot/dts/tegra-seaboard.dts
+++ b/arch/arm/boot/dts/tegra-seaboard.dts
@@ -104,10 +104,12 @@
104 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 104 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
105 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 105 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
106 power-gpios = <&gpio 70 0>; /* gpio PI6 */ 106 power-gpios = <&gpio 70 0>; /* gpio PI6 */
107 bus-width = <4>;
107 }; 108 };
108 109
109 sdhci@c8000600 { 110 sdhci@c8000600 {
110 support-8bit; 111 support-8bit;
112 bus-width = <8>;
111 }; 113 };
112 114
113 usb@c5000000 { 115 usb@c5000000 {
diff --git a/arch/arm/boot/dts/tegra-ventana.dts b/arch/arm/boot/dts/tegra-ventana.dts
index 2dcff8728e90..29e54c7a3657 100644
--- a/arch/arm/boot/dts/tegra-ventana.dts
+++ b/arch/arm/boot/dts/tegra-ventana.dts
@@ -100,9 +100,11 @@
100 cd-gpios = <&gpio 69 0>; /* gpio PI5 */ 100 cd-gpios = <&gpio 69 0>; /* gpio PI5 */
101 wp-gpios = <&gpio 57 0>; /* gpio PH1 */ 101 wp-gpios = <&gpio 57 0>; /* gpio PH1 */
102 power-gpios = <&gpio 70 0>; /* gpio PI6 */ 102 power-gpios = <&gpio 70 0>; /* gpio PI6 */
103 bus-width = <4>;
103 }; 104 };
104 105
105 sdhci@c8000600 { 106 sdhci@c8000600 {
106 support-8bit; 107 support-8bit;
108 bus-width = <8>;
107 }; 109 };
108}; 110};
diff --git a/arch/powerpc/boot/dts/mpc8569mds.dts b/arch/powerpc/boot/dts/mpc8569mds.dts
index 7e283c891b7f..fe0d60935e9b 100644
--- a/arch/powerpc/boot/dts/mpc8569mds.dts
+++ b/arch/powerpc/boot/dts/mpc8569mds.dts
@@ -119,6 +119,7 @@
119 sdhc@2e000 { 119 sdhc@2e000 {
120 status = "disabled"; 120 status = "disabled";
121 sdhci,1-bit-only; 121 sdhci,1-bit-only;
122 bus-width = <1>;
122 }; 123 };
123 124
124 par_io@e0100 { 125 par_io@e0100 {
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 56d4499d4388..33e81c24e140 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1766,7 +1766,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
1766 pdata->slots[0].nonremovable = true; 1766 pdata->slots[0].nonremovable = true;
1767 pdata->slots[0].no_regulator_off_init = true; 1767 pdata->slots[0].no_regulator_off_init = true;
1768 } 1768 }
1769 of_property_read_u32(np, "ti,bus-width", &bus_width); 1769 of_property_read_u32(np, "bus-width", &bus_width);
1770 if (bus_width == 4) 1770 if (bus_width == 4)
1771 pdata->slots[0].caps |= MMC_CAP_4_BIT_DATA; 1771 pdata->slots[0].caps |= MMC_CAP_4_BIT_DATA;
1772 else if (bus_width == 8) 1772 else if (bus_width == 8)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 8abdaf6697a8..0d2b082f2246 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -402,7 +402,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
402 if (!np) 402 if (!np)
403 return -ENODEV; 403 return -ENODEV;
404 404
405 if (of_get_property(np, "fsl,card-wired", NULL)) 405 if (of_get_property(np, "non-removable", NULL))
406 boarddata->cd_type = ESDHC_CD_PERMANENT; 406 boarddata->cd_type = ESDHC_CD_PERMANENT;
407 407
408 if (of_get_property(np, "fsl,cd-controller", NULL)) 408 if (of_get_property(np, "fsl,cd-controller", NULL))
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index c5c2a48bdd94..d9a4ef4f1ed0 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -42,7 +42,8 @@ static struct sdhci_ops sdhci_pltfm_ops = {
42#ifdef CONFIG_OF 42#ifdef CONFIG_OF
43static bool sdhci_of_wp_inverted(struct device_node *np) 43static bool sdhci_of_wp_inverted(struct device_node *np)
44{ 44{
45 if (of_get_property(np, "sdhci,wp-inverted", NULL)) 45 if (of_get_property(np, "sdhci,wp-inverted", NULL) ||
46 of_get_property(np, "wp-inverted", NULL))
46 return true; 47 return true;
47 48
48 /* Old device trees don't have the wp-inverted property. */ 49 /* Old device trees don't have the wp-inverted property. */
@@ -59,13 +60,16 @@ void sdhci_get_of_property(struct platform_device *pdev)
59 struct sdhci_host *host = platform_get_drvdata(pdev); 60 struct sdhci_host *host = platform_get_drvdata(pdev);
60 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); 61 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
61 const __be32 *clk; 62 const __be32 *clk;
63 u32 bus_width;
62 int size; 64 int size;
63 65
64 if (of_device_is_available(np)) { 66 if (of_device_is_available(np)) {
65 if (of_get_property(np, "sdhci,auto-cmd12", NULL)) 67 if (of_get_property(np, "sdhci,auto-cmd12", NULL))
66 host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12; 68 host->quirks |= SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12;
67 69
68 if (of_get_property(np, "sdhci,1-bit-only", NULL)) 70 if (of_get_property(np, "sdhci,1-bit-only", NULL) ||
71 (of_property_read_u32(np, "bus-width", &bus_width) == 0 &&
72 bus_width == 1))
69 host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; 73 host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA;
70 74
71 if (sdhci_of_wp_inverted(np)) 75 if (sdhci_of_wp_inverted(np))