mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-10 23:12:48 +00:00
sync kmod-switch with whiterussian
SVN-Revision: 2989
This commit is contained in:
parent
fd4279b8ed
commit
372988515c
@ -413,6 +413,7 @@ static int handle_vlan_enable_write(void *driver, char *buf, int nr)
|
|||||||
static int handle_reset(void *driver, char *buf, int nr)
|
static int handle_reset(void *driver, char *buf, int nr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
u32 cfg;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reset sequence: RC high->low(100ms)->high(30ms)
|
* Reset sequence: RC high->low(100ms)->high(30ms)
|
||||||
@ -438,14 +439,15 @@ static int handle_reset(void *driver, char *buf, int nr)
|
|||||||
udelay(1000);
|
udelay(1000);
|
||||||
/* Leave RC high and disable GPIO outputs */
|
/* Leave RC high and disable GPIO outputs */
|
||||||
adm_disout((__u8)(eecs | eesk | eedi));
|
adm_disout((__u8)(eecs | eesk | eedi));
|
||||||
|
|
||||||
}
|
}
|
||||||
/* set up initial configuration for ports */
|
|
||||||
for (i = 0; i <= 5; i++) {
|
/* set up initial configuration for cpu port */
|
||||||
int cfg = 0x8000 | /* Auto MDIX */
|
cfg = (0x8000 | /* Auto MDIX */
|
||||||
(((i == 5) ? 1 : 0) << 4) | /* Tagging */
|
(0xf << 10) | /* PVID */
|
||||||
0xf; /* full duplex, 100Mbps, auto neg, flow ctrl */
|
(1 << 4) | /* Tagging */
|
||||||
adm_wreg(port_conf[i], cfg);
|
0xf); /* full duplex, 100Mbps, auto neg, flow ctrl */
|
||||||
}
|
adm_wreg(port_conf[5], cfg);
|
||||||
|
|
||||||
/* vlan mode select register (0x11): vlan on, mac clone */
|
/* vlan mode select register (0x11): vlan on, mac clone */
|
||||||
adm_wreg(0x11, 0xff30);
|
adm_wreg(0x11, 0xff30);
|
||||||
@ -490,13 +492,12 @@ static int detect_adm()
|
|||||||
eedi = getgpiopin("adm_eedi", 4);
|
eedi = getgpiopin("adm_eedi", 4);
|
||||||
eerc = getgpiopin("adm_rc", 0);
|
eerc = getgpiopin("adm_rc", 0);
|
||||||
|
|
||||||
} else if ((strcmp(nvram_get("boardtype"), "bcm94710dev") == 0) &&
|
} else if ((strcmp(nvram_get("boardtype") ?: "", "bcm94710dev") == 0) &&
|
||||||
(strncmp(nvram_get("boardnum"), "42", 2) == 0)) {
|
(strncmp(nvram_get("boardnum") ?: "", "42", 2) == 0)) {
|
||||||
/* WRT54G v1.1 hack */
|
/* WRT54G v1.1 hack */
|
||||||
eecs = 2;
|
eecs = 2;
|
||||||
eesk = 3;
|
eesk = 3;
|
||||||
eedi = 5;
|
eedi = 5;
|
||||||
eerc = 6;
|
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user