diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-18 13:09:58 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-06-28 15:41:33 -0400 |
commit | 1636f8ac2b08410df4766449f7c86b912443cd99 (patch) | |
tree | 9c923c017e956779f237d4ffa51d49beb3de6d3e /drivers/net | |
parent | 2b07be2493681220cac4d185494a4edb0b8efd1e (diff) |
sparc/of: Move of_device fields into struct pdev_archdata
This patch moves SPARC architecture specific data members out of
struct of_device and into the pdev_archdata structure. The reason
for this change is to unify the struct of_device definition amongst
all the architectures. It also remvoes the .sysdata, .slot, .portid
and .clock_freq properties because they aren't actually used by
anything.
A subsequent patch will replace struct of_device entirely with struct
platform_device and the of_platform support code will share common
routines with the platform bus (but the bus instances themselves can
remain separate).
This patch also adds 'struct resources *resource' and num_resources
to match the fields defined in struct platform_device. After this
change, 'struct platform_device' can be used as a drop-in replacement
for 'struct of_platform'.
This change is in preparation for merging the of_platform_bus_type
with the platform_bus_type.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/myri_sbus.c | 2 | ||||
-rw-r--r-- | drivers/net/niu.c | 6 | ||||
-rw-r--r-- | drivers/net/sunbmac.c | 2 | ||||
-rw-r--r-- | drivers/net/sunhme.c | 6 | ||||
-rw-r--r-- | drivers/net/sunlance.c | 2 | ||||
-rw-r--r-- | drivers/net/sunqe.c | 6 |
6 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 1a57c3da1f49..370d3c17f24c 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -1079,7 +1079,7 @@ static int __devinit myri_sbus_probe(struct of_device *op, const struct of_devic | |||
1079 | 1079 | ||
1080 | mp->dev = dev; | 1080 | mp->dev = dev; |
1081 | dev->watchdog_timeo = 5*HZ; | 1081 | dev->watchdog_timeo = 5*HZ; |
1082 | dev->irq = op->irqs[0]; | 1082 | dev->irq = op->archdata.irqs[0]; |
1083 | dev->netdev_ops = &myri_ops; | 1083 | dev->netdev_ops = &myri_ops; |
1084 | 1084 | ||
1085 | /* Register interrupt handler now. */ | 1085 | /* Register interrupt handler now. */ |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 63e8e3893bd6..5dd50b6ae776 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -9119,12 +9119,12 @@ static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) | |||
9119 | if (!int_prop) | 9119 | if (!int_prop) |
9120 | return -ENODEV; | 9120 | return -ENODEV; |
9121 | 9121 | ||
9122 | for (i = 0; i < op->num_irqs; i++) { | 9122 | for (i = 0; i < op->archdata.num_irqs; i++) { |
9123 | ldg_num_map[i] = int_prop[i]; | 9123 | ldg_num_map[i] = int_prop[i]; |
9124 | np->ldg[i].irq = op->irqs[i]; | 9124 | np->ldg[i].irq = op->archdata.irqs[i]; |
9125 | } | 9125 | } |
9126 | 9126 | ||
9127 | np->num_ldg = op->num_irqs; | 9127 | np->num_ldg = op->archdata.num_irqs; |
9128 | 9128 | ||
9129 | return 0; | 9129 | return 0; |
9130 | #else | 9130 | #else |
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 367e96f317d4..0b10d24de051 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -1201,7 +1201,7 @@ static int __devinit bigmac_ether_init(struct of_device *op, | |||
1201 | dev->watchdog_timeo = 5*HZ; | 1201 | dev->watchdog_timeo = 5*HZ; |
1202 | 1202 | ||
1203 | /* Finish net device registration. */ | 1203 | /* Finish net device registration. */ |
1204 | dev->irq = bp->bigmac_op->irqs[0]; | 1204 | dev->irq = bp->bigmac_op->archdata.irqs[0]; |
1205 | dev->dma = 0; | 1205 | dev->dma = 0; |
1206 | 1206 | ||
1207 | if (register_netdev(dev)) { | 1207 | if (register_netdev(dev)) { |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 3d9650b8d38f..0a63ebef86a0 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2561,7 +2561,7 @@ static int __init quattro_sbus_register_irqs(void) | |||
2561 | if (skip) | 2561 | if (skip) |
2562 | continue; | 2562 | continue; |
2563 | 2563 | ||
2564 | err = request_irq(op->irqs[0], | 2564 | err = request_irq(op->archdata.irqs[0], |
2565 | quattro_sbus_interrupt, | 2565 | quattro_sbus_interrupt, |
2566 | IRQF_SHARED, "Quattro", | 2566 | IRQF_SHARED, "Quattro", |
2567 | qp); | 2567 | qp); |
@@ -2590,7 +2590,7 @@ static void quattro_sbus_free_irqs(void) | |||
2590 | if (skip) | 2590 | if (skip) |
2591 | continue; | 2591 | continue; |
2592 | 2592 | ||
2593 | free_irq(op->irqs[0], qp); | 2593 | free_irq(op->archdata.irqs[0], qp); |
2594 | } | 2594 | } |
2595 | } | 2595 | } |
2596 | #endif /* CONFIG_SBUS */ | 2596 | #endif /* CONFIG_SBUS */ |
@@ -2790,7 +2790,7 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2790 | /* Happy Meal can do it all... */ | 2790 | /* Happy Meal can do it all... */ |
2791 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; | 2791 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; |
2792 | 2792 | ||
2793 | dev->irq = op->irqs[0]; | 2793 | dev->irq = op->archdata.irqs[0]; |
2794 | 2794 | ||
2795 | #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) | 2795 | #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) |
2796 | /* Hook up SBUS register/descriptor accessors. */ | 2796 | /* Hook up SBUS register/descriptor accessors. */ |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 7d9c33dd9d1a..c6bfdad6c0c8 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1474,7 +1474,7 @@ no_link_test: | |||
1474 | dev->ethtool_ops = &sparc_lance_ethtool_ops; | 1474 | dev->ethtool_ops = &sparc_lance_ethtool_ops; |
1475 | dev->netdev_ops = &sparc_lance_ops; | 1475 | dev->netdev_ops = &sparc_lance_ops; |
1476 | 1476 | ||
1477 | dev->irq = op->irqs[0]; | 1477 | dev->irq = op->archdata.irqs[0]; |
1478 | 1478 | ||
1479 | /* We cannot sleep if the chip is busy during a | 1479 | /* We cannot sleep if the chip is busy during a |
1480 | * multicast list update event, because such events | 1480 | * multicast list update event, because such events |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 72b579c8d812..446517487084 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -803,7 +803,7 @@ static struct sunqec * __devinit get_qec(struct of_device *child) | |||
803 | 803 | ||
804 | qec_init_once(qecp, op); | 804 | qec_init_once(qecp, op); |
805 | 805 | ||
806 | if (request_irq(op->irqs[0], qec_interrupt, | 806 | if (request_irq(op->archdata.irqs[0], qec_interrupt, |
807 | IRQF_SHARED, "qec", (void *) qecp)) { | 807 | IRQF_SHARED, "qec", (void *) qecp)) { |
808 | printk(KERN_ERR "qec: Can't register irq.\n"); | 808 | printk(KERN_ERR "qec: Can't register irq.\n"); |
809 | goto fail; | 809 | goto fail; |
@@ -901,7 +901,7 @@ static int __devinit qec_ether_init(struct of_device *op) | |||
901 | SET_NETDEV_DEV(dev, &op->dev); | 901 | SET_NETDEV_DEV(dev, &op->dev); |
902 | 902 | ||
903 | dev->watchdog_timeo = 5*HZ; | 903 | dev->watchdog_timeo = 5*HZ; |
904 | dev->irq = op->irqs[0]; | 904 | dev->irq = op->archdata.irqs[0]; |
905 | dev->dma = 0; | 905 | dev->dma = 0; |
906 | dev->ethtool_ops = &qe_ethtool_ops; | 906 | dev->ethtool_ops = &qe_ethtool_ops; |
907 | dev->netdev_ops = &qec_ops; | 907 | dev->netdev_ops = &qec_ops; |
@@ -999,7 +999,7 @@ static void __exit qec_exit(void) | |||
999 | struct sunqec *next = root_qec_dev->next_module; | 999 | struct sunqec *next = root_qec_dev->next_module; |
1000 | struct of_device *op = root_qec_dev->op; | 1000 | struct of_device *op = root_qec_dev->op; |
1001 | 1001 | ||
1002 | free_irq(op->irqs[0], (void *) root_qec_dev); | 1002 | free_irq(op->archdata.irqs[0], (void *) root_qec_dev); |
1003 | of_iounmap(&op->resource[0], root_qec_dev->gregs, | 1003 | of_iounmap(&op->resource[0], root_qec_dev->gregs, |
1004 | GLOB_REG_SIZE); | 1004 | GLOB_REG_SIZE); |
1005 | kfree(root_qec_dev); | 1005 | kfree(root_qec_dev); |