orion: Add support for 3.7

Signed-off-by: Maarten Bezemer <maarten.beze...@gmail.com>
---
I tested this update on my WRT350n-v2 device and all (LAN and WLAN) seemed to 
be working just fine. It is running for a couple of hours now.

To commit:
 * svn cp target/linux/orion/config-3.{3,7}
 * svn cp target/linux/orion/patches-3.{3,7}
 * svn mv target/linux/orion/patches-3.7/a01-dt2-fixes-for-3.{3,7}.patch
And apply the provided patch.

The modifications (compared to patches-3.3) are:
 * a01-dt2-fixes-for-3.7.patch:
  - asm/leds.h is not required (and missing)
  - pci_std_swizzle is set by default (see 
http://www.spinics.net/lists/linux-tegra/msg05225.html but I suppose the kernel 
developer(s) forgot dt2-setup.c
 * Rest are refreshed patches and changes that were added to the the kernel 
since 3.3

I have used kernel_menuconfig to update config-3.7

Index: target/linux/orion/Makefile
===================================================================
--- target/linux/orion/Makefile (revision 34954)
+++ target/linux/orion/Makefile (working copy)
@@ -13,7 +13,7 @@
 CFLAGS=-Os -pipe -march=armv5te -mtune=xscale -fno-caller-saves
 MAINTAINER:=Imre Kaloz <ka...@openwrt.org>
 
-LINUX_VERSION:=3.3.8
+LINUX_VERSION:=3.7.1
 
 include $(INCLUDE_DIR)/target.mk
 
Index: target/linux/orion/config-3.7
===================================================================
--- target/linux/orion/config-3.7       (working copy)
+++ target/linux/orion/config-3.7       (working copy)
@@ -1,12 +1,14 @@
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_ORION5X=y
 CONFIG_ARCH_REQUIRE_GPIOLIB=y
 # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
 # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
-# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARM=y
 # CONFIG_ARM_CPU_SUSPEND is not set
 CONFIG_ARM_L1_CACHE_SHIFT=5
@@ -15,10 +17,13 @@
 # CONFIG_ARM_THUMB is not set
 # CONFIG_ARPD is not set
 CONFIG_ATA=m
+CONFIG_ATAGS=y
 # CONFIG_CACHE_L2X0 is not set
+CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"
 CONFIG_CMDLINE_FORCE=y
+CONFIG_COMMON_CLK=y
 CONFIG_CPU_32v5=y
 CONFIG_CPU_ABRT_EV5T=y
 CONFIG_CPU_CACHE_VIVT=y
@@ -36,10 +41,12 @@
 CONFIG_CRYPTO_ALGAPI2=y
 CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_DEV_MV_CESA=y
+CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_WORKQUEUE=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 # CONFIG_DEBUG_USER is not set
 CONFIG_DECOMPRESS_LZMA=y
 CONFIG_DLCI=m
@@ -53,9 +60,15 @@
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
 CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_IO=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_KERNEL_EXECVE=y
+CONFIG_GENERIC_KERNEL_THREAD=y
 CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HAMRADIO is not set
@@ -64,10 +77,18 @@
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAVE_AOUT=y
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
 CONFIG_HAVE_ARCH_KGDB=y
 CONFIG_HAVE_ARCH_PFN_VALID=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_BPF_JIT=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_CLK_PREPARE=y
 CONFIG_HAVE_C_RECORDMCOUNT=y
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
 CONFIG_HAVE_DMA_API_DEBUG=y
+CONFIG_HAVE_DMA_ATTRS=y
+CONFIG_HAVE_DMA_CONTIGUOUS=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
 CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
@@ -86,8 +107,8 @@
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_PROC_CPU=y
 CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_SCHED_CLOCK=y
-CONFIG_HAVE_SPARSE_IRQ=y
+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
+CONFIG_HAVE_UID16=y
 CONFIG_HDLC=m
 CONFIG_HDLC_CISCO=m
 CONFIG_HDLC_FR=m
@@ -103,6 +124,7 @@
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
+CONFIG_IRQ_DOMAIN=y
 CONFIG_KTIME_SCALAR=y
 CONFIG_LEDS_GPIO=y
 CONFIG_LEGACY_PTYS=y
@@ -133,6 +155,7 @@
 CONFIG_MACH_WNR854T=y
 CONFIG_MACH_WRT350N_V2=y
 CONFIG_MDIO_BOARDINFO=y
+CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MV643XX_ETH=y
 CONFIG_NEED_DMA_MAP_STATE=y
@@ -153,6 +176,7 @@
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PHYLIB=y
 CONFIG_PLAT_ORION=y
+CONFIG_PLAT_ORION_LEGACY=y
 # CONFIG_PREEMPT_RCU is not set
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_ISL1208=y
@@ -162,7 +186,9 @@
 # CONFIG_SCSI_MULTI_LUN is not set
 CONFIG_SPLIT_PTLOCK_CPUS=999999
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_UID16=y
+CONFIG_UIDGID_CONVERTED=y
 CONFIG_USB=m
 CONFIG_USB_ARCH_HAS_XHCI=y
 CONFIG_USB_COMMON=m
Index: target/linux/orion/patches-3.7/210-wn802t_support.patch
===================================================================
--- target/linux/orion/patches-3.7/210-wn802t_support.patch     (working copy)
+++ target/linux/orion/patches-3.7/210-wn802t_support.patch     (working copy)
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-orion5x/Kconfig
 +++ b/arch/arm/mach-orion5x/Kconfig
-@@ -139,10 +139,13 @@ config MACH_MSS2
+@@ -138,10 +138,13 @@ config MACH_MSS2
          Maxtor Shared Storage II platform.
  
  config MACH_WNR854T
@@ -48,7 +48,7 @@
        orion5x_uart0_init();
  
        orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE,
-@@ -167,7 +181,7 @@ static struct hw_pci wnr854t_pci __initd
+@@ -166,7 +180,7 @@ static struct hw_pci wnr854t_pci __initd
  
  static int __init wnr854t_pci_init(void)
  {
@@ -57,7 +57,7 @@
                pci_common_init(&wnr854t_pci);
  
        return 0;
-@@ -178,6 +192,18 @@ MACHINE_START(WNR854T, "Netgear WNR854T"
+@@ -177,6 +191,18 @@ MACHINE_START(WNR854T, "Netgear WNR854T"
        /* Maintainer: Imre Kaloz <ka...@openwrt.org> */
        .atag_offset    = 0x100,
        .init_machine   = wnr854t_init,
Index: target/linux/orion/patches-3.7/300-dns323_partition_map.patch
===================================================================
--- target/linux/orion/patches-3.7/300-dns323_partition_map.patch       
(working copy)
+++ target/linux/orion/patches-3.7/300-dns323_partition_map.patch       
(working copy)
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-orion5x/dns323-setup.c
 +++ b/arch/arm/mach-orion5x/dns323-setup.c
-@@ -113,6 +113,13 @@ subsys_initcall(dns323_pci_init);
+@@ -114,6 +114,13 @@ subsys_initcall(dns323_pci_init);
   *  0x00020000-0x001a0000 : "Linux Kernel"
   *  0x001a0000-0x007d0000 : "File System"
   *  0x007d0000-0x00800000 : "u-boot"
@@ -14,7 +14,7 @@
   */
  
  #define DNS323_NOR_BOOT_BASE 0xf4000000
-@@ -128,11 +135,11 @@ static struct mtd_partition dns323_parti
+@@ -129,11 +136,11 @@ static struct mtd_partition dns323_parti
                .size   = 0x00010000,
                .offset = 0x00010000,
        }, {
Index: target/linux/orion/patches-3.7/400-fix-section-mismatch-warnings.patch
===================================================================
--- target/linux/orion/patches-3.7/400-fix-section-mismatch-warnings.patch      
(working copy)
+++ target/linux/orion/patches-3.7/400-fix-section-mismatch-warnings.patch      
(working copy)
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-orion5x/common.c
 +++ b/arch/arm/mach-orion5x/common.c
-@@ -192,7 +192,7 @@ void __init orion5x_init_early(void)
+@@ -205,7 +205,7 @@ void __init orion5x_init_early(void)
  
  int orion5x_tclk;
  
@@ -9,23 +9,3 @@
  {
        u32 dev, rev;
  
-@@ -204,7 +204,7 @@ int __init orion5x_find_tclk(void)
-       return 166666667;
- }
- 
--static void orion5x_timer_init(void)
-+static __init void orion5x_timer_init(void)
- {
-       orion5x_tclk = orion5x_find_tclk();
- 
---- a/arch/arm/mach-orion5x/addr-map.c
-+++ b/arch/arm/mach-orion5x/addr-map.c
-@@ -76,7 +76,7 @@ static int __init cpu_win_can_remap(cons
- /*
-  * Description of the windows needed by the platform code
-  */
--static struct __initdata orion_addr_map_cfg addr_map_cfg = {
-+static struct orion_addr_map_cfg addr_map_cfg __initdata = {
-       .num_wins = 8,
-       .cpu_win_can_remap = cpu_win_can_remap,
-       .bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE,
Index: target/linux/orion/patches-3.7/a01-dt2-fixes-for-3.7.patch
===================================================================
--- target/linux/orion/patches-3.7/a01-dt2-fixes-for-3.7.patch  (working copy)
+++ target/linux/orion/patches-3.7/a01-dt2-fixes-for-3.7.patch  (working copy)
@@ -1,6 +1,14 @@
 --- a/arch/arm/mach-orion5x/dt2-setup.c
 +++ b/arch/arm/mach-orion5x/dt2-setup.c
-@@ -146,7 +146,7 @@ void __init dt2_pci_preinit(void)
+@@ -26,7 +26,6 @@
+ #include <linux/interrupt.h>
+ #include <asm/mach-types.h>
+ #include <asm/gpio.h>
+-#include <asm/leds.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/pci.h>
+ #include <mach/orion5x.h>
+@@ -146,7 +145,7 @@ void __init dt2_pci_preinit(void)
        }
  }
  
@@ -9,7 +17,15 @@
  {
        int irq;
  
-@@ -383,8 +383,7 @@ __tagtable(ATAG_MV_UBOOT, parse_tag_dt2_
+@@ -183,7 +182,6 @@ static int __init dt2_pci_map_irq(struct
+ static struct hw_pci dt2_pci __initdata = {
+       .nr_controllers = 2,
+       .preinit        = dt2_pci_preinit,
+-      .swizzle        = pci_std_swizzle,
+       .setup          = orion5x_pci_sys_setup,
+       .scan           = orion5x_pci_sys_scan_bus,
+       .map_irq        = dt2_pci_map_irq,
+@@ -383,8 +381,7 @@ __tagtable(ATAG_MV_UBOOT, parse_tag_dt2_
   *
   * Vanilla kernel should use "tag_fixup_mem32" function.
   */
@@ -19,7 +35,7 @@
  {
        char *p = NULL;
        static char openwrt_init_tag[] __initdata = " init=/etc/preinit";
-@@ -437,10 +436,11 @@ void __init openwrt_fixup(struct machine
+@@ -437,10 +434,11 @@ void __init openwrt_fixup(struct machine
  /* Warning: Freecom uses their own custom bootloader with mach-type (=1500) */
  MACHINE_START(DT2, "Freecom DataTank Gateway")
        /* Maintainer: Zintis Petersons <zintis.peters...@abcsolutions.lv> */
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to