git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
drivers
/
net
/
fs_enet
/
mac-fcc.c
diff --git
a/drivers/net/fs_enet/mac-fcc.c
b/drivers/net/fs_enet/mac-fcc.c
index
1ff2597
..
95e2bb8
100644
(file)
--- a/
drivers/net/fs_enet/mac-fcc.c
+++ b/
drivers/net/fs_enet/mac-fcc.c
@@
-12,6
+12,7
@@
* kind, whether express or implied.
*/
* kind, whether express or implied.
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
@@
-34,7
+35,6
@@
#include <linux/bitops.h>
#include <linux/fs.h>
#include <linux/platform_device.h>
#include <linux/bitops.h>
#include <linux/fs.h>
#include <linux/platform_device.h>
-#include <linux/phy.h>
#include <asm/immap_cpm2.h>
#include <asm/mpc8260.h>
#include <asm/immap_cpm2.h>
#include <asm/mpc8260.h>
@@
-123,32
+123,22
@@
static int do_pd_setup(struct fs_enet_private *fep)
/* Attach the memory for the FCC Parameter RAM */
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_pram");
/* Attach the memory for the FCC Parameter RAM */
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_pram");
- fep->fcc.ep = (void *)ioremap(r->start, r->end - r->start + 1);
+ fep->fcc.ep = (void *)r->start;
+
if (fep->fcc.ep == NULL)
return -EINVAL;
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_regs");
if (fep->fcc.ep == NULL)
return -EINVAL;
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fcc_regs");
- fep->fcc.fccp = (void *)ioremap(r->start, r->end - r->start + 1);
+ fep->fcc.fccp = (void *)r->start;
+
if (fep->fcc.fccp == NULL)
return -EINVAL;
if (fep->fcc.fccp == NULL)
return -EINVAL;
- if (fep->fpi->fcc_regs_c) {
-
- fep->fcc.fcccp = (void *)fep->fpi->fcc_regs_c;
- } else {
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM,
- "fcc_regs_c");
- fep->fcc.fcccp = (void *)ioremap(r->start,
- r->end - r->start + 1);
- }
+ fep->fcc.fcccp = (void *)fep->fpi->fcc_regs_c;
if (fep->fcc.fcccp == NULL)
return -EINVAL;
if (fep->fcc.fcccp == NULL)
return -EINVAL;
- fep->fcc.mem = (void *)fep->fpi->mem_offset;
- if (fep->fcc.mem == NULL)
- return -EINVAL;
-
return 0;
}
return 0;
}
@@
-166,6
+156,8
@@
static int setup_data(struct net_device *dev)
if ((unsigned int)fep->fcc.idx >= 3) /* max 3 FCCs */
return -EINVAL;
if ((unsigned int)fep->fcc.idx >= 3) /* max 3 FCCs */
return -EINVAL;
+ fep->fcc.mem = (void *)fpi->mem_offset;
+
if (do_pd_setup(fep) != 0)
return -EINVAL;
if (do_pd_setup(fep) != 0)
return -EINVAL;
@@
-403,7
+395,7
@@
static void restart(struct net_device *dev)
/* adjust to speed (for RMII mode) */
if (fpi->use_rmii) {
/* adjust to speed (for RMII mode) */
if (fpi->use_rmii) {
- if (fep->
phydev->
speed == 100)
+ if (fep->speed == 100)
C8(fcccp, fcc_gfemr, 0x20);
else
S8(fcccp, fcc_gfemr, 0x20);
C8(fcccp, fcc_gfemr, 0x20);
else
S8(fcccp, fcc_gfemr, 0x20);
@@
-429,7
+421,7
@@
static void restart(struct net_device *dev)
S32(fccp, fcc_fpsmr, FCC_PSMR_RMII);
/* adjust to duplex mode */
S32(fccp, fcc_fpsmr, FCC_PSMR_RMII);
/* adjust to duplex mode */
- if (fep->
phydev->
duplex)
+ if (fep->duplex)
S32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB);
else
C32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB);
S32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB);
else
C32(fccp, fcc_fpsmr, FCC_PSMR_FDE | FCC_PSMR_LPB);
@@
-495,10
+487,7
@@
static void rx_bd_done(struct net_device *dev)
static void tx_kickstart(struct net_device *dev)
{
static void tx_kickstart(struct net_device *dev)
{
- struct fs_enet_private *fep = netdev_priv(dev);
- fcc_t *fccp = fep->fcc.fccp;
-
- S32(fccp, fcc_ftodr, 0x80);
+ /* nothing */
}
static u32 get_int_events(struct net_device *dev)
}
static u32 get_int_events(struct net_device *dev)