aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2008-04-11 12:06:54 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-04-17 02:01:38 -0400
commit56626f335b76eecd79d07fb21d0e625eb4aa52da (patch)
tree0a46cacdab6c2d2c3ce565773091fb3d8a509820
parente24e788abe0def81341fd23efae43e813678f7b1 (diff)
[POWERPC] QE: UCC nodes cleanup
- get rid of `model = "UCC"' in the ucc nodes It isn't used anywhere, so remove it. If we'll ever need something like this, we'll use compatible property instead. - replace last occurrences of device-id with cell-index. Drivers are modified for backward compatibility's sake. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--Documentation/powerpc/booting-without-of.txt6
-rw-r--r--arch/powerpc/boot/dts/mpc832x_mds.dts7
-rw-r--r--arch/powerpc/boot/dts/mpc832x_rdb.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc836x_mds.dts4
-rw-r--r--arch/powerpc/boot/dts/mpc8568mds.dts4
-rw-r--r--drivers/net/ucc_geth.c8
-rw-r--r--drivers/net/ucc_geth_mii.c11
-rw-r--r--drivers/serial/ucc_uart.c16
8 files changed, 30 insertions, 30 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 528b4822f451..4cc780024e6c 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1645,8 +1645,7 @@ platforms are moved over to use the flattened-device-tree model.
1645 - device_type : should be "network", "hldc", "uart", "transparent" 1645 - device_type : should be "network", "hldc", "uart", "transparent"
1646 "bisync", "atm", or "serial". 1646 "bisync", "atm", or "serial".
1647 - compatible : could be "ucc_geth" or "fsl_atm" and so on. 1647 - compatible : could be "ucc_geth" or "fsl_atm" and so on.
1648 - model : should be "UCC". 1648 - cell-index : the ucc number(1-8), corresponding to UCCx in UM.
1649 - device-id : the ucc number(1-8), corresponding to UCCx in UM.
1650 - reg : Offset and length of the register set for the device 1649 - reg : Offset and length of the register set for the device
1651 - interrupts : <a b> where a is the interrupt number and b is a 1650 - interrupts : <a b> where a is the interrupt number and b is a
1652 field that represents an encoding of the sense and level 1651 field that represents an encoding of the sense and level
@@ -1699,8 +1698,7 @@ platforms are moved over to use the flattened-device-tree model.
1699 ucc@2000 { 1698 ucc@2000 {
1700 device_type = "network"; 1699 device_type = "network";
1701 compatible = "ucc_geth"; 1700 compatible = "ucc_geth";
1702 model = "UCC"; 1701 cell-index = <1>;
1703 device-id = <1>;
1704 reg = <2000 200>; 1702 reg = <2000 200>;
1705 interrupts = <a0 0>; 1703 interrupts = <a0 0>;
1706 interrupt-parent = <700>; 1704 interrupt-parent = <700>;
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index 9bb408371bcd..539e02fb3526 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -255,9 +255,7 @@
255 enet0: ucc@2200 { 255 enet0: ucc@2200 {
256 device_type = "network"; 256 device_type = "network";
257 compatible = "ucc_geth"; 257 compatible = "ucc_geth";
258 model = "UCC";
259 cell-index = <3>; 258 cell-index = <3>;
260 device-id = <3>;
261 reg = <0x2200 0x200>; 259 reg = <0x2200 0x200>;
262 interrupts = <34>; 260 interrupts = <34>;
263 interrupt-parent = <&qeic>; 261 interrupt-parent = <&qeic>;
@@ -271,9 +269,7 @@
271 enet1: ucc@3200 { 269 enet1: ucc@3200 {
272 device_type = "network"; 270 device_type = "network";
273 compatible = "ucc_geth"; 271 compatible = "ucc_geth";
274 model = "UCC";
275 cell-index = <4>; 272 cell-index = <4>;
276 device-id = <4>;
277 reg = <0x3200 0x200>; 273 reg = <0x3200 0x200>;
278 interrupts = <35>; 274 interrupts = <35>;
279 interrupt-parent = <&qeic>; 275 interrupt-parent = <&qeic>;
@@ -287,8 +283,7 @@
287 ucc@2400 { 283 ucc@2400 {
288 device_type = "serial"; 284 device_type = "serial";
289 compatible = "ucc_uart"; 285 compatible = "ucc_uart";
290 model = "UCC"; 286 cell-index = <5>; /* The UCC number, 1-7*/
291 device-id = <5>; /* The UCC number, 1-7*/
292 port-number = <0>; /* Which ttyQEx device */ 287 port-number = <0>; /* Which ttyQEx device */
293 soft-uart; /* We need Soft-UART */ 288 soft-uart; /* We need Soft-UART */
294 reg = <0x2400 0x200>; 289 reg = <0x2400 0x200>;
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 94f93d209de8..179c81c6a7ac 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -208,9 +208,7 @@
208 enet0: ucc@3000 { 208 enet0: ucc@3000 {
209 device_type = "network"; 209 device_type = "network";
210 compatible = "ucc_geth"; 210 compatible = "ucc_geth";
211 model = "UCC";
212 cell-index = <2>; 211 cell-index = <2>;
213 device-id = <2>;
214 reg = <0x3000 0x200>; 212 reg = <0x3000 0x200>;
215 interrupts = <33>; 213 interrupts = <33>;
216 interrupt-parent = <&qeic>; 214 interrupt-parent = <&qeic>;
@@ -224,9 +222,7 @@
224 enet1: ucc@2200 { 222 enet1: ucc@2200 {
225 device_type = "network"; 223 device_type = "network";
226 compatible = "ucc_geth"; 224 compatible = "ucc_geth";
227 model = "UCC";
228 cell-index = <3>; 225 cell-index = <3>;
229 device-id = <3>;
230 reg = <0x2200 0x200>; 226 reg = <0x2200 0x200>;
231 interrupts = <34>; 227 interrupts = <34>;
232 interrupt-parent = <&qeic>; 228 interrupt-parent = <&qeic>;
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index 55f03e8dc97f..8160ff24e87e 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -257,9 +257,7 @@
257 enet0: ucc@2000 { 257 enet0: ucc@2000 {
258 device_type = "network"; 258 device_type = "network";
259 compatible = "ucc_geth"; 259 compatible = "ucc_geth";
260 model = "UCC";
261 cell-index = <1>; 260 cell-index = <1>;
262 device-id = <1>;
263 reg = <0x2000 0x200>; 261 reg = <0x2000 0x200>;
264 interrupts = <32>; 262 interrupts = <32>;
265 interrupt-parent = <&qeic>; 263 interrupt-parent = <&qeic>;
@@ -274,9 +272,7 @@
274 enet1: ucc@3000 { 272 enet1: ucc@3000 {
275 device_type = "network"; 273 device_type = "network";
276 compatible = "ucc_geth"; 274 compatible = "ucc_geth";
277 model = "UCC";
278 cell-index = <2>; 275 cell-index = <2>;
279 device-id = <2>;
280 reg = <0x3000 0x200>; 276 reg = <0x3000 0x200>;
281 interrupts = <33>; 277 interrupts = <33>;
282 interrupt-parent = <&qeic>; 278 interrupt-parent = <&qeic>;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 97bc048f2158..df4b5e89d7e4 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -324,9 +324,7 @@
324 enet2: ucc@2000 { 324 enet2: ucc@2000 {
325 device_type = "network"; 325 device_type = "network";
326 compatible = "ucc_geth"; 326 compatible = "ucc_geth";
327 model = "UCC";
328 cell-index = <1>; 327 cell-index = <1>;
329 device-id = <1>;
330 reg = <2000 200>; 328 reg = <2000 200>;
331 interrupts = <20>; 329 interrupts = <20>;
332 interrupt-parent = <&qeic>; 330 interrupt-parent = <&qeic>;
@@ -341,9 +339,7 @@
341 enet3: ucc@3000 { 339 enet3: ucc@3000 {
342 device_type = "network"; 340 device_type = "network";
343 compatible = "ucc_geth"; 341 compatible = "ucc_geth";
344 model = "UCC";
345 cell-index = <2>; 342 cell-index = <2>;
346 device-id = <2>;
347 reg = <3000 200>; 343 reg = <3000 200>;
348 interrupts = <21>; 344 interrupts = <21>;
349 interrupt-parent = <&qeic>; 345 interrupt-parent = <&qeic>;
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 8cc316653a39..ed84182c6828 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3852,7 +3852,13 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3852 3852
3853 ugeth_vdbg("%s: IN", __FUNCTION__); 3853 ugeth_vdbg("%s: IN", __FUNCTION__);
3854 3854
3855 prop = of_get_property(np, "device-id", NULL); 3855 prop = of_get_property(np, "cell-index", NULL);
3856 if (!prop) {
3857 prop = of_get_property(np, "device-id", NULL);
3858 if (!prop)
3859 return -ENODEV;
3860 }
3861
3856 ucc_num = *prop - 1; 3862 ucc_num = *prop - 1;
3857 if ((ucc_num < 0) || (ucc_num > 7)) 3863 if ((ucc_num < 0) || (ucc_num > 7))
3858 return -ENODEV; 3864 return -ENODEV;
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c
index c69e654d539f..8a48ddb1e866 100644
--- a/drivers/net/ucc_geth_mii.c
+++ b/drivers/net/ucc_geth_mii.c
@@ -203,9 +203,14 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
203 if ((res.start >= tempres.start) && 203 if ((res.start >= tempres.start) &&
204 (res.end <= tempres.end)) { 204 (res.end <= tempres.end)) {
205 /* set this UCC to be the MII master */ 205 /* set this UCC to be the MII master */
206 const u32 *id = of_get_property(tempnp, "device-id", NULL); 206 const u32 *id;
207 if (id == NULL) 207
208 goto bus_register_fail; 208 id = of_get_property(tempnp, "cell-index", NULL);
209 if (!id) {
210 id = of_get_property(tempnp, "device-id", NULL);
211 if (!id)
212 goto bus_register_fail;
213 }
209 214
210 ucc_set_qe_mux_mii_mng(*id - 1); 215 ucc_set_qe_mux_mii_mng(*id - 1);
211 216
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index e0994f061001..5e4310ccd591 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -1270,10 +1270,18 @@ static int ucc_uart_probe(struct of_device *ofdev,
1270 1270
1271 /* Get the UCC number (device ID) */ 1271 /* Get the UCC number (device ID) */
1272 /* UCCs are numbered 1-7 */ 1272 /* UCCs are numbered 1-7 */
1273 iprop = of_get_property(np, "device-id", NULL); 1273 iprop = of_get_property(np, "cell-index", NULL);
1274 if (!iprop || (*iprop < 1) || (*iprop > UCC_MAX_NUM)) { 1274 if (!iprop) {
1275 dev_err(&ofdev->dev, 1275 iprop = of_get_property(np, "device-id", NULL);
1276 "missing or invalid UCC specified in device tree\n"); 1276 if (!iprop) {
1277 dev_err(&ofdev->dev, "UCC is unspecified in "
1278 "device tree\n");
1279 return -EINVAL;
1280 }
1281 }
1282
1283 if ((*iprop < 1) || (*iprop > UCC_MAX_NUM)) {
1284 dev_err(&ofdev->dev, "no support for UCC%u\n", *iprop);
1277 kfree(qe_port); 1285 kfree(qe_port);
1278 return -ENODEV; 1286 return -ENODEV;
1279 } 1287 }