diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-11-29 17:09:56 -0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-12-04 11:41:51 +0100 |
commit | da5155b1a5f3f6c042b18944f1718dbbe03b74fa (patch) | |
tree | ffe356b9c5224a1c70d88d13d48dc9ad1b0898ac /target/linux/orion | |
parent | cec7e661e7a7e30de00607df5772510b30eb5dad (diff) | |
download | upstream-da5155b1a5f3f6c042b18944f1718dbbe03b74fa.tar.gz upstream-da5155b1a5f3f6c042b18944f1718dbbe03b74fa.tar.bz2 upstream-da5155b1a5f3f6c042b18944f1718dbbe03b74fa.zip |
orion: Add support for 4.4 kernel
Patches and configuration apply just fine on the Marvell Orion target.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'target/linux/orion')
5 files changed, 1124 insertions, 0 deletions
diff --git a/target/linux/orion/config-4.4 b/target/linux/orion/config-4.4 new file mode 100644 index 0000000000..472850199e --- /dev/null +++ b/target/linux/orion/config-4.4 @@ -0,0 +1,422 @@ +# CONFIG_AF_KCM is not set +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_APM_EMULATION is not set +# CONFIG_AQUANTIA_PHY is not set +# CONFIG_ARCH_ASPEED is not set +CONFIG_ARCH_CLOCKSOURCE_DATA=y +CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_ARCH_HAS_SG_CHAIN=y +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_MMAP_RND_BITS=8 +CONFIG_ARCH_MMAP_RND_BITS_MAX=16 +CONFIG_ARCH_MMAP_RND_BITS_MIN=8 +CONFIG_ARCH_MULTIPLATFORM=y +CONFIG_ARCH_MULTI_CPU_AUTO=y +# CONFIG_ARCH_MULTI_V4 is not set +# CONFIG_ARCH_MULTI_V4T is not set +CONFIG_ARCH_MULTI_V4_V5=y +CONFIG_ARCH_MULTI_V5=y +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_ORION5X=y +# CONFIG_ARCH_ORION5X_DT is not set +# CONFIG_ARCH_OXNAS is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set +CONFIG_ARCH_WANT_GENERAL_HUGETLB=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_ARM=y +# CONFIG_ARM_CPU_SUSPEND is not set +# CONFIG_ARM_CRYPTO is not set +CONFIG_ARM_GIC_MAX_NR=1 +CONFIG_ARM_HAS_SG_CHAIN=y +CONFIG_ARM_L1_CACHE_SHIFT=5 +# CONFIG_ARM_MODULE_PLTS is not set +CONFIG_ARM_PATCH_PHYS_VIRT=y +# CONFIG_ARM_THUMB is not set +# CONFIG_ARM_TIMER_SP804 is not set +CONFIG_ATAGS=y +# CONFIG_ATH5K_PCI is not set +CONFIG_AUTO_ZRELADDR=y +# CONFIG_BINFMT_FLAT is not set +CONFIG_BLK_MQ_PCI=y +# CONFIG_BNXT is not set +# CONFIG_CACHE_L2X0 is not set +CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLKSRC_MMIO=y +CONFIG_CLKSRC_OF=y +CONFIG_CLKSRC_PROBE=y +# CONFIG_CLK_QORIQ is not set +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMDLINE="rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 earlyprintk" +CONFIG_CMDLINE_FORCE=y +CONFIG_COMMON_CLK=y +# CONFIG_COMMON_CLK_NXP is not set +# CONFIG_COMMON_CLK_PIC32 is not set +# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set +# CONFIG_CORESIGHT is not set +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_COPY_FEROCEON=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_FEROCEON=y +CONFIG_CPU_FEROCEON_OLD_ID=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_NO_EFFICIENT_FFS is not set +CONFIG_CPU_PABRT_LEGACY=y +CONFIG_CPU_SW_DOMAIN_PAN=y +CONFIG_CPU_TLB_FEROCEON=y +CONFIG_CPU_USE_DOMAINS=y +# CONFIG_CXL_AFU_DRIVER_OPS is not set +CONFIG_DEBUG_LL=y +CONFIG_DEBUG_LL_INCLUDE="debug/8250.S" +CONFIG_DEBUG_LL_UART_8250=y +# CONFIG_DEBUG_MVEBU_UART0_ALTERNATE is not set +# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set +# CONFIG_DEBUG_TIMEKEEPING is not set +# CONFIG_DEBUG_UART_8250 is not set +# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set +# CONFIG_DEBUG_UART_8250_PALMCHIP is not set +CONFIG_DEBUG_UART_8250_SHIFT=2 +# CONFIG_DEBUG_UART_8250_WORD is not set +CONFIG_DEBUG_UART_PHYS=0xf1012000 +CONFIG_DEBUG_UART_VIRT=0xfe012000 +CONFIG_DEBUG_UNCOMPRESS=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set +CONFIG_DEVMEM=y +CONFIG_DNOTIFY=y +# CONFIG_DP83848_PHY is not set +# CONFIG_DP83867_PHY is not set +# CONFIG_DST_CACHE is not set +CONFIG_DTC=y +CONFIG_EARLY_PRINTK=y +CONFIG_EDAC_ATOMIC_SCRUB=y +CONFIG_EDAC_SUPPORT=y +# CONFIG_EFI is not set +CONFIG_ELFCORE=y +# CONFIG_EXPORTFS_BLOCK_OPS is not set +# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set +CONFIG_FIXED_PHY=y +CONFIG_FIX_EARLYCON_MEM=y +# CONFIG_FPGA is not set +CONFIG_FRAME_POINTER=y +# CONFIG_FS_ENCRYPTION is not set +# CONFIG_FW_CFG_SYSFS is not set +# CONFIG_GCC_PLUGINS is not set +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_EARLY_IOREMAP=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_GENERIC_IO=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +# CONFIG_GOLDFISH is not set +CONFIG_GPIOLIB=y +# CONFIG_GPIO_74XX_MMIO is not set +# CONFIG_GPIO_ALTERA is not set +# CONFIG_GPIO_MOCKUP is not set +# CONFIG_GPIO_MPC8XXX is not set +CONFIG_GPIO_MVEBU=y +CONFIG_GPIO_SYSFS=y +# CONFIG_GPIO_ZX is not set +# CONFIG_GREYBUS is not set +CONFIG_HANDLE_DOMAIN_IRQ=y +# CONFIG_HARDENED_USERCOPY is not set +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_HAS_DMA=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_ARCH_AUDITSYSCALL=y +# CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y +# CONFIG_HAVE_ARCH_HASH is not set +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_HAVE_ARCH_MMAP_RND_BITS=y +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +# CONFIG_HAVE_ARCH_VMAP_STACK is not set +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_HAVE_CBPF_JIT=y +CONFIG_HAVE_CC_STACKPROTECTOR=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_HAVE_DEBUG_KMEMLEAK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_EXIT_THREAD=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_GCC_PLUGINS=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y +CONFIG_HAVE_IDE=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZ4=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_HAVE_NET_DSA=y +CONFIG_HAVE_NMI=y +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_UID16=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +# CONFIG_HIP04_ETH is not set +# CONFIG_HISI_FEMAC is not set +# CONFIG_HNS is not set +# CONFIG_HNS_DSAF is not set +# CONFIG_HNS_ENET is not set +CONFIG_HZ_FIXED=0 +CONFIG_HZ_PERIODIC=y +# CONFIG_IDLE_PAGE_TRACKING is not set +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_INTEL_TH is not set +# CONFIG_INTEL_XWAY_PHY is not set +CONFIG_IOMMU_HELPER=y +CONFIG_IRQCHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_FORCED_THREADING=y +# CONFIG_IRQ_POLL is not set +CONFIG_IRQ_WORK=y +# CONFIG_ISA_BUS_API is not set +# CONFIG_LEDS_BCM6328 is not set +# CONFIG_LEDS_BCM6358 is not set +# CONFIG_LEDS_CLASS_FLASH is not set +CONFIG_LEDS_GPIO=y +# CONFIG_LEDS_TRIGGER_MTD is not set +# CONFIG_LEDS_TRIGGER_PANIC is not set +CONFIG_LIBFDT=y +# CONFIG_LNET is not set +# CONFIG_LWTUNNEL is not set +CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 +# CONFIG_MACH_ASM9260 is not set +# CONFIG_MACH_D2NET_DT is not set +# CONFIG_MACH_DB88F5281 is not set +# CONFIG_MACH_DNS323 is not set +# CONFIG_MACH_DT2 is not set +# CONFIG_MACH_KUROBOX_PRO is not set +# CONFIG_MACH_LINKSTATION_LSCHL is not set +# CONFIG_MACH_LINKSTATION_LS_HGL is not set +# CONFIG_MACH_LINKSTATION_MINI is not set +# CONFIG_MACH_LINKSTATION_PRO is not set +# CONFIG_MACH_MSS2_DT is not set +# CONFIG_MACH_MV2120 is not set +# CONFIG_MACH_NET2BIG is not set +# CONFIG_MACH_RD88F5181L_FXO is not set +# CONFIG_MACH_RD88F5181L_GE is not set +# CONFIG_MACH_RD88F5182 is not set +# CONFIG_MACH_RD88F5182_DT is not set +# CONFIG_MACH_RD88F6183AP_GE is not set +# CONFIG_MACH_TERASTATION_PRO2 is not set +# CONFIG_MACH_TS209 is not set +# CONFIG_MACH_TS409 is not set +# CONFIG_MACH_TS78XX is not set +CONFIG_MACH_WNR854T=y +CONFIG_MACH_WRT350N_V2=y +# CONFIG_MACSEC is not set +CONFIG_MANDATORY_FILE_LOCKING=y +CONFIG_MAY_USE_DEVLINK=y +# CONFIG_MDIO_HISI_FEMAC is not set +CONFIG_MEMBARRIER=y +# CONFIG_MEMTEST is not set +# CONFIG_MFD_ATMEL_FLEXCOM is not set +# CONFIG_MFD_ATMEL_HLCDC is not set +# CONFIG_MFD_EXYNOS_LPASS is not set +# CONFIG_MFD_MT6397 is not set +# CONFIG_MICROCHIP_PHY is not set +# CONFIG_MICROSEMI_PHY is not set +CONFIG_MIGHT_HAVE_PCI=y +# CONFIG_MLXSW_CORE is not set +CONFIG_MODULES_USE_ELF_REL=y +# CONFIG_MOST is not set +# CONFIG_MPLS is not set +# CONFIG_MTD_PARTITIONED_MASTER is not set +CONFIG_MTD_PHYSMAP=y +CONFIG_MULTIUSER=y +CONFIG_MULTI_IRQ_HANDLER=y +CONFIG_MV643XX_ETH=y +CONFIG_MVEBU_MBUS=y +CONFIG_MVMDIO=y +# CONFIG_MVNETA is not set +# CONFIG_MVNETA_BM is not set +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_KUSER_HELPERS=y +CONFIG_NEED_PER_CPU_KM=y +# CONFIG_NET_CLS_FLOWER is not set +# CONFIG_NET_CLS_MATCHALL is not set +# CONFIG_NET_DEVLINK is not set +# CONFIG_NET_L3_MASTER_DEV is not set +# CONFIG_NET_NCSI is not set +# CONFIG_NET_SWITCHDEV is not set +CONFIG_NET_VENDOR_AMAZON=y +# CONFIG_NET_VENDOR_AURORA is not set +CONFIG_NET_VENDOR_CAVIUM=y +CONFIG_NET_VENDOR_EZCHIP=y +CONFIG_NET_VENDOR_NETRONOME=y +CONFIG_NET_VENDOR_RENESAS=y +CONFIG_NET_VENDOR_ROCKER=y +CONFIG_NET_VENDOR_SYNOPSYS=y +CONFIG_NMI_LOG_BUF_SHIFT=13 +CONFIG_NO_BOOTMEM=y +# CONFIG_NTB is not set +# CONFIG_NVM is not set +# CONFIG_NVMEM is not set +CONFIG_OF=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_ADDRESS_PCI=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_GPIO=y +CONFIG_OF_IRQ=y +CONFIG_OF_MDIO=y +CONFIG_OF_NET=y +# CONFIG_OF_OVERLAY is not set +CONFIG_OF_PCI=y +CONFIG_OF_PCI_IRQ=y +CONFIG_OF_RESERVED_MEM=y +# CONFIG_OF_UNITTEST is not set +CONFIG_OLD_SIGACTION=y +CONFIG_OLD_SIGSUSPEND3=y +# CONFIG_ORANGEFS_FS is not set +# CONFIG_PAGE_EXTENSION is not set +CONFIG_PAGE_OFFSET=0xC0000000 +# CONFIG_PAGE_OWNER is not set +# CONFIG_PARAVIRT is not set +# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set +CONFIG_PCI=y +# CONFIG_PCIE_ALTERA is not set +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_DOMAINS_GENERIC=y +CONFIG_PERF_USE_VMALLOC=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_PHYLIB=y +# CONFIG_PHY_PXA_28NM_HSIC is not set +# CONFIG_PHY_PXA_28NM_USB2 is not set +CONFIG_PLAT_ORION=y +CONFIG_PLAT_ORION_LEGACY=y +CONFIG_PRINTK_NMI=y +# CONFIG_PROC_CHILDREN is not set +# CONFIG_QCOM_EMAC is not set +# CONFIG_QED is not set +# CONFIG_RAS is not set +CONFIG_RATIONAL=y +# CONFIG_RCU_EQS_DEBUG is not set +# CONFIG_RCU_EXPEDITE_BOOT is not set +# CONFIG_RCU_EXPERT is not set +# CONFIG_RCU_PERF_TEST is not set +# CONFIG_RCU_STALL_COMMON is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_SBITMAP=y +CONFIG_SCHED_HRTICK=y +# CONFIG_SCHED_INFO is not set +# CONFIG_SCSI_DMA is not set +CONFIG_SECTION_MISMATCH_WARN_ONLY=y +CONFIG_SERIAL_8250_FSL=y +# CONFIG_SERIAL_8250_MOXA is not set +# CONFIG_SERIAL_8250_RT288X is not set +# CONFIG_SERIAL_BCM63XX is not set +# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set +# CONFIG_SERIAL_STM32 is not set +# CONFIG_SG_POOL is not set +# CONFIG_SG_SPLIT is not set +# CONFIG_SLAB_FREELIST_RANDOM is not set +# CONFIG_SOCK_CGROUP_DATA is not set +# CONFIG_SOC_BRCMSTB is not set +CONFIG_SPARSE_IRQ=y +CONFIG_SPLIT_PTLOCK_CPUS=999999 +# CONFIG_SQUASHFS_LZ4 is not set +CONFIG_SRAM=y +CONFIG_SRCU=y +# CONFIG_STAGING_BOARD is not set +# CONFIG_STM is not set +# CONFIG_STREAM_PARSER is not set +# CONFIG_SUNXI_SRAM is not set +CONFIG_SWIOTLB=y +CONFIG_SWPHY=y +# CONFIG_SYNC_FILE is not set +# CONFIG_SYNOPSYS_DWC_ETH_QOS is not set +# CONFIG_SYSTEM_DATA_VERIFICATION is not set +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +# CONFIG_TCP_CONG_BBR is not set +# CONFIG_TCP_CONG_CDG is not set +# CONFIG_TCP_CONG_NV is not set +# CONFIG_TERANETICS_PHY is not set +# CONFIG_TEST_BITMAP is not set +# CONFIG_TEST_HASH is not set +# CONFIG_TEST_HEXDUMP is not set +# CONFIG_TEST_PRINTF is not set +# CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_TEST_UUID is not set +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_TI_CPSW_ALE is not set +# CONFIG_TRIM_UNUSED_KSYMS is not set +# CONFIG_TUN_VNET_CROSS_LE is not set +# CONFIG_UBSAN is not set +CONFIG_UID16=y +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_USB_SUPPORT=y +# CONFIG_USB_ULPI_BUS is not set +# CONFIG_USERFAULTFD is not set +CONFIG_USE_OF=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_VFP is not set +# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set +# CONFIG_WATCHDOG_SYSFS is not set +CONFIG_WLAN_VENDOR_ADMTEK=y +CONFIG_WLAN_VENDOR_ATH=y +CONFIG_WLAN_VENDOR_ATMEL=y +CONFIG_WLAN_VENDOR_BROADCOM=y +CONFIG_WLAN_VENDOR_CISCO=y +CONFIG_WLAN_VENDOR_INTEL=y +CONFIG_WLAN_VENDOR_INTERSIL=y +CONFIG_WLAN_VENDOR_MARVELL=y +CONFIG_WLAN_VENDOR_MEDIATEK=y +CONFIG_WLAN_VENDOR_RALINK=y +CONFIG_WLAN_VENDOR_REALTEK=y +CONFIG_WLAN_VENDOR_RSI=y +CONFIG_WLAN_VENDOR_ST=y +CONFIG_WLAN_VENDOR_TI=y +CONFIG_WLAN_VENDOR_ZYDAS=y +# CONFIG_WQ_WATCHDOG is not set +# CONFIG_XILINX_GMII2RGMII is not set +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ZBOOT_ROM_TEXT=0x0 diff --git a/target/linux/orion/patches-4.4/100-wrt350nv2_openwrt_partition_map.patch b/target/linux/orion/patches-4.4/100-wrt350nv2_openwrt_partition_map.patch new file mode 100644 index 0000000000..89c2c9420b --- /dev/null +++ b/target/linux/orion/patches-4.4/100-wrt350nv2_openwrt_partition_map.patch @@ -0,0 +1,32 @@ +--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c ++++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c +@@ -134,11 +134,11 @@ static struct mtd_partition wrt350n_v2_n + { + .name = "kernel", + .offset = 0x00000000, +- .size = 0x00760000, ++ .size = 0x00140000, // change to kernel mtd size here (1/3) + }, { + .name = "rootfs", +- .offset = 0x001a0000, +- .size = 0x005c0000, ++ .offset = 0x00140000, // change to kernel mtd size here (2/3) ++ .size = 0x00610000, // adopt to kernel mtd size here (3/3) = 0x00750000 - <kernel mtd size> + }, { + .name = "lang", + .offset = 0x00760000, +@@ -151,6 +151,14 @@ static struct mtd_partition wrt350n_v2_n + .name = "u-boot", + .offset = 0x007c0000, + .size = 0x00040000, ++ }, { ++ .name = "eRcOmM_do_not_touch", ++ .offset = 0x00750000, ++ .size = 0x00010000, // erasesize ++ }, { ++ .name = "image", // for sysupgrade ++ .offset = 0x00000000, ++ .size = 0x00750000, + }, + }; + diff --git a/target/linux/orion/patches-4.4/101-wnr854t_partition_map.patch b/target/linux/orion/patches-4.4/101-wnr854t_partition_map.patch new file mode 100644 index 0000000000..881cfb773e --- /dev/null +++ b/target/linux/orion/patches-4.4/101-wnr854t_partition_map.patch @@ -0,0 +1,25 @@ +--- a/arch/arm/mach-orion5x/wnr854t-setup.c ++++ b/arch/arm/mach-orion5x/wnr854t-setup.c +@@ -57,15 +57,19 @@ static struct mtd_partition wnr854t_nor_ + { + .name = "kernel", + .offset = 0x00000000, +- .size = 0x00100000, ++ .size = 0x00140000, + }, { + .name = "rootfs", +- .offset = 0x00100000, +- .size = 0x00660000, ++ .offset = 0x00140000, ++ .size = 0x00620000, + }, { + .name = "uboot", + .offset = 0x00760000, + .size = 0x00040000, ++ }, { ++ .name = "image", // for sysupgrade ++ .offset = 0x00000000, ++ .size = 0x00760000, + }, + }; + diff --git a/target/linux/orion/patches-4.4/200-dt2_board_support.patch b/target/linux/orion/patches-4.4/200-dt2_board_support.patch new file mode 100644 index 0000000000..3d2efffe68 --- /dev/null +++ b/target/linux/orion/patches-4.4/200-dt2_board_support.patch @@ -0,0 +1,570 @@ +Index: linux-3.18.43/arch/arm/mach-orion5x/Kconfig +=================================================================== +--- linux-3.18.43.orig/arch/arm/mach-orion5x/Kconfig ++++ linux-3.18.43/arch/arm/mach-orion5x/Kconfig +@@ -36,6 +36,13 @@ config MACH_RD88F5182_DT + Say 'Y' here if you want your kernel to support the Marvell + Orion-NAS (88F5182) RD2, Flattened Device Tree. + ++config MACH_DT2 ++ bool "Freecom DataTank Gateway" ++ select I2C_BOARDINFO ++ help ++ Say 'Y' here if you want your kernel to support the ++ Freecom DataTank Gateway ++ + config MACH_KUROBOX_PRO + bool "KuroBox Pro" + select I2C_BOARDINFO +Index: linux-3.18.43/arch/arm/mach-orion5x/Makefile +=================================================================== +--- linux-3.18.43.orig/arch/arm/mach-orion5x/Makefile ++++ linux-3.18.43/arch/arm/mach-orion5x/Makefile +@@ -14,6 +14,7 @@ obj-$(CONFIG_MACH_TS78XX) += ts78xx-setu + obj-$(CONFIG_MACH_MV2120) += mv2120-setup.o + obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o + obj-$(CONFIG_MACH_WNR854T) += wnr854t-setup.o ++obj-$(CONFIG_MACH_DT2) += dt2-setup.o + obj-$(CONFIG_MACH_RD88F5181L_GE) += rd88f5181l-ge-setup.o + obj-$(CONFIG_MACH_RD88F5181L_FXO) += rd88f5181l-fxo-setup.o + obj-$(CONFIG_MACH_RD88F6183AP_GE) += rd88f6183ap-ge-setup.o +Index: linux-3.18.43/arch/arm/mach-orion5x/dt2-common.h +=================================================================== +--- /dev/null ++++ linux-3.18.43/arch/arm/mach-orion5x/dt2-common.h +@@ -0,0 +1,82 @@ ++#ifndef __INC_DT2_COMMON_H ++#define __INC_DT2_COMMON_H ++ ++#define ATAG_MV_UBOOT 0x41000403 ++ ++struct tag_mv_uboot { ++ u32 uboot_version; ++ u32 tclk; ++ u32 sysclk; ++ u32 isUsbHost; ++ u32 overEthAddr; ++ u8 dt2_eeprom[256]; ++}; ++ ++#define DT2_EEPROM_ADDR 0x50 ++#define DT2_EEPROM_OFFSET 0 ++#define DT2_EEPROM_LENGTH 256 ++ ++#define DT2_SERIAL_NUMBER_DEFAULT "run on default\0" ++#define DT2_REVISION_DEFAULT_INIT 0xFF ++#define DT2_CONFIG_FLAGS_DEFAULT 0x00 ++ ++#define _PACKED_ __attribute__((packed)) ++ ++struct DT2_EEPROM_SD_CONFIG { ++ unsigned int ram_1; ++ unsigned int ram_2; ++ unsigned int ram_3; ++ unsigned int ram_4; ++ unsigned char ram_5; ++ unsigned char ram_6; ++ unsigned short ram_7; ++ unsigned int magic_id; ++ } _PACKED_; // 24 Bytes in total ++ ++struct DT2_EEPROM_FC_CONFIG { ++ unsigned char rtc_sts_mask; ++ unsigned char rtc_sts_init; ++ unsigned char rtc_int_mask; ++ unsigned char rtc_int_init; ++ unsigned char rtc_atrim_init; ++ unsigned char rtc_dtrim_init; ++ unsigned char dummy1; ++ unsigned char dummy2; ++ unsigned char dt2_config_flags; /* 0x80 to load rtc_values to RTC */ ++ unsigned char dt2_revision; /* upper nibble is HW, lower nibble is FW */ ++ unsigned char dt2_serial_number[16]; /* Serial number of DT-2 */ ++ } _PACKED_; // 26 Bytes in total ++ ++#define CFG_LOAD_RTC_VALUES 0x80 ++ ++struct DT2_EEPROM_GW_CONFIG { ++ unsigned int dummy1; ++ unsigned int dummy2; ++ unsigned int dummy3; ++ unsigned char dummy4; ++ unsigned char tos_video_val1; ++ unsigned char tos_video_val2; ++ unsigned char tos_voip_val; ++ unsigned char qos_igmp_cfg; ++ unsigned char num_of_ifs; ++ unsigned short vlan_ports_if[3]; ++ unsigned char mac_addr[3][6]; ++ } _PACKED_; // 42 Bytes in total ++ ++#define _SIZE_OF_ALL_STRUCTS_ (sizeof(struct DT2_EEPROM_SD_CONFIG) + sizeof(struct DT2_EEPROM_FC_CONFIG) + sizeof(struct DT2_EEPROM_GW_CONFIG)) ++ ++// MV = EEPROM - SD - FC - GW - CRC ++struct DT2_EEPROM_MV_CONFIG { ++ unsigned int reg_addr[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; ++ unsigned int reg_data[(DT2_EEPROM_LENGTH - _SIZE_OF_ALL_STRUCTS_ - sizeof(unsigned int)) / (sizeof(unsigned int) * 2)]; ++ } _PACKED_; ++ ++struct DT2_EEPROM_STRUCT { ++ struct DT2_EEPROM_MV_CONFIG mv; ++ struct DT2_EEPROM_SD_CONFIG sd; ++ struct DT2_EEPROM_FC_CONFIG fc; ++ struct DT2_EEPROM_GW_CONFIG gw; ++ unsigned int crc; ++ } _PACKED_; ++ ++#endif +Index: linux-3.18.43/arch/arm/mach-orion5x/dt2-setup.c +=================================================================== +--- /dev/null ++++ linux-3.18.43/arch/arm/mach-orion5x/dt2-setup.c +@@ -0,0 +1,448 @@ ++/* ++ * arch/arm/mach-orion5x/dt2-setup.c ++ * ++ * Freecom DataTank Gateway Setup ++ * ++ * Copyright (C) 2009 Zintis Petersons <Zintis.Petersons@abcsolutions.lv> ++ * ++ * This file is licensed under the terms of the GNU General Public ++ * License version 2. This program is licensed "as is" without any ++ * warranty of any kind, whether express or implied. ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/init.h> ++#include <linux/platform_device.h> ++#include <linux/pci.h> ++#include <linux/irq.h> ++#include <linux/mtd/physmap.h> ++#include <linux/mv643xx_eth.h> ++#include <linux/ethtool.h> ++#include <linux/if_ether.h> ++#include <net/dsa.h> ++#include <linux/ata_platform.h> ++#include <linux/i2c.h> ++#include <linux/reboot.h> ++#include <linux/interrupt.h> ++#include <asm/mach-types.h> ++#include <asm/gpio.h> ++#include <asm/mach/arch.h> ++#include <asm/mach/pci.h> ++#include <mach/orion5x.h> ++#include "common.h" ++#include "mpp.h" ++ ++/***************************************************************************** ++ * DT2 local ++ ****************************************************************************/ ++#include <asm/setup.h> ++#include "dt2-common.h" ++ ++u32 mvUbootVer = 0; ++u32 mvTclk = 166666667; ++u32 mvSysclk = 200000000; ++u32 mvIsUsbHost = 1; ++u32 overEthAddr = 0; ++u32 gBoardId = -1; ++struct DT2_EEPROM_STRUCT dt2_eeprom; ++ ++/***************************************************************************** ++ * DT2 Info ++ ****************************************************************************/ ++/* ++ * PCI ++ */ ++ ++#define DT2_PCI_SLOT0_OFFS 7 ++#define DT2_PCI_SLOT0_IRQ_A_PIN 3 ++#define DT2_PCI_SLOT0_IRQ_B_PIN 2 ++ ++#define DT2_PIN_GPIO_SYNC 25 ++#define DT2_PIN_GPIO_POWER 24 ++#define DT2_PIN_GPIO_UNPLUG1 23 ++#define DT2_PIN_GPIO_UNPLUG2 22 ++#define DT2_PIN_GPIO_RESET 4 ++ ++#define DT2_NOR_BOOT_BASE 0xf4000000 ++#define DT2_NOR_BOOT_SIZE SZ_512K ++ ++#define DT2_LEDS_BASE 0xfa000000 ++#define DT2_LEDS_SIZE SZ_1K ++ ++/***************************************************************************** ++ * 512K NOR Flash on Device bus Boot CS ++ ****************************************************************************/ ++ ++static struct mtd_partition dt2_partitions[] = { ++ { ++ .name = "u-boot", ++ .size = 0x00080000, ++ .offset = 0, ++ }, ++}; ++ ++static struct physmap_flash_data dt2_nor_flash_data = { ++ .width = 1, /* 8 bit bus width */ ++ .parts = dt2_partitions, ++ .nr_parts = ARRAY_SIZE(dt2_partitions) ++}; ++ ++static struct resource dt2_nor_flash_resource = { ++ .flags = IORESOURCE_MEM, ++ .start = DT2_NOR_BOOT_BASE, ++ .end = DT2_NOR_BOOT_BASE + DT2_NOR_BOOT_SIZE - 1, ++}; ++ ++static struct platform_device dt2_nor_flash = { ++ .name = "physmap-flash", ++ .id = 0, ++ .dev = { ++ .platform_data = &dt2_nor_flash_data, ++ }, ++ .resource = &dt2_nor_flash_resource, ++ .num_resources = 1, ++}; ++ ++/***************************************************************************** ++ * PCI ++ ****************************************************************************/ ++ ++void __init dt2_pci_preinit(void) ++{ ++ int pin, irq; ++ ++ /* ++ * Configure PCI GPIO IRQ pins ++ */ ++ pin = DT2_PCI_SLOT0_IRQ_A_PIN; ++ if (gpio_request(pin, "PCI IntA") == 0) { ++ if (gpio_direction_input(pin) == 0) { ++ irq = gpio_to_irq(pin); ++ irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ++ printk (KERN_INFO "PCI IntA IRQ: %d\n", irq); ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to " ++ "irq_set_irq_type pin %d\n", pin); ++ gpio_free(pin); ++ } ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to request gpio %d\n", pin); ++ } ++ ++ pin = DT2_PCI_SLOT0_IRQ_B_PIN; ++ if (gpio_request(pin, "PCI IntB") == 0) { ++ if (gpio_direction_input(pin) == 0) { ++ irq = gpio_to_irq(pin); ++ irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW); ++ printk (KERN_INFO "PCI IntB IRQ: %d\n", irq); ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to " ++ "irq_set_irq_type pin %d\n", pin); ++ gpio_free(pin); ++ } ++ } else { ++ printk(KERN_ERR "dt2_pci_preinit failed to gpio_request %d\n", pin); ++ } ++} ++ ++static int __init dt2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) ++{ ++ int irq; ++ ++ /* ++ * Check for devices with hard-wired IRQs. ++ */ ++ irq = orion5x_pci_map_irq(dev, slot, pin); ++ if (irq != -1){ ++ printk(KERN_INFO "orion5x_pci_map_irq: %d\n", irq); ++ return irq; ++ } ++ ++ /* ++ * PCI IRQs are connected via GPIOs ++ */ ++ switch (slot - DT2_PCI_SLOT0_OFFS) { ++ case 0: ++ if (pin == 1){ ++ irq = gpio_to_irq(DT2_PCI_SLOT0_IRQ_A_PIN); ++ printk(KERN_INFO "dt2_pci_map_irq DT2_PCI_SLOT0_IRQ_A_PIN: %d\n", irq); ++ } ++ else { ++ irq = gpio_to_irq(DT2_PCI_SLOT0_IRQ_B_PIN); ++ printk(KERN_INFO "dt2_pci_map_irq DT2_PCI_SLOT0_IRQ_B_PIN: %d\n", irq); ++ } ++ default: ++ irq = -1; ++ printk(KERN_INFO "dt2_pci_map_irq IRQ: %d\n", irq); ++ } ++ ++ return irq; ++} ++ ++static struct hw_pci dt2_pci __initdata = { ++ .nr_controllers = 2, ++ .preinit = dt2_pci_preinit, ++ .setup = orion5x_pci_sys_setup, ++ .scan = orion5x_pci_sys_scan_bus, ++ .map_irq = dt2_pci_map_irq, ++}; ++ ++static int __init dt2_pci_init(void) ++{ ++ if (machine_is_dt2()) ++ pci_common_init(&dt2_pci); ++ ++ return 0; ++} ++ ++subsys_initcall(dt2_pci_init); ++ ++/***************************************************************************** ++ * Ethernet ++ ****************************************************************************/ ++ ++static struct mv643xx_eth_platform_data dt2_eth_data = { ++ .phy_addr = MV643XX_ETH_PHY_NONE, ++ .speed = SPEED_1000, ++ .duplex = DUPLEX_FULL, ++}; ++ ++static struct dsa_chip_data dt2_switch_chip_data = { ++ .port_names[0] = "wan", ++ .port_names[1] = "lan1", ++ .port_names[2] = "lan2", ++ .port_names[3] = "cpu", ++ .port_names[4] = "lan3", ++ .port_names[5] = "lan4", ++}; ++ ++static struct dsa_platform_data dt2_switch_plat_data = { ++ .nr_chips = 1, ++ .chip = &dt2_switch_chip_data, ++}; ++ ++/***************************************************************************** ++ * RTC ISL1208 on I2C bus ++ ****************************************************************************/ ++static struct i2c_board_info __initdata dt2_i2c_rtc = { ++ I2C_BOARD_INFO("isl1208", 0x6F), ++}; ++ ++/***************************************************************************** ++ * Sata ++ ****************************************************************************/ ++static struct mv_sata_platform_data dt2_sata_data = { ++ .n_ports = 2, ++}; ++ ++/***************************************************************************** ++ * General Setup ++ ****************************************************************************/ ++static unsigned int dt2_mpp_modes[] __initdata = { ++ MPP0_GPIO, // RTC interrupt ++ MPP1_GPIO, // 88e6131 interrupt ++ MPP2_GPIO, // PCI_intB ++ MPP3_GPIO, // PCI_intA ++ MPP4_GPIO, // reset button switch ++ MPP5_GPIO, ++ MPP6_GPIO, ++ MPP7_GPIO, ++ MPP8_GPIO, ++ MPP9_GIGE, /* GE_RXERR */ ++ MPP10_GPIO, // usb ++ MPP11_GPIO, // usb ++ MPP12_GIGE, // GE_TXD[4] ++ MPP13_GIGE, // GE_TXD[5] ++ MPP14_GIGE, // GE_TXD[6] ++ MPP15_GIGE, // GE_TXD[7] ++ MPP16_GIGE, // GE_RXD[4] ++ MPP17_GIGE, // GE_RXD[5] ++ MPP18_GIGE, // GE_RXD[6] ++ MPP19_GIGE, // GE_RXD[7] ++ 0, ++}; ++ ++/***************************************************************************** ++ * LEDS ++ ****************************************************************************/ ++static struct platform_device dt2_leds = { ++ .name = "dt2-led", ++ .id = -1, ++}; ++ ++/**************************************************************************** ++ * GPIO key ++ ****************************************************************************/ ++static irqreturn_t dt2_reset_handler(int irq, void *dev_id) ++{ ++ /* This is the paper-clip reset which does an emergency reboot. */ ++ printk(KERN_INFO "Restarting system.\n"); ++ machine_restart(NULL); ++ ++ /* This should never be reached. */ ++ return IRQ_HANDLED; ++} ++ ++static irqreturn_t dt2_power_handler(int irq, void *dev_id) ++{ ++ printk(KERN_INFO "Shutting down system.\n"); ++ machine_power_off(); ++ return IRQ_HANDLED; ++} ++ ++static void __init dt2_init(void) ++{ ++ /* ++ * Setup basic Orion functions. Need to be called early. ++ */ ++ orion5x_init(); ++ ++ orion5x_mpp_conf(dt2_mpp_modes); ++ ++ /* ++ * Configure peripherals. ++ */ ++ ++ orion5x_uart0_init(); ++ orion5x_ehci0_init(); ++ orion5x_ehci1_init(); ++ orion5x_i2c_init(); ++ orion5x_sata_init(&dt2_sata_data); ++ orion5x_xor_init(); ++ ++ printk(KERN_INFO "U-Boot parameters:\n"); ++ printk(KERN_INFO "Sys Clk = %d, Tclk = %d, BoardID = 0x%02x\n", mvSysclk, mvTclk, gBoardId); ++ ++ printk(KERN_INFO "Serial: %s\n", dt2_eeprom.fc.dt2_serial_number); ++ printk(KERN_INFO "Revision: %016x\n", dt2_eeprom.fc.dt2_revision); ++ printk(KERN_INFO "DT2: Using MAC address %pM for port 0\n", ++ dt2_eeprom.gw.mac_addr[0]); ++ printk(KERN_INFO "DT2: Using MAC address %pM for port 1\n", ++ dt2_eeprom.gw.mac_addr[1]); ++ ++ orion5x_eth_init(&dt2_eth_data); ++ memcpy(dt2_eth_data.mac_addr, dt2_eeprom.gw.mac_addr[0], 6); ++ orion5x_eth_switch_init(&dt2_switch_plat_data, NO_IRQ); ++ ++ i2c_register_board_info(0, &dt2_i2c_rtc, 1); ++ ++ mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, ++ ORION_MBUS_DEVBUS_BOOT_ATTR, ++ DT2_NOR_BOOT_BASE, DT2_NOR_BOOT_SIZE); ++ ++ platform_device_register(&dt2_nor_flash); ++ ++ mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_TARGET(0), ++ ORION_MBUS_DEVBUS_ATTR(0), ++ DT2_LEDS_BASE, DT2_LEDS_SIZE); ++ platform_device_register(&dt2_leds); ++ ++ if (request_irq(gpio_to_irq(DT2_PIN_GPIO_RESET), &dt2_reset_handler, ++ IRQF_TRIGGER_LOW, ++ "DT2: Reset button", NULL) < 0) { ++ ++ printk("DT2: Reset Button IRQ %d not available\n", ++ gpio_to_irq(DT2_PIN_GPIO_RESET)); ++ } ++ ++ if (request_irq(gpio_to_irq(DT2_PIN_GPIO_POWER), &dt2_power_handler, ++ IRQF_TRIGGER_LOW, ++ "DT2: Power button", NULL) < 0) { ++ ++ printk(KERN_DEBUG "DT2: Power Button IRQ %d not available\n", ++ gpio_to_irq(DT2_PIN_GPIO_POWER)); ++ } ++} ++ ++static int __init parse_tag_dt2_uboot(const struct tag *t) ++{ ++ struct tag_mv_uboot *mv_uboot; ++ ++ // Get pointer to our block ++ mv_uboot = (struct tag_mv_uboot*)&t->u; ++ mvTclk = mv_uboot->tclk; ++ mvSysclk = mv_uboot->sysclk; ++ mvUbootVer = mv_uboot->uboot_version; ++ mvIsUsbHost = mv_uboot->isUsbHost; ++ ++ // Some clock fixups ++ if(mvTclk == 166000000) mvTclk = 166666667; ++ else if(mvTclk == 133000000) mvTclk = 133333333; ++ else if(mvSysclk == 166000000) mvSysclk = 166666667; ++ ++ gBoardId = (mvUbootVer & 0xff); ++ ++ //DT2 specific data ++ memcpy(&dt2_eeprom, mv_uboot->dt2_eeprom, sizeof(struct DT2_EEPROM_STRUCT)); ++ ++ return 0; ++} ++__tagtable(ATAG_MV_UBOOT, parse_tag_dt2_uboot); ++ ++/* ++ * This is OpenWrt specific fixup. It includes code from original "tag_fixup_mem32" to ++ * fixup bogus memory tags and also fixes kernel cmdline by adding " init=/etc/preinit" ++ * at the end. It is important to flash OpenWrt image from original Freecom firmware. ++ * ++ * Vanilla kernel should use "tag_fixup_mem32" function. ++ */ ++static void __init openwrt_fixup(struct tag *t, char **from) ++{ ++ char *p = NULL; ++ static char openwrt_init_tag[] __initdata = " init=/etc/preinit"; ++ ++ for (; t->hdr.size; t = tag_next(t)){ ++ /* Locate the Freecom cmdline */ ++ if (t->hdr.tag == ATAG_CMDLINE) { ++ p = t->u.cmdline.cmdline; ++ printk("%s(%d): Found cmdline '%s' at 0x%0lx\n", ++ __FUNCTION__, __LINE__, p, (unsigned long)p); ++ } ++ /* ++ * Many orion-based systems have buggy bootloader implementations. ++ * This is a common fixup for bogus memory tags. ++ */ ++ if (t->hdr.tag == ATAG_MEM && ++ (!t->u.mem.size || t->u.mem.size & ~PAGE_MASK || ++ t->u.mem.start & ~PAGE_MASK)) { ++ printk(KERN_WARNING ++ "Clearing invalid memory bank %dKB@0x%08x\n", ++ t->u.mem.size / 1024, t->u.mem.start); ++ t->hdr.tag = 0; ++ } ++ } ++ ++ printk("%s(%d): End of table at 0x%0lx\n", __FUNCTION__, __LINE__, (unsigned long)t); ++ ++ /* Overwrite the end of the table with a new cmdline tag. */ ++ t->hdr.tag = ATAG_CMDLINE; ++ t->hdr.size = ++ (sizeof (struct tag_header) + ++ strlen(p) + strlen(openwrt_init_tag) + 1 + 4) >> 2; ++ ++ strlcpy(t->u.cmdline.cmdline, p, COMMAND_LINE_SIZE); ++ strlcpy(t->u.cmdline.cmdline + strlen(p), openwrt_init_tag, ++ COMMAND_LINE_SIZE - strlen(p)); ++ ++ printk("%s(%d): New cmdline '%s' at 0x%0lx\n", ++ __FUNCTION__, __LINE__, ++ t->u.cmdline.cmdline, (unsigned long)t->u.cmdline.cmdline); ++ ++ t = tag_next(t); ++ ++ printk("%s(%d): New end of table at 0x%0lx\n", __FUNCTION__, __LINE__, (unsigned long)t); ++ ++ t->hdr.tag = ATAG_NONE; ++ t->hdr.size = 0; ++} ++ ++/* Warning: Freecom uses their own custom bootloader with mach-type (=1500) */ ++MACHINE_START(DT2, "Freecom DataTank Gateway") ++ /* Maintainer: Zintis Petersons <Zintis.Petersons@abcsolutions.lv> */ ++ .atag_offset = 0x100, ++ .init_machine = dt2_init, ++ .map_io = orion5x_map_io, ++ .init_irq = orion5x_init_irq, ++ .init_time = orion5x_timer_init, ++ .fixup = openwrt_fixup, //tag_fixup_mem32, ++MACHINE_END diff --git a/target/linux/orion/patches-4.4/210-wn802t_support.patch b/target/linux/orion/patches-4.4/210-wn802t_support.patch new file mode 100644 index 0000000000..e7827edd29 --- /dev/null +++ b/target/linux/orion/patches-4.4/210-wn802t_support.patch @@ -0,0 +1,75 @@ +--- a/arch/arm/mach-orion5x/Kconfig ++++ b/arch/arm/mach-orion5x/Kconfig +@@ -147,10 +147,13 @@ config MACH_MSS2_DT + Maxtor Shared Storage II platform. + + config MACH_WNR854T +- bool "Netgear WNR854T" ++ bool "Netgear WNR854T / WN802T" + help + Say 'Y' here if you want your kernel to support the +- Netgear WNR854T platform. ++ Netgear WNR854T or WN802T platform. ++ ++config MACH_WN802T ++ def_bool MACH_WNR854T + + config MACH_RD88F5181L_GE + bool "Marvell Orion-VoIP GE Reference Design" +--- a/arch/arm/mach-orion5x/wnr854t-setup.c ++++ b/arch/arm/mach-orion5x/wnr854t-setup.c +@@ -115,6 +115,15 @@ static struct dsa_platform_data wnr854t_ + .chip = &wnr854t_switch_chip_data, + }; + ++static struct dsa_chip_data wn802t_switch_chip_data = { ++ .port_names[2] = "wan", ++ .port_names[3] = "cpu", ++}; ++ ++static struct dsa_platform_data wn802t_switch_plat_data = { ++ .nr_chips = 1, ++ .chip = &wn802t_switch_chip_data, ++}; + static void __init wnr854t_init(void) + { + /* +@@ -128,7 +137,12 @@ static void __init wnr854t_init(void) + * Configure peripherals. + */ + orion5x_eth_init(&wnr854t_eth_data); +- orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); ++ ++ if (machine_is_wn802t()) ++ orion5x_eth_switch_init(&wn802t_switch_plat_data, NO_IRQ); ++ else ++ orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); ++ + orion5x_uart0_init(); + + mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET, +@@ -168,7 +182,7 @@ static struct hw_pci wnr854t_pci __initd + + static int __init wnr854t_pci_init(void) + { +- if (machine_is_wnr854t()) ++ if (machine_is_wnr854t() || machine_is_wn802t()) + pci_common_init(&wnr854t_pci); + + return 0; +@@ -186,3 +200,15 @@ MACHINE_START(WNR854T, "Netgear WNR854T" + .fixup = tag_fixup_mem32, + .restart = orion5x_restart, + MACHINE_END ++ ++MACHINE_START(WN802T, "Netgear WN802T") ++ /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */ ++ .atag_offset = 0x100, ++ .init_machine = wnr854t_init, ++ .map_io = orion5x_map_io, ++ .init_early = orion5x_init_early, ++ .init_irq = orion5x_init_irq, ++ .init_time = orion5x_timer_init, ++ .fixup = tag_fixup_mem32, ++ .restart = orion5x_restart, ++MACHINE_END |