diff options
author | Vitaly Bordug <vbordug@ru.mvista.com> | 2007-01-27 03:00:04 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-30 09:36:01 -0500 |
commit | b1f54ba34f9e036ab515bbac0c01d17300e1c79a (patch) | |
tree | cf50663a12573623611188f65138f3bd7f711227 /drivers/net/fs_enet/mac-scc.c | |
parent | 0c0b3ae68ec93b1db5c637d294647d1cca0df763 (diff) |
FS_ENET: OF-related fixup for FEC and SCC MAC's
Updated direct resource pass with ioremap call, make it grant proper IRQ
mapping, stuff incompatible with the new approach were respectively put
under #ifndef CONFIG_PPC_MERGE. It is required so that both ppc and
powerpc could utilize fs_enet effectively.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/fs_enet/mac-scc.c')
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 95ec5872c507..afd7fca7c6c4 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -121,13 +121,13 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
121 | return -EINVAL; | 121 | return -EINVAL; |
122 | 122 | ||
123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); | 123 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); |
124 | fep->scc.sccp = (void *)r->start; | 124 | fep->scc.sccp = ioremap(r->start, r->end - r->start + 1); |
125 | 125 | ||
126 | if (fep->scc.sccp == NULL) | 126 | if (fep->scc.sccp == NULL) |
127 | return -EINVAL; | 127 | return -EINVAL; |
128 | 128 | ||
129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); | 129 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pram"); |
130 | fep->scc.ep = (void *)r->start; | 130 | fep->scc.ep = ioremap(r->start, r->end - r->start + 1); |
131 | 131 | ||
132 | if (fep->scc.ep == NULL) | 132 | if (fep->scc.ep == NULL) |
133 | return -EINVAL; | 133 | return -EINVAL; |
@@ -397,6 +397,7 @@ static void stop(struct net_device *dev) | |||
397 | 397 | ||
398 | static void pre_request_irq(struct net_device *dev, int irq) | 398 | static void pre_request_irq(struct net_device *dev, int irq) |
399 | { | 399 | { |
400 | #ifndef CONFIG_PPC_MERGE | ||
400 | immap_t *immap = fs_enet_immap; | 401 | immap_t *immap = fs_enet_immap; |
401 | u32 siel; | 402 | u32 siel; |
402 | 403 | ||
@@ -410,6 +411,7 @@ static void pre_request_irq(struct net_device *dev, int irq) | |||
410 | siel &= ~(0x80000000 >> (irq & ~1)); | 411 | siel &= ~(0x80000000 >> (irq & ~1)); |
411 | out_be32(&immap->im_siu_conf.sc_siel, siel); | 412 | out_be32(&immap->im_siu_conf.sc_siel, siel); |
412 | } | 413 | } |
414 | #endif | ||
413 | } | 415 | } |
414 | 416 | ||
415 | static void post_free_irq(struct net_device *dev, int irq) | 417 | static void post_free_irq(struct net_device *dev, int irq) |