orion: Add support for 3.7 Signed-off-by: Maarten Bezemer <[email protected]> --- 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 weeks now.
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 Index: target/linux/orion/Makefile =================================================================== --- target/linux/orion/Makefile (revision 35445) +++ target/linux/orion/Makefile (working copy) @@ -13,7 +13,7 @@ CFLAGS=-Os -pipe -march=armv5te -mtune=xscale -fno-caller-saves MAINTAINER:=Imre Kaloz <[email protected]> -LINUX_VERSION:=3.3.8 +LINUX_VERSION:=3.7.5 include $(INCLUDE_DIR)/target.mk Index: target/linux/orion/dns323/config-3.7 =================================================================== --- target/linux/orion/dns323/config-3.7 (revision 0) +++ target/linux/orion/dns323/config-3.7 (working copy) @@ -0,0 +1,46 @@ +CONFIG_ATA=y +CONFIG_ATAGS_PROC=y +CONFIG_BLK_DEV_DM=y +CONFIG_BLK_DEV_MD=y +CONFIG_BLK_DEV_SD=y +CONFIG_CMDLINE="root=/dev/mtdblock3 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200" +CONFIG_CRC16=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_DM_CRYPT=y +CONFIG_DM_MIRROR=y +CONFIG_DM_SNAPSHOT=y +CONFIG_EXPORTFS=y +CONFIG_EXT2_FS=y +CONFIG_EXT3_FS=y +CONFIG_EXT4_FS=y +CONFIG_FS_MBCACHE=y +CONFIG_INPUT=y +CONFIG_INPUT_EVDEV=y +CONFIG_INPUT_KEYBOARD=y +CONFIG_JBD=y +CONFIG_JBD2=y +CONFIG_KEXEC=y +CONFIG_KEYBOARD_GPIO=y +CONFIG_MD=y +CONFIG_MD_AUTODETECT=y +CONFIG_MD_LINEAR=y +# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID0=y +CONFIG_MD_RAID1=y +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID456 is not set +CONFIG_NLS=y +CONFIG_RTC_DRV_M41T80=y +CONFIG_RTC_DRV_M41T80_WDT=y +CONFIG_SATA_MV=y +CONFIG_SCSI=y +CONFIG_SCSI_MOD=y +CONFIG_SENSORS_G760A=y +CONFIG_SENSORS_LM75=y +# CONFIG_USB_SUPPORT is not set +CONFIG_XFS_FS=y Index: target/linux/orion/harddisk/config-3.7 =================================================================== --- target/linux/orion/harddisk/config-3.7 (revision 0) +++ target/linux/orion/harddisk/config-3.7 (working copy) @@ -0,0 +1,28 @@ +CONFIG_ATA=y +CONFIG_BLK_DEV_DM=y +CONFIG_BLK_DEV_MD=y +CONFIG_BLK_DEV_SD=y +CONFIG_CRC16=y +# CONFIG_DM_CRYPT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_SNAPSHOT is not set +CONFIG_EXT4_FS=y +CONFIG_FS_MBCACHE=y +CONFIG_JBD2=y +CONFIG_MD=y +CONFIG_MD_AUTODETECT=y +CONFIG_MD_LINEAR=y +# CONFIG_MD_MULTIPATH is not set +CONFIG_MD_RAID0=y +CONFIG_MD_RAID1=y +# CONFIG_MD_RAID10 is not set +# CONFIG_MD_RAID456 is not set +CONFIG_NLS=y +CONFIG_SATA_MV=y +CONFIG_SCSI=y +CONFIG_SCSI_MOD=y +CONFIG_USB=y +CONFIG_USB_COMMON=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_STORAGE=y Index: target/linux/orion/patches-3.7/100-wrt350nv2_openwrt_partition_map.patch =================================================================== --- target/linux/orion/patches-3.7/100-wrt350nv2_openwrt_partition_map.patch (revision 0) +++ target/linux/orion/patches-3.7/100-wrt350nv2_openwrt_partition_map.patch (working copy) @@ -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 = 0x00100000, // change to kernel mtd size here (1/3) + }, { + .name = "rootfs", +- .offset = 0x001a0000, +- .size = 0x005c0000, ++ .offset = 0x00100000, // change to kernel mtd size here (2/3) ++ .size = 0x00650000, // 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, + }, + }; + Index: target/linux/orion/patches-3.7/101-wnr854t_partition_map.patch =================================================================== --- target/linux/orion/patches-3.7/101-wnr854t_partition_map.patch (revision 0) +++ target/linux/orion/patches-3.7/101-wnr854t_partition_map.patch (working copy) @@ -0,0 +1,13 @@ +--- a/arch/arm/mach-orion5x/wnr854t-setup.c ++++ b/arch/arm/mach-orion5x/wnr854t-setup.c +@@ -66,6 +66,10 @@ static struct mtd_partition wnr854t_nor_ + .name = "uboot", + .offset = 0x00760000, + .size = 0x00040000, ++ }, { ++ .name = "image", // for sysupgrade ++ .offset = 0x00000000, ++ .size = 0x00760000, + }, + }; + Index: target/linux/orion/patches-3.7/200-dt2_board_support.patch =================================================================== --- target/linux/orion/patches-3.7/200-dt2_board_support.patch (revision 0) +++ target/linux/orion/patches-3.7/200-dt2_board_support.patch (working copy) @@ -0,0 +1,26 @@ +--- a/arch/arm/mach-orion5x/Kconfig ++++ b/arch/arm/mach-orion5x/Kconfig +@@ -16,6 +16,13 @@ config MACH_RD88F5182 + Say 'Y' here if you want your kernel to support the + Marvell Orion-NAS (88F5182) RD2 + ++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 +--- a/arch/arm/mach-orion5x/Makefile ++++ b/arch/arm/mach-orion5x/Makefile +@@ -18,6 +18,7 @@ obj-$(CONFIG_MACH_BIGDISK) += d2net-setu + obj-$(CONFIG_MACH_NET2BIG) += net2big-setup.o + obj-$(CONFIG_MACH_MSS2) += mss2-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: target/linux/orion/patches-3.7/210-wn802t_support.patch =================================================================== --- target/linux/orion/patches-3.7/210-wn802t_support.patch (revision 0) +++ target/linux/orion/patches-3.7/210-wn802t_support.patch (working copy) @@ -0,0 +1,78 @@ +--- a/arch/arm/mach-orion5x/Kconfig ++++ b/arch/arm/mach-orion5x/Kconfig +@@ -138,10 +138,13 @@ config MACH_MSS2 + 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(); + + orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE, +@@ -166,7 +180,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; +@@ -177,6 +191,18 @@ MACHINE_START(WNR854T, "Netgear WNR854T" + /* Maintainer: Imre Kaloz <[email protected]> */ + .atag_offset = 0x100, + .init_machine = wnr854t_init, ++ .map_io = orion5x_map_io, ++ .init_early = orion5x_init_early, ++ .init_irq = orion5x_init_irq, ++ .timer = &orion5x_timer, ++ .fixup = tag_fixup_mem32, ++ .restart = orion5x_restart, ++MACHINE_END ++ ++MACHINE_START(WN802T, "Netgear WN802T") ++ /* Maintainer: Imre Kaloz <[email protected]> */ ++ .atag_offset = 0x100, ++ .init_machine = wnr854t_init, + .map_io = orion5x_map_io, + .init_early = orion5x_init_early, + .init_irq = orion5x_init_irq, Index: target/linux/orion/patches-3.7/300-dns323_partition_map.patch =================================================================== --- target/linux/orion/patches-3.7/300-dns323_partition_map.patch (revision 0) +++ target/linux/orion/patches-3.7/300-dns323_partition_map.patch (working copy) @@ -0,0 +1,30 @@ +--- a/arch/arm/mach-orion5x/dns323-setup.c ++++ b/arch/arm/mach-orion5x/dns323-setup.c +@@ -114,6 +114,13 @@ subsys_initcall(dns323_pci_init); + * 0x00020000-0x001a0000 : "Linux Kernel" + * 0x001a0000-0x007d0000 : "File System" + * 0x007d0000-0x00800000 : "u-boot" ++ * ++ * Layout as used by OpenWrt ++ * 0x00000000-0x00010000 : "MTD1" ++ * 0x00010000-0x00020000 : "MTD2" ++ * 0x00020000-0x001a0000 : "kernel" ++ * 0x001a0000-0x007d0000 : "rootfs" ++ * 0x007d0000-0x00800000 : "u-boot" + */ + + #define DNS323_NOR_BOOT_BASE 0xf4000000 +@@ -129,11 +136,11 @@ static struct mtd_partition dns323_parti + .size = 0x00010000, + .offset = 0x00010000, + }, { +- .name = "Linux Kernel", ++ .name = "kernel", + .size = 0x00180000, + .offset = 0x00020000, + }, { +- .name = "File System", ++ .name = "rootfs", + .size = 0x00630000, + .offset = 0x001A0000, + }, { 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 (revision 0) +++ target/linux/orion/patches-3.7/400-fix-section-mismatch-warnings.patch (working copy) @@ -0,0 +1,11 @@ +--- a/arch/arm/mach-orion5x/common.c ++++ b/arch/arm/mach-orion5x/common.c +@@ -205,7 +205,7 @@ void __init orion5x_init_early(void) + + int orion5x_tclk; + +-int __init orion5x_find_tclk(void) ++static __init int orion5x_find_tclk(void) + { + u32 dev, rev; + 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 (revision 0) +++ target/linux/orion/patches-3.7/a01-dt2-fixes-for-3.7.patch (working copy) @@ -0,0 +1,50 @@ +--- a/arch/arm/mach-orion5x/dt2-setup.c ++++ b/arch/arm/mach-orion5x/dt2-setup.c +@@ -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) + } + } + +-static int __init dt2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ++static int __init dt2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) + { + int irq; + +@@ -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. + */ +-void __init openwrt_fixup(struct machine_desc *mdesc, struct tag *t, +- char **from, struct meminfo *meminfo) ++void __init openwrt_fixup(struct tag *t, char **from, struct meminfo *meminfo) + { + char *p = NULL; + static char openwrt_init_tag[] __initdata = " init=/etc/preinit"; +@@ -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 <[email protected]> */ +- .boot_params = 0x00000100, ++ .atag_offset = 0x100, + .init_machine = dt2_init, + .map_io = orion5x_map_io, + .init_irq = orion5x_init_irq, + .timer = &orion5x_timer, + .fixup = openwrt_fixup, //tag_fixup_mem32, ++ .restart = orion5x_restart, + MACHINE_END _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
