diff options
Diffstat (limited to 'drivers/net/fs_enet/mac-scc.c')
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index e3557eca7b6d..029b3c7ef29c 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/bitops.h> | 32 | #include <linux/bitops.h> |
33 | #include <linux/fs.h> | 33 | #include <linux/fs.h> |
34 | #include <linux/platform_device.h> | 34 | #include <linux/platform_device.h> |
35 | #include <linux/of_platform.h> | ||
35 | 36 | ||
36 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
37 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
@@ -43,10 +44,6 @@ | |||
43 | #include <asm/cpm1.h> | 44 | #include <asm/cpm1.h> |
44 | #endif | 45 | #endif |
45 | 46 | ||
46 | #ifdef CONFIG_PPC_CPM_NEW_BINDING | ||
47 | #include <linux/of_platform.h> | ||
48 | #endif | ||
49 | |||
50 | #include "fs_enet.h" | 47 | #include "fs_enet.h" |
51 | 48 | ||
52 | /*************************************************/ | 49 | /*************************************************/ |
@@ -99,7 +96,6 @@ static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op) | |||
99 | 96 | ||
100 | static int do_pd_setup(struct fs_enet_private *fep) | 97 | static int do_pd_setup(struct fs_enet_private *fep) |
101 | { | 98 | { |
102 | #ifdef CONFIG_PPC_CPM_NEW_BINDING | ||
103 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct of_device *ofdev = to_of_device(fep->dev); |
104 | 100 | ||
105 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 101 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); |
@@ -115,27 +111,6 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
115 | iounmap(fep->scc.sccp); | 111 | iounmap(fep->scc.sccp); |
116 | return -EINVAL; | 112 | return -EINVAL; |
117 | } | 113 | } |
118 | #else | ||
119 | struct platform_device *pdev = to_platform_device(fep->dev); | ||
120 | struct resource *r; | ||
121 | |||
122 | /* Fill out IRQ field */ | ||
123 | fep->interrupt = platform_get_irq_byname(pdev, "interrupt"); | ||
124 | if (fep->interrupt < 0) | ||
125 | return -EINVAL; | ||
126 | |||
127 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | ||
128 | fep->scc.sccp = ioremap(r->start, r->end - r->start + 1); | ||
129 | |||
130 | if (fep->scc.sccp == NULL) | ||
131 | return -EINVAL; | ||
132 | |||
133 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); | ||
134 | fep->scc.ep = ioremap(r->start, r->end - r->start + 1); | ||
135 | |||
136 | if (fep->scc.ep == NULL) | ||
137 | return -EINVAL; | ||
138 | #endif | ||
139 | 114 | ||
140 | return 0; | 115 | return 0; |
141 | } | 116 | } |
@@ -149,16 +124,6 @@ static int setup_data(struct net_device *dev) | |||
149 | { | 124 | { |
150 | struct fs_enet_private *fep = netdev_priv(dev); | 125 | struct fs_enet_private *fep = netdev_priv(dev); |
151 | 126 | ||
152 | #ifndef CONFIG_PPC_CPM_NEW_BINDING | ||
153 | struct fs_platform_info *fpi = fep->fpi; | ||
154 | |||
155 | fep->scc.idx = fs_get_scc_index(fpi->fs_no); | ||
156 | if ((unsigned int)fep->fcc.idx >= 4) /* max 4 SCCs */ | ||
157 | return -EINVAL; | ||
158 | |||
159 | fpi->cp_command = fep->fcc.idx << 6; | ||
160 | #endif | ||
161 | |||
162 | do_pd_setup(fep); | 127 | do_pd_setup(fep); |
163 | 128 | ||
164 | fep->scc.hthi = 0; | 129 | fep->scc.hthi = 0; |