diff options
-rw-r--r-- | target/brcm/kernel.config | 161 | ||||
-rw-r--r-- | target/brcm/patches/brcm.patch | 228 | ||||
-rw-r--r-- | target/brcm/tools/trx/trx.c | 20 |
3 files changed, 46 insertions, 363 deletions
diff --git a/target/brcm/kernel.config b/target/brcm/kernel.config index 9f3be185b..7f4f10c83 100644 --- a/target/brcm/kernel.config +++ b/target/brcm/kernel.config @@ -1,20 +1,21 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.34 -# Thu Jun 3 22:53:49 2010 +# Linux kernel version: 2.6.36 +# Fri Nov 19 00:45:57 2010 # CONFIG_MIPS=y # # Machine selection # -# CONFIG_MACH_ALCHEMY is not set +# CONFIG_MIPS_ALCHEMY is not set # CONFIG_AR7 is not set CONFIG_BCM47XX=y # CONFIG_BCM63XX is not set # CONFIG_MIPS_COBALT is not set # CONFIG_MACH_DECSTATION is not set # CONFIG_MACH_JAZZ is not set +# CONFIG_MACH_JZ4740 is not set # CONFIG_LASAT is not set # CONFIG_MACH_LOONGSON is not set # CONFIG_MIPS_MALTA is not set @@ -48,7 +49,9 @@ CONFIG_BCM47XX=y # CONFIG_CAVIUM_OCTEON_SIMULATOR is not set # CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set # CONFIG_ALCHEMY_GPIO_INDIRECT is not set +CONFIG_CAVIUM_OCTEON_HELPER=y CONFIG_LOONGSON_UART_BASE=y +# CONFIG_LOONGSON_MC146818 is not set CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set @@ -57,7 +60,6 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_TIME=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y @@ -71,7 +73,6 @@ CONFIG_NEED_DMA_MAP_STATE=y CONFIG_SYS_HAS_EARLY_PRINTK=y # CONFIG_NO_IOPORT is not set CONFIG_GENERIC_GPIO=y -# CONFIG_CPU_BIG_ENDIAN is not set CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y CONFIG_IRQ_CPU=y @@ -80,29 +81,7 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 # # CPU selection # -# CONFIG_CPU_LOONGSON2E is not set -# CONFIG_CPU_LOONGSON2F is not set CONFIG_CPU_MIPS32_R1=y -# CONFIG_CPU_MIPS32_R2 is not set -# CONFIG_CPU_MIPS64_R1 is not set -# CONFIG_CPU_MIPS64_R2 is not set -# CONFIG_CPU_R3000 is not set -# CONFIG_CPU_TX39XX is not set -# CONFIG_CPU_VR41XX is not set -# CONFIG_CPU_R4300 is not set -# CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set -# CONFIG_CPU_R5000 is not set -# CONFIG_CPU_R5432 is not set -# CONFIG_CPU_R5500 is not set -# CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set -# CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set -# CONFIG_CPU_RM7000 is not set -# CONFIG_CPU_RM9000 is not set -# CONFIG_CPU_SB1 is not set -# CONFIG_CPU_CAVIUM_OCTEON is not set CONFIG_SYS_HAS_CPU_MIPS32_R1=y CONFIG_CPU_MIPS32=y CONFIG_CPU_MIPSR1=y @@ -114,16 +93,11 @@ CONFIG_HARDWARE_WATCHPOINTS=y # Kernel type # CONFIG_32BIT=y -# CONFIG_64BIT is not set CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_8KB is not set # CONFIG_PAGE_SIZE_16KB is not set -# CONFIG_PAGE_SIZE_32KB is not set # CONFIG_PAGE_SIZE_64KB is not set CONFIG_CPU_HAS_PREFETCH=y CONFIG_MIPS_MT_DISABLED=y -# CONFIG_MIPS_MT_SMP is not set -# CONFIG_MIPS_MT_SMTC is not set # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set CONFIG_CPU_HAS_SYNC=y CONFIG_GENERIC_HARDIRQS=y @@ -133,8 +107,6 @@ CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y CONFIG_PAGEFLAGS_EXTENDED=y @@ -173,6 +145,7 @@ CONFIG_CONSTRUCTORS=y CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set # CONFIG_SWAP is not set @@ -187,7 +160,6 @@ CONFIG_SYSVIPC_SYSCTL=y # RCU Subsystem # CONFIG_TREE_RCU=y -# CONFIG_TREE_PREEMPT_RCU is not set # CONFIG_TINY_RCU is not set # CONFIG_RCU_TRACE is not set CONFIG_RCU_FANOUT=32 @@ -232,11 +204,13 @@ CONFIG_SLAB=y # CONFIG_SLOB is not set # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y # # GCOV-based kernel profiling # -# CONFIG_SLOW_WORK is not set CONFIG_HAVE_GENERIC_DMA_COHERENT=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y @@ -258,8 +232,6 @@ CONFIG_BLOCK=y CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set CONFIG_DEFAULT_NOOP=y CONFIG_DEFAULT_IOSCHED="noop" # CONFIG_INLINE_SPIN_TRYLOCK is not set @@ -353,12 +325,14 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set # CONFIG_IPV6 is not set # CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set # CONFIG_NETFILTER is not set # CONFIG_IP_DCCP is not set # CONFIG_IP_SCTP is not set # CONFIG_RDS is not set # CONFIG_TIPC is not set # CONFIG_ATM is not set +# CONFIG_L2TP is not set # CONFIG_BRIDGE is not set # CONFIG_NET_DSA is not set # CONFIG_VLAN_8021Q is not set @@ -391,9 +365,14 @@ CONFIG_WIRELESS=y # # CFG80211 needs to be enabled for MAC80211 # + +# +# Some wireless drivers require a rate control algorithm +# # CONFIG_WIMAX is not set # CONFIG_RFKILL is not set # CONFIG_NET_9P is not set +# CONFIG_CAIF is not set # # Device Drivers @@ -431,6 +410,7 @@ CONFIG_MTD_BLOCK=y # CONFIG_INFTL is not set # CONFIG_RFD_FTL is not set # CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set # CONFIG_MTD_OOPS is not set # @@ -570,6 +550,7 @@ CONFIG_SCSI_WAIT_SCAN=m # # CONFIG_FIREWIRE is not set # CONFIG_IEEE1394 is not set +# CONFIG_FIREWIRE_NOSY is not set # CONFIG_I2O is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set @@ -624,7 +605,6 @@ CONFIG_B44_PCI=y # CONFIG_SMSC9420 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set -# CONFIG_KS8842 is not set # CONFIG_KS8851_MLL is not set # CONFIG_VIA_RHINE is not set # CONFIG_SC92031 is not set @@ -641,6 +621,10 @@ CONFIG_WLAN=y # Enable WiMAX (Networking options) to see the WiMAX drivers # # CONFIG_WAN is not set + +# +# CAIF transport drivers +# # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_PPP is not set @@ -670,6 +654,7 @@ CONFIG_WLAN=y # CONFIG_VT is not set # CONFIG_DEVKMEM is not set # CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set # CONFIG_NOZOMI is not set # @@ -685,10 +670,13 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=2 # # Non-8250 serial port support # +# CONFIG_SERIAL_MFD_HSU is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set # CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set CONFIG_UNIX98_PTYS=y # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set # CONFIG_LEGACY_PTYS is not set @@ -699,6 +687,7 @@ CONFIG_UNIX98_PTYS=y # CONFIG_RAW_DRIVER is not set # CONFIG_TCG_TPM is not set CONFIG_DEVPORT=y +# CONFIG_RAMOOPS is not set # CONFIG_I2C is not set # CONFIG_SPI is not set @@ -734,7 +723,7 @@ CONFIG_SSB=y CONFIG_SSB_SPROM=y CONFIG_SSB_PCIHOST_POSSIBLE=y CONFIG_SSB_PCIHOST=y -# CONFIG_SSB_B43_PCI_BRIDGE is not set +CONFIG_SSB_B43_PCI_BRIDGE=y # CONFIG_SSB_SILENT is not set # CONFIG_SSB_DEBUG is not set CONFIG_SSB_SERIAL=y @@ -745,15 +734,7 @@ CONFIG_SSB_DRIVER_MIPS=y CONFIG_SSB_EMBEDDED=y CONFIG_SSB_DRIVER_EXTIF=y # CONFIG_SSB_DRIVER_GIGE is not set - -# -# Multifunction device drivers -# -# CONFIG_MFD_CORE is not set -# CONFIG_MFD_SM501 is not set -# CONFIG_HTC_PASIC3 is not set -# CONFIG_MFD_TMIO is not set -# CONFIG_LPC_SCH is not set +# CONFIG_MFD_SUPPORT is not set # CONFIG_REGULATOR is not set # CONFIG_MEDIA_SUPPORT is not set @@ -772,26 +753,7 @@ CONFIG_SSB_DRIVER_EXTIF=y # # CONFIG_DISPLAY_SUPPORT is not set # CONFIG_SOUND is not set -CONFIG_USB_SUPPORT=y -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set - -# -# Enable Host or Gadget support to see Inventra options -# - -# -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may -# -# CONFIG_USB_GADGET is not set - -# -# OTG and related infrastructure -# +# CONFIG_USB_SUPPORT is not set # CONFIG_UWB is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set @@ -803,10 +765,6 @@ CONFIG_RTC_LIB=y # CONFIG_DMADEVICES is not set # CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set - -# -# TI VLYNQ -# # CONFIG_STAGING is not set # @@ -822,11 +780,9 @@ CONFIG_RTC_LIB=y # CONFIG_OCFS2_FS is not set # CONFIG_BTRFS_FS is not set # CONFIG_NILFS2_FS is not set -# CONFIG_AUFS_FS is not set CONFIG_FILE_LOCKING=y # CONFIG_FSNOTIFY is not set # CONFIG_DNOTIFY is not set -# CONFIG_INOTIFY is not set # CONFIG_INOTIFY_USER is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set @@ -863,36 +819,8 @@ CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set # CONFIG_HUGETLB_PAGE is not set # CONFIG_CONFIGFS_FS is not set -CONFIG_MISC_FILESYSTEMS=y -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -# CONFIG_HFS_FS is not set -# CONFIG_HFSPLUS_FS is not set -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_YAFFS_FS is not set -# CONFIG_JFFS2_FS is not set -# CONFIG_LOGFS is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set -# CONFIG_VXFS_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_OMFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_ROMFS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_SMB_FS is not set -# CONFIG_CEPH_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set +# CONFIG_MISC_FILESYSTEMS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set # # Partition Types @@ -910,12 +838,13 @@ CONFIG_PRINTK_TIME=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_FRAME_WARN=1024 -CONFIG_MAGIC_SYSRQ=y +# CONFIG_MAGIC_SYSRQ is not set # CONFIG_STRIP_ASM_SYMS is not set # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_KERNEL is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set # CONFIG_DEBUG_MEMORY_INIT is not set # CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_SYSCTL_SYSCALL_CHECK is not set @@ -926,11 +855,12 @@ CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_TRACING_SUPPORT=y # CONFIG_FTRACE is not set +# CONFIG_ATOMIC64_SELFTEST is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y CONFIG_EARLY_PRINTK=y CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="panic=5" +CONFIG_CMDLINE="panic=5 console=ttyS0,115200n8" # CONFIG_CMDLINE_OVERRIDE is not set # @@ -939,9 +869,6 @@ CONFIG_CMDLINE="panic=5" # CONFIG_KEYS is not set # CONFIG_SECURITY is not set # CONFIG_SECURITYFS is not set -# CONFIG_DEFAULT_SECURITY_SELINUX is not set -# CONFIG_DEFAULT_SECURITY_SMACK is not set -# CONFIG_DEFAULT_SECURITY_TOMOYO is not set CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_DEFAULT_SECURITY="" CONFIG_CRYPTO=y @@ -951,17 +878,10 @@ CONFIG_CRYPTO=y # CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_ALGAPI2=y -CONFIG_CRYPTO_AEAD2=y -CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_PCOMP=y -CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_MANAGER is not set +# CONFIG_CRYPTO_MANAGER2 is not set # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set -CONFIG_CRYPTO_WORKQUEUE=y # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_TEST is not set @@ -979,7 +899,7 @@ CONFIG_CRYPTO_WORKQUEUE=y # CONFIG_CRYPTO_CBC is not set # CONFIG_CRYPTO_CTR is not set # CONFIG_CRYPTO_CTS is not set -CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_ECB is not set # CONFIG_CRYPTO_LRW is not set # CONFIG_CRYPTO_PCBC is not set # CONFIG_CRYPTO_XTS is not set @@ -1063,3 +983,4 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y CONFIG_NLATTR=y +CONFIG_GENERIC_ATOMIC64=y diff --git a/target/brcm/patches/brcm.patch b/target/brcm/patches/brcm.patch index a7c45888f..f62c72395 100644 --- a/target/brcm/patches/brcm.patch +++ b/target/brcm/patches/brcm.patch @@ -1,117 +1,3 @@ -diff -Nur linux-2.6.34.orig/arch/mips/bcm47xx/Makefile linux-2.6.34/arch/mips/bcm47xx/Makefile ---- linux-2.6.34.orig/arch/mips/bcm47xx/Makefile 2010-05-16 23:17:36.000000000 +0200 -+++ linux-2.6.34/arch/mips/bcm47xx/Makefile 2010-06-03 22:38:03.501617275 +0200 -@@ -3,4 +3,5 @@ - # under Linux. - # - --obj-y := gpio.o irq.o prom.o serial.o setup.o time.o wgt634u.o -+obj-y := gpio.o irq.o nvram.o platform.o prom.o \ -+ serial.o setup.o time.o wgt634u.o -diff -Nur linux-2.6.34.orig/arch/mips/bcm47xx/nvram.c linux-2.6.34/arch/mips/bcm47xx/nvram.c ---- linux-2.6.34.orig/arch/mips/bcm47xx/nvram.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.34/arch/mips/bcm47xx/nvram.c 2010-06-03 22:37:52.471617640 +0200 -@@ -0,0 +1,100 @@ -+/* -+ * BCM947xx nvram variable access -+ * -+ * Copyright (C) 2005 Broadcom Corporation -+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ */ -+ -+#include <linux/init.h> -+#include <linux/module.h> -+#include <linux/ssb/ssb.h> -+#include <linux/kernel.h> -+#include <linux/string.h> -+#include <linux/interrupt.h> -+#include <linux/spinlock.h> -+#include <linux/slab.h> -+#include <asm/byteorder.h> -+#include <asm/bootinfo.h> -+#include <asm/addrspace.h> -+#include <asm/io.h> -+#include <asm/uaccess.h> -+#include <asm/mach-bcm47xx/nvram.h> -+#include <asm/mach-bcm47xx/bcm47xx.h> -+ -+static char nvram_buf[NVRAM_SPACE]; -+ -+/* Probe for NVRAM header */ -+static void __init early_nvram_init(void) -+{ -+ struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore; -+ struct nvram_header *header; -+ int i; -+ u32 base, lim, off; -+ u32 *src, *dst; -+ -+ base = mcore->flash_window; -+ lim = mcore->flash_window_size; -+ -+ off = FLASH_MIN; -+ while (off <= lim) { -+ /* Windowed flash access */ -+ header = (struct nvram_header *) -+ KSEG1ADDR(base + off - NVRAM_SPACE); -+ if (header->magic == NVRAM_HEADER) -+ goto found; -+ off <<= 1; -+ } -+ -+ /* Try embedded NVRAM at 4 KB and 1 KB as last resorts */ -+ header = (struct nvram_header *) KSEG1ADDR(base + 4096); -+ if (header->magic == NVRAM_HEADER) -+ goto found; -+ -+ header = (struct nvram_header *) KSEG1ADDR(base + 1024); -+ if (header->magic == NVRAM_HEADER) -+ goto found; -+ -+ return; -+ -+found: -+ src = (u32 *) header; -+ dst = (u32 *) nvram_buf; -+ for (i = 0; i < sizeof(struct nvram_header); i += 4) -+ *dst++ = *src++; -+ for (; i < header->len && i < NVRAM_SPACE; i += 4) -+ *dst++ = le32_to_cpu(*src++); -+} -+ -+int nvram_getenv(char *name, char *val, size_t val_len) -+{ -+ char *var, *value, *end, *eq; -+ -+ if (!name) -+ return 1; -+ -+ if (!nvram_buf[0]) -+ early_nvram_init(); -+ -+ /* Look for name=value and return value */ -+ var = &nvram_buf[sizeof(struct nvram_header)]; -+ end = nvram_buf + sizeof(nvram_buf) - 2; -+ end[0] = end[1] = '\0'; -+ for (; *var; var = value + strlen(value) + 1) { -+ eq = strchr(var, '='); -+ if (!eq) -+ break; -+ value = eq + 1; -+ if ((eq - var) == strlen(name) && -+ strncmp(var, name, (eq - var)) == 0) { -+ snprintf(val, val_len, "%s", value); -+ return 0; -+ } -+ } -+ return 1; -+} -+EXPORT_SYMBOL(nvram_getenv); diff -Nur linux-2.6.34.orig/arch/mips/bcm47xx/platform.c linux-2.6.34/arch/mips/bcm47xx/platform.c --- linux-2.6.34.orig/arch/mips/bcm47xx/platform.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.34/arch/mips/bcm47xx/platform.c 2010-06-03 22:38:03.501617275 +0200 @@ -195,120 +81,6 @@ diff -Nur linux-2.6.34.orig/arch/mips/bcm47xx/platform.c linux-2.6.34/arch/mips/ +} + +device_initcall(bcm47xx_register_devices); -diff -Nur linux-2.6.34.orig/arch/mips/bcm47xx/setup.c linux-2.6.34/arch/mips/bcm47xx/setup.c ---- linux-2.6.34.orig/arch/mips/bcm47xx/setup.c 2010-05-16 23:17:36.000000000 +0200 -+++ linux-2.6.34/arch/mips/bcm47xx/setup.c 2010-06-03 22:37:52.481613327 +0200 -@@ -1,8 +1,8 @@ - /* - * Copyright (C) 2004 Florian Schirmer <jolt@tuxbox.org> -- * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> - * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org> - * Copyright (C) 2006 Michael Buesch <mb@bu3sch.de> -+ * Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.org> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the -@@ -33,6 +33,7 @@ - #include <asm/time.h> - #include <bcm47xx.h> - #include <asm/fw/cfe/cfe_api.h> -+#include <asm/mach-bcm47xx/nvram.h> - - struct ssb_bus ssb_bcm47xx; - EXPORT_SYMBOL(ssb_bcm47xx); -@@ -81,28 +82,42 @@ - /* Fill boardinfo structure */ - memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo)); - -- if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0) -+ if (cfe_getenv("boardvendor", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("boardvendor", buf, sizeof(buf)) >= 0) - iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0); -- if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0) -+ if (cfe_getenv("boardtype", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("boardtype", buf, sizeof(buf)) >= 0) - iv->boardinfo.type = (u16)simple_strtoul(buf, NULL, 0); -- if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0) -+ if (cfe_getenv("boardrev", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("boardrev", buf, sizeof(buf)) >= 0) - iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0); - - /* Fill sprom structure */ - memset(&(iv->sprom), 0, sizeof(struct ssb_sprom)); - iv->sprom.revision = 3; - -- if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0) -+ if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("et0macaddr", buf, sizeof(buf)) >= 0) - str2eaddr(buf, iv->sprom.et0mac); -- if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0) -+ -+ if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("et1macaddr", buf, sizeof(buf)) >= 0) - str2eaddr(buf, iv->sprom.et1mac); -- if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0) -- iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 10); -- if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0) -- iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 10); -- if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0) -+ -+ if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("et0phyaddr", buf, sizeof(buf)) >= 0) -+ iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0); -+ -+ if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("et1phyaddr", buf, sizeof(buf)) >= 0) -+ iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0); -+ -+ if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("et0mdcport", buf, sizeof(buf)) >= 0) - iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10); -- if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0) -+ -+ if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0 || -+ nvram_getenv("et1mdcport", buf, sizeof(buf)) >= 0) - iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10); - - return 0; -diff -Nur linux-2.6.34.orig/arch/mips/include/asm/mach-bcm47xx/nvram.h linux-2.6.34/arch/mips/include/asm/mach-bcm47xx/nvram.h ---- linux-2.6.34.orig/arch/mips/include/asm/mach-bcm47xx/nvram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.34/arch/mips/include/asm/mach-bcm47xx/nvram.h 2010-06-03 22:38:03.501617275 +0200 -@@ -0,0 +1,35 @@ -+/* -+ * Copyright (C) 2005, Broadcom Corporation -+ * Copyright (C) 2006, Felix Fietkau <nbd@openwrt.org> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ */ -+ -+#ifndef __NVRAM_H -+#define __NVRAM_H -+ -+struct nvram_header { -+ u32 magic; -+ u32 len; -+ u32 crc_ver_init; /* 0:7 crc, 8:15 ver, 16:31 sdram_init */ -+ u32 config_refresh; /* 0:15 sdram_config, 16:31 sdram_refresh */ -+ u32 config_ncdl; /* ncdl values for memc */ -+}; -+ -+#define NVRAM_HEADER 0x48534C46 /* 'FLSH' */ -+#define NVRAM_VERSION 1 -+#define NVRAM_HEADER_SIZE 20 -+#define NVRAM_SPACE 0x8000 -+#define NVRAM_FLASH_SIZE 0x20000 -+ -+#define FLASH_MIN 0x00020000 /* Minimum flash size */ -+ -+#define NVRAM_MAX_VALUE_LEN 255 -+#define NVRAM_MAX_PARAM_LEN 64 -+ -+int nvram_getenv(char *name, char *val, size_t val_len); -+ -+#endif diff -Nur linux-2.6.34.orig/drivers/ssb/driver_mipscore.c linux-2.6.34/drivers/ssb/driver_mipscore.c --- linux-2.6.34.orig/drivers/ssb/driver_mipscore.c 2010-05-16 23:17:36.000000000 +0200 +++ linux-2.6.34/drivers/ssb/driver_mipscore.c 2010-06-03 22:38:03.501617275 +0200 diff --git a/target/brcm/tools/trx/trx.c b/target/brcm/tools/trx/trx.c index 0be554dd8..3e383425b 100644 --- a/target/brcm/tools/trx/trx.c +++ b/target/brcm/tools/trx/trx.c @@ -27,16 +27,6 @@ #include <string.h> #include <errno.h> #include <unistd.h> -#include <byteswap.h> -#include <endian.h> - -#if __BYTE_ORDER == __BIG_ENDIAN -#define STORE32_LE(X) bswap_32(X) -#elif __BYTE_ORDER == __LITTLE_ENDIAN -#define STORE32_LE(X) (X) -#else -#error unkown endianness! -#endif uint32_t crc32buf(char *buf, size_t len); @@ -97,9 +87,9 @@ int main(int argc, char **argv) p = (struct trx_header *) buf; - p->magic = STORE32_LE(TRX_MAGIC); + p->magic = TRX_MAGIC; cur_len = sizeof(struct trx_header); - p->flag_version = STORE32_LE((TRX_VERSION << 16)); + p->flag_version = (TRX_VERSION << 16); in = NULL; i = 0; @@ -107,7 +97,7 @@ int main(int argc, char **argv) while ((c = getopt(argc, argv, "-:o:p:v:m:a:b:")) != -1) { switch (c) { case 1: - p->offsets[i++] = STORE32_LE(cur_len); + p->offsets[i++] = cur_len; if (!(in = fopen(optarg, "r"))) { fprintf(stderr, "can not open \"%s\" for reading\n", optarg); @@ -237,9 +227,9 @@ int main(int argc, char **argv) p->crc32 = crc32buf((char *) &p->flag_version, cur_len - offsetof(struct trx_header, flag_version)); - p->crc32 = STORE32_LE(p->crc32); + p->crc32 = p->crc32; - p->len = STORE32_LE(cur_len); + p->len = cur_len; if (!fwrite(buf, cur_len, 1, out) || fflush(out)) { fprintf(stderr, "fwrite failed\n"); |