From 1ee30e3c419824f45dc52d67516274548548b574 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 13 Jan 2011 17:26:47 +0100 Subject: update to Linux Kernel 2.6.37 --- mk/kernel-ver.mk | 4 +- package/iproute2/Makefile | 9 +- package/iproute2/files/Config | 2 + package/iproute2/patches/patch-tc_Makefile | 18 - package/iptables-snmp/patches/patch-Makefile_in | 11 + .../iptables-snmp/patches/patch-iptables-snmp_c | 12 + package/iptables/Makefile | 9 +- package/libvirt/patches/patch-configure | 38 + package/libvirt/patches/patch-libvirt_pc | 9 + .../patches/patch-agent_mibgroup_mibII_tcpTable_c | 48 + package/sdl/patches/patch-include_SDL_config_h | 311 + package/sdl/patches/patch-sdl-config_in | 16 + package/sdl/patches/patch-sdl_pc_in | 10 + package/tcl/patches/patch-unix_configure | 33 + package/tcl/patches/patch-unix_tclUnixTime_c | 39 + target/linux/config/Config.in.leds | 28 +- target/linux/config/Config.in.network | 8 +- target/linux/patches/2.6.37/ar7.patch | 90 + target/linux/patches/2.6.37/ar71xx.patch | 18667 ++++ target/linux/patches/2.6.37/aufs2.patch | 28523 ++++++ target/linux/patches/2.6.37/brcm.patch | 169 + .../linux/patches/2.6.37/bsd-compatibility.patch | 2512 + target/linux/patches/2.6.37/cc-abstract.patch | 14 + target/linux/patches/2.6.37/cris.patch | 5736 ++ target/linux/patches/2.6.37/cygwin-compat.patch | 14 + target/linux/patches/2.6.37/drm-kconfig.patch | 36 + target/linux/patches/2.6.37/exmap.patch | 11 + target/linux/patches/2.6.37/foxg20.patch | 522 + target/linux/patches/2.6.37/freebsd-compat.patch | 11 + target/linux/patches/2.6.37/gemalto.patch | 11 + target/linux/patches/2.6.37/lemote.patch | 4271 + target/linux/patches/2.6.37/mtd-root.patch | 64 + target/linux/patches/2.6.37/ocf-20100325.patch | 87545 +++++++++++++++++++ target/linux/patches/2.6.37/rb532.patch | 18 + target/linux/patches/2.6.37/startup.patch | 20 + target/linux/patches/2.6.37/uuid.patch | 261 + target/linux/patches/2.6.37/yaffs2.patch | 16912 ++++ .../kernel-headers/patches/2.6.37/aufs2.patch | 240 + .../patches/2.6.37/cleankernel.patch | 11 + .../patches/2.6.37/etrax-header.patch | 75 + .../patches/2.6.37/linux-gcc-check.patch | 18 + .../kernel-headers/patches/2.6.37/microperl.patch | 24 + 42 files changed, 166344 insertions(+), 36 deletions(-) create mode 100644 package/iproute2/files/Config delete mode 100644 package/iproute2/patches/patch-tc_Makefile create mode 100644 package/iptables-snmp/patches/patch-Makefile_in create mode 100644 package/iptables-snmp/patches/patch-iptables-snmp_c create mode 100644 package/libvirt/patches/patch-configure create mode 100644 package/libvirt/patches/patch-libvirt_pc create mode 100644 package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c create mode 100644 package/sdl/patches/patch-include_SDL_config_h create mode 100644 package/sdl/patches/patch-sdl-config_in create mode 100644 package/sdl/patches/patch-sdl_pc_in create mode 100644 package/tcl/patches/patch-unix_configure create mode 100644 package/tcl/patches/patch-unix_tclUnixTime_c create mode 100644 target/linux/patches/2.6.37/ar7.patch create mode 100644 target/linux/patches/2.6.37/ar71xx.patch create mode 100644 target/linux/patches/2.6.37/aufs2.patch create mode 100644 target/linux/patches/2.6.37/brcm.patch create mode 100644 target/linux/patches/2.6.37/bsd-compatibility.patch create mode 100644 target/linux/patches/2.6.37/cc-abstract.patch create mode 100644 target/linux/patches/2.6.37/cris.patch create mode 100644 target/linux/patches/2.6.37/cygwin-compat.patch create mode 100644 target/linux/patches/2.6.37/drm-kconfig.patch create mode 100644 target/linux/patches/2.6.37/exmap.patch create mode 100644 target/linux/patches/2.6.37/foxg20.patch create mode 100644 target/linux/patches/2.6.37/freebsd-compat.patch create mode 100644 target/linux/patches/2.6.37/gemalto.patch create mode 100644 target/linux/patches/2.6.37/lemote.patch create mode 100644 target/linux/patches/2.6.37/mtd-root.patch create mode 100644 target/linux/patches/2.6.37/ocf-20100325.patch create mode 100644 target/linux/patches/2.6.37/rb532.patch create mode 100644 target/linux/patches/2.6.37/startup.patch create mode 100644 target/linux/patches/2.6.37/uuid.patch create mode 100644 target/linux/patches/2.6.37/yaffs2.patch create mode 100644 toolchain/kernel-headers/patches/2.6.37/aufs2.patch create mode 100644 toolchain/kernel-headers/patches/2.6.37/cleankernel.patch create mode 100644 toolchain/kernel-headers/patches/2.6.37/etrax-header.patch create mode 100644 toolchain/kernel-headers/patches/2.6.37/linux-gcc-check.patch create mode 100644 toolchain/kernel-headers/patches/2.6.37/microperl.patch diff --git a/mk/kernel-ver.mk b/mk/kernel-ver.mk index 50b8c4056..1741c62d0 100644 --- a/mk/kernel-ver.mk +++ b/mk/kernel-ver.mk @@ -1,3 +1,3 @@ -KERNEL_VERSION:= 2.6.36 +KERNEL_VERSION:= 2.6.37 KERNEL_RELEASE:= 1 -KERNEL_MD5SUM:= 61f3739a73afb6914cb007f37fb09b62 +KERNEL_MD5SUM:= c8ee37b4fdccdb651e0603d35350b434 diff --git a/package/iproute2/Makefile b/package/iproute2/Makefile index 90b27a057..f0c815e59 100644 --- a/package/iproute2/Makefile +++ b/package/iproute2/Makefile @@ -41,18 +41,21 @@ $(eval $(call PKG_template,SS,ss,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_SS},${PK TCFLAGS+= -D_GNU_SOURCE XAKE_FLAGS+= CCOPTS="${TCFLAGS}" MFLAGS="CC=${TARGET_CC}" \ HOSTCFLAGS="-I${LINUX_HEADER_DIR}/include" - CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include" +post-configure: + $(CP) ./files/Config $(WRKBUILD)/ + ip-install: ${INSTALL_DIR} ${IDIR_IP}/{etc/iproute2,usr/sbin} ${INSTALL_DATA} ${WRKINST}/etc/iproute2/* ${IDIR_IP}/etc/iproute2/ ${INSTALL_BIN} ${WRKINST}/sbin/ip ${IDIR_IP}/usr/sbin/ip tc-install: - ${INSTALL_DIR} ${IDIR_TC}/{lib/tc,usr/sbin} + ${INSTALL_DIR} ${IDIR_TC}/{lib/tc,usr/sbin,usr/lib/tc} # use ${CP} here, since m_ipt.so is a symlink to m_xt.so - ${CP} ${WRKINST}/lib/tc/{m_*.so,*.dist} ${IDIR_TC}/lib/tc/ + ${CP} ${WRKINST}/lib/tc/m_*.so ${IDIR_TC}/lib/tc/ + ${CP} ${WRKINST}/usr/lib/tc/*.dist ${IDIR_TC}/usr/lib/tc/ ${INSTALL_BIN} ${WRKINST}/sbin/tc ${IDIR_TC}/usr/sbin/ tc-atm-install: diff --git a/package/iproute2/files/Config b/package/iproute2/files/Config new file mode 100644 index 000000000..0ba7d387d --- /dev/null +++ b/package/iproute2/files/Config @@ -0,0 +1,2 @@ +TC_CONFIG_ATM:=y +TC_CONFIG_XT:=y diff --git a/package/iproute2/patches/patch-tc_Makefile b/package/iproute2/patches/patch-tc_Makefile deleted file mode 100644 index 29a11b40b..000000000 --- a/package/iproute2/patches/patch-tc_Makefile +++ /dev/null @@ -1,18 +0,0 @@ - yeah, right. Disabling everything with echo-statements is really useful. ---- iproute2-2.6.34.orig/tc/Makefile 2010-05-19 17:32:43.000000000 +0200 -+++ iproute2-2.6.34/tc/Makefile 2011-01-03 18:28:02.980563959 +0100 -@@ -99,10 +99,11 @@ libtc.a: $(TCLIB) - $(AR) rcs $@ $(TCLIB) - - install: all -- echo mkdir -p $(MODDESTDIR) -- echo install -m 0755 tc $(DESTDIR)$(SBINDIR) -+ mkdir -p $(MODDESTDIR) -+ mkdir -p $(DESTDIR)$(SBINDIR) -+ install -m 0755 tc $(DESTDIR)$(SBINDIR) - for i in $(TCSO); \ -- do echo install -m 755 $$i $(MODDESTDIR); \ -+ do install -m 755 $$i $(MODDESTDIR); \ - done - if [ ! -f $(MODDESTDIR)/m_ipt.so ]; then \ - if [ -f $(MODDESTDIR)/m_xt.so ]; \ diff --git a/package/iptables-snmp/patches/patch-Makefile_in b/package/iptables-snmp/patches/patch-Makefile_in new file mode 100644 index 000000000..164003986 --- /dev/null +++ b/package/iptables-snmp/patches/patch-Makefile_in @@ -0,0 +1,11 @@ +--- iptables-snmp-0.1.orig/Makefile.in 2005-11-02 13:00:10.000000000 +0100 ++++ iptables-snmp-0.1/Makefile.in 2011-01-12 15:44:48.000000000 +0100 +@@ -67,7 +67,7 @@ OTHER = -Iinclude -DIPTABLES_VERSION=$( + + all: iptables-snmp.so + +-iptables-snmp.so: $(OBJS) libiptc.a Makefile ++iptables-snmp.so: $(OBJS) Makefile + $(CC) $(CFLAGS) $(OTHER) $(DFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) + + libiptc.a: $(LIBIPTC_OBJS) Makefile diff --git a/package/iptables-snmp/patches/patch-iptables-snmp_c b/package/iptables-snmp/patches/patch-iptables-snmp_c new file mode 100644 index 000000000..c129ff0e9 --- /dev/null +++ b/package/iptables-snmp/patches/patch-iptables-snmp_c @@ -0,0 +1,12 @@ +--- iptables-snmp-0.1.orig/iptables-snmp.c 2005-11-02 12:10:54.000000000 +0100 ++++ iptables-snmp-0.1/iptables-snmp.c 2011-01-12 15:46:19.000000000 +0100 +@@ -37,6 +37,9 @@ + + #include "libiptc/libiptc.h" + ++/* For backward compatibility */ ++//typedef struct iptc_handle *iptc_handle_t; ++ + static oid agent_version_oid[] = { + BASE_OID, 1, 0, AGENT_VERSION_INDEX + }; diff --git a/package/iptables/Makefile b/package/iptables/Makefile index d9229dc50..e20e117c5 100644 --- a/package/iptables/Makefile +++ b/package/iptables/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= iptables -PKG_VERSION:= 1.4.8 +PKG_VERSION:= 1.4.10 PKG_RELEASE:= 1 -PKG_MD5SUM:= 697ed89f37af4473a5f6349ba2700f2d +PKG_MD5SUM:= f382fe693f0b59d87bd47bea65eca198 PKG_DESCR:= The netfilter firewalling software PKG_SECTION:= firewall PKG_DEPENDS:= kmod-ip-nf-iptables kmod-nf-conntrack @@ -17,10 +17,7 @@ PKG_DEPENDS+= kmod-netfilter-xt-target-tcpmss PKG_DEPENDS6:= kmod-ip6-nf-iptables kmod-nf-conntrack-ipv6 PKG_DEPENDS6+= kmod-ip6-nf-filter kmod-ip6-nf-target-reject PKG_URL:= http://www.netfilter.org -PKG_SITES:= http://www.netfilter.org/projects/iptables/files/ \ - ftp://ftp.be.netfilter.org/pub/netfilter/iptables/ \ - ftp://ftp.de.netfilter.org/pub/netfilter/iptables/ \ - ftp://ftp.no.netfilter.org/pub/netfilter/iptables/ +PKG_SITES:= http://www.netfilter.org/projects/iptables/files/ PKG_SUBPKGS:= IPTABLES IP6TABLES diff --git a/package/libvirt/patches/patch-configure b/package/libvirt/patches/patch-configure new file mode 100644 index 000000000..87eb324fc --- /dev/null +++ b/package/libvirt/patches/patch-configure @@ -0,0 +1,38 @@ +--- libvirt-0.8.7.orig/configure 2011-01-04 03:22:44.000000000 +0100 ++++ libvirt-0.8.7/configure 2011-01-12 18:43:03.000000000 +0100 +@@ -36745,7 +36745,7 @@ $as_echo "$as_me: Found python in enviro + + # Find any Python interpreter. + if test -z "$PYTHON"; then +- for ac_prog in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 ++ for ac_prog in python python2 python3 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +@@ -36920,25 +36920,7 @@ $as_echo "$am_cv_python_pyexecdir" >&6; + if test -x "$PYTHON_CONFIG" + then + PYTHON_INCLUDES=`$PYTHON_CONFIG --includes` +- else +- if test -r $PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=-I$PYTHON_EXEC_PREFIX/include/python$PYTHON_VERSION +- else +- if test -r $prefix/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=-I$prefix/include/python$PYTHON_VERSION +- else +- if test -r /usr/include/python$PYTHON_VERSION/Python.h +- then +- PYTHON_INCLUDES=-I/usr/include/python$PYTHON_VERSION +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find python$PYTHON_VERSION/Python.h, disabling bindings" >&5 +-$as_echo "$as_me: Could not find python$PYTHON_VERSION/Python.h, disabling bindings" >&6;} +- with_python=no +- fi +- fi +- fi ++ echo "DEBUG: $PYTHON_CONFIG" + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find python interpreter, disabling bindings" >&5 diff --git a/package/libvirt/patches/patch-libvirt_pc b/package/libvirt/patches/patch-libvirt_pc new file mode 100644 index 000000000..a46fcce14 --- /dev/null +++ b/package/libvirt/patches/patch-libvirt_pc @@ -0,0 +1,9 @@ +--- libvirt-0.8.7.orig/libvirt.pc 2011-01-04 03:23:23.000000000 +0100 ++++ libvirt-0.8.7/libvirt.pc 2011-01-12 18:31:53.000000000 +0100 +@@ -7,5 +7,5 @@ Name: libvirt + Version: 0.8.7 + Description: libvirt library + Requires: +-Libs: -L${libdir} -lvirt -ldl ++Libs: -L${libdir} -lvirt -lintl + Cflags: -I${includedir} diff --git a/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c b/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c new file mode 100644 index 000000000..f0be57e78 --- /dev/null +++ b/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c @@ -0,0 +1,48 @@ +--- net-snmp-5.6.1.orig/agent/mibgroup/mibII/tcpTable.c 2010-10-20 15:12:08.000000000 +0200 ++++ net-snmp-5.6.1/agent/mibgroup/mibII/tcpTable.c 2011-01-12 14:48:14.000000000 +0100 +@@ -33,6 +33,12 @@ + #include + #include + #include ++ ++/* libnl 2.0 compatibility code */ ++#define nl_handle nl_sock ++#define nl_handle_alloc nl_socket_alloc ++#define nl_handle_alloc_cb nl_socket_alloc_cb ++#define nl_handle_destroy nl_socket_free + #endif + + #include +@@ -565,8 +571,8 @@ tcpTable_load_netlink(void) + } + + if (nl_connect(nl, NETLINK_INET_DIAG) < 0) { +- DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror())); +- snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror()); ++ DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(1))); ++ snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(1)); + nl_handle_destroy(nl); + return -1; + } +@@ -580,8 +586,8 @@ tcpTable_load_netlink(void) + nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0); + + if (nl_send_auto_complete(nl, nm) < 0) { +- DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror())); +- snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror()); ++ DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(1))); ++ snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(1)); + nl_handle_destroy(nl); + return -1; + } +@@ -593,8 +599,8 @@ tcpTable_load_netlink(void) + + while (running) { + if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) { +- DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror())); +- snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror()); ++ DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(1))); ++ snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(1)); + nl_handle_destroy(nl); + return -1; + } diff --git a/package/sdl/patches/patch-include_SDL_config_h b/package/sdl/patches/patch-include_SDL_config_h new file mode 100644 index 000000000..371f7199f --- /dev/null +++ b/package/sdl/patches/patch-include_SDL_config_h @@ -0,0 +1,311 @@ +--- SDL-1.2.14.orig/include/SDL_config.h 2009-10-19 13:51:07.000000000 +0200 ++++ SDL-1.2.14/include/SDL_config.h 2011-01-12 11:57:30.000000000 +0100 +@@ -1,3 +1,4 @@ ++/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */ + /* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2009 Sam Lantinga +@@ -23,23 +24,288 @@ + #ifndef _SDL_config_h + #define _SDL_config_h + ++/* This is a set of defines to configure the SDL features */ ++ ++/* General platform specific identifiers */ + #include "SDL_platform.h" + +-/* Add any platform that doesn't build using the configure system */ +-#if defined(__DREAMCAST__) +-#include "SDL_config_dreamcast.h" +-#elif defined(__MACOS__) +-#include "SDL_config_macos.h" +-#elif defined(__MACOSX__) +-#include "SDL_config_macosx.h" +-#elif defined(__SYMBIAN32__) +-#include "SDL_config_symbian.h" /* must be before win32! */ +-#elif defined(__WIN32__) +-#include "SDL_config_win32.h" +-#elif defined(__OS2__) +-#include "SDL_config_os2.h" ++/* Make sure that this isn't included by Visual C++ */ ++#ifdef _MSC_VER ++#error You should copy include/SDL_config.h.default to include/SDL_config.h ++#endif ++ ++/* C language features */ ++/* #undef const */ ++/* #undef inline */ ++/* #undef volatile */ ++ ++/* C datatypes */ ++/* #undef size_t */ ++/* #undef int8_t */ ++/* #undef uint8_t */ ++/* #undef int16_t */ ++/* #undef uint16_t */ ++/* #undef int32_t */ ++/* #undef uint32_t */ ++/* #undef int64_t */ ++/* #undef uint64_t */ ++/* #undef uintptr_t */ ++#define SDL_HAS_64BIT_TYPE 1 ++ ++/* Endianness */ ++#define SDL_BYTEORDER 1234 ++ ++/* Comment this if you want to build without any C library requirements */ ++#define HAVE_LIBC 1 ++#if HAVE_LIBC ++ ++/* Useful headers */ ++#define HAVE_ALLOCA_H 1 ++#define HAVE_SYS_TYPES_H 1 ++#define HAVE_STDIO_H 1 ++#define STDC_HEADERS 1 ++#define HAVE_STDLIB_H 1 ++#define HAVE_STDARG_H 1 ++#define HAVE_MALLOC_H 1 ++#define HAVE_MEMORY_H 1 ++#define HAVE_STRING_H 1 ++#define HAVE_STRINGS_H 1 ++#define HAVE_INTTYPES_H 1 ++#define HAVE_STDINT_H 1 ++#define HAVE_CTYPE_H 1 ++#define HAVE_MATH_H 1 ++#define HAVE_ICONV_H 1 ++#define HAVE_SIGNAL_H 1 ++/* #undef HAVE_ALTIVEC_H */ ++ ++/* C library functions */ ++#define HAVE_MALLOC 1 ++#define HAVE_CALLOC 1 ++#define HAVE_REALLOC 1 ++#define HAVE_FREE 1 ++#define HAVE_ALLOCA 1 ++#ifndef _WIN32 /* Don't use C runtime versions of these on Windows */ ++#define HAVE_GETENV 1 ++#define HAVE_PUTENV 1 ++#define HAVE_UNSETENV 1 ++#endif ++#define HAVE_QSORT 1 ++#define HAVE_ABS 1 ++#define HAVE_BCOPY 1 ++#define HAVE_MEMSET 1 ++#define HAVE_MEMCPY 1 ++#define HAVE_MEMMOVE 1 ++/* #undef HAVE_MEMCMP */ ++#define HAVE_STRLEN 1 ++#define HAVE_STRLCPY 1 ++#define HAVE_STRLCAT 1 ++#define HAVE_STRDUP 1 ++/* #undef HAVE__STRREV */ ++/* #undef HAVE__STRUPR */ ++/* #undef HAVE__STRLWR */ ++/* #undef HAVE_INDEX */ ++/* #undef HAVE_RINDEX */ ++#define HAVE_STRCHR 1 ++#define HAVE_STRRCHR 1 ++#define HAVE_STRSTR 1 ++/* #undef HAVE_ITOA */ ++/* #undef HAVE__LTOA */ ++/* #undef HAVE__UITOA */ ++/* #undef HAVE__ULTOA */ ++#define HAVE_STRTOL 1 ++#define HAVE_STRTOUL 1 ++/* #undef HAVE__I64TOA */ ++/* #undef HAVE__UI64TOA */ ++#define HAVE_STRTOLL 1 ++#define HAVE_STRTOULL 1 ++/* #undef HAVE_STRTOD */ ++#define HAVE_ATOI 1 ++#define HAVE_ATOF 1 ++#define HAVE_STRCMP 1 ++#define HAVE_STRNCMP 1 ++/* #undef HAVE__STRICMP */ ++#define HAVE_STRCASECMP 1 ++/* #undef HAVE__STRNICMP */ ++#define HAVE_STRNCASECMP 1 ++#define HAVE_SSCANF 1 ++#define HAVE_SNPRINTF 1 ++#define HAVE_VSNPRINTF 1 ++/* #undef HAVE_ICONV */ ++#define HAVE_SIGACTION 1 ++#define HAVE_SETJMP 1 ++#define HAVE_NANOSLEEP 1 ++/* #undef HAVE_CLOCK_GETTIME */ ++#define HAVE_GETPAGESIZE 1 ++#define HAVE_MPROTECT 1 ++ + #else +-#include "SDL_config_minimal.h" +-#endif /* platform config */ ++/* We may need some replacement for stdarg.h here */ ++#include ++#endif /* HAVE_LIBC */ ++ ++/* Allow disabling of core subsystems */ ++/* #undef SDL_AUDIO_DISABLED */ ++/* #undef SDL_CDROM_DISABLED */ ++/* #undef SDL_CPUINFO_DISABLED */ ++/* #undef SDL_EVENTS_DISABLED */ ++/* #undef SDL_FILE_DISABLED */ ++/* #undef SDL_JOYSTICK_DISABLED */ ++/* #undef SDL_LOADSO_DISABLED */ ++/* #undef SDL_THREADS_DISABLED */ ++/* #undef SDL_TIMERS_DISABLED */ ++/* #undef SDL_VIDEO_DISABLED */ ++ ++/* Enable various audio drivers */ ++#define SDL_AUDIO_DRIVER_ALSA 1 ++#define SDL_AUDIO_DRIVER_ALSA_DYNAMIC "libasound.so.2" ++/* #undef SDL_AUDIO_DRIVER_ARTS */ ++/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */ ++/* #undef SDL_AUDIO_DRIVER_BAUDIO */ ++/* #undef SDL_AUDIO_DRIVER_BSD */ ++/* #undef SDL_AUDIO_DRIVER_COREAUDIO */ ++/* #undef SDL_AUDIO_DRIVER_DART */ ++/* #undef SDL_AUDIO_DRIVER_DC */ ++#define SDL_AUDIO_DRIVER_DISK 1 ++#define SDL_AUDIO_DRIVER_DUMMY 1 ++/* #undef SDL_AUDIO_DRIVER_DMEDIA */ ++/* #undef SDL_AUDIO_DRIVER_DSOUND */ ++/* #undef SDL_AUDIO_DRIVER_PULSE */ ++/* #undef SDL_AUDIO_DRIVER_PULSE_DYNAMIC */ ++/* #undef SDL_AUDIO_DRIVER_ESD */ ++/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */ ++/* #undef SDL_AUDIO_DRIVER_MINT */ ++/* #undef SDL_AUDIO_DRIVER_MMEAUDIO */ ++/* #undef SDL_AUDIO_DRIVER_NAS */ ++/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */ ++/* #undef SDL_AUDIO_DRIVER_OSS */ ++/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */ ++/* #undef SDL_AUDIO_DRIVER_PAUD */ ++/* #undef SDL_AUDIO_DRIVER_QNXNTO */ ++/* #undef SDL_AUDIO_DRIVER_SNDMGR */ ++/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */ ++/* #undef SDL_AUDIO_DRIVER_WAVEOUT */ ++ ++/* Enable various cdrom drivers */ ++/* #undef SDL_CDROM_AIX */ ++/* #undef SDL_CDROM_BEOS */ ++/* #undef SDL_CDROM_BSDI */ ++/* #undef SDL_CDROM_DC */ ++/* #undef SDL_CDROM_DUMMY */ ++/* #undef SDL_CDROM_FREEBSD */ ++#define SDL_CDROM_LINUX 1 ++/* #undef SDL_CDROM_MACOS */ ++/* #undef SDL_CDROM_MACOSX */ ++/* #undef SDL_CDROM_MINT */ ++/* #undef SDL_CDROM_OPENBSD */ ++/* #undef SDL_CDROM_OS2 */ ++/* #undef SDL_CDROM_OSF */ ++/* #undef SDL_CDROM_QNX */ ++/* #undef SDL_CDROM_WIN32 */ ++ ++/* Enable various input drivers */ ++#define SDL_INPUT_LINUXEV 1 ++#define SDL_INPUT_TSLIB 1 ++/* #undef SDL_JOYSTICK_BEOS */ ++/* #undef SDL_JOYSTICK_DC */ ++/* #undef SDL_JOYSTICK_DUMMY */ ++/* #undef SDL_JOYSTICK_IOKIT */ ++#define SDL_JOYSTICK_LINUX 1 ++/* #undef SDL_JOYSTICK_MACOS */ ++/* #undef SDL_JOYSTICK_MINT */ ++/* #undef SDL_JOYSTICK_OS2 */ ++/* #undef SDL_JOYSTICK_RISCOS */ ++/* #undef SDL_JOYSTICK_WINMM */ ++/* #undef SDL_JOYSTICK_USBHID */ ++/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */ ++ ++/* Enable various shared object loading systems */ ++/* #undef SDL_LOADSO_BEOS */ ++/* #undef SDL_LOADSO_DLCOMPAT */ ++#define SDL_LOADSO_DLOPEN 1 ++/* #undef SDL_LOADSO_DUMMY */ ++/* #undef SDL_LOADSO_LDG */ ++/* #undef SDL_LOADSO_MACOS */ ++/* #undef SDL_LOADSO_OS2 */ ++/* #undef SDL_LOADSO_WIN32 */ ++ ++/* Enable various threading systems */ ++/* #undef SDL_THREAD_BEOS */ ++/* #undef SDL_THREAD_DC */ ++/* #undef SDL_THREAD_OS2 */ ++/* #undef SDL_THREAD_PTH */ ++#define SDL_THREAD_PTHREAD 1 ++#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1 ++/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */ ++/* #undef SDL_THREAD_SPROC */ ++/* #undef SDL_THREAD_WIN32 */ ++ ++/* Enable various timer systems */ ++/* #undef SDL_TIMER_BEOS */ ++/* #undef SDL_TIMER_DC */ ++/* #undef SDL_TIMER_DUMMY */ ++/* #undef SDL_TIMER_MACOS */ ++/* #undef SDL_TIMER_MINT */ ++/* #undef SDL_TIMER_OS2 */ ++/* #undef SDL_TIMER_RISCOS */ ++#define SDL_TIMER_UNIX 1 ++/* #undef SDL_TIMER_WIN32 */ ++/* #undef SDL_TIMER_WINCE */ ++ ++/* Enable various video drivers */ ++/* #undef SDL_VIDEO_DRIVER_AALIB */ ++/* #undef SDL_VIDEO_DRIVER_BWINDOW */ ++/* #undef SDL_VIDEO_DRIVER_CACA */ ++/* #undef SDL_VIDEO_DRIVER_DC */ ++/* #undef SDL_VIDEO_DRIVER_DDRAW */ ++#define SDL_VIDEO_DRIVER_DGA 1 ++/* #undef SDL_VIDEO_DRIVER_DIRECTFB */ ++/* #undef SDL_VIDEO_DRIVER_DRAWSPROCKET */ ++#define SDL_VIDEO_DRIVER_DUMMY 1 ++#define SDL_VIDEO_DRIVER_FBCON 1 ++/* #undef SDL_VIDEO_DRIVER_GAPI */ ++/* #undef SDL_VIDEO_DRIVER_GEM */ ++/* #undef SDL_VIDEO_DRIVER_GGI */ ++/* #undef SDL_VIDEO_DRIVER_IPOD */ ++/* #undef SDL_VIDEO_DRIVER_NANOX */ ++/* #undef SDL_VIDEO_DRIVER_OS2FS */ ++/* #undef SDL_VIDEO_DRIVER_PHOTON */ ++/* #undef SDL_VIDEO_DRIVER_PICOGUI */ ++/* #undef SDL_VIDEO_DRIVER_PS2GS */ ++/* #undef SDL_VIDEO_DRIVER_PS3 */ ++/* #undef SDL_VIDEO_DRIVER_QTOPIA */ ++/* #undef SDL_VIDEO_DRIVER_QUARTZ */ ++/* #undef SDL_VIDEO_DRIVER_RISCOS */ ++/* #undef SDL_VIDEO_DRIVER_SVGALIB */ ++/* #undef SDL_VIDEO_DRIVER_TOOLBOX */ ++/* #undef SDL_VIDEO_DRIVER_VGL */ ++/* #undef SDL_VIDEO_DRIVER_WINDIB */ ++/* #undef SDL_VIDEO_DRIVER_WSCONS */ ++#define SDL_VIDEO_DRIVER_X11 1 ++#define SDL_VIDEO_DRIVER_X11_DGAMOUSE 1 ++#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6" ++#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6" ++/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */ ++/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER */ ++#define SDL_VIDEO_DRIVER_X11_VIDMODE 1 ++#define SDL_VIDEO_DRIVER_X11_XINERAMA 1 ++#define SDL_VIDEO_DRIVER_X11_XME 1 ++/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */ ++#define SDL_VIDEO_DRIVER_X11_XV 1 ++/* #undef SDL_VIDEO_DRIVER_XBIOS */ ++ ++/* Enable OpenGL support */ ++/* #undef SDL_VIDEO_OPENGL */ ++/* #undef SDL_VIDEO_OPENGL_GLX */ ++/* #undef SDL_VIDEO_OPENGL_WGL */ ++/* #undef SDL_VIDEO_OPENGL_OSMESA */ ++/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */ ++ ++/* Disable screensaver */ ++#define SDL_VIDEO_DISABLE_SCREENSAVER 1 ++ ++/* Enable assembly routines */ ++#define SDL_ASSEMBLY_ROUTINES 1 ++#define SDL_HERMES_BLITTERS 1 ++/* #undef SDL_ALTIVEC_BLITTERS */ + + #endif /* _SDL_config_h */ diff --git a/package/sdl/patches/patch-sdl-config_in b/package/sdl/patches/patch-sdl-config_in new file mode 100644 index 000000000..4d3de58ed --- /dev/null +++ b/package/sdl/patches/patch-sdl-config_in @@ -0,0 +1,16 @@ +--- SDL-1.2.14.orig/sdl-config.in 2009-10-13 01:07:20.000000000 +0200 ++++ SDL-1.2.14/sdl-config.in 2011-01-12 21:46:41.000000000 +0100 +@@ -45,11 +45,11 @@ while test $# -gt 0; do + echo -I@includedir@/SDL @SDL_CFLAGS@ + ;; + @ENABLE_SHARED_TRUE@ --libs) +-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ ++@ENABLE_SHARED_TRUE@ echo @SDL_LIBS@ + @ENABLE_SHARED_TRUE@ ;; + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) +-@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ ++@ENABLE_STATIC_TRUE@ echo @SDL_STATIC_LIBS@ + @ENABLE_STATIC_TRUE@ ;; + *) + echo "${usage}" 1>&2 diff --git a/package/sdl/patches/patch-sdl_pc_in b/package/sdl/patches/patch-sdl_pc_in new file mode 100644 index 000000000..fd0ae8d52 --- /dev/null +++ b/package/sdl/patches/patch-sdl_pc_in @@ -0,0 +1,10 @@ +--- SDL-1.2.14.orig/sdl.pc.in 2009-10-13 01:07:20.000000000 +0200 ++++ SDL-1.2.14/sdl.pc.in 2011-01-12 21:54:44.000000000 +0100 +@@ -10,6 +10,6 @@ Description: Simple DirectMedia Layer is + Version: @SDL_VERSION@ + Requires: + Conflicts: +-Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ ++Libs: @SDL_LIBS@ + Libs.private: @SDL_STATIC_LIBS@ + Cflags: -I${includedir}/SDL @SDL_CFLAGS@ diff --git a/package/tcl/patches/patch-unix_configure b/package/tcl/patches/patch-unix_configure new file mode 100644 index 000000000..393c2b45e --- /dev/null +++ b/package/tcl/patches/patch-unix_configure @@ -0,0 +1,33 @@ +--- tcl8.5.8.orig/unix/configure 2009-11-13 19:38:45.000000000 +0100 ++++ tcl8.5.8/unix/configure 2011-01-13 16:22:59.000000000 +0100 +@@ -7968,9 +7968,6 @@ fi + LD_SEARCH_FLAGS="" + LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" + +-cat >>confdefs.h <<\_ACEOF +-#define MAC_OSX_TCL 1 +-_ACEOF + + PLAT_OBJS='${MAC_OSX_OBJS}' + PLAT_SRCS='${MAC_OSX_SRCS}' +@@ -17646,11 +17643,6 @@ _ACEOF + + + cat >>confdefs.h <<\_ACEOF +-#define TCL_LOAD_FROM_MEMORY 1 +-_ACEOF +- +- +-cat >>confdefs.h <<\_ACEOF + #define TCL_WIDE_CLICKS 1 + _ACEOF + +@@ -18817,7 +18809,7 @@ HTML_DIR='$(DISTDIR)/html' + # AIX remembers this path and will attempt to use it at run-time to look + # up the Tcl library. + +-if test "`uname -s`" = "Darwin" ; then ++if test "Linux" = "Darwin" ; then + + if test "`uname -s`" = "Darwin" ; then + echo "$as_me:$LINENO: checking how to package libraries" >&5 diff --git a/package/tcl/patches/patch-unix_tclUnixTime_c b/package/tcl/patches/patch-unix_tclUnixTime_c new file mode 100644 index 000000000..e0334126f --- /dev/null +++ b/package/tcl/patches/patch-unix_tclUnixTime_c @@ -0,0 +1,39 @@ +--- tcl8.5.8.orig/unix/tclUnixTime.c 2008-04-14 19:49:59.000000000 +0200 ++++ tcl8.5.8/unix/tclUnixTime.c 2011-01-13 15:59:00.000000000 +0100 +@@ -164,12 +164,6 @@ TclpGetWideClicks(void) + + (*tclGetTimeProcPtr) (&time, tclTimeClientData); + now = (Tcl_WideInt) (time.sec*1000000 + time.usec); +- } else { +-#ifdef MAC_OSX_TCL +- now = (Tcl_WideInt) (mach_absolute_time() & INT64_MAX); +-#else +-#error Wide high-resolution clicks not implemented on this platform +-#endif + } + + return now; +@@ -200,23 +194,6 @@ TclpWideClicksToNanoseconds( + + if (tclGetTimeProcPtr != NativeGetTime) { + nsec = clicks * 1000; +- } else { +-#ifdef MAC_OSX_TCL +- static mach_timebase_info_data_t tb; +- static uint64_t maxClicksForUInt64; +- +- if (!tb.denom) { +- mach_timebase_info(&tb); +- maxClicksForUInt64 = UINT64_MAX / tb.numer; +- } +- if ((uint64_t) clicks < maxClicksForUInt64) { +- nsec = ((uint64_t) clicks) * tb.numer / tb.denom; +- } else { +- nsec = ((long double) (uint64_t) clicks) * tb.numer / tb.denom; +- } +-#else +-#error Wide high-resolution clicks not implemented on this platform +-#endif + } + + return nsec; diff --git a/target/linux/config/Config.in.leds b/target/linux/config/Config.in.leds index 54cda3ceb..88acae81e 100644 --- a/target/linux/config/Config.in.leds +++ b/target/linux/config/Config.in.leds @@ -1,6 +1,10 @@ config ADK_KERNEL_NEW_LEDS boolean +config ADK_KERNEL_LEDS_CLASS + boolean + select ADK_KERNEL_NEW_LEDS + config ADK_KERNEL_LEDS_TRIGGERS boolean select ADK_KERNEL_NEW_LEDS @@ -8,17 +12,27 @@ config ADK_KERNEL_LEDS_TRIGGERS menu "LEDS driver support" depends on ADK_TARGET_WITH_LEDS -config ADK_KPACKAGE_KMOD_LEDS_CLASS - prompt "LED Class support" +config ADK_KPACKAGE_KMOD_LEDS_MIKROTIK_RB532 + prompt "LED suppport for RB532" tristate - select ADK_KERNEL_NEW_LEDS + select ADK_KERNEL_LEDS_CLASS + depends on ADK_TARGET_SYSTEM_MIKROTIK_RB532 + default y if ADK_TARGET_SYSTEM_MIKROTIK_RB532 + default n + +config ADK_KPACKAGE_KMOD_LEDS_WRAP + prompt "LED suppport for WRAP" + tristate + select ADK_KERNEL_LEDS_CLASS + depends on ADK_TARGET_SYSTEM_PCENGINES_WRAP + default y if ADK_TARGET_SYSTEM_PCENGINES_WRAP default n - help config ADK_KPACKAGE_KMOD_LEDS_ALIX2 prompt "LED suppport for ALIX2/ALIX3" tristate - select ADK_KPACKAGE_KMOD_LEDS_CLASS + select ADK_KERNEL_LEDS_CLASS + depends on ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 || ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default n @@ -27,24 +41,28 @@ config ADK_KPACKAGE_KMOD_LEDS_TRIGGER_TIMER prompt "LED Timer trigger" tristate select ADK_KERNEL_LEDS_TRIGGERS + select ADK_KERNEL_LEDS_CLASS default n config ADK_KPACKAGE_KMOD_LEDS_TRIGGER_HEARTBEAT prompt "LED Heartbeat trigger" tristate select ADK_KERNEL_LEDS_TRIGGERS + select ADK_KERNEL_LEDS_CLASS default n config ADK_KPACKAGE_KMOD_LEDS_TRIGGER_DEFAULT_ON prompt "LED Default On trigger" tristate select ADK_KERNEL_LEDS_TRIGGERS + select ADK_KERNEL_LEDS_CLASS default n config ADK_KPACKAGE_KMOD_NETFILTER_XT_TARGET_LED prompt "LED IPTables trigger" tristate select ADK_KERNEL_LEDS_TRIGGERS + select ADK_KERNEL_LEDS_CLASS select ADK_PACKAGE_IPTABLES default n diff --git a/target/linux/config/Config.in.network b/target/linux/config/Config.in.network index b7555bd12..1bbf681dc 100644 --- a/target/linux/config/Config.in.network +++ b/target/linux/config/Config.in.network @@ -24,6 +24,10 @@ config ADK_KERNEL_NET_IPGRE_BROADCAST boolean default n +config ADK_KERNEL_NET_IPGRE_DEMUX + boolean + default n + config ADK_KERNEL_PPP_ASYNC boolean default n @@ -134,11 +138,11 @@ config ADK_KPACKAGE_KMOD_NET_IPIP mobile-IP facilities (allowing laptops to seamlessly move between networks without changing their IP addresses). - config ADK_KPACKAGE_KMOD_NET_IPGRE prompt "kmod-net-ipgre.................... GRE tunnels over IP" tristate - #depends on ADK_KPACKAGE_KMOD_NET_IPGRE_BROADCAST + select ADK_KERNEL_NET_IPGRE_BROADCAST + select ADK_KERNEL_NET_IPGRE_DEMUX default n help Tunneling means encapsulating data of one protocol type within diff --git a/target/linux/patches/2.6.37/ar7.patch b/target/linux/patches/2.6.37/ar7.patch new file mode 100644 index 000000000..5f3b69ce1 --- /dev/null +++ b/target/linux/patches/2.6.37/ar7.patch @@ -0,0 +1,90 @@ +diff -Nur linux-2.6.36.orig/arch/mips/Kconfig linux-2.6.36/arch/mips/Kconfig +--- linux-2.6.36.orig/arch/mips/Kconfig 2010-10-20 22:30:22.000000000 +0200 ++++ linux-2.6.36/arch/mips/Kconfig 2010-12-16 21:02:19.000000000 +0100 +@@ -46,7 +46,6 @@ + select CEVT_R4K + select CSRC_R4K + select IRQ_CPU +- select NO_EXCEPT_FILL + select SWAP_IO_SPACE + select SYS_HAS_CPU_MIPS32_R1 + select SYS_HAS_EARLY_PRINTK +diff -Nur linux-2.6.36.orig/arch/mips/ar7/prom.c linux-2.6.36/arch/mips/ar7/prom.c +--- linux-2.6.36.orig/arch/mips/ar7/prom.c 2010-10-20 22:30:22.000000000 +0200 ++++ linux-2.6.36/arch/mips/ar7/prom.c 2010-12-16 21:02:19.000000000 +0100 +@@ -206,6 +206,14 @@ + if (strstr(arcs_cmdline, "console=")) + return; + ++#ifdef CONFIG_KGDB ++ if (!strstr(prom_getcmdline(), "nokgdb")) { ++ strcat(prom_getcmdline(), " console=kgdb"); ++ kgdb_enabled = 1; ++ return; ++ } ++#endif ++ + s = prom_getenv("modetty0"); + if (s) { + baud = simple_strtoul(s, &p, 10); +diff -Nur linux-2.6.36.orig/drivers/mtd/ar7part.c linux-2.6.36/drivers/mtd/ar7part.c +--- linux-2.6.36.orig/drivers/mtd/ar7part.c 2010-10-20 22:30:22.000000000 +0200 ++++ linux-2.6.36/drivers/mtd/ar7part.c 2010-12-16 21:02:19.000000000 +0100 +@@ -28,7 +28,7 @@ + #include + #include + +-#define AR7_PARTS 4 ++#define AR7_PARTS 5 + #define ROOT_OFFSET 0xe0000 + + #define LOADER_MAGIC1 le32_to_cpu(0xfeedfa42) +@@ -122,14 +122,19 @@ + + ar7_parts[2].name = "linux"; + ar7_parts[2].offset = pre_size; +- ar7_parts[2].size = master->size - pre_size - post_size; ++ ar7_parts[2].size = master->size - pre_size - post_size - 2*master->erasesize; + ar7_parts[2].mask_flags = 0; + + ar7_parts[3].name = "rootfs"; + ar7_parts[3].offset = root_offset; +- ar7_parts[3].size = master->size - root_offset - post_size; ++ ar7_parts[3].size = master->size - root_offset - post_size - 2*master->erasesize; + ar7_parts[3].mask_flags = 0; + ++ ar7_parts[4].name = "cfgfs"; ++ ar7_parts[4].offset = master->size - 2*master->erasesize; ++ ar7_parts[4].size = 2*master->erasesize; ++ ar7_parts[4].mask_flags = 0; ++ + *pparts = ar7_parts; + return AR7_PARTS; + } +diff -Nur linux-2.6.36.orig/drivers/mtd/maps/physmap.c linux-2.6.36/drivers/mtd/maps/physmap.c +--- linux-2.6.36.orig/drivers/mtd/maps/physmap.c 2010-10-20 22:30:22.000000000 +0200 ++++ linux-2.6.36/drivers/mtd/maps/physmap.c 2010-12-16 21:02:19.000000000 +0100 +@@ -79,7 +79,7 @@ + "map_rom", + NULL }; + #ifdef CONFIG_MTD_PARTITIONS +-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; ++static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", "ar7part", NULL }; + #endif + + static int physmap_flash_probe(struct platform_device *dev) +diff -Nur linux-2.6.36.orig/drivers/serial/8250.c linux-2.6.36/drivers/serial/8250.c +--- linux-2.6.36.orig/drivers/serial/8250.c 2010-10-20 22:30:22.000000000 +0200 ++++ linux-2.6.36/drivers/serial/8250.c 2010-12-16 21:02:19.000000000 +0100 +@@ -2761,7 +2761,11 @@ + { + struct uart_8250_port *up = (struct uart_8250_port *)port; + ++#ifdef CONFIG_AR7 ++ wait_for_xmitr(up, BOTH_EMPTY); ++#else + wait_for_xmitr(up, UART_LSR_THRE); ++#endif + serial_out(up, UART_TX, ch); + } + diff --git a/target/linux/patches/2.6.37/ar71xx.patch b/target/linux/patches/2.6.37/ar71xx.patch new file mode 100644 index 000000000..059ac9dd5 --- /dev/null +++ b/target/linux/patches/2.6.37/ar71xx.patch @@ -0,0 +1,18667 @@ +diff -Nur linux-2.6.37.orig/arch/mips/Kconfig linux-2.6.37/arch/mips/Kconfig +--- linux-2.6.37.orig/arch/mips/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/mips/Kconfig 2011-01-11 20:25:48.000000000 +0100 +@@ -65,6 +65,23 @@ + Support for the Texas Instruments AR7 System-on-a-Chip + family: TNETD7100, 7200 and 7300. + ++config ATHEROS_AR71XX ++ bool "Atheros AR71xx based boards" ++ select CEVT_R4K ++ select CSRC_R4K ++ select DMA_NONCOHERENT ++ select HW_HAS_PCI ++ select IRQ_CPU ++ select ARCH_REQUIRE_GPIOLIB ++ select SYS_HAS_CPU_MIPS32_R1 ++ select SYS_HAS_CPU_MIPS32_R2 ++ select SYS_SUPPORTS_32BIT_KERNEL ++ select SYS_SUPPORTS_BIG_ENDIAN ++ select SYS_HAS_EARLY_PRINTK ++ select MIPS_MACHINE ++ help ++ Support for Atheros AR71xx based boards. ++ + config BCM47XX + bool "Broadcom BCM47XX based boards" + select CEVT_R4K +@@ -717,6 +734,7 @@ + endchoice + + source "arch/mips/alchemy/Kconfig" ++source "arch/mips/ar71xx/Kconfig" + source "arch/mips/bcm63xx/Kconfig" + source "arch/mips/jazz/Kconfig" + source "arch/mips/jz4740/Kconfig" +@@ -880,9 +898,15 @@ + config MIPS_DISABLE_OBSOLETE_IDE + bool + ++config MYLOADER ++ bool ++ + config SYNC_R4K + bool + ++config MIPS_MACHINE ++ def_bool n ++ + config NO_IOPORT + def_bool n + +diff -Nur linux-2.6.37.orig/arch/mips/Makefile linux-2.6.37/arch/mips/Makefile +--- linux-2.6.37.orig/arch/mips/Makefile 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37/arch/mips/Makefile 2011-01-11 20:25:48.000000000 +0100 +@@ -158,6 +158,13 @@ + endif + cflags-$(CONFIG_CAVIUM_CN63XXP1) += -Wa,-mfix-cn63xxp1 + ++# ++# Atheros AR71xx ++# ++core-$(CONFIG_ATHEROS_AR71XX) += arch/mips/ar71xx/ ++cflags-$(CONFIG_ATHEROS_AR71XX) += -I$(srctree)/arch/mips/include/asm/mach-ar71xx ++load-$(CONFIG_ATHEROS_AR71XX) += 0xffffffff80060000 ++ + cflags-$(CONFIG_CPU_R4000_WORKAROUNDS) += $(call cc-option,-mfix-r4000,) + cflags-$(CONFIG_CPU_R4400_WORKAROUNDS) += $(call cc-option,-mfix-r4400,) + cflags-$(CONFIG_CPU_DADDI_WORKAROUNDS) += $(call cc-option,-mno-daddi,) +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/Kconfig linux-2.6.37/arch/mips/ar71xx/Kconfig +--- linux-2.6.37.orig/arch/mips/ar71xx/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/Kconfig 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,264 @@ ++if ATHEROS_AR71XX ++ ++menu "Atheros AR71xx machine selection" ++ ++config AR71XX_MACH_AP81 ++ bool "Atheros AP81 board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_AP83 ++ bool "Atheros AP83 board support" ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_DIR_600_A1 ++ bool "D-Link DIR-600 rev. A1 support" ++ select AR71XX_DEV_AP91_ETH ++ select AR71XX_DEV_AP91_PCI if PCI ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_NVRAM ++ default n ++ ++config AR71XX_MACH_DIR_615_C1 ++ bool "D-Link DIR-615 rev. C1 support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_NVRAM ++ default n ++ ++config AR71XX_MACH_DIR_825_B1 ++ bool "D-Link DIR-825 rev. B1 board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AP94_PCI if PCI ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_PB42 ++ bool "Atheros PB42 board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_PB42_PCI if PCI ++ default n ++ ++config AR71XX_MACH_PB44 ++ bool "Atheros PB44 board support" ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_PB42_PCI if PCI ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_PB92 ++ bool "Atheros PB92 board support" ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_PB9X_PCI if PCI ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_AW_NR580 ++ bool "AzureWave AW-NR580 board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_PB42_PCI if PCI ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_WZR_HP_G300NH ++ bool "Buffalo WZR-HP-G300NH board support" ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default y ++ ++config AR71XX_MACH_WP543 ++ bool "Compex WP543/WPJ543 board support" ++ select MYLOADER ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_PB42_PCI if PCI ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_WRT160NL ++ bool "Linksys WRT160NL board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ select AR71XX_NVRAM ++ default n ++ ++config AR71XX_MACH_WRT400N ++ bool "Linksys WRT400N board support" ++ select AR71XX_DEV_AP94_PCI if PCI ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_RB4XX ++ bool "MikroTik RouterBOARD 4xx series support" ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_RB750 ++ bool "MikroTik RouterBOARD 750 support" ++ select AR71XX_DEV_AP91_ETH ++ default n ++ ++config AR71XX_MACH_WNDR3700 ++ bool "NETGEAR WNDR3700 board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AP94_PCI if PCI ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_WNR2000 ++ bool "NETGEAR WNR2000 board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_MZK_W04NU ++ bool "Planex MZK-W04NU board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_MZK_W300NH ++ bool "Planex MZK-W300NH board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_NBG460N ++ bool "Zyxel NBG460N/550N/550NH board support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_TL_WR741ND ++ bool "TP-LINK TL-WR741ND support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AP91_ETH ++ select AR71XX_DEV_AP91_PCI if PCI ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_TL_WR841N_V1 ++ bool "TP-LINK TL-WR841N v1 support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_PB42_PCI if PCI ++ select AR71XX_DEV_DSA ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_TL_WR941ND ++ bool "TP-LINK TL-WR941ND support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_DSA ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ default n ++ ++config AR71XX_MACH_TL_WR1043ND ++ bool "TP-LINK TL-WR1043ND support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_USB ++ default n ++ ++config AR71XX_MACH_TEW_632BRP ++ bool "TRENDnet TEW-632BRP support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AR913X_WMAC ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_NVRAM ++ default n ++ ++config AR71XX_MACH_UBNT ++ bool "Ubiquiti AR71xx based boards support" ++ select AR71XX_DEV_M25P80 ++ select AR71XX_DEV_AP91_PCI if PCI ++ select AR71XX_DEV_GPIO_BUTTONS ++ select AR71XX_DEV_LEDS_GPIO ++ select AR71XX_DEV_PB42_PCI if PCI ++ select AR71XX_DEV_USB ++ default n ++ ++endmenu ++ ++config AR71XX_DEV_M25P80 ++ def_bool n ++ ++config AR71XX_DEV_AP91_PCI ++ def_bool n ++ ++config AR71XX_DEV_AP91_ETH ++ def_bool n ++ ++config AR71XX_DEV_AP94_PCI ++ def_bool n ++ ++config AR71XX_DEV_AR913X_WMAC ++ def_bool n ++ ++config AR71XX_DEV_DSA ++ def_bool n ++ ++config AR71XX_DEV_GPIO_BUTTONS ++ def_bool n ++ ++config AR71XX_DEV_LEDS_GPIO ++ def_bool n ++ ++config AR71XX_DEV_PB42_PCI ++ def_bool n ++ ++config AR71XX_DEV_PB9X_PCI ++ def_bool n ++ ++config AR71XX_DEV_USB ++ def_bool n ++ ++config AR71XX_NVRAM ++ def_bool n ++ ++endif +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/Makefile linux-2.6.37/arch/mips/ar71xx/Makefile +--- linux-2.6.37.orig/arch/mips/ar71xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/Makefile 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,54 @@ ++# ++# Makefile for the Atheros AR71xx SoC specific parts of the kernel ++# ++# Copyright (C) 2008-2009 Gabor Juhos ++# Copyright (C) 2008 Imre Kaloz ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License version 2 as published ++# by the Free Software Foundation. ++ ++obj-y := prom.o irq.o setup.o devices.o gpio.o ar71xx.o ++ ++obj-$(CONFIG_EARLY_PRINTK) += early_printk.o ++obj-$(CONFIG_PCI) += pci.o ++ ++obj-$(CONFIG_AR71XX_DEV_AP91_ETH) += dev-ap91-eth.o ++obj-$(CONFIG_AR71XX_DEV_AP91_PCI) += dev-ap91-pci.o ++obj-$(CONFIG_AR71XX_DEV_AP94_PCI) += dev-ap94-pci.o ++obj-$(CONFIG_AR71XX_DEV_AR913X_WMAC) += dev-ar913x-wmac.o ++obj-$(CONFIG_AR71XX_DEV_DSA) += dev-dsa.o ++obj-$(CONFIG_AR71XX_DEV_GPIO_BUTTONS) += dev-gpio-buttons.o ++obj-$(CONFIG_AR71XX_DEV_LEDS_GPIO) += dev-leds-gpio.o ++obj-$(CONFIG_AR71XX_DEV_M25P80) += dev-m25p80.o ++obj-$(CONFIG_AR71XX_DEV_PB42_PCI) += dev-pb42-pci.o ++obj-$(CONFIG_AR71XX_DEV_PB9X_PCI) += dev-pb9x-pci.o ++obj-$(CONFIG_AR71XX_DEV_USB) += dev-usb.o ++ ++obj-$(CONFIG_AR71XX_NVRAM) += nvram.o ++ ++obj-$(CONFIG_AR71XX_MACH_AP81) += mach-ap81.o ++obj-$(CONFIG_AR71XX_MACH_AP83) += mach-ap83.o ++obj-$(CONFIG_AR71XX_MACH_AW_NR580) += mach-aw-nr580.o ++obj-$(CONFIG_AR71XX_MACH_DIR_600_A1) += mach-dir-600-a1.o ++obj-$(CONFIG_AR71XX_MACH_DIR_615_C1) += mach-dir-615-c1.o ++obj-$(CONFIG_AR71XX_MACH_DIR_825_B1) += mach-dir-825-b1.o ++obj-$(CONFIG_AR71XX_MACH_MZK_W04NU) += mach-mzk-w04nu.o ++obj-$(CONFIG_AR71XX_MACH_MZK_W300NH) += mach-mzk-w300nh.o ++obj-$(CONFIG_AR71XX_MACH_NBG460N) += mach-nbg460n.o ++obj-$(CONFIG_AR71XX_MACH_PB42) += mach-pb42.o ++obj-$(CONFIG_AR71XX_MACH_PB44) += mach-pb44.o ++obj-$(CONFIG_AR71XX_MACH_PB92) += mach-pb92.o ++obj-$(CONFIG_AR71XX_MACH_RB4XX) += mach-rb4xx.o ++obj-$(CONFIG_AR71XX_MACH_RB750) += mach-rb750.o ++obj-$(CONFIG_AR71XX_MACH_TEW_632BRP) += mach-tew-632brp.o ++obj-$(CONFIG_AR71XX_MACH_TL_WR741ND) += mach-tl-wr741nd.o ++obj-$(CONFIG_AR71XX_MACH_TL_WR841N_V1) += mach-tl-wr841n.o ++obj-$(CONFIG_AR71XX_MACH_TL_WR941ND) += mach-tl-wr941nd.o ++obj-$(CONFIG_AR71XX_MACH_TL_WR1043ND) += mach-tl-wr1043nd.o ++obj-$(CONFIG_AR71XX_MACH_UBNT) += mach-ubnt.o ++obj-$(CONFIG_AR71XX_MACH_WNDR3700) += mach-wndr3700.o ++obj-$(CONFIG_AR71XX_MACH_WNR2000) += mach-wnr2000.o ++obj-$(CONFIG_AR71XX_MACH_WP543) += mach-wp543.o ++obj-$(CONFIG_AR71XX_MACH_WRT160NL) += mach-wrt160nl.o ++obj-$(CONFIG_AR71XX_MACH_WRT400N) += mach-wrt400n.o +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/ar71xx.c linux-2.6.37/arch/mips/ar71xx/ar71xx.c +--- linux-2.6.37.orig/arch/mips/ar71xx/ar71xx.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/ar71xx.c 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,177 @@ ++/* ++ * AR71xx SoC routines ++ * ++ * Copyright (C) 2008-2009 Gabor Juhos ++ * Copyright (C) 2008 Imre Kaloz ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include ++ ++static DEFINE_MUTEX(ar71xx_flash_mutex); ++ ++void __iomem *ar71xx_ddr_base; ++EXPORT_SYMBOL_GPL(ar71xx_ddr_base); ++ ++void __iomem *ar71xx_pll_base; ++EXPORT_SYMBOL_GPL(ar71xx_pll_base); ++ ++void __iomem *ar71xx_reset_base; ++EXPORT_SYMBOL_GPL(ar71xx_reset_base); ++ ++void __iomem *ar71xx_gpio_base; ++EXPORT_SYMBOL_GPL(ar71xx_gpio_base); ++ ++void __iomem *ar71xx_usb_ctrl_base; ++EXPORT_SYMBOL_GPL(ar71xx_usb_ctrl_base); ++ ++void ar71xx_device_stop(u32 mask) ++{ ++ unsigned long flags; ++ u32 mask_inv; ++ u32 t; ++ ++ switch (ar71xx_soc) { ++ case AR71XX_SOC_AR7130: ++ case AR71XX_SOC_AR7141: ++ case AR71XX_SOC_AR7161: ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR71XX_RESET_REG_RESET_MODULE); ++ ar71xx_reset_wr(AR71XX_RESET_REG_RESET_MODULE, t | mask); ++ local_irq_restore(flags); ++ break; ++ ++ case AR71XX_SOC_AR7240: ++ case AR71XX_SOC_AR7241: ++ case AR71XX_SOC_AR7242: ++ mask_inv = mask & RESET_MODULE_USB_OHCI_DLL_7240; ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR724X_RESET_REG_RESET_MODULE); ++ t |= mask; ++ t &= ~mask_inv; ++ ar71xx_reset_wr(AR724X_RESET_REG_RESET_MODULE, t); ++ local_irq_restore(flags); ++ break; ++ ++ case AR71XX_SOC_AR9130: ++ case AR71XX_SOC_AR9132: ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR91XX_RESET_REG_RESET_MODULE); ++ ar71xx_reset_wr(AR91XX_RESET_REG_RESET_MODULE, t | mask); ++ local_irq_restore(flags); ++ break; ++ ++ default: ++ BUG(); ++ } ++} ++EXPORT_SYMBOL_GPL(ar71xx_device_stop); ++ ++void ar71xx_device_start(u32 mask) ++{ ++ unsigned long flags; ++ u32 mask_inv; ++ u32 t; ++ ++ switch (ar71xx_soc) { ++ case AR71XX_SOC_AR7130: ++ case AR71XX_SOC_AR7141: ++ case AR71XX_SOC_AR7161: ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR71XX_RESET_REG_RESET_MODULE); ++ ar71xx_reset_wr(AR71XX_RESET_REG_RESET_MODULE, t & ~mask); ++ local_irq_restore(flags); ++ break; ++ ++ case AR71XX_SOC_AR7240: ++ case AR71XX_SOC_AR7241: ++ case AR71XX_SOC_AR7242: ++ mask_inv = mask & RESET_MODULE_USB_OHCI_DLL_7240; ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR724X_RESET_REG_RESET_MODULE); ++ t &= ~mask; ++ t |= mask_inv; ++ ar71xx_reset_wr(AR724X_RESET_REG_RESET_MODULE, t); ++ local_irq_restore(flags); ++ break; ++ ++ case AR71XX_SOC_AR9130: ++ case AR71XX_SOC_AR9132: ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR91XX_RESET_REG_RESET_MODULE); ++ ar71xx_reset_wr(AR91XX_RESET_REG_RESET_MODULE, t & ~mask); ++ local_irq_restore(flags); ++ break; ++ ++ default: ++ BUG(); ++ } ++} ++EXPORT_SYMBOL_GPL(ar71xx_device_start); ++ ++int ar71xx_device_stopped(u32 mask) ++{ ++ unsigned long flags; ++ u32 t; ++ ++ switch (ar71xx_soc) { ++ case AR71XX_SOC_AR7130: ++ case AR71XX_SOC_AR7141: ++ case AR71XX_SOC_AR7161: ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR71XX_RESET_REG_RESET_MODULE); ++ local_irq_restore(flags); ++ break; ++ ++ case AR71XX_SOC_AR7240: ++ case AR71XX_SOC_AR7241: ++ case AR71XX_SOC_AR7242: ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR724X_RESET_REG_RESET_MODULE); ++ local_irq_restore(flags); ++ break; ++ ++ case AR71XX_SOC_AR9130: ++ case AR71XX_SOC_AR9132: ++ local_irq_save(flags); ++ t = ar71xx_reset_rr(AR91XX_RESET_REG_RESET_MODULE); ++ local_irq_restore(flags); ++ break; ++ ++ default: ++ BUG(); ++ } ++ ++ return ((t & mask) == mask); ++} ++EXPORT_SYMBOL_GPL(ar71xx_device_stopped); ++ ++void ar71xx_ddr_flush(u32 reg) ++{ ++ ar71xx_ddr_wr(reg, 1); ++ while ((ar71xx_ddr_rr(reg) & 0x1)); ++ ++ ar71xx_ddr_wr(reg, 1); ++ while ((ar71xx_ddr_rr(reg) & 0x1)); ++} ++EXPORT_SYMBOL_GPL(ar71xx_ddr_flush); ++ ++void ar71xx_flash_acquire(void) ++{ ++ mutex_lock(&ar71xx_flash_mutex); ++} ++EXPORT_SYMBOL_GPL(ar71xx_flash_acquire); ++ ++void ar71xx_flash_release(void) ++{ ++ mutex_unlock(&ar71xx_flash_mutex); ++} ++EXPORT_SYMBOL_GPL(ar71xx_flash_release); +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-eth.c linux-2.6.37/arch/mips/ar71xx/dev-ap91-eth.c +--- linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-eth.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/dev-ap91-eth.c 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,70 @@ ++/* ++ * Atheros AP91 reference board ethernet initialization ++ * ++ * Copyright (C) 2010 Gabor Juhos ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#include "devices.h" ++#include "dev-dsa.h" ++#include "dev-ap91-eth.h" ++ ++static struct dsa_chip_data ap91_dsa_chip = { ++ .port_names[0] = "cpu", ++ .port_names[1] = "lan1", ++ .port_names[2] = "lan2", ++ .port_names[3] = "lan3", ++ .port_names[4] = "lan4", ++}; ++ ++static struct dsa_platform_data ap91_dsa_data = { ++ .nr_chips = 1, ++ .chip = &ap91_dsa_chip, ++}; ++ ++static void ap91_eth_set_port_name(unsigned port, const char *name) ++{ ++ if (port < 1 || port > 5) ++ return; ++ ++ if (name) ++ ap91_dsa_chip.port_names[port] = (char *) name; ++} ++ ++void __init ap91_eth_init(u8 *mac_addr, const char *port_names[]) ++{ ++ if (mac_addr) ++ ar71xx_set_mac_base(mac_addr); ++ ++ if (port_names) { ++ int i; ++ ++ for (i = 0; i < AP91_ETH_NUM_PORT_NAMES; i++) ++ ap91_eth_set_port_name(i + 1, port_names[i]); ++ } ++ ++ /* WAN port */ ++ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ++ ar71xx_eth0_data.speed = SPEED_100; ++ ar71xx_eth0_data.duplex = DUPLEX_FULL; ++ ar71xx_eth0_data.fifo_cfg1 = 0x0fff0000; ++ ar71xx_eth0_data.fifo_cfg2 = 0x00001fff; ++ ar71xx_eth0_data.fifo_cfg3 = 0x008001ff; ++ ++ /* LAN ports */ ++ ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; ++ ar71xx_eth1_data.speed = SPEED_1000; ++ ar71xx_eth1_data.duplex = DUPLEX_FULL; ++ ar71xx_eth1_data.fifo_cfg1 = 0x0fff0000; ++ ar71xx_eth1_data.fifo_cfg2 = 0x00001fff; ++ ar71xx_eth1_data.fifo_cfg3 = 0x008001ff; ++ ++ ar71xx_add_device_mdio(0x0); ++ ar71xx_add_device_eth(1); ++ ar71xx_add_device_eth(0); ++ ++ ar71xx_add_device_dsa(1, &ap91_dsa_data); ++} +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-eth.h linux-2.6.37/arch/mips/ar71xx/dev-ap91-eth.h +--- linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-eth.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/dev-ap91-eth.h 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,23 @@ ++/* ++ * Atheros AP91 reference board ethernet initialization ++ * ++ * Copyright (C) 2010 Gabor Juhos ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#ifndef _AR71XX_DEV_AP91_ETH_H ++#define _AR71XX_DEV_AP91_ETH_H ++ ++#define AP91_ETH_NUM_PORT_NAMES 4 ++ ++#if defined(CONFIG_AR71XX_DEV_AP91_ETH) ++void ap91_eth_init(u8 *mac_addr, const char *port_names[]) __init; ++#else ++static inline void ap91_eth_init(u8 *mac_addr) { } ++#endif ++ ++#endif /* _AR71XX_DEV_AP91_ETH_H */ ++ +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-pci.c linux-2.6.37/arch/mips/ar71xx/dev-ap91-pci.c +--- linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-pci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/dev-ap91-pci.c 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,114 @@ ++/* ++ * Atheros AP91 reference board PCI initialization ++ * ++ * Copyright (C) 2009 Gabor Juhos ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "dev-ap91-pci.h" ++ ++static struct ath9k_platform_data ap91_wmac_data; ++static char ap91_wmac_mac[6]; ++static int ap91_pci_fixup_enabled; ++ ++static struct ar71xx_pci_irq ap91_pci_irqs[] __initdata = { ++ { ++ .slot = 0, ++ .pin = 1, ++ .irq = AR71XX_PCI_IRQ_DEV0, ++ } ++}; ++ ++static int ap91_pci_plat_dev_init(struct pci_dev *dev) ++{ ++ switch(PCI_SLOT(dev->devfn)) { ++ case 0: ++ dev->dev.platform_data = &ap91_wmac_data; ++ break; ++ } ++ ++ return 0; ++} ++ ++static void ap91_pci_fixup(struct pci_dev *dev) ++{ ++ void __iomem *mem; ++ u16 *cal_data; ++ u16 cmd; ++ u32 val; ++ ++ if (!ap91_pci_fixup_enabled) ++ return; ++ ++ printk(KERN_INFO "PCI: fixup device %s\n", pci_name(dev)); ++ ++ cal_data = ap91_wmac_data.eeprom_data; ++ if (*cal_data != 0xa55a) { ++ printk(KERN_ERR "PCI: no calibration data found for %s\n", ++ pci_name(dev)); ++ return; ++ } ++ ++ mem = ioremap(AR71XX_PCI_MEM_BASE, 0x10000); ++ if (!mem) { ++ printk(KERN_ERR "PCI: ioremap error for device %s\n", ++ pci_name(dev)); ++ return; ++ } ++ ++ /* Setup the PCI device to allow access to the internal registers */ ++ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, 0xffff); ++ pci_read_config_word(dev, PCI_COMMAND, &cmd); ++ cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; ++ pci_write_config_word(dev, PCI_COMMAND, cmd); ++ ++ /* set pointer to first reg address */ ++ cal_data += 3; ++ while (*cal_data != 0xffff) { ++ u32 reg; ++ reg = *cal_data++; ++ val = *cal_data++; ++ val |= (*cal_data++) << 16; ++ ++ __raw_writel(val, mem + reg); ++ udelay(100); ++ } ++ ++ pci_read_config_dword(dev, PCI_VENDOR_ID, &val); ++ dev->vendor = val & 0xffff; ++ dev->device = (val >> 16) & 0xffff; ++ ++ pci_read_config_dword(dev, PCI_CLASS_REVISION, &val); ++ dev->revision = val & 0xff; ++ dev->class = val >> 8; /* upper 3 bytes */ ++ ++ iounmap(mem); ++} ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ap91_pci_fixup); ++ ++void __init ap91_pci_init(u8 *cal_data, u8 *mac_addr) ++{ ++ if (cal_data) ++ memcpy(ap91_wmac_data.eeprom_data, cal_data, ++ sizeof(ap91_wmac_data.eeprom_data)); ++ ++ if (mac_addr) { ++ memcpy(ap91_wmac_mac, mac_addr, sizeof(ap91_wmac_mac)); ++ ap91_wmac_data.macaddr = ap91_wmac_mac; ++ } ++ ++ ar71xx_pci_plat_dev_init = ap91_pci_plat_dev_init; ++ ar71xx_pci_init(ARRAY_SIZE(ap91_pci_irqs), ap91_pci_irqs); ++ ++ ap91_pci_fixup_enabled = 1; ++} +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-pci.h linux-2.6.37/arch/mips/ar71xx/dev-ap91-pci.h +--- linux-2.6.37.orig/arch/mips/ar71xx/dev-ap91-pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/dev-ap91-pci.h 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,21 @@ ++/* ++ * Atheros AP91 reference board PCI initialization ++ * ++ * Copyright (C) 2009 Gabor Juhos ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#ifndef _AR71XX_DEV_AP91_PCI_H ++#define _AR71XX_DEV_AP91_PCI_H ++ ++#if defined(CONFIG_AR71XX_DEV_AP91_PCI) ++void ap91_pci_init(u8 *cal_data, u8 *mac_addr) __init; ++#else ++static inline void ap91_pci_init(u8 *cal_data, u8 *mac_addr) { } ++#endif ++ ++#endif /* _AR71XX_DEV_AP91_PCI_H */ ++ +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/dev-ap94-pci.c linux-2.6.37/arch/mips/ar71xx/dev-ap94-pci.c +--- linux-2.6.37.orig/arch/mips/ar71xx/dev-ap94-pci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/dev-ap94-pci.c 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,159 @@ ++/* ++ * Atheros AP94 reference board PCI initialization ++ * ++ * Copyright (C) 2009-2010 Gabor Juhos ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "dev-ap94-pci.h" ++ ++static struct ath9k_platform_data ap94_wmac0_data; ++static struct ath9k_platform_data ap94_wmac1_data; ++static char ap94_wmac0_mac[6]; ++static char ap94_wmac1_mac[6]; ++static int ap94_pci_fixup_enabled; ++ ++static struct ar71xx_pci_irq ap94_pci_irqs[] __initdata = { ++ { ++ .slot = 0, ++ .pin = 1, ++ .irq = AR71XX_PCI_IRQ_DEV0, ++ }, { ++ .slot = 1, ++ .pin = 1, ++ .irq = AR71XX_PCI_IRQ_DEV1, ++ } ++}; ++ ++static int ap94_pci_plat_dev_init(struct pci_dev *dev) ++{ ++ switch(PCI_SLOT(dev->devfn)) { ++ case 17: ++ dev->dev.platform_data = &ap94_wmac0_data; ++ break; ++ ++ case 18: ++ dev->dev.platform_data = &ap94_wmac1_data; ++ break; ++ } ++ ++ return 0; ++} ++ ++static void ap94_pci_fixup(struct pci_dev *dev) ++{ ++ void __iomem *mem; ++ u16 *cal_data; ++ u16 cmd; ++ u32 bar0; ++ u32 val; ++ ++ if (!ap94_pci_fixup_enabled) ++ return; ++ ++ switch (PCI_SLOT(dev->devfn)) { ++ case 17: ++ cal_data = ap94_wmac0_data.eeprom_data; ++ break; ++ case 18: ++ cal_data = ap94_wmac1_data.eeprom_data; ++ break; ++ default: ++ return; ++ } ++ ++ if (*cal_data != 0xa55a) { ++ printk(KERN_ERR "PCI: no calibration data found for %s\n", ++ pci_name(dev)); ++ return; ++ } ++ ++ mem = ioremap(AR71XX_PCI_MEM_BASE, 0x10000); ++ if (!mem) { ++ printk(KERN_ERR "PCI: ioremap error for device %s\n", ++ pci_name(dev)); ++ return; ++ } ++ ++ printk(KERN_INFO "PCI: fixup device %s\n", pci_name(dev)); ++ ++ pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); ++ ++ /* Setup the PCI device to allow access to the internal registers */ ++ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, AR71XX_PCI_MEM_BASE); ++ pci_read_config_word(dev, PCI_COMMAND, &cmd); ++ cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; ++ pci_write_config_word(dev, PCI_COMMAND, cmd); ++ ++ /* set pointer to first reg address */ ++ cal_data += 3; ++ while (*cal_data != 0xffff) { ++ u32 reg; ++ reg = *cal_data++; ++ val = *cal_data++; ++ val |= (*cal_data++) << 16; ++ ++ __raw_writel(val, mem + reg); ++ udelay(100); ++ } ++ ++ pci_read_config_dword(dev, PCI_VENDOR_ID, &val); ++ dev->vendor = val & 0xffff; ++ dev->device = (val >> 16) & 0xffff; ++ ++ pci_read_config_dword(dev, PCI_CLASS_REVISION, &val); ++ dev->revision = val & 0xff; ++ dev->class = val >> 8; /* upper 3 bytes */ ++ ++ pci_read_config_word(dev, PCI_COMMAND, &cmd); ++ cmd &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); ++ pci_write_config_word(dev, PCI_COMMAND, cmd); ++ ++ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0); ++ ++ iounmap(mem); ++} ++DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ap94_pci_fixup); ++ ++void __init ap94_pci_enable_quirk_wndr3700(void) ++{ ++ ap94_wmac0_data.quirk_wndr3700 = 1; ++ ap94_wmac1_data.quirk_wndr3700 = 1; ++} ++ ++void __init ap94_pci_init(u8 *cal_data0, u8 *mac_addr0, ++ u8 *cal_data1, u8 *mac_addr1) ++{ ++ if (cal_data0) ++ memcpy(ap94_wmac0_data.eeprom_data, cal_data0, ++ sizeof(ap94_wmac0_data.eeprom_data)); ++ ++ if (cal_data1) ++ memcpy(ap94_wmac1_data.eeprom_data, cal_data1, ++ sizeof(ap94_wmac1_data.eeprom_data)); ++ ++ if (mac_addr0) { ++ memcpy(ap94_wmac0_mac, mac_addr0, sizeof(ap94_wmac0_mac)); ++ ap94_wmac0_data.macaddr = ap94_wmac0_mac; ++ } ++ ++ if (mac_addr1) { ++ memcpy(ap94_wmac1_mac, mac_addr1, sizeof(ap94_wmac1_mac)); ++ ap94_wmac1_data.macaddr = ap94_wmac1_mac; ++ } ++ ++ ar71xx_pci_plat_dev_init = ap94_pci_plat_dev_init; ++ ar71xx_pci_init(ARRAY_SIZE(ap94_pci_irqs), ap94_pci_irqs); ++ ++ ap94_pci_fixup_enabled = 1; ++} +diff -Nur linux-2.6.37.orig/arch/mips/ar71xx/dev-ap94-pci.h linux-2.6.37/arch/mips/ar71xx/dev-ap94-pci.h +--- linux-2.6.37.orig/arch/mips/ar71xx/dev-ap94-pci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37/arch/mips/ar71xx/dev-ap94-pci.h 2011-01-11 20:25:48.000000000 +0100 +@@ -0,0 +1,28 @@ ++/* ++ * Atheros AP94 reference board PCI initialization ++ * ++ * Copyright (C) 2009-2010 Gabor Juhos ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 as published ++ * by the Free Software Foundation. ++ */ ++ ++#ifndef _AR71XX_DEV_AP94_PCI_H ++#define _AR71XX_DEV_AP94_PCI_H ++ ++#if defined(CONFIG_AR71XX_DEV_AP94_PCI) ++void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0, ++ u8 *cal_data1, u8 *mac_addr1) __init; ++ ++void ap94_pci_enable_quirk_wndr3700(void) __init; ++ ++#else ++static inline void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0, ++ u8 *cal_data1, u8 *mac_addr1) {}