aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/Kconfig2
-rw-r--r--arch/m32r/kernel/ptrace.c1
-rw-r--r--arch/m32r/kernel/smpboot.c1
-rw-r--r--arch/m32r/kernel/sys_m32r.c1
-rw-r--r--drivers/net/fec.c49
5 files changed, 42 insertions, 12 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index abb582bc218f..5c8a845a4129 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -938,7 +938,7 @@ source "drivers/acpi/Kconfig"
938 938
939menuconfig APM 939menuconfig APM
940 tristate "APM (Advanced Power Management) BIOS support" 940 tristate "APM (Advanced Power Management) BIOS support"
941 depends on PM && !X86_VISWS 941 depends on PM_SLEEP && !X86_VISWS
942 ---help--- 942 ---help---
943 APM is a BIOS specification for saving power using several different 943 APM is a BIOS specification for saving power using several different
944 techniques. This is mostly useful for battery powered laptops with 944 techniques. This is mostly useful for battery powered laptops with
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 57a92ef31a90..62a51429306e 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -17,6 +17,7 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/err.h>
20#include <linux/smp.h> 21#include <linux/smp.h>
21#include <linux/smp_lock.h> 22#include <linux/smp_lock.h>
22#include <linux/errno.h> 23#include <linux/errno.h>
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
index 3eb305953497..9dae410014d8 100644
--- a/arch/m32r/kernel/smpboot.c
+++ b/arch/m32r/kernel/smpboot.c
@@ -43,6 +43,7 @@
43#include <linux/init.h> 43#include <linux/init.h>
44#include <linux/kernel.h> 44#include <linux/kernel.h>
45#include <linux/mm.h> 45#include <linux/mm.h>
46#include <linux/err.h>
46#include <linux/irq.h> 47#include <linux/irq.h>
47#include <linux/bootmem.h> 48#include <linux/bootmem.h>
48#include <linux/delay.h> 49#include <linux/delay.h>
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index bda85548de6c..b13dbbeaeafa 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -10,6 +10,7 @@
10#include <linux/errno.h> 10#include <linux/errno.h>
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/fs.h>
13#include <linux/smp.h> 14#include <linux/smp.h>
14#include <linux/sem.h> 15#include <linux/sem.h>
15#include <linux/msg.h> 16#include <linux/msg.h>
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 03023dd17829..4e8df910c00d 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -47,6 +47,7 @@
47#include <asm/uaccess.h> 47#include <asm/uaccess.h>
48#include <asm/io.h> 48#include <asm/io.h>
49#include <asm/pgtable.h> 49#include <asm/pgtable.h>
50#include <asm/cacheflush.h>
50 51
51#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \ 52#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || \
52 defined(CONFIG_M5272) || defined(CONFIG_M528x) || \ 53 defined(CONFIG_M5272) || defined(CONFIG_M528x) || \
@@ -98,8 +99,6 @@ static unsigned char fec_mac_default[] = {
98#define FEC_FLASHMAC 0xf0006006 99#define FEC_FLASHMAC 0xf0006006
99#elif defined(CONFIG_GILBARCONAP) || defined(CONFIG_SCALES) 100#elif defined(CONFIG_GILBARCONAP) || defined(CONFIG_SCALES)
100#define FEC_FLASHMAC 0xf0006000 101#define FEC_FLASHMAC 0xf0006000
101#elif defined (CONFIG_MTD_KeyTechnology)
102#define FEC_FLASHMAC 0xffe04000
103#elif defined(CONFIG_CANCam) 102#elif defined(CONFIG_CANCam)
104#define FEC_FLASHMAC 0xf0020000 103#define FEC_FLASHMAC 0xf0020000
105#elif defined (CONFIG_M5272C3) 104#elif defined (CONFIG_M5272C3)
@@ -191,6 +190,8 @@ struct fec_enet_private {
191 /* Hardware registers of the FEC device */ 190 /* Hardware registers of the FEC device */
192 volatile fec_t *hwp; 191 volatile fec_t *hwp;
193 192
193 struct net_device *netdev;
194
194 /* The saved address of a sent-in-place packet/buffer, for skfree(). */ 195 /* The saved address of a sent-in-place packet/buffer, for skfree(). */
195 unsigned char *tx_bounce[TX_RING_SIZE]; 196 unsigned char *tx_bounce[TX_RING_SIZE];
196 struct sk_buff* tx_skbuff[TX_RING_SIZE]; 197 struct sk_buff* tx_skbuff[TX_RING_SIZE];
@@ -1269,7 +1270,7 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
1269 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR3); 1270 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR3);
1270 *icrp = 0x00000ddd; 1271 *icrp = 0x00000ddd;
1271 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); 1272 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
1272 *icrp = (*icrp & 0x70777777) | 0x0d000000; 1273 *icrp = 0x0d000000;
1273} 1274}
1274 1275
1275static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) 1276static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
@@ -1331,7 +1332,7 @@ static void __inline__ fec_disable_phy_intr(void)
1331{ 1332{
1332 volatile unsigned long *icrp; 1333 volatile unsigned long *icrp;
1333 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); 1334 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
1334 *icrp = (*icrp & 0x70777777) | 0x08000000; 1335 *icrp = 0x08000000;
1335} 1336}
1336 1337
1337static void __inline__ fec_phy_ack_intr(void) 1338static void __inline__ fec_phy_ack_intr(void)
@@ -1339,7 +1340,7 @@ static void __inline__ fec_phy_ack_intr(void)
1339 volatile unsigned long *icrp; 1340 volatile unsigned long *icrp;
1340 /* Acknowledge the interrupt */ 1341 /* Acknowledge the interrupt */
1341 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1); 1342 icrp = (volatile unsigned long *) (MCF_MBAR + MCFSIM_ICR1);
1342 *icrp = (*icrp & 0x77777777) | 0x08000000; 1343 *icrp = 0x0d000000;
1343} 1344}
1344 1345
1345static void __inline__ fec_localhw_setup(void) 1346static void __inline__ fec_localhw_setup(void)
@@ -1426,6 +1427,29 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
1426 *gpio_pehlpar = 0xc0; 1427 *gpio_pehlpar = 0xc0;
1427 } 1428 }
1428#endif 1429#endif
1430
1431#if defined(CONFIG_M527x)
1432 /* Set up gpio outputs for MII lines */
1433 {
1434 volatile u8 *gpio_par_fec;
1435 volatile u16 *gpio_par_feci2c;
1436
1437 gpio_par_feci2c = (volatile u16 *)(MCF_IPSBAR + 0x100082);
1438 /* Set up gpio outputs for FEC0 MII lines */
1439 gpio_par_fec = (volatile u8 *)(MCF_IPSBAR + 0x100078);
1440
1441 *gpio_par_feci2c |= 0x0f00;
1442 *gpio_par_fec |= 0xc0;
1443
1444#if defined(CONFIG_FEC2)
1445 /* Set up gpio outputs for FEC1 MII lines */
1446 gpio_par_fec = (volatile u8 *)(MCF_IPSBAR + 0x100079);
1447
1448 *gpio_par_feci2c |= 0x00a0;
1449 *gpio_par_fec |= 0xc0;
1450#endif /* CONFIG_FEC2 */
1451 }
1452#endif /* CONFIG_M527x */
1429} 1453}
1430 1454
1431static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep) 1455static void __inline__ fec_set_mii(struct net_device *dev, struct fec_enet_private *fep)
@@ -1940,9 +1964,10 @@ static void mii_display_status(struct net_device *dev)
1940 printk(".\n"); 1964 printk(".\n");
1941} 1965}
1942 1966
1943static void mii_display_config(struct net_device *dev) 1967static void mii_display_config(struct work_struct *work)
1944{ 1968{
1945 struct fec_enet_private *fep = netdev_priv(dev); 1969 struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
1970 struct net_device *dev = fep->netdev;
1946 uint status = fep->phy_status; 1971 uint status = fep->phy_status;
1947 1972
1948 /* 1973 /*
@@ -1976,9 +2001,10 @@ static void mii_display_config(struct net_device *dev)
1976 fep->sequence_done = 1; 2001 fep->sequence_done = 1;
1977} 2002}
1978 2003
1979static void mii_relink(struct net_device *dev) 2004static void mii_relink(struct work_struct *work)
1980{ 2005{
1981 struct fec_enet_private *fep = netdev_priv(dev); 2006 struct fec_enet_private *fep = container_of(work, struct fec_enet_private, phy_task);
2007 struct net_device *dev = fep->netdev;
1982 int duplex; 2008 int duplex;
1983 2009
1984 /* 2010 /*
@@ -2022,7 +2048,7 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev)
2022 return; 2048 return;
2023 2049
2024 fep->mii_phy_task_queued = 1; 2050 fep->mii_phy_task_queued = 1;
2025 INIT_WORK(&fep->phy_task, (void*)mii_relink, dev); 2051 INIT_WORK(&fep->phy_task, mii_relink);
2026 schedule_work(&fep->phy_task); 2052 schedule_work(&fep->phy_task);
2027} 2053}
2028 2054
@@ -2035,7 +2061,7 @@ static void mii_queue_config(uint mii_reg, struct net_device *dev)
2035 return; 2061 return;
2036 2062
2037 fep->mii_phy_task_queued = 1; 2063 fep->mii_phy_task_queued = 1;
2038 INIT_WORK(&fep->phy_task, (void*)mii_display_config, dev); 2064 INIT_WORK(&fep->phy_task, mii_display_config);
2039 schedule_work(&fep->phy_task); 2065 schedule_work(&fep->phy_task);
2040} 2066}
2041 2067
@@ -2330,6 +2356,7 @@ int __init fec_enet_init(struct net_device *dev)
2330 2356
2331 fep->index = index; 2357 fep->index = index;
2332 fep->hwp = fecp; 2358 fep->hwp = fecp;
2359 fep->netdev = dev;
2333 2360
2334 /* Whack a reset. We should wait for this. 2361 /* Whack a reset. We should wait for this.
2335 */ 2362 */