add western digital netcenter support to broadcom-diag (#6124) original patch from Christoph Muellner
SVN-Revision: 19008
This commit is contained in:
parent
89f3773ca4
commit
61a1c4d06b
1 changed files with 31 additions and 0 deletions
|
@ -133,6 +133,9 @@ enum {
|
||||||
/* Sitecom */
|
/* Sitecom */
|
||||||
WL105B,
|
WL105B,
|
||||||
|
|
||||||
|
/* Western Digital */
|
||||||
|
WDNetCenter,
|
||||||
|
|
||||||
/* Askey */
|
/* Askey */
|
||||||
RT210W,
|
RT210W,
|
||||||
};
|
};
|
||||||
|
@ -151,6 +154,21 @@ static void __init bcm4780_init(void) {
|
||||||
schedule_timeout(HZ * 5);
|
schedule_timeout(HZ * 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __init NetCenter_init(void) {
|
||||||
|
/* unset pin 6 (+12V) */
|
||||||
|
int pin = 1 << 6;
|
||||||
|
gpio_outen(pin, pin);
|
||||||
|
gpio_control(pin, 0);
|
||||||
|
gpio_out(pin, pin);
|
||||||
|
/* unset pin 1 (turn off red led, blue will light alone if +5V comes up) */
|
||||||
|
pin = 1 << 1;
|
||||||
|
gpio_outen(pin, pin);
|
||||||
|
gpio_control(pin, 0);
|
||||||
|
gpio_out(pin, pin);
|
||||||
|
/* unset pin 3 (+5V) and wait 5 seconds (harddisk spin up) */
|
||||||
|
bcm4780_init();
|
||||||
|
}
|
||||||
|
|
||||||
static void __init bcm57xx_init(void) {
|
static void __init bcm57xx_init(void) {
|
||||||
int pin = 1 << 2;
|
int pin = 1 << 2;
|
||||||
|
|
||||||
|
@ -810,6 +828,15 @@ static struct platform_t __initdata platforms[] = {
|
||||||
{ .name = "power", .gpio = 1 << 3},
|
{ .name = "power", .gpio = 1 << 3},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
/* Western Digital Net Center */
|
||||||
|
[WDNetCenter] = {
|
||||||
|
.name = "Western Digital NetCenter",
|
||||||
|
.buttons = {
|
||||||
|
{ .name = "power", .gpio = 1 << 0},
|
||||||
|
{ .name = "reset", .gpio = 1 << 7},
|
||||||
|
},
|
||||||
|
.platform_init = NetCenter_init,
|
||||||
|
},
|
||||||
/* Askey (and clones) */
|
/* Askey (and clones) */
|
||||||
[RT210W] = {
|
[RT210W] = {
|
||||||
.name = "Askey RT210W",
|
.name = "Askey RT210W",
|
||||||
|
@ -965,6 +992,10 @@ static struct platform_t __init *platform_detect(void)
|
||||||
!strcmp(getvar("boardflags"), "0x750")) /* D-Link DIR-320 */
|
!strcmp(getvar("boardflags"), "0x750")) /* D-Link DIR-320 */
|
||||||
return &platforms[DIR320];
|
return &platforms[DIR320];
|
||||||
|
|
||||||
|
if (!strncmp(boardnum, "TH",2) && !strcmp(boardtype,"0x042f")) {
|
||||||
|
return &platforms[WDNetCenter];
|
||||||
|
}
|
||||||
|
|
||||||
} else { /* PMON based - old stuff */
|
} else { /* PMON based - old stuff */
|
||||||
if ((simple_strtoul(getvar("GemtekPmonVer"), NULL, 0) == 9) &&
|
if ((simple_strtoul(getvar("GemtekPmonVer"), NULL, 0) == 9) &&
|
||||||
(simple_strtoul(getvar("et0phyaddr"), NULL, 0) == 30)) {
|
(simple_strtoul(getvar("et0phyaddr"), NULL, 0) == 30)) {
|
||||||
|
|
Loading…
Reference in a new issue