aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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 /drivers
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>
Diffstat (limited to 'drivers')
-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
3 files changed, 27 insertions, 8 deletions
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 }