aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixp2000
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixp2000')
-rw-r--r--drivers/net/ixp2000/pm3386.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/net/ixp2000/pm3386.c b/drivers/net/ixp2000/pm3386.c
index ec70b1d553e3..5c7ab7564053 100644
--- a/drivers/net/ixp2000/pm3386.c
+++ b/drivers/net/ixp2000/pm3386.c
@@ -89,7 +89,37 @@ static void pm3386_port_reg_write(int port, int _reg, int spacing, u16 value)
89 89
90void pm3386_reset(void) 90void pm3386_reset(void)
91{ 91{
92 /* @@@ Implement me. */ 92 u8 mac[3][6];
93
94 /* Save programmed MAC addresses. */
95 pm3386_get_mac(0, mac[0]);
96 pm3386_get_mac(1, mac[1]);
97 pm3386_get_mac(2, mac[2]);
98
99 /* Assert analog and digital reset. */
100 pm3386_reg_write(0, 0x002, 0x0060);
101 pm3386_reg_write(1, 0x002, 0x0060);
102 mdelay(1);
103
104 /* Deassert analog reset. */
105 pm3386_reg_write(0, 0x002, 0x0062);
106 pm3386_reg_write(1, 0x002, 0x0062);
107 mdelay(10);
108
109 /* Deassert digital reset. */
110 pm3386_reg_write(0, 0x002, 0x0063);
111 pm3386_reg_write(1, 0x002, 0x0063);
112 mdelay(10);
113
114 /* Restore programmed MAC addresses. */
115 pm3386_set_mac(0, mac[0]);
116 pm3386_set_mac(1, mac[1]);
117 pm3386_set_mac(2, mac[2]);
118
119 /* Disable carrier on all ports. */
120 pm3386_set_carrier(0, 0);
121 pm3386_set_carrier(1, 0);
122 pm3386_set_carrier(2, 0);
93} 123}
94 124
95static u16 swaph(u16 x) 125static u16 swaph(u16 x)