aboutsummaryrefslogtreecommitdiffstats
path: root/package/switch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-03-14 13:42:21 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-03-14 13:42:21 +0000
commit812529c2fa690b6fbafef9df1b7badf2d94c07c0 (patch)
tree5911736c21f9cb28a9a3ce19f5f249d022307171 /package/switch
parent9a1beb72da81192873e8a18adc33d978725ede30 (diff)
downloadupstream-812529c2fa690b6fbafef9df1b7badf2d94c07c0.tar.gz
upstream-812529c2fa690b6fbafef9df1b7badf2d94c07c0.tar.bz2
upstream-812529c2fa690b6fbafef9df1b7badf2d94c07c0.zip
fix kmod-switch compile on brcm-2.4 (#1461)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6565 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/switch')
-rw-r--r--package/switch/Makefile2
-rw-r--r--package/switch/src/switch-adm.c22
2 files changed, 12 insertions, 12 deletions
diff --git a/package/switch/Makefile b/package/switch/Makefile
index 172d9911fe..81ae346555 100644
--- a/package/switch/Makefile
+++ b/package/switch/Makefile
@@ -36,7 +36,7 @@ define Build/Prepare
endef
ifeq ($(BOARD),brcm)
-BUILDFLAGS := -DBROADCOM -DBCMDRIVER
+BUILDFLAGS := -DBROADCOM -DBCMDRIVER -I$(LINUX_DIR)/arch/mips/bcm947xx/include
else
ifeq ($(BOARD),brcm47xx)
BUILDFLAGS := -DBROADCOM
diff --git a/package/switch/src/switch-adm.c b/package/switch/src/switch-adm.c
index 8d96316b7c..0fb21ffaaf 100644
--- a/package/switch/src/switch-adm.c
+++ b/package/switch/src/switch-adm.c
@@ -75,7 +75,7 @@ MODULE_PARM(force, "i");
#define atoi(str) simple_strtoul(((str != NULL) ? str : ""), NULL, 0)
-#if defined(BCMGPIO2) || defined(BCMGPIO)
+#ifdef BROADCOM
extern char *nvram_get(char *name);
/* Return gpio pin number assigned to the named pin */
@@ -86,7 +86,7 @@ extern char *nvram_get(char *name);
*
* 'def_pin' is returned if there is no such variable found.
*/
-static unsigned int getgpiopin(char *pin_name, unsigned int def_pin)
+static unsigned int get_gpiopin(char *pin_name, unsigned int def_pin)
{
char name[] = "gpioXXXX";
char *val;
@@ -496,25 +496,25 @@ static int detect_adm(void)
{
int ret = 0;
-#if defined(BCMGPIO2) || defined(BCMGPIO)
+#ifdef BROADCOM
int boardflags = atoi(nvram_get("boardflags"));
int boardnum = atoi(nvram_get("boardnum"));
if (boardnum == 44) { /* Trendware TEW-411BRP+ */
ret = 1;
- eecs = getgpiopin("adm_eecs", 2);
- eesk = getgpiopin("adm_eesk", 3);
- eedi = getgpiopin("adm_eedi", 4);
- eerc = getgpiopin("adm_rc", 5);
+ eecs = get_gpiopin("adm_eecs", 2);
+ eesk = get_gpiopin("adm_eesk", 3);
+ eedi = get_gpiopin("adm_eedi", 4);
+ eerc = get_gpiopin("adm_rc", 5);
} else if ((boardflags & 0x80) || force) {
ret = 1;
- eecs = getgpiopin("adm_eecs", 2);
- eesk = getgpiopin("adm_eesk", 3);
- eedi = getgpiopin("adm_eedi", 4);
- eerc = getgpiopin("adm_rc", 0);
+ eecs = get_gpiopin("adm_eecs", 2);
+ eesk = get_gpiopin("adm_eesk", 3);
+ eedi = get_gpiopin("adm_eedi", 4);
+ eerc = get_gpiopin("adm_rc", 0);
} else if ((strcmp(nvram_get("boardtype") ?: "", "bcm94710dev") == 0) &&
(strncmp(nvram_get("boardnum") ?: "", "42", 2) == 0)) {