[bcm63xx] add support for HomeStation ADB P.DG A4001N.
[openwrt.git] / target / linux / brcm63xx / base-files / lib / brcm63xx.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2007 OpenWrt.org
4 #
5 #
6
7 board_name=""
8 status_led=""
9 status_led2=""
10 sys_mtd_part=""
11 brcm63xx_has_reset_button=""
12
13 brcm63xx_detect() {
14         board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
15
16         if [ "$board_name" = "96358VW" ] && [ -e /proc/switch/eth1/enable ]; then
17                 board_name="DVAG3810BN"
18         fi
19
20         case "$board_name" in
21         96328avng)
22                 status_led="96328avng::power"
23                 ifname=eth0
24                 ;;
25         963281TAN)
26                 status_led="963281TAN::power"
27                 ifname=eth0
28                 ;;
29         963281T_TEF)
30                 brcm63xx_has_reset_button="true"
31                 status_led="963281T_TEF:green:power"
32                 ifname=eth0
33                 ;;
34         96348GW)
35                 status_led="power"
36                 brcm63xx_has_reset_button="true"
37                 ifname=eth1
38                 ;;
39         GW6000)
40                 brcm63xx_has_reset_button="true"
41                 ifname=eth1
42                 ;;
43         GW6200)
44                 status_led="line1"
45                 status_led2="tel"
46                 brcm63xx_has_reset_button="true"
47                 ifname=eth1
48                 ;;
49         96348GW-11)
50                 status_led="power"
51                 brcm63xx_has_reset_button="true"
52                 ifname=eth1
53                 ;;
54         CT536_CT5621)
55                 status_led="power"
56                 brcm63xx_has_reset_button="true"
57                 ifname=eth0
58                 ;;
59         SPW500V)
60                 status_led="power:green"
61                 brcm63xx_has_reset_button="true"
62                 ifname=eth0
63                 ;;
64         AW4139 |\
65         AW4339U)
66                 status_led="dsl-274xb:green:power"
67                 brcm63xx_has_reset_button="true"
68                 ifname=eth0
69                 ;;
70         96358-502V)
71                 status_led="spw303v:green:power+adsl"
72                 brcm63xx_has_reset_button="true"
73                 ifname=eth0
74                 ;;
75         V2110)
76                 status_led="V2110:power:green"
77                 brcm63xx_has_reset_button="true"
78                 ifname=eth0
79                 ;;
80         CPVA642)
81                 status_led="power:green"
82                 brcm63xx_has_reset_button="true"
83                 ifname=eth0
84                 ;;
85         D-4P-W)
86                 status_led="power:green"
87                 brcm63xx_has_reset_button="true"
88                 ifname=eth0
89                 ;;
90         NB6)
91                 brcm63xx_has_reset_button="true"
92                 ifname=eth0
93                 ;;
94         *)
95                 ;;
96         esac
97 }
98
99 brcm63xx_detect