summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/Makefile27
-rw-r--r--target/linux/brcm63xx/base-files.mk5
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/diag.sh23
-rw-r--r--target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom42
-rw-r--r--target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds33
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/uci-defaults/02_network139
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc39
-rwxr-xr-xtarget/linux/brcm63xx/base-files/lib/brcm63xx.sh183
-rw-r--r--target/linux/brcm63xx/base-files/lib/preinit/03_do_brcm63xx.sh7
-rw-r--r--target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx10
-rw-r--r--target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx7
-rw-r--r--target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx27
-rw-r--r--target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx12
-rw-r--r--target/linux/brcm63xx/base-files/lib/upgrade/platform.sh16
-rw-r--r--target/linux/brcm63xx/config-3.14221
-rw-r--r--target/linux/brcm63xx/dts/a4001n.dts8
-rw-r--r--target/linux/brcm63xx/dts/a4001n1.dts8
-rw-r--r--target/linux/brcm63xx/dts/ar-5381u.dts8
-rw-r--r--target/linux/brcm63xx/dts/ar-5387un.dts8
-rw-r--r--target/linux/brcm63xx/dts/ar1004g.dts8
-rw-r--r--target/linux/brcm63xx/dts/bcm6318.dtsi19
-rw-r--r--target/linux/brcm63xx/dts/bcm63268.dtsi23
-rw-r--r--target/linux/brcm63xx/dts/bcm6328.dtsi19
-rw-r--r--target/linux/brcm63xx/dts/bcm6338.dtsi33
-rw-r--r--target/linux/brcm63xx/dts/bcm6345.dtsi33
-rw-r--r--target/linux/brcm63xx/dts/bcm6348.dtsi33
-rw-r--r--target/linux/brcm63xx/dts/bcm6358.dtsi37
-rw-r--r--target/linux/brcm63xx/dts/bcm6362.dtsi23
-rw-r--r--target/linux/brcm63xx/dts/bcm6368.dtsi36
-rw-r--r--target/linux/brcm63xx/dts/bcm96328avng.dts8
-rw-r--r--target/linux/brcm63xx/dts/ct-5365.dts30
-rw-r--r--target/linux/brcm63xx/dts/ct-6373.dts30
-rw-r--r--target/linux/brcm63xx/dts/ct536plus.dts8
-rw-r--r--target/linux/brcm63xx/dts/dsl-274xb-c.dts30
-rw-r--r--target/linux/brcm63xx/dts/dva-g3810bn_tl.dts8
-rw-r--r--target/linux/brcm63xx/dts/gw6000.dts8
-rw-r--r--target/linux/brcm63xx/dts/gw6200.dts8
-rw-r--r--target/linux/brcm63xx/dts/hg520v.dts30
-rw-r--r--target/linux/brcm63xx/dts/hg553.dts30
-rw-r--r--target/linux/brcm63xx/dts/hg556a-a.dts36
-rw-r--r--target/linux/brcm63xx/dts/hg556a-b.dts36
-rw-r--r--target/linux/brcm63xx/dts/hg556a-c.dts36
-rw-r--r--target/linux/brcm63xx/dts/nb4-fxc-r1.dts8
-rw-r--r--target/linux/brcm63xx/dts/nb4-ser-r0.dts8
-rw-r--r--target/linux/brcm63xx/dts/nb6-ser-r0.dts8
-rw-r--r--target/linux/brcm63xx/dts/p870hw-51a-v2.dts30
-rw-r--r--target/linux/brcm63xx/dts/spw500v.dts30
-rw-r--r--target/linux/brcm63xx/dts/vr-3025u.dts30
-rw-r--r--target/linux/brcm63xx/dts/vr-3025un.dts30
-rw-r--r--target/linux/brcm63xx/dts/wap-5813n.dts30
-rw-r--r--target/linux/brcm63xx/generic/target.mk7
-rwxr-xr-xtarget/linux/brcm63xx/image/Makefile395
-rw-r--r--target/linux/brcm63xx/image/README.images-bcm63xx127
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/Makefile62
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.c584
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.h113
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/LzmaTypes.h45
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/Makefile86
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/board.c103
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/cache.c46
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/cache.h17
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/cacheops.h85
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/config.h31
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/cp0regdef.h54
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/head.S118
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/loader.c175
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/loader.lds34
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/loader2.lds10
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/lzma-data.lds8
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/printf.c350
-rw-r--r--target/linux/brcm63xx/image/lzma-loader/src/printf.h18
-rw-r--r--target/linux/brcm63xx/modules.mk37
-rw-r--r--target/linux/brcm63xx/patches-3.14/001-of-Create-unlocked-version-of-for_each_child_of_node.patch52
-rw-r--r--target/linux/brcm63xx/patches-3.14/002-lib-add-glibc-style-strchrnul-variant.patch56
-rw-r--r--target/linux/brcm63xx/patches-3.14/003-of-Make-of_find_node_by_path-handle-aliases.patch106
-rw-r--r--target/linux/brcm63xx/patches-3.14/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch28
-rw-r--r--target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch41
-rw-r--r--target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch27
-rw-r--r--target/linux/brcm63xx/patches-3.14/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch151
-rw-r--r--target/linux/brcm63xx/patches-3.14/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch169
-rw-r--r--target/linux/brcm63xx/patches-3.14/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch62
-rw-r--r--target/linux/brcm63xx/patches-3.14/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch138
-rw-r--r--target/linux/brcm63xx/patches-3.14/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch36
-rw-r--r--target/linux/brcm63xx/patches-3.14/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch62
-rw-r--r--target/linux/brcm63xx/patches-3.14/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch137
-rw-r--r--target/linux/brcm63xx/patches-3.14/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch36
-rw-r--r--target/linux/brcm63xx/patches-3.14/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch24
-rw-r--r--target/linux/brcm63xx/patches-3.14/201-SPI-Allow-specifying-the-parsers-for-SPI-flash.patch38
-rw-r--r--target/linux/brcm63xx/patches-3.14/202-MTD-DEVICES-m25p80-use-parsers-if-provided-in-flash-.patch23
-rw-r--r--target/linux/brcm63xx/patches-3.14/203-MTD-DEVICES-m25p80-add-support-for-limiting-reads.patch92
-rw-r--r--target/linux/brcm63xx/patches-3.14/204-USB-OHCI-allow-other-arches-to-use-the-BE-frame-numb.patch31
-rw-r--r--target/linux/brcm63xx/patches-3.14/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch65
-rw-r--r--target/linux/brcm63xx/patches-3.14/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch493
-rw-r--r--target/linux/brcm63xx/patches-3.14/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch100
-rw-r--r--target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch135
-rw-r--r--target/linux/brcm63xx/patches-3.14/301-led_count.patch41
-rw-r--r--target/linux/brcm63xx/patches-3.14/302-extended-platform-devices.patch25
-rw-r--r--target/linux/brcm63xx/patches-3.14/303-spi-board-info.patch33
-rw-r--r--target/linux/brcm63xx/patches-3.14/308-board_leds_naming.patch267
-rw-r--r--target/linux/brcm63xx/patches-3.14/309-cfe_version_mod.patch27
-rw-r--r--target/linux/brcm63xx/patches-3.14/310-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-registe.patch61
-rw-r--r--target/linux/brcm63xx/patches-3.14/311-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-irq-setup-co.patch135
-rw-r--r--target/linux/brcm63xx/patches-3.14/312-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-reset-code.patch85
-rw-r--r--target/linux/brcm63xx/patches-3.14/313-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-gpio.patch39
-rw-r--r--target/linux/brcm63xx/patches-3.14/314-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-spi-code.patch80
-rw-r--r--target/linux/brcm63xx/patches-3.14/315-MIPS-BCM63XX-remove-RUNTIME_DETECT-usage-from-enet-c.patch89
-rw-r--r--target/linux/brcm63xx/patches-3.14/316-MIPS-BCM63XX-remove-RUNTIME_DETECT-in-cpu-feature-ov.patch23
-rw-r--r--target/linux/brcm63xx/patches-3.14/317-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-for-bcmcpu_g.patch199
-rw-r--r--target/linux/brcm63xx/patches-3.14/318-MIPS-BCM63XX-add-width-to-__dispatch_internal.patch41
-rw-r--r--target/linux/brcm63xx/patches-3.14/319-MIPS-BCM63XX-move-bcm63xx_init_irq-down.patch225
-rw-r--r--target/linux/brcm63xx/patches-3.14/320-MIPS-BCM63XX-replace-irq-dispatch-code-with-a-generi.patch174
-rw-r--r--target/linux/brcm63xx/patches-3.14/321-MIPS-BCM63XX-append-irq-line-to-irq_-stat-mask.patch182
-rw-r--r--target/linux/brcm63xx/patches-3.14/322-MIPS-BCM63XX-populate-irq_-stat-mask-_addr-for-secon.patch94
-rw-r--r--target/linux/brcm63xx/patches-3.14/323-MIPS-BCM63XX-add-cpu-argument-to-dispatch-internal.patch70
-rw-r--r--target/linux/brcm63xx/patches-3.14/324-MIPS-BCM63XX-protect-irq-register-accesses.patch162
-rw-r--r--target/linux/brcm63xx/patches-3.14/325-MIPS-BCM63XX-wire-up-the-second-cpu-s-irq-line.patch93
-rw-r--r--target/linux/brcm63xx/patches-3.14/326-MIPS-BCM63XX-use-irq_desc-as-argument-for-un-mask.patch83
-rw-r--r--target/linux/brcm63xx/patches-3.14/327-MIPS-BCM63XX-allow-setting-affinity-for-IPIC.patch118
-rw-r--r--target/linux/brcm63xx/patches-3.14/328-cfe_simplify_detection.patch20
-rw-r--r--target/linux/brcm63xx/patches-3.14/329-bcm63xxpart_use_cfedetection.patch51
-rw-r--r--target/linux/brcm63xx/patches-3.14/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch77
-rw-r--r--target/linux/brcm63xx/patches-3.14/331-MIPS-BCM63XX-define-variant-id-field.patch23
-rw-r--r--target/linux/brcm63xx/patches-3.14/332-MIPS-BCM63XX-detect-BCM6328-variants.patch68
-rw-r--r--target/linux/brcm63xx/patches-3.14/333-MIPS-BCM63XX-detect-BCM6362-variants.patch46
-rw-r--r--target/linux/brcm63xx/patches-3.14/334-MIPS-BCM63XX-detect-BCM6368-variants.patch48
-rw-r--r--target/linux/brcm63xx/patches-3.14/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch20
-rw-r--r--target/linux/brcm63xx/patches-3.14/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch70
-rw-r--r--target/linux/brcm63xx/patches-3.14/337-MIPS-BCM63XX-widen-cpuid-field.patch56
-rw-r--r--target/linux/brcm63xx/patches-3.14/338-MIPS-BCM63XX-increase-number-of-IRQs.patch39
-rw-r--r--target/linux/brcm63xx/patches-3.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch769
-rw-r--r--target/linux/brcm63xx/patches-3.14/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch55
-rw-r--r--target/linux/brcm63xx/patches-3.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch672
-rw-r--r--target/linux/brcm63xx/patches-3.14/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch156
-rw-r--r--target/linux/brcm63xx/patches-3.14/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch342
-rw-r--r--target/linux/brcm63xx/patches-3.14/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch74
-rw-r--r--target/linux/brcm63xx/patches-3.14/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch63
-rw-r--r--target/linux/brcm63xx/patches-3.14/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch56
-rw-r--r--target/linux/brcm63xx/patches-3.14/347-MIPS-BCM6318-USB-support.patch124
-rw-r--r--target/linux/brcm63xx/patches-3.14/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch71
-rw-r--r--target/linux/brcm63xx/patches-3.14/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch117
-rw-r--r--target/linux/brcm63xx/patches-3.14/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch107
-rw-r--r--target/linux/brcm63xx/patches-3.14/351-set-board-usbh-ports.patch10
-rw-r--r--target/linux/brcm63xx/patches-3.14/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch95
-rw-r--r--target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch61
-rw-r--r--target/linux/brcm63xx/patches-3.14/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch188
-rw-r--r--target/linux/brcm63xx/patches-3.14/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch95
-rw-r--r--target/linux/brcm63xx/patches-3.14/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch140
-rw-r--r--target/linux/brcm63xx/patches-3.14/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch66
-rw-r--r--target/linux/brcm63xx/patches-3.14/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch517
-rw-r--r--target/linux/brcm63xx/patches-3.14/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch181
-rw-r--r--target/linux/brcm63xx/patches-3.14/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch128
-rw-r--r--target/linux/brcm63xx/patches-3.14/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch303
-rw-r--r--target/linux/brcm63xx/patches-3.14/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch67
-rw-r--r--target/linux/brcm63xx/patches-3.14/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch102
-rw-r--r--target/linux/brcm63xx/patches-3.14/366-MIPS-add-support-for-vmlinux.bin-appended-DTB.patch124
-rw-r--r--target/linux/brcm63xx/patches-3.14/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch96
-rw-r--r--target/linux/brcm63xx/patches-3.14/368-MIPS-BCM63XX-expand-board_info-with-an-of-compatible.patch24
-rw-r--r--target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch61
-rw-r--r--target/linux/brcm63xx/patches-3.14/370-bcm63xx-add-of_board_ids-for-all-supported-boards.patch147
-rw-r--r--target/linux/brcm63xx/patches-3.14/371_add_of_node_available_by_alias.patch37
-rw-r--r--target/linux/brcm63xx/patches-3.14/372_dont_register_pflash_when_available_in_dtb.patch21
-rw-r--r--target/linux/brcm63xx/patches-3.14/400-bcm963xx_flashmap.patch65
-rw-r--r--target/linux/brcm63xx/patches-3.14/401-bcm963xx_real_rootfs_length.patch27
-rw-r--r--target/linux/brcm63xx/patches-3.14/402_bcm63xx_enet_vlan_incoming_fixed.patch11
-rw-r--r--target/linux/brcm63xx/patches-3.14/403-6358-enet1-external-mii-clk.patch22
-rw-r--r--target/linux/brcm63xx/patches-3.14/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch169
-rw-r--r--target/linux/brcm63xx/patches-3.14/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch53
-rw-r--r--target/linux/brcm63xx/patches-3.14/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch133
-rw-r--r--target/linux/brcm63xx/patches-3.14/412-MTD-physmap-allow-passing-pp_data.patch41
-rw-r--r--target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch72
-rw-r--r--target/linux/brcm63xx/patches-3.14/414-MTD-m25p80-allow-passing-pp_data.patch40
-rw-r--r--target/linux/brcm63xx/patches-3.14/415-MIPS-BCM63XX-export-the-attached-flash-type.patch31
-rw-r--r--target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch236
-rw-r--r--target/linux/brcm63xx/patches-3.14/417-MTD-bcm63xxpart-allow-passing-a-caldata-offset.patch120
-rw-r--r--target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch83
-rw-r--r--target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch51
-rw-r--r--target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch49
-rw-r--r--target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch206
-rw-r--r--target/linux/brcm63xx/patches-3.14/423-bcm63xx_enet_add_b53_support.patch169
-rw-r--r--target/linux/brcm63xx/patches-3.14/424-bcm63xx_enet_no_request_mem_region.patch15
-rw-r--r--target/linux/brcm63xx/patches-3.14/425-bcm63xxpart_parse_paritions_from_dt.patch349
-rw-r--r--target/linux/brcm63xx/patches-3.14/499-allow_better_context_for_board_patches.patch56
-rw-r--r--target/linux/brcm63xx/patches-3.14/500-board-D4PW.patch67
-rw-r--r--target/linux/brcm63xx/patches-3.14/501-board-NB4.patch308
-rw-r--r--target/linux/brcm63xx/patches-3.14/502-board-96338W2_E7T.patch51
-rw-r--r--target/linux/brcm63xx/patches-3.14/503-board-CPVA642.patch109
-rw-r--r--target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch73
-rw-r--r--target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch86
-rw-r--r--target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch126
-rw-r--r--target/linux/brcm63xx/patches-3.14/507-board-MAGIC.patch89
-rw-r--r--target/linux/brcm63xx/patches-3.14/508-board_hw553.patch95
-rw-r--r--target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch56
-rw-r--r--target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch83
-rw-r--r--target/linux/brcm63xx/patches-3.14/511-board_V2500V.patch123
-rw-r--r--target/linux/brcm63xx/patches-3.14/512-board_BTV2110.patch75
-rw-r--r--target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch260
-rw-r--r--target/linux/brcm63xx/patches-3.14/514-board_ct536_ct5621.patch70
-rw-r--r--target/linux/brcm63xx/patches-3.14/515-board_DWV-S0_fixes.patch19
-rw-r--r--target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch88
-rw-r--r--target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch10
-rw-r--r--target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch51
-rw-r--r--target/linux/brcm63xx/patches-3.14/520-bcm63xx-add-support-for-96368MVWG-board.patch137
-rw-r--r--target/linux/brcm63xx/patches-3.14/521-bcm63xx-add-support-for-96368MVNgr-board.patch92
-rw-r--r--target/linux/brcm63xx/patches-3.14/522-MIPS-BCM63XX-add-96328avng-reference-board.patch67
-rw-r--r--target/linux/brcm63xx/patches-3.14/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch96
-rw-r--r--target/linux/brcm63xx/patches-3.14/524-board_dsl_274xb_rev_f.patch132
-rw-r--r--target/linux/brcm63xx/patches-3.14/525-board_96348w3.patch70
-rw-r--r--target/linux/brcm63xx/patches-3.14/526-board_CT6373-1.patch149
-rw-r--r--target/linux/brcm63xx/patches-3.14/527-board_dva-g3810bn-tl-1.patch85
-rw-r--r--target/linux/brcm63xx/patches-3.14/528-board_nb6.patch136
-rw-r--r--target/linux/brcm63xx/patches-3.14/529-board_fast2604.patch68
-rw-r--r--target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch145
-rw-r--r--target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch127
-rw-r--r--target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch103
-rw-r--r--target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch66
-rw-r--r--target/linux/brcm63xx/patches-3.14/534-board_hw556.patch426
-rw-r--r--target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch71
-rw-r--r--target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch145
-rw-r--r--target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch113
-rw-r--r--target/linux/brcm63xx/patches-3.14/550-alice_gate2_leds.patch102
-rw-r--r--target/linux/brcm63xx/patches-3.14/551-96348gw_a_leds.patch22
-rw-r--r--target/linux/brcm63xx/patches-3.14/552-board_96348gw-10_reset_button.patch20
-rw-r--r--target/linux/brcm63xx/patches-3.14/553-boards_probe_switch.patch119
-rw-r--r--target/linux/brcm63xx/patches-3.14/554-board_DWVS0_leds_buttons.patch97
-rw-r--r--target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch106
-rw-r--r--target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch105
-rw-r--r--target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch88
-rw-r--r--target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch71
-rw-r--r--target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch119
-rw-r--r--target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch142
-rw-r--r--target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch137
-rw-r--r--target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch128
-rw-r--r--target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch128
-rw-r--r--target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch108
-rw-r--r--target/linux/brcm63xx/patches-3.14/565-board_hw520.patch68
-rw-r--r--target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch107
-rw-r--r--target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch152
-rw-r--r--target/linux/brcm63xx/patches-3.14/800-wl_exports.patch25
-rw-r--r--target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch31
-rw-r--r--target/linux/brcm63xx/patches-3.14/802-rtl8367r_fix_RGMII_support.patch30
-rw-r--r--target/linux/brcm63xx/patches-3.14/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch26
-rw-r--r--target/linux/brcm63xx/profiles/00-default.mk15
-rw-r--r--target/linux/brcm63xx/profiles/01-generic.mk15
-rw-r--r--target/linux/brcm63xx/profiles/adb.mk26
-rw-r--r--target/linux/brcm63xx/profiles/asmax.mk15
-rw-r--r--target/linux/brcm63xx/profiles/comtrend.mk84
-rw-r--r--target/linux/brcm63xx/profiles/d-link.mk25
-rw-r--r--target/linux/brcm63xx/profiles/huawei.mk45
-rw-r--r--target/linux/brcm63xx/profiles/sfr.mk26
-rw-r--r--target/linux/brcm63xx/profiles/t-com.mk15
-rw-r--r--target/linux/brcm63xx/profiles/tecom.mk28
-rw-r--r--target/linux/brcm63xx/profiles/zyxel.mk15
-rw-r--r--target/linux/brcm63xx/smp/config-default13
-rw-r--r--target/linux/brcm63xx/smp/target.mk8
254 files changed, 0 insertions, 22425 deletions
diff --git a/target/linux/brcm63xx/Makefile b/target/linux/brcm63xx/Makefile
deleted file mode 100644
index fb00300..0000000
--- a/target/linux/brcm63xx/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2006-2009 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-include $(TOPDIR)/rules.mk
-
-ARCH:=mips
-BOARD:=brcm63xx
-BOARDNAME:=Broadcom BCM63xx
-SUBTARGETS:=generic smp
-FEATURES:=squashfs usb atm pci pcmcia usbgadget
-LINUX_VERSION:=3.14.16
-MAINTAINER:=Florian Fainelli <florian@openwrt.org>
-
-include $(INCLUDE_DIR)/target.mk
-
-DEFAULT_PACKAGES += swconfig kmod-input-gpio-keys-polled kmod-button-hotplug
-
-define Target/Description
- Build firmware images for Broadcom based xDSL/routers
- currently supports BCM6338, BCM6348 and BCM6358 based devices.
- (e.g. Inventel Livebox, Siemens SE515, Neufbox 4)
-endef
-
-$(eval $(call BuildTarget))
diff --git a/target/linux/brcm63xx/base-files.mk b/target/linux/brcm63xx/base-files.mk
deleted file mode 100644
index d6682bd..0000000
--- a/target/linux/brcm63xx/base-files.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-define Package/base-files/install-target
- rm -f $(1)/etc/config/network
-endef
-
-
diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh
deleted file mode 100755
index bbf5c0b..0000000
--- a/target/linux/brcm63xx/base-files/etc/diag.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2007-2013 OpenWrt.org
-
-. /lib/functions/leds.sh
-. /lib/brcm63xx.sh
-
-set_state() {
- case "$1" in
- preinit)
- status_led_set_timer 200 200
- ;;
- failsafe)
- status_led_set_timer 50 50
- ;;
- done)
- if [ "${status_led/power}" != "$status_led" ]; then
- status_led_on
- else
- status_led_off
- fi
- ;;
- esac
-}
diff --git a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
deleted file mode 100644
index 2d8f1f5..0000000
--- a/target/linux/brcm63xx/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-# Based on gabors ralink wisoc implementation.
-
-rt2x00_eeprom_die() {
- echo "rt2x00 eeprom: " "$*"
- exit 1
-}
-
-rt2x00_eeprom_extract() {
- local part=$1
- local offset=$2
- local count=$3
- local mtd
-
- . /lib/functions.sh
-
- mtd=$(find_mtd_part $part)
- [ -n "$mtd" ] || \
- rt2x00_eeprom_die "no mtd device found for partition $part"
-
- dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count || \
- rt2x00_eeprom_die "failed to extract from $mtd"
-}
-
-[ -e /lib/firmware/$FIRMWARE ] && exit 0
-
-. /lib/brcm63xx.sh
-
-board=$board_name
-
-case "$FIRMWARE" in
-"rt2x00.eeprom" )
- case $board in
- HW556_C)
- rt2x00_eeprom_extract "cal_data" 130560 512
- ;;
- *)
- rt2x00_eeprom_die "board $board is not supported yet"
- ;;
- esac
- ;;
-esac
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds b/target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds
deleted file mode 100644
index 854b3b2..0000000
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2013-2014 OpenWrt.org
-#
-
-. /lib/functions/uci-defaults.sh
-. /lib/brcm63xx.sh
-
-case "$board_name" in
-963281T_TEF)
- ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0"
- ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1"
- ;;
-96328dg2x2)
- ucidef_set_led_usbdev "usb" "USB" "A4001N:green:usb" "1-1"
- ;;
-'F@ST2704V2')
- ucidef_set_led_usbdev "usb" "USB" "F@ST2704V2:green:usb" "1-1"
- ;;
-HW553)
- ucidef_set_led_netdev "lan" "LAN" "HW553:blue:lan" "eth0"
- ucidef_set_led_usbdev "usb1" "USB1" "HW553:red:hspa" "1-1"
- ucidef_set_led_usbdev "usb2" "USB2" "HW553:blue:hspa" "1-2"
- ;;
-HW556*)
- ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0"
- ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
- ;;
-esac
-
-ucidef_commit_leds
-
-exit 0
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network b/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
deleted file mode 100755
index 3884e07..0000000
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012 OpenWrt.org
-#
-
-[ -e /etc/config/network ] && exit 0
-
-touch /etc/config/network
-
-. /lib/functions/uci-defaults.sh
-. /lib/brcm63xx.sh
-
-ucidef_set_interface_loopback
-
-case "$board_name" in
-
-96348W3 |\
-96358-502V |\
-CVG834G_E15R3921 |\
-RTA770BW |\
-RTA770W |\
-SPW500V)
- ucidef_set_interface_lan "eth0"
- ;;
-
-96338GW |\
-96338W |\
-96338W2_E7T |\
-96348A-122 |\
-96348W3 |\
-AR1004G |\
-CPVA642 |\
-CT536_CT5621 |\
-CT6373-1 |\
-D-4P-W |\
-"F@ST2604" |\
-RTA1320_16M |\
-V2110)
- ucidef_set_interface_lan "eth0"
- ucidef_add_switch "eth0" "1" "1"
- ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
- ;;
-
-96348GW |\
-96348GW-10 |\
-96348GW-11 |\
-96348GW-A |\
-96358VW |\
-96358VW2 |\
-AGPF-S0 |\
-"CPVA502+" |\
-DV201AMR |\
-DWV-S0 |\
-"F@ST2404" |\
-MAGIC |\
-RTA1025W_16 |\
-V2500V_BB)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
- ucidef_add_switch "eth1" "1" "1"
- ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
- ;;
-
-AW4139 |\
-AW4339U |\
-HW553 |\
-HW556*)
- ucidef_set_interface_lan "eth0.1"
- ucidef_add_switch "eth0" "1" "1"
- ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
- ;;
-
-NB4-* |\
-DVG3810BN |\
-HW6358GW_B)
- ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
- ucidef_add_switch "eth1" "1" "1"
- ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
- ;;
-
-96328avng |\
-96328A-1241N |\
-96328A-1441N1 |\
-963281TAN |\
-963281T_TEF |\
-96328dg2x2 |\
-96368M-1341N |\
-96368M-1541N |\
-96368MVNgr |\
-AW5200B |\
-"F@ST2504n" |\
-"F@ST2704V2" |\
-P870HW-51a_v2)
- ucidef_set_interface_lan "eth0.1"
- ucidef_add_switch "eth0" "1" "1"
- ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
- ;;
-
-96368MVWG)
- ucidef_set_interface_lan "eth0.1"
- ucidef_add_switch "eth0" "1" "1"
- ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
- ;;
-
-96369R-1231N)
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
- ucidef_add_switch "eth0" "1" "1"
- ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 5t"
- ucidef_add_switch_vlan "eth0" "2" "4 5t"
- ;;
-
-NB6)
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
- ucidef_add_switch "switch0" "1" "1"
- ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
- ucidef_add_switch_vlan "switch0" "2" "0 9t"
- ;;
-
-VW6339GU)
- ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
- ucidef_add_switch "switch0" "1" "1"
- ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 8t"
- ucidef_add_switch_vlan "switch0" "2" "4 8t"
- ;;
-
-963268BU_P300)
- ucidef_set_interface_lan "eth0.1"
- ucidef_add_switch "switch0" "1" "1"
- ucidef_add_switch_vlan "switch0" "1" "0 3 4 5 6 7 8t"
- ;;
-
-*)
- ucidef_set_interfaces_lan_wan "eth1" "eth0"
- ;;
-
-esac
-
-uci commit network
-
-exit 0
diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc b/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
deleted file mode 100755
index 2840eb1..0000000
--- a/target/linux/brcm63xx/base-files/etc/uci-defaults/09_fix_crc
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2007 OpenWrt.org
-#
-#
-
-. /lib/brcm63xx.sh
-
-do_fixcrc() {
- mtd fixtrx linux
-}
-
-brcm63xx_detect
-
-case "$board_name" in
- 96328avng |\
- 96328A-1241N |\
- 96328A-1441N1 |\
- 963281TAN |\
- 963281T_TEF |\
- 96328dg2x2 |\
- 96358-502V |\
- 96368M-1341N |\
- 96368M-1541N |\
- 96369R-1231N |\
- AW4339U |\
- "CPVA502+" |\
- CPVA642 |\
- CT6373-1 |\
- MAGIC |\
- P870HW-51a_v2 |\
- RTA770BW |\
- RTA770W |\
- V2110 |\
- V2500V_BB)
- do_fixcrc
- ;;
-esac
-
diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
deleted file mode 100755
index 58ce71e..0000000
--- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2007 OpenWrt.org
-#
-#
-
-board_name=""
-status_led=""
-status_led2=""
-sys_mtd_part=""
-brcm63xx_has_reset_button=""
-ifname=""
-
-brcm63xx_detect() {
- board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo)
-
- if [ "$board_name" = "96358VW" ] && [ -n "$(swconfig dev eth1 help 2>/dev/null)" ]; then
- board_name="DVAG3810BN"
- fi
-
- case "$board_name" in
- 963281TAN)
- status_led="963281TAN::power"
- ifname=eth0
- ;;
- 963281T_TEF)
- brcm63xx_has_reset_button="true"
- status_led="A4001N1:green:power"
- ifname=eth0
- ;;
- 96328avng)
- status_led="96328avng::power"
- ifname=eth0
- ;;
- 96328dg2x2)
- brcm63xx_has_reset_button="true"
- status_led="A4001N:green:power"
- ifname="eth0"
- ;;
- 96328A-1241N)
- brcm63xx_has_reset_button="true"
- status_led="AR-5381u:green:power"
- ifname=eth0
- ;;
- 96328A-1441N1)
- brcm63xx_has_reset_button="true"
- status_led="AR-5387un:green:power"
- ifname=eth0
- ;;
- 96348GW)
- status_led="96348GW:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth1
- ;;
- 96348GW-11)
- status_led="96348GW-11:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth1
- ;;
- 96358-502V)
- status_led="spw303v:green:power+adsl"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- 96368M-1341N)
- brcm63xx_has_reset_button="true"
- status_led="VR-3025un:green:power"
- ifname="eth0"
- ;;
- 96368M-1541N)
- brcm63xx_has_reset_button="true"
- status_led="VR-3025u:green:power"
- ifname="eth0"
- ;;
- 96369R-1231N)
- brcm63xx_has_reset_button="true"
- status_led="WAP-5813n:green:power"
- ifname="eth0"
- ;;
- AR1004G)
- status_led="AR1004G:green:power"
- brcm63xx_has_reset_button="true"
- ;;
- AW4139 |\
- AW4339U)
- status_led="dsl-274xb:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- AW5200B)
- status_led="dsl-275xb:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- CPVA642)
- status_led="CPVA642:green:power:"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- CT536_CT5621)
- status_led="CT536_CT5621:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- CVG834G_E15R3921)
- status_led="CVG834G:green:power"
- ifname=eth0
- ;;
- D-4P-W)
- status_led="D-4P-W:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- "F@ST2504n")
- status_led="fast2504n:green:ok"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- 'F@ST2704V2')
- status_led="F@ST2704V2:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- GW6000)
- brcm63xx_has_reset_button="true"
- ifname=eth1
- ;;
- GW6200)
- status_led="GW6200:green:line1"
- status_led2="GW6200:green:tel"
- brcm63xx_has_reset_button="true"
- ifname=eth1
- ;;
- HW553)
- status_led="HW553:blue:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- HW556*)
- status_led="HW556:red:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- HW6358GW_B)
- status_led="HW520:green:net"
- brcm63xx_has_reset_button="true"
- ifname="eth0"
- ;;
- NB6)
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- P870HW-51a_v2)
- brcm63xx_has_reset_button="true"
- status_led="P870HW-51a:green:power"
- ifname="eth0"
- ;;
- RTA770BW)
- brcm63xx_has_reset_button="true"
- status_led="RTA770BW:green:diag"
- ifname=eth0
- ;;
- RTA770W)
- brcm63xx_has_reset_button="true"
- status_led="RTA770W:green:diag"
- ifname=eth0
- ;;
- SPW500V)
- status_led="SPW500V:green:power"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- V2110)
- status_led="V2110:power:green"
- brcm63xx_has_reset_button="true"
- ifname=eth0
- ;;
- *)
- ;;
- esac
-}
-
-brcm63xx_detect
diff --git a/target/linux/brcm63xx/base-files/lib/preinit/03_do_brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/preinit/03_do_brcm63xx.sh
deleted file mode 100644
index dd60c49..0000000
--- a/target/linux/brcm63xx/base-files/lib/preinit/03_do_brcm63xx.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-do_brcm63xx() {
- . /lib/brcm63xx.sh
-}
-
-boot_hook_add preinit_main do_brcm63xx
diff --git a/target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx
deleted file mode 100644
index e1653e3..0000000
--- a/target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-failsafe_ip() {
- [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
- ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
- }
-}
-
-boot_hook_add failsafe failsafe_ip
-
diff --git a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
deleted file mode 100644
index 1de59b7..0000000
--- a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-set_preinit_iface() {
- ifconfig $ifname 0.0.0.0 up
-}
-
-boot_hook_add preinit_main set_preinit_iface
diff --git a/target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx
deleted file mode 100644
index 7655fb7..0000000
--- a/target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-port_net_echo() {
- [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
- if [ "$pi_preinit_net_messages" = "y" ] || [ "$pi_failsafe_net_message" = "true" ] && [ "$pi_preinit_no_failsafe_netmsg" != "y" ]; then
- netmsg $pi_broadcast "$1"
- fi
- }
-}
-
-preinit_ip_deconfig() {
- if [ -z "$pi_ifname" ]; then
- ifconfig $ifname 0.0.0.0 down
- else
- grep -q "$pi_ifname" /proc/net/dev && {
- ifconfig $pi_ifname 0.0.0.0 down
- }
- fi
-}
-
-preinit_net_echo() {
- preinit_ip
-
- port_net_echo $1
-}
-
-
diff --git a/target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx
deleted file mode 100644
index f030cb2..0000000
--- a/target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-indicate_failsafe() {
- preinit_net_echo() {
- port_net_echo $1
- }
- echo "- failsafe -"
- preinit_net_echo "Entering Failsafe!\n"
- indicate_failsafe_led
-}
-
-
diff --git a/target/linux/brcm63xx/base-files/lib/upgrade/platform.sh b/target/linux/brcm63xx/base-files/lib/upgrade/platform.sh
deleted file mode 100644
index 5c9e2c2..0000000
--- a/target/linux/brcm63xx/base-files/lib/upgrade/platform.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-PART_NAME=linux
-platform_check_image() {
- [ "$#" -gt 1 ] && return 1
- case "$(get_magic_word "$1")" in
- 3600|3700|3800)
- # 6348GW-11 boards use openwrt-96348GW-11-squashfs-cfe.bin files
- return 0
- ;;
- *)
- echo "Invalid image type. Please use only .bin files"
- return 1
- ;;
- esac
-}
-
-# use default for platform_do_upgrade()
diff --git a/target/linux/brcm63xx/config-3.14 b/target/linux/brcm63xx/config-3.14
deleted file mode 100644
index 1fee639..0000000
--- a/target/linux/brcm63xx/config-3.14
+++ /dev/null
@@ -1,221 +0,0 @@
-CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-CONFIG_ARCH_DISCARD_MEMBLOCK=y
-CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_B53=y
-CONFIG_B53_MMAP_DRIVER=y
-CONFIG_B53_PHY_DRIVER=y
-CONFIG_B53_PHY_FIXUP=y
-CONFIG_B53_SPI_DRIVER=y
-# CONFIG_B53_SRAB_DRIVER is not set
-CONFIG_BCM63XX=y
-CONFIG_BCM63XX_CPU_3368=y
-CONFIG_BCM63XX_CPU_6318=y
-CONFIG_BCM63XX_CPU_63268=y
-CONFIG_BCM63XX_CPU_6328=y
-CONFIG_BCM63XX_CPU_6338=y
-CONFIG_BCM63XX_CPU_6345=y
-CONFIG_BCM63XX_CPU_6348=y
-CONFIG_BCM63XX_CPU_6358=y
-CONFIG_BCM63XX_CPU_6362=y
-CONFIG_BCM63XX_CPU_6368=y
-CONFIG_BCM63XX_EHCI=y
-CONFIG_BCM63XX_ENET=y
-CONFIG_BCM63XX_OHCI=y
-CONFIG_BCM63XX_PHY=y
-CONFIG_BCM63XX_WDT=y
-CONFIG_BCMA=y
-CONFIG_BCMA_BLOCKIO=y
-# CONFIG_BCMA_DEBUG is not set
-# CONFIG_BCMA_DRIVER_GMAC_CMN is not set
-# CONFIG_BCMA_DRIVER_MIPS is not set
-# CONFIG_BCMA_DRIVER_PCI_HOSTMODE is not set
-CONFIG_BCMA_HOST_PCI=y
-CONFIG_BCMA_HOST_PCI_POSSIBLE=y
-# CONFIG_BCMA_HOST_SOC is not set
-CONFIG_BOARD_BCM63XX_DT=y
-CONFIG_BOARD_BCM963XX=y
-CONFIG_BOARD_LIVEBOX=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_CEVT_R4K=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"
-CONFIG_CMDLINE_BOOL=y
-# CONFIG_CMDLINE_OVERRIDE is not set
-CONFIG_CPU_BIG_ENDIAN=y
-CONFIG_CPU_BMIPS=y
-CONFIG_CPU_BMIPS32_3300=y
-CONFIG_CPU_BMIPS4350=y
-CONFIG_CPU_GENERIC_DUMP_TLB=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_R4K_CACHE_TLB=y
-CONFIG_CPU_R4K_FPU=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CSRC_R4K=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_DTC=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_FIRMWARE_IN_KERNEL=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_IO=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_NET_UTILS=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GPIOLIB=y
-CONFIG_GPIO_DEVRES=y
-CONFIG_GPIO_SYSFS=y
-# CONFIG_HAMRADIO is not set
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
-CONFIG_HAVE_CC_STACKPROTECTOR=y
-CONFIG_HAVE_CLK=y
-CONFIG_HAVE_CONTEXT_TRACKING=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DEBUG_KMEMLEAK=y
-CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
-CONFIG_HAVE_DMA_API_DEBUG=y
-CONFIG_HAVE_DMA_ATTRS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
-CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_MEMBLOCK=y
-CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
-CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_BCM63XX=y
-CONFIG_HZ=250
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-CONFIG_HZ_PERIODIC=y
-CONFIG_IMAGE_CMDLINE_HACK=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_CPU=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_KEXEC=y
-CONFIG_LEDS_GPIO=y
-CONFIG_MDIO_BOARDINFO=y
-CONFIG_MIPS=y
-CONFIG_MIPS_APPENDED_DTB=y
-# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
-CONFIG_MIPS_L1_CACHE_SHIFT=4
-CONFIG_MIPS_L1_CACHE_SHIFT_4=y
-# CONFIG_MIPS_MACHINE is not set
-CONFIG_MIPS_MT_DISABLED=y
-CONFIG_MIPS_O32_FP64_SUPPORT=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MODULE_FORCE_LOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MTD_BCM63XX_PARTS=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_BE_BYTE_SWAP=y
-# CONFIG_MTD_CFI_GEOMETRY is not set
-# CONFIG_MTD_CFI_NOSWAP is not set
-CONFIG_MTD_CFI_STAA=y
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_JEDECPROBE=y
-CONFIG_MTD_M25P80=y
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_REDBOOT_PARTS=y
-CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_MDIO=y
-CONFIG_OF_MTD=y
-CONFIG_OF_NET=y
-CONFIG_OF_PCI=y
-CONFIG_OF_PCI_IRQ=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-CONFIG_PCI=y
-# CONFIG_PCIEAER is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PHYLIB=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_POSIX_MQUEUE_SYSCTL=y
-# CONFIG_PREEMPT_RCU is not set
-CONFIG_PROC_DEVICETREE=y
-# CONFIG_RCU_STALL_COMMON is not set
-CONFIG_RELAY=y
-CONFIG_RTL8366_SMI=y
-CONFIG_RTL8367_PHY=y
-# CONFIG_SCSI_DMA is not set
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_BCM63XX=y
-CONFIG_SERIAL_BCM63XX_CONSOLE=y
-CONFIG_SPI=y
-CONFIG_SPI_BCM63XX=y
-CONFIG_SPI_BCM63XX_HSSPI=y
-CONFIG_SPI_BITBANG=y
-CONFIG_SPI_GPIO=y
-CONFIG_SPI_MASTER=y
-CONFIG_SQUASHFS_EMBEDDED=y
-CONFIG_SSB=y
-CONFIG_SSB_B43_PCI_BRIDGE=y
-CONFIG_SSB_BLOCKIO=y
-# CONFIG_SSB_DRIVER_MIPS is not set
-CONFIG_SSB_DRIVER_PCICORE=y
-CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
-CONFIG_SSB_PCIHOST=y
-CONFIG_SSB_PCIHOST_POSSIBLE=y
-CONFIG_SSB_SPROM=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SWCONFIG=y
-CONFIG_SYNC_R4K=y
-CONFIG_SYS_HAS_CPU_BMIPS=y
-CONFIG_SYS_HAS_CPU_BMIPS32_3300=y
-CONFIG_SYS_HAS_CPU_BMIPS4350=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
-CONFIG_SYS_SUPPORTS_SMP=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USE_OF=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_WATCHDOG_NOWAYOUT=y
-CONFIG_WEAK_ORDERING=y
-CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/brcm63xx/dts/a4001n.dts b/target/linux/brcm63xx/dts/a4001n.dts
deleted file mode 100644
index 011fbf4..0000000
--- a/target/linux/brcm63xx/dts/a4001n.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6328.dtsi"
-
-/ {
- model = "ADB P.DG A4001N";
- compatible = "adb,a4001n", "brcm,bcm6328";
-};
diff --git a/target/linux/brcm63xx/dts/a4001n1.dts b/target/linux/brcm63xx/dts/a4001n1.dts
deleted file mode 100644
index 2bdd201..0000000
--- a/target/linux/brcm63xx/dts/a4001n1.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6328.dtsi"
-
-/ {
- model = "ADB P.DG A4001N1";
- compatible = "adb,a4001n1", "brcm,bcm6328";
-};
diff --git a/target/linux/brcm63xx/dts/ar-5381u.dts b/target/linux/brcm63xx/dts/ar-5381u.dts
deleted file mode 100644
index 812108a..0000000
--- a/target/linux/brcm63xx/dts/ar-5381u.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6328.dtsi"
-
-/ {
- model = "Comtrend AR-5381u";
- compatible = "comtrend,ar-5381u", "brcm,bcm6328";
-};
diff --git a/target/linux/brcm63xx/dts/ar-5387un.dts b/target/linux/brcm63xx/dts/ar-5387un.dts
deleted file mode 100644
index d24a655..0000000
--- a/target/linux/brcm63xx/dts/ar-5387un.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6328.dtsi"
-
-/ {
- model = "Comtrend AR-5387un";
- compatible = "comtrend,ar-5387un", "brcm,bcm6328";
-};
diff --git a/target/linux/brcm63xx/dts/ar1004g.dts b/target/linux/brcm63xx/dts/ar1004g.dts
deleted file mode 100644
index c5bea28a..0000000
--- a/target/linux/brcm63xx/dts/ar1004g.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6348.dtsi"
-
-/ {
- model = "ASMAX AR 1004g";
- compatible = "asmax,ar1004g", "brcm,bcm6348";
-};
diff --git a/target/linux/brcm63xx/dts/bcm6318.dtsi b/target/linux/brcm63xx/dts/bcm6318.dtsi
deleted file mode 100644
index 0710fd8..0000000
--- a/target/linux/brcm63xx/dts/bcm6318.dtsi
+++ /dev/null
@@ -1,19 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6318";
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips3300", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- ubus@10000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm63268.dtsi b/target/linux/brcm63xx/dts/bcm63268.dtsi
deleted file mode 100644
index 6487ab2..0000000
--- a/target/linux/brcm63xx/dts/bcm63268.dtsi
+++ /dev/null
@@ -1,23 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm63268";
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
-
- cpu@1 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- ubus@10000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm6328.dtsi b/target/linux/brcm63xx/dts/bcm6328.dtsi
deleted file mode 100644
index b8fc3ad..0000000
--- a/target/linux/brcm63xx/dts/bcm6328.dtsi
+++ /dev/null
@@ -1,19 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6328";
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- ubus@10000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm6338.dtsi b/target/linux/brcm63xx/dts/bcm6338.dtsi
deleted file mode 100644
index a20bd73..0000000
--- a/target/linux/brcm63xx/dts/bcm6338.dtsi
+++ /dev/null
@@ -1,33 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6338";
-
- aliases {
- pflash = &pflash;
- };
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips3300", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- pflash: nor@1fc00000 {
- compatible = "cfi-flash";
- reg = <0x1fc00000 0x400000>;
- bank-width = <2>;
- #address-cells = <1>;
- #size-cells = <1>;
-
- status = "disabled";
- };
-
- ubus@fff00000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm6345.dtsi b/target/linux/brcm63xx/dts/bcm6345.dtsi
deleted file mode 100644
index 51123a8..0000000
--- a/target/linux/brcm63xx/dts/bcm6345.dtsi
+++ /dev/null
@@ -1,33 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6345";
-
- aliases {
- pflash = &pflash;
- };
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips32", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- pflash: nor@1fc00000 {
- compatible = "cfi-flash";
- reg = <0x1fc00000 0x400000>;
- bank-width = <2>;
- #address-cells = <1>;
- #size-cells = <1>;
-
- status = "disabled";
- };
-
- ubus@fff00000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm6348.dtsi b/target/linux/brcm63xx/dts/bcm6348.dtsi
deleted file mode 100644
index c839313..0000000
--- a/target/linux/brcm63xx/dts/bcm6348.dtsi
+++ /dev/null
@@ -1,33 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6348";
-
- aliases {
- pflash = &pflash;
- };
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips3300", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- pflash: nor@1fc00000 {
- compatible = "cfi-flash";
- reg = <0x1fc00000 0x400000>;
- bank-width = <2>;
- #address-cells = <1>;
- #size-cells = <1>;
-
- status = "disabled";
- };
-
- ubus@fff00000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm6358.dtsi b/target/linux/brcm63xx/dts/bcm6358.dtsi
deleted file mode 100644
index d5a84a4..0000000
--- a/target/linux/brcm63xx/dts/bcm6358.dtsi
+++ /dev/null
@@ -1,37 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6358";
-
- aliases {
- pflash = &pflash;
- };
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
-
- cpu@1 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- pflash: nor@1e000000 {
- compatible = "cfi-flash";
- reg = <0x1e000000 0x2000000>;
- bank-width = <2>;
- #address-cells = <1>;
- #size-cells = <1>;
-
- status = "disabled";
- };
-
- ubus@fff00000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm6362.dtsi b/target/linux/brcm63xx/dts/bcm6362.dtsi
deleted file mode 100644
index 9553621..0000000
--- a/target/linux/brcm63xx/dts/bcm6362.dtsi
+++ /dev/null
@@ -1,23 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6362";
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
-
- cpu@1 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- ubus@10000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm6368.dtsi b/target/linux/brcm63xx/dts/bcm6368.dtsi
deleted file mode 100644
index 8dfb6e8..0000000
--- a/target/linux/brcm63xx/dts/bcm6368.dtsi
+++ /dev/null
@@ -1,36 +0,0 @@
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "brcm,bcm6368";
-
- aliases {
- pflash = &pflash;
- };
-
- cpus {
- cpu@0 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
-
- cpu@1 {
- compatible = "brcm,bmips4350", "mips,mips4Kc";
- };
- };
-
- memory { device_type = "memory"; reg = <0 0>; };
-
- ubus@10000000 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "simple-bus";
- };
-
- pflash: nor@18000000 {
- compatible = "cfi-flash";
- reg = <0x18000000 0x2000000>;
- bank-width = <2>;
- #address-cells = <1>;
- #size-cells = <1>;
- status = "disabled";
- };
-};
diff --git a/target/linux/brcm63xx/dts/bcm96328avng.dts b/target/linux/brcm63xx/dts/bcm96328avng.dts
deleted file mode 100644
index 52e7daf..0000000
--- a/target/linux/brcm63xx/dts/bcm96328avng.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6328.dtsi"
-
-/ {
- model = "Broadcom BCM96328avng reference board";
- compatible = "brcm,bcm96328avng", "brcm,bcm6328";
-};
diff --git a/target/linux/brcm63xx/dts/ct-5365.dts b/target/linux/brcm63xx/dts/ct-5365.dts
deleted file mode 100644
index 2ada4f8..0000000
--- a/target/linux/brcm63xx/dts/ct-5365.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6348.dtsi"
-
-/ {
- model = "Comtrend CT-5365";
- compatible = "comtrend,ct-5365", "brcm,bcm6348";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x3e0000>;
- };
-
- nvram@3f0000 {
- label = "nvram";
- reg = <0x3f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/ct-6373.dts b/target/linux/brcm63xx/dts/ct-6373.dts
deleted file mode 100644
index 1aca23a..0000000
--- a/target/linux/brcm63xx/dts/ct-6373.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "Comtrend CT-6373";
- compatible = "comtrend,ct-6373", "brcm,bcm6358";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x7e0000>;
- };
-
- nvram@7f0000 {
- label = "nvram";
- reg = <0x7f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/ct536plus.dts b/target/linux/brcm63xx/dts/ct536plus.dts
deleted file mode 100644
index d8e2d3b..0000000
--- a/target/linux/brcm63xx/dts/ct536plus.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6348.dtsi"
-
-/ {
- model = "Comtrend CT-536+/CT-5621T";
- compatible = "comtrend,ct536+", "brcm,bcm6348";
-};
diff --git a/target/linux/brcm63xx/dts/dsl-274xb-c.dts b/target/linux/brcm63xx/dts/dsl-274xb-c.dts
deleted file mode 100644
index e36ddfa..0000000
--- a/target/linux/brcm63xx/dts/dsl-274xb-c.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "D-Link DSL-2740B/DSL-2741B rev C2/3";
- compatible = "d-link,dsl-274xb-c2", "brcm,bcm6358";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x3e0000>;
- };
-
- nvram@3f0000 {
- label = "nvram";
- reg = <0x3f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts b/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts
deleted file mode 100644
index 20accd7..0000000
--- a/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "D-Link DVA-G3810BN/TL";
- compatible = "d-link,dva-g3810bn/tl", "brcm,bcm6358";
-};
diff --git a/target/linux/brcm63xx/dts/gw6000.dts b/target/linux/brcm63xx/dts/gw6000.dts
deleted file mode 100644
index f0b5c54..0000000
--- a/target/linux/brcm63xx/dts/gw6000.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6348.dtsi"
-
-/ {
- model = "TECOM GW6000";
- compatible = "tecom,gw6000", "brcm,bcm6348";
-};
diff --git a/target/linux/brcm63xx/dts/gw6200.dts b/target/linux/brcm63xx/dts/gw6200.dts
deleted file mode 100644
index 4165030..0000000
--- a/target/linux/brcm63xx/dts/gw6200.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6348.dtsi"
-
-/ {
- model = "TECOM GW6200";
- compatible = "tecom,gw6200", "brcm,bcm6348";
-};
diff --git a/target/linux/brcm63xx/dts/hg520v.dts b/target/linux/brcm63xx/dts/hg520v.dts
deleted file mode 100644
index bc8af33..0000000
--- a/target/linux/brcm63xx/dts/hg520v.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "Huawei EchoLife HG520v";
- compatible = "huawei,hg520v", "brcm,bcm6358";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x3e0000>;
- };
-
- nvram@3f0000 {
- label = "nvram";
- reg = <0x3f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/hg553.dts b/target/linux/brcm63xx/dts/hg553.dts
deleted file mode 100644
index 75fec8b..0000000
--- a/target/linux/brcm63xx/dts/hg553.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "Huawei EchoLife HG553";
- compatible = "huawei,hg553", "brcm,bcm6358";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x020000>;
- read-only;
- };
-
- linux@20000 {
- label = "linux";
- reg = <0x020000 0xfc0000>;
- };
-
- nvram@fe0000 {
- label = "nvram";
- reg = <0xfe0000 0x020000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/hg556a-a.dts b/target/linux/brcm63xx/dts/hg556a-a.dts
deleted file mode 100644
index bf43571..0000000
--- a/target/linux/brcm63xx/dts/hg556a-a.dts
+++ /dev/null
@@ -1,36 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "Huawei EchoLife HG556a (version A)";
- compatible = "huawei,hg556a-a", "brcm,bcm6358";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x020000>;
- read-only;
- };
-
- linux@20000 {
- label = "linux";
- reg = <0x020000 0xec0000>;
- };
-
- cal_data@ee0000 {
- label = "cal_data";
- reg = <0xee0000 0x100000>;
- read-only;
- };
-
- nvram@fe0000 {
- label = "nvram";
- reg = <0xfe0000 0x020000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/hg556a-b.dts b/target/linux/brcm63xx/dts/hg556a-b.dts
deleted file mode 100644
index 6d218c2..0000000
--- a/target/linux/brcm63xx/dts/hg556a-b.dts
+++ /dev/null
@@ -1,36 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "Huawei EchoLife HG556a (version B)";
- compatible = "huawei,hg556a-b", "brcm,bcm6358";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x020000>;
- read-only;
- };
-
- linux@20000 {
- label = "linux";
- reg = <0x020000 0xec0000>;
- };
-
- cal_data@ee0000 {
- label = "cal_data";
- reg = <0xee0000 0x100000>;
- read-only;
- };
-
- nvram@fe0000 {
- label = "nvram";
- reg = <0xfe0000 0x020000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/hg556a-c.dts b/target/linux/brcm63xx/dts/hg556a-c.dts
deleted file mode 100644
index a5bccda..0000000
--- a/target/linux/brcm63xx/dts/hg556a-c.dts
+++ /dev/null
@@ -1,36 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "Huawei EchoLife HG556a (version C)";
- compatible = "huawei,hg556a-c", "brcm,bcm6358";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x020000>;
- read-only;
- };
-
- linux@20000 {
- label = "linux";
- reg = <0x020000 0xec0000>;
- };
-
- cal_data@ee0000 {
- label = "cal_data";
- reg = <0xee0000 0x100000>;
- read-only;
- };
-
- nvram@fe0000 {
- label = "nvram";
- reg = <0xfe0000 0x020000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/nb4-fxc-r1.dts b/target/linux/brcm63xx/dts/nb4-fxc-r1.dts
deleted file mode 100644
index e04845f..0000000
--- a/target/linux/brcm63xx/dts/nb4-fxc-r1.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "SFR Neuf Box 4 (Foxconn)";
- compatible = "sfr,nb4-fxc-r1", "brcm,bcm6358";
-};
diff --git a/target/linux/brcm63xx/dts/nb4-ser-r0.dts b/target/linux/brcm63xx/dts/nb4-ser-r0.dts
deleted file mode 100644
index 9b82ccd..0000000
--- a/target/linux/brcm63xx/dts/nb4-ser-r0.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6358.dtsi"
-
-/ {
- model = "SFR Neuf Box 4 (Sercomm)";
- compatible = "sfr,nb4-ser-r0", "brcm,bcm6358";
-};
diff --git a/target/linux/brcm63xx/dts/nb6-ser-r0.dts b/target/linux/brcm63xx/dts/nb6-ser-r0.dts
deleted file mode 100644
index ea3b1fa..0000000
--- a/target/linux/brcm63xx/dts/nb6-ser-r0.dts
+++ /dev/null
@@ -1,8 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6362.dtsi"
-
-/ {
- model = "SFR neufbox 6 (Sercomm)";
- compatible = "sfr,nb6-ser-r0", "brcm,bcm6362";
-};
diff --git a/target/linux/brcm63xx/dts/p870hw-51a-v2.dts b/target/linux/brcm63xx/dts/p870hw-51a-v2.dts
deleted file mode 100644
index 916dd4a..0000000
--- a/target/linux/brcm63xx/dts/p870hw-51a-v2.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6368.dtsi"
-
-/ {
- model = "Zyxel P870HW-51a v2";
- compatible = "zyxel,p870hw-51a-v2", "brcm,bcm6368";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x3e0000>;
- };
-
- nvram@3f0000 {
- label = "nvram";
- reg = <0x3f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/spw500v.dts b/target/linux/brcm63xx/dts/spw500v.dts
deleted file mode 100644
index d9ac629..0000000
--- a/target/linux/brcm63xx/dts/spw500v.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6348.dtsi"
-
-/ {
- model = "T-Com Speedport W500 V";
- compatible = "t-com,spw500v", "brcm,bcm6348";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x3e0000>;
- };
-
- nvram@3f0000 {
- label = "nvram";
- reg = <0x3f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/vr-3025u.dts b/target/linux/brcm63xx/dts/vr-3025u.dts
deleted file mode 100644
index 86fde1c..0000000
--- a/target/linux/brcm63xx/dts/vr-3025u.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6368.dtsi"
-
-/ {
- model = "Comtrend VR-3025u";
- compatible = "comtrend,vr-3025u", "brcm,bcm6368";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x0000000 0x0020000>;
- read-only;
- };
-
- linux@20000 {
- label = "linux";
- reg = <0x0020000 0x1fc0000>;
- };
-
- nvram@1fe0000 {
- label = "nvram";
- reg = <0x1fe0000 0x020000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/vr-3025un.dts b/target/linux/brcm63xx/dts/vr-3025un.dts
deleted file mode 100644
index 6fc0c2a..0000000
--- a/target/linux/brcm63xx/dts/vr-3025un.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6368.dtsi"
-
-/ {
- model = "Comtrend VR-3025un";
- compatible = "comtrend,vr-3025un", "brcm,bcm6368";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x7e0000>;
- };
-
- nvram@7f0000 {
- label = "nvram";
- reg = <0x7f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/dts/wap-5813n.dts b/target/linux/brcm63xx/dts/wap-5813n.dts
deleted file mode 100644
index 29b85a2..0000000
--- a/target/linux/brcm63xx/dts/wap-5813n.dts
+++ /dev/null
@@ -1,30 +0,0 @@
-/dts-v1/;
-
-/include/ "bcm6368.dtsi"
-
-/ {
- model = "Comtrend WAP-5813n";
- compatible = "comtrend,wap-5813n", "brcm,bcm6368";
-};
-
-&pflash {
- status = "ok";
-
- linux,part-probe = "bcm63xxpart";
-
- cfe@0 {
- label = "CFE";
- reg = <0x000000 0x010000>;
- read-only;
- };
-
- linux@10000 {
- label = "linux";
- reg = <0x010000 0x7e0000>;
- };
-
- nvram@7f0000 {
- label = "nvram";
- reg = <0x7f0000 0x010000>;
- };
-};
diff --git a/target/linux/brcm63xx/generic/target.mk b/target/linux/brcm63xx/generic/target.mk
deleted file mode 100644
index d43a37c..0000000
--- a/target/linux/brcm63xx/generic/target.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-BOARDNAME:=generic
-
-define Target/Description
- Build firmware images for BCM63XX boards without SMP support.
-endef
-
-
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
deleted file mode 100755
index a9d938f..0000000
--- a/target/linux/brcm63xx/image/Makefile
+++ /dev/null
@@ -1,395 +0,0 @@
-#
-# Copyright (C) 2006-2011 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/image.mk
-
-LOADADDR = 0x80010000 # RAM start + 16M
-KERNEL_ENTRY = $(LOADADDR) # Newer kernels add a jmp to the kernel_entry at the start of the binary
-RAMSIZE = 0x01000000 # 64MB
-
-LOADER_MAKEOPTS= \
- KDIR=$(KDIR) \
- LOADADDR=$(LOADADDR) \
- KERNEL_ENTRY=$(KERNEL_ENTRY) \
- RAMSIZE=$(RAMSIZE)
-
-define trxalign/jffs2-128k
--a 0x20000
-endef
-define trxalign/jffs2-64k
--a 0x10000
-endef
-define trxalign/squashfs
--a 1024
-endef
-
-define Image/LimitName16
-$(shell expr substr "$(1)" 1 16)
-endef
-
-TARGET_DTBS:=
-TARGET_IMAGES:=
-
-TARGET_Default_DTBS:=
-TARGET_Default_IMAGES:=
-
-define Image/Build/CFE
- # Generate the tagged image
- $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
- --output $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin \
- --boardid $(2) --chipid $(3) --entry $(KERNEL_ENTRY) \
- --load-addr $(LOADADDR) --rsa-signature "$(5)" \
- --info1 "-$(call Image/LimitName16,$(4))" --info2 $(1) \
- $(6) $(7) $(8) $(9)
-endef
-
-define Image/Build/CFEDTB
- # Generate the tagged image
- $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f $(KDIR)/root.$(1) \
- --output $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin \
- --boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
- --load-addr $(LOADADDR) --rsa-signature "$(6)" \
- --info1 "-$(call Image/LimitName16,$(5))" --info2 $(1) \
- $(7) $(8) $(9) $(10)
-endef
-
-define Image/Build/ZYXCFEDTB
- # Generate the tagged image
- $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f $(KDIR)/root.$(1) \
- --output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
- --boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
- --load-addr $(LOADADDR) --rsa-signature "$(6)" \
- --info1 "-$(call Image/LimitName16,$(5))" --info2 $(1) \
- $(7) $(8) $(9) $(10)
- # Fix up header
- $(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
- -o $(BIN_DIR)/openwrt-$(5)-$(1)-zyxcfe.bin
- rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
-endef
-
-define Image/Build/CFEAGPF
- # Generate the tagged image
- $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
- --output $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin \
- --boardid $(2) --chipid $(3) --entry $(LOADADDR) \
- --load-addr $(LOADADDR) --tag-version 8 \
- --signature2 IMAGE --block-size 0x20000 \
- --image-offset $(4) --info1 "-$(call Image/LimitName16,$(5))" --info2 $(1)
-endef
-
-define Image/Build/RG100A
- # Generate the tagged image
- $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
- --output $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin \
- --boardid $(2) --chipid $(3) --entry $(LOADADDR) \
- --load-addr $(LOADADDR) --block-size 0x20000 \
- --image-offset $(4) --info1 "-$(call Image/LimitName16,$(5))" --info2 $(1)
-endef
-
-define Image/Build/RedBoot
- cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(1)-vmlinux.elf
- gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
- $(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
- dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(1)-vmlinux.lzma bs=65536 conv=sync
- dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(1)-vmlinux.gz bs=65536 conv=sync
-endef
-
-define Image/Build/SPW303V
- # Generate the tagged image
- $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \
- --output $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
- --boardid $(2) --chipid $(3) --entry $(KERNEL_ENTRY) \
- --load-addr $(LOADADDR) --rsa-signature "$(5)" \
- --pad 4 $(6) $(7) $(8) $(9)
- # Fix up header
- $(STAGING_DIR_HOST)/bin/spw303v -i $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
- -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin
- $(STAGING_DIR_HOST)/bin/xorimage -i $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin \
- -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-factory.bin
- rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
-endef
-
-define Image/Build/CFEOLD
- $(TOPDIR)/scripts/brcmImage.pl -t -p \
- -b $(2) -c $(3) \
- -k $(KDIR)/vmlinux.lzma.cfe \
- -r $(KDIR)/root.$(1) \
- -o $(BIN_DIR)/openwrt-$(2)-$(1)-cfe.bin
-endef
-
-define Image/Build/HCS
- $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(3) \
- --rev_maj=$(4) --rev_min=$(5) --input_file=$(6) \
- --output_file=$(BIN_DIR)/openwrt-$(2)-$(1).bin
-endef
-
-define Build/Clean
- $(MAKE) -C lzma-loader clean
-endef
-
-define Image/PrepareLoader
- # Standard LZMA kernel
- $(STAGING_DIR_HOST)/bin/lzma e -d22 -fb64 -a1 $(KDIR)/vmlinux$(1) $(KDIR)/vmlinux$(1).lzma
-
- # Build the LZMA loader
- rm -rf $(KDIR)/lzma-loader
- $(MAKE) -C lzma-loader \
- $(LOADER_MAKEOPTS) \
- BUILD_DIR="$(KDIR)" \
- TARGET_DIR="$(BIN_DIR)" \
- LOADER_DATA="$(KDIR)/vmlinux$(1).lzma" \
- LOADER=$(IMG_PREFIX)-loader$(1).elf \
- LZMA_TEXT_START=0x80a00000 \
- compile loader.elf
-
- rm -f $(KDIR)/vmlinux$(1).lzma
-endef
-
-define Image/PrepareLoaderDTB
- # append dtb to vmlinux, then build a standard LZMA loader
- cat $(KDIR)/vmlinux$(1) $(DTS_DIR)/$(2).dtb > $(KDIR)/vmlinux$(1)-$(2)
- $(call Image/PrepareLoader,$(1)-$(2))
-endef
-
-define Image/PrepareCFELzmaKernel
- # CFE is a LZMA nazi! It took me hours to find out the parameters!
- # Also I think lzma has a bug cause it generates different output depending on
- # if you use stdin / stdout or not. Use files instead of stdio here, cause
- # otherwise CFE will complain and not boot the image.
- $(STAGING_DIR_HOST)/bin/lzma e -d22 -fb64 -a1 $(KDIR)/vmlinux$(1) $(KDIR)/vmlinux$(1).lzma.tmp
-
- # Strip out the length, CFE doesn't like this
- dd if=$(KDIR)/vmlinux$(1).lzma.tmp of=$(KDIR)/vmlinux$(1).lzma.cfe bs=5 count=1
- dd if=$(KDIR)/vmlinux$(1).lzma.tmp of=$(KDIR)/vmlinux$(1).lzma.cfe ibs=13 obs=5 skip=1 seek=1 conv=notrunc
- rm -f $(KDIR)/vmlinux$(1).lzma.tmp
-endef
-
-define Image/PrepareCFELzmaKernelDTB
- # compile the dts (the dtb will be later reused for the lzma loader)
- $(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(DTS_DIR)/$(1).dtb ../dts/$(1).dts
- cat $(KDIR)/vmlinux $(DTS_DIR)/$(1).dtb > $(KDIR)/vmlinux-$(1)
- $(call Image/PrepareCFELzmaKernel,-$(1))
-endef
-
-define Image/Prepare
- $(call Image/PrepareCFELzmaKernel,)
-
- $(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), $(call Image/PrepareCFELzmaKernelDTB,$(board)))
-
- ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- $(call Image/PrepareLoader,-initramfs)
- $(foreach board,$(sort $(TARGET_$(PROFILE)_DTBS)), $(call Image/PrepareLoaderDTB,-initramfs,$(board)))
- endif
- rm -f $(KDIR)/fs_mark
- touch $(KDIR)/fs_mark
- $(call prepare_generic_squashfs,$(KDIR)/fs_mark)
-endef
-
-define Image/Build/Initramfs
- # Netgear CVG834G
- $(call Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux-initramfs)
-endef
-
-# $(1) = Profile
-# $(2) = dtb
-# $(3) = boardname
-# $(4) = chipid
-# $(5) = imagename
-# $(6) = rsa signature
-# $(7) = additional options
-define CfeImageDTB
- define Image/Build/$(5)
- $$(call Image/Build/CFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
- endef
-
- TARGET_Default_DTBS += $(2)
- TARGET_Default_IMAGES += $(5)
- TARGET_$(1)_DTBS += $(2)
- TARGET_$(1)_IMAGES += $(5)
-endef
-
-# $(1) = Profile
-# $(2) = dtb
-# $(3) = boardname
-# $(4) = chipid
-# $(5) = imagename
-# $(6) = rsa signature
-# $(7) = additional options
-define ZyxCfeImageDTB
- define Image/Build/$(5)
- $$(call Image/Build/ZYXCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
- endef
-
- TARGET_Default_DTBS += $(2)
- TARGET_Default_IMAGES += $(5)
- TARGET_$(1)_DTBS += $(2)
- TARGET_$(1)_IMAGES += $(5)
-endef
-
-
-define Image/Build
- dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
- # Various routers
- $(call Image/Build/CFE,$(1),963281TAN,6328,963281TAN-4M-flash-generic,,--pad 2)
- $(call Image/Build/CFE,$(1),963281TAN,6328,963281TAN-8M-flash-generic,,--pad 4)
- $(call Image/Build/CFE,$(1),963281TAN,6328,963281TAN-16M-flash-generic,,--pad 8)
- $(call Image/Build/CFE,$(1),96345GW2,6345,96345GW2-generic)
- $(call Image/Build/CFE,$(1),96345GW2,6345,96348GW2-bc221,,--layoutver 5)
- $(call Image/Build/CFE,$(1),96345GW2,6345,92345GW2-rev,OpenWRT-$(REVISION))
- $(call Image/Build/CFE,$(1),96348GW,6348,96348GW-generic,,)
- $(call Image/Build/CFE,$(1),96348R,6348,96348R-generic,,)
- $(call Image/Build/CFE,$(1),96348GW,6348,96348GW-bc221,,--layoutver 5)
- $(call Image/Build/CFE,$(1),6338GW,6338,6338GW-generic,,)
- $(call Image/Build/CFE,$(1),6338W,6338,6338W-generic,,)
- $(call Image/Build/CFE,$(1),96348GW-11,6348,96348GW-11-generic)
- $(call Image/Build/CFE,$(1),96348GW-10,6348,96348GW-10-generic)
- $(call Image/Build/CFE,$(1),96358VW,6358,96358VW-generic)
- $(call Image/Build/CFE,$(1),96358VW2,6358,96358VW2-generic)
- $(call Image/Build/CFE,$(1),96368MVNgr,6368,96368MVNgr-generic)
- $(call Image/Build/CFE,$(1),96368MVWG,6368,96368MVWG-generic)
-
- # BT Voyager V210_BTR
- $(call Image/Build/CFE,$(1),V210_BB,6348,BTV210_BTR,,--layoutver 5)
- # BT Voyager V210_ROI, V210_WB
- $(call Image/Build/CFE,$(1),V210,6348,BTV210_ROI_WB,,--layoutver 5)
- # BT Voyager V2091_BTR
- $(call Image/Build/CFE,$(1),V2091_BB,6348,BTV2091_BTR,,--layoutver 5)
- # BT Voyager V2091_ROI, V2091_WB
- $(call Image/Build/CFE,$(1),V2091,6348,BTV2091_ROI_WB,,--layoutver 5)
- # BT Voyager V220V, V220V_MGCP_BTR
- $(call Image/Build/CFE,$(1),RTA1052V,6348,BTV220V_MGCP_BTR,,--layoutver 5)
- # BT Voyager V2110, V2110_AA, V2110_ROI
- $(call Image/Build/CFE,$(1),V2110,6348,BTV2110,,--layoutver 5)
- # BT Voyager V2500V, V2500V_SIP_CLUB, V2500V_AA
- $(call Image/Build/CFE,$(1),V2500V_BB,6348,BTV2500V,,--layoutver 5)
- # RTA1025W_16 (numerous routers)
- $(call Image/Build/CFE,$(1),RTA1025W_16,6348,RTA1025W_16,,--layoutver 5)
- # RTA1320_16M (numerous routers)
- $(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5)
-
- # Sagem F@ST2504n
- $(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION))
-
- # Davolink DV201AMR
- $(call Image/Build/CFEOLD,$(1),DV201AMR,6348)
- # USR 9108
- $(call Image/Build/CFE,$(1),96348GW-A,6348,USR9108)
- # NetGear DG834GT, DG834PN
- $(call Image/Build/CFE,$(1),96348GW-10,6348,DG834GT_DG834PN)
- # Belkin f5d7633
- $(call Image/Build/CFE,$(1),96348GW-10,6348,F5D7633)
- # D-Link DSL-2640B, rev B2
- $(call Image/Build/CFE,$(1),D-4P-W,6348,DSL2640B-B2)
- # D-Link DSL-2650U
- $(call Image/Build/CFE,$(1),96358VW2,6358,DSL2650U)
- # D-Link DSL-2740B/DSL-2741B, rev F1
- $(call Image/Build/CFE,$(1),AW4339U,6328,DSL274XB-F1-EU,,--signature2="4.06.01.EUF1" --pad 4)
- $(call Image/Build/CFE,$(1),AW4339U,6328,DSL274XB-F1-AU,,--signature2="4.06.01.AUF1" --pad 4)
-
- # TP-Link TD-8810A, TD-8810B, TD-8811A, TD-8811B
- $(call Image/Build/CFE,$(1),8L-2M-8M,6338,TP8810_8811)
- # TP-Link 8900GB
- $(call Image/Build/CFE,$(1),96348GW-11,6348,TD8900GB,$(shell printf 'PRID\x89\x10\x00\x02'))
-
- # Sagem F@ST2404
- $(call Image/Build/CFE,$(1),F@ST2404,6348,F@ST2404-cfe)
- $(call Image/Build/CFE,$(1),F@ST2404,6348,F@ST2404,OpenWRT-$(REVISION))
- # Sagem F@ST2604
- $(call Image/Build/CFE,$(1),F@ST2604,6348,F@ST2604-cfe)
- $(call Image/Build/CFE,$(1),F@ST2604,6348,F@ST2604,OpenWRT-$(REVISION))
- # Sagem F@ST2704V2
- $(call Image/Build/CFE,$(1),F@ST2704V2,6328,F@ST2704V2-cfe)
- $(call Image/Build/CFE,$(1),F@ST2704V2,6328,F@ST2704V2,OpenWRT-$(REVISION))
- # Inventel Livebox
- $(call Image/Build/RedBoot,livebox)
- # Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
- $(call Image/Build/CFEAGPF,$(1),AGPF-S0,6358,0x20000,AGV2+W-cfe)
- $(call Image/Build/CFEAGPF,$(1),AGPF-S0,6358,0x20000,AGV2+W)
- # Pirelli A226G
- $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x10000,A226G-cfe)
- $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x10000,A226G)
-
- # Pirelli A226M
- $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x20000,A226M-cfe)
- $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x20000,A226M)
-
- # RG100A,DB120 etc.
- $(call Image/Build/RG100A,$(1),96358VW2,6358,0x20000,RG100A_DB120)
-
- # Telsey CPVA642-type (e.g. CPA-ZNTE60T)
- $(call Image/Build/CFE,$(1),CPVA642,6358,CPA-ZNTE60T,,--signature "Telsey Tlc",--signature2 "99.99.999",--second-image-flag "0")
-
- # T-Com Speedport W 303V Typ B
- $(call Image/Build/SPW303V,$(1),96358-502V,6358,SPW303V)
-
- # Netgear CVG834G
- $(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
-
- # build dtb image list
- $(foreach image,$(TARGET_$(PROFILE)_IMAGES),$(call Image/Build/$(image),$(1)))
-
- ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
- $(call Image/Build/Initramfs)
- endif
-endef
-
-# Generic 96328avng
-$(eval $(call CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-4M-flash-generic,,--pad 2))
-$(eval $(call CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-8M-flash-generic,,--pad 4))
-$(eval $(call CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-16M-flash-generic,,--pad 8))
-
-# ADB P.DG A4001N
-$(eval $(call CfeImageDTB,A4001N,a4001n,96328dg2x2,6328,A4001N,,--pad 8))
-# ADB P.DG A4001N1
-$(eval $(call CfeImageDTB,A4001N1,a4001n1,963281T_TEF,6328,A4001N1,,--pad 8))
-# Asmax AR 1004g
-$(eval $(call CfeImageDTB,AR1004G,ar1004g,96348GW-10,6348,AR1004G))
-# Comtrend AR-5381u
-$(eval $(call CfeImageDTB,AR5381u,ar-5381u,96328A-1241N,6328,AR-5381u,,--pad 8))
-# Comtrend AR-5387un
-$(eval $(call CfeImageDTB,AR5387un,ar-5387un,96328A-1441N1,6328,AR-5387un,,--pad 8))
-# Comtrend 536, 5621
-$(eval $(call CfeImageDTB,CT536_CT5621,ct536plus,96348GW-11,6348,CT536_CT5621))
-# Comtrend CT-5365
-$(eval $(call CfeImageDTB,CT5365,ct-5365,96348A-122,6348,CT-5365))
-# Comtrend CT-6373
-$(eval $(call CfeImageDTB,CT6373,ct-6373,CT6373-1,6358,CT-6373))
-# Comtrend VR-3025u
-$(eval $(call CfeImageDTB,VR3025u,vr-3025u,96368M-1541N,6368,VR-3025u,,--pad 16 --image-offset 0x20000 --block-size 0x20000))
-# Comtrend VR-3025un
-$(eval $(call CfeImageDTB,VR3025un,vr-3025un,96368M-1341N,6368,VR-3025un,,--pad 4))
-# Comtrend WAP-5813n
-$(eval $(call CfeImageDTB,WAP5813n,wap-5813n,96369R-1231N,6368,WAP-5813n,,--pad 4))
-# D-Link DSL-2740B/DSL-2741B, rev C2
-$(eval $(call CfeImageDTB,DSL274XB_C,dsl-274xb-c,96358GW,6358,DSL274XB-C2))
-# D-Link DSL-2740B/DSL-2741B, rev C3
-$(eval $(call CfeImageDTB,DSL274XB_C,dsl-274xb-c,AW4139,6358,DSL274XB-C3))
-# D-Link DVA-G3810BN/TL
-$(eval $(call CfeImageDTB,DVAG3810BN,dva-g3810bn_tl,96358VW,6358,DVAG3810BN))
-# Huawei HG520v
-$(eval $(call CfeImageDTB,HG520v,hg520v,HW6358GW_B,6358,HG520v,EchoLife_HG520v))
-# Huawei HG553
-$(eval $(call CfeImageDTB,HG553,hg553,HW553,6358,HG553,EchoLife_HG553,--image-offset 0x20000 --block-size 0x20000 --tag-version 7))
-# Huawei HG556a
-$(eval $(call CfeImageDTB,HG556a_AB,hg556a-a,HW556,6358,HG556a_A,EchoLife_HG556a,--image-offset 0x20000 --block-size 0x10000 --tag-version 8))
-$(eval $(call CfeImageDTB,HG556a_AB,hg556a-b,HW556,6358,HG556a_B,EchoLife_HG556a,--image-offset 0x20000 --block-size 0x20000 --tag-version 8))
-$(eval $(call CfeImageDTB,HG556a_C,hg556a-c,HW556,6358,HG556a_C,EchoLife_HG556a,--image-offset 0x20000 --block-size 0x20000 --tag-version 8))
-# T-Com Speedport W 500V
-$(eval $(call CfeImageDTB,SPW500V,spw500v,96348GW,6348,SPW500V))
-# Tecom GW6000
-$(eval $(call CfeImageDTB,GW6000,gw6000,96348GW,6348,GW6000))
-# Tecom GW6200
-$(eval $(call CfeImageDTB,GW6200,gw6200,96348GW,6348,GW6200,$(shell printf '\x99')))
-# SFR Neufbox 4
-$(eval $(call CfeImageDTB,Neufbox4,nb4-ser-r0,96358VW,6358,NEUFBOX4-SER,OpenWRT-$(REVISION)))
-$(eval $(call CfeImageDTB,Neufbox4,nb4-fxc-r1,96358VW,6358,NEUFBOX4-FXC,OpenWRT-$(REVISION)))
-# SFR neufbox 6
-$(eval $(call CfeImageDTB,Neufbox6,nb6-ser-r0,NB6-SER-r0,6362,NEUFBOX6,OpenWRT-$(REVISION)))
-# ZyXEL P870HW-51a v2
-$(eval $(call ZyxCfeImageDTB,P870HW_51a_v2,p870hw-51a-v2,96368VVW,6368,P870HW-51a_v2,ZyXEL,--signature "ZyXEL_0001"))
-
-$(eval $(call BuildImage))
diff --git a/target/linux/brcm63xx/image/README.images-bcm63xx b/target/linux/brcm63xx/image/README.images-bcm63xx
deleted file mode 100644
index 91b6d01..0000000
--- a/target/linux/brcm63xx/image/README.images-bcm63xx
+++ /dev/null
@@ -1,127 +0,0 @@
-The image neede to flash onto a Broadcom 63xx-series board depends on the
-board, method you are using to flash, and, for web-based flash, on the version
-of the Broadcom code your router uses.
-
-There are two major revisions of the Broadcom code as far as imagetags are
-concerned, before 3.08 and after 3.08, however there are some variations
-within in that, either due to vendor differences or due to changes at
-Broadcom (it's not clear yet which is the case). In addtion Pirelli modified
-the Broadcom code, so Alice Gate models use a different imagetag than any
-other vendor.
-
-The imagetag format for flashing via CFE is the same for almost all the
-boards, and is the same for all images generated by the imagetag utility.
-Images flashable using cfe are labelled openwrt-<board>-<filesystem>-cfe.bin
-
-The imagetags for tftp/ftp flashing is based on Broadcom 3.00-3.04 imagetags
-and is known to be correct as the source code GPL and is available for reading.
-
-Broadcom code 2.21 is based on the BT Voyager firmware image I looked at. It
-may in fact be BT Voyager-specific. 2.21 is actually more difficult to deal
-with the imagetag from 3.00 as it has three different CRC calculations in
-addtition to the header CRC.
-
-Broadcom 3.00-3.02 flashing has been tested on Comtrend CT-5261, CT-536 and
-Tecom GW6000, and is the version of the flashing that was present before the
-imagetags were split by broadcom code version (early June 2009)
-
-3.04 is guessed to be the same as 3.00-3.02 based on available information
-
-Broadom 3.06 is thought to be the same as 3.00-3.02, however the only 3.06
-this author (Daniel Dickinson) has seen is the Alice Gate (Pirelli) firmware
-which is known to be different due to vendor (Pirelli) modifications to the
-Broadcom code.
-
-Broadcom 3.10 uses an imagetag that is believed to apply to all 3.10 and 3.12
-versions, and has been tested on the Tecom GW6200. This version introdec changes to
-the imagetag to deal with TR69 (a remote rouer management system developed by the
-DSL forum). There is a field for vendor-specific information, that at least in some
-cases is not optional. It is based on the hexedit of a neufbox4 firmware image, the
-information in https://dev.openwrt.org/ticket/4987, and the hexedit of a Tecom
-GW6200 image.
-
-Some boards share the same tag format, but require vendor-specific fields in
-the board. In that case the tagid is shared, but the filename of the generated
-image reflects the router for which the image was created.
-
-router |method | codever |filename
-+-------------+-------------+---------+---------------------------------------
-|any |cfe+most web | any |openwrt-<board>-<fs>-cfe.bin
-|AGVoIP2+WiFi |cfe |alice3.06|openwrt-AGV2+W-cfe-<fs>-cfe.bin
-|AGVoIP2+WiFi |web |alice3.06|openwrt-AGV2+W-cfe-<fs>-cfe.bin
-|CT536 |web |3.02 |openwrt-CT536_CT5621-<fs>-cfe.bin
-|CT5621 |web |3.02 |openwrt-CT536_CT5621-<fs>-cfe.bin
-|DG834GT |web |3.02 |openwrt-DG834GT_DG834PN-<fs>-cfe.bin
-|DG834PN |web |3.02 |openwrt-DG834GT_DG834PN-<fs>-cfe.bin
-|DSL-2640B |web |3.10 |openwrt-DSL2640B-<fs>-cfe.bin
-|DSL-2740B |web |3.10 |openwrt-DSL2670B-<fs>-cfe.bin
-|F5D7633 |web |3.10 |openwrt-F5D7633-<fs>-cfe.bin
-|F@ST2404 |web |3.0X? |openwrt-F@ST2404-cfe-<fs>-cfe.bin
-|F@ST2404 |web |3.1X? |openwrt-F@ST2404-<fs>-cfe.bin
-|GW6000 |web |3.00 |openwrt-GW6000-<fs>-cfe.bin
-|GW6200 |web |3.10 |openwrt-GW6200-<fs>-cfe.bin
-|Neufbox4 |web |3.12 |openwrt-NEUFBOX4-<fs>-cfe.bin
-|TD8810A |web |3.06 |openwrt-TD8810-<fs>-cfe.bin
-|TD8810B |web |3.06 |openwrt-TD8810-<fs>-cfe.bin
-|TD8811A |web |3.06 |openwrt-TD8811-<fs>-cfe.bin
-|TD8811B |web |3.06 |openwrt-TD881-<fs>-cfe.bin
-|TD8900GB |web |3.06 |openwrt-TD8900DB<fs>-cfe.bin
-|USR9108 |web |3.0X? |openwrt-USR9108-<fs>-cfe.bin
-|V2091_BTR |web |2.21 |openwrt-V2091_BTR-<fs>-cfe.bin
-|V2091_ROI |web |2.21 |openwrt-V2091-<fs>-cfe.bin
-|V2091_WB |web |2.21 |openwrt-V2091-<fs>-cfe.bin
-|V210_BTR |web |2.21 |openwrt-V210_BTR-<fs>-cfe.bin
-|V210_ROI |web |2.21 |openwrt-V210-ROI_WB<fs>-cfe.bin
-|V210_WB |web |2.21 |openwrt-V210-ROI_WB<fs>-cfe.bin
-|V2110 |web |2.21 |openwrt-V2110-<fs>-cfe.bin
-|V2110_AA |web |2.21 |openwrt-V2110-<fs>-cfe.bin
-|V2110_ROI |web |2.21 |openwrt-V2110-<fs>-cfe.bin
-|V2500V |web |2.21 |openwrt-V2500V<fs>-cfe.bin
-|V2500V_AA |web |2.21 |openwrt-V2500V-<fs>-cfe.bin
-|V2500V_SIP_CLUB |web |2.21 |openwrt-V2500V-<fs>-cfe.bin
-
-Old imagetag routers
---------------------
-Davolink DV201AMR
-
-Redboot routers
----------------
-Inventel Livebox
-
-Known router->code versions
----------------------------
-
-Vendor |Model |Code Ver
----------------------------+------------------------------------------+--------
-Belkin |F5D7633 |3.10
-British Telecom (BT) |Voyager V2091_BTR |2.21
-British Telecom (BT) |Voyager V2091_ROI |2.21
-British Telecom (BT) |Voyager V2091_WB |2.21
-British Telecom (BT) |Voyager V210_BTR |2.21
-British Telecom (BT) |Voyager V210_ROI |2.21
-British Telecom (BT) |Voyager V210_WB |2.21
-British Telecom (BT) |Voyager V2110 |2.21
-British Telecom (BT) |Voyager V2110_AA |2.21
-British Telecom (BT) |Voyager V2110_ROI |2.21
-British Telecom (BT) |Voyager V220V |2.21
-British Telecom (BT) |Voyager V2500V |2.21
-British Telecom (BT) |Voyager V2500V_AA |2.21
-British Telecom (BT) |Voyager V2500V_SIP_CLUB |2.21
-Comtrend |CT-5261 |3.02
-Comtrend |CT-536 |3.02
-D-Link |DSL-2640B |3.10
-D-Link |DSL-2670B |3.10
-NetGear |DG834GT |3.02
-NetGear |DG834PN |3.02
-Neuf Cegetel |Neufbox 4 |3.12
-Pirelli |Alice Gate Wi-Fi (+VoIP models?) |ag 3.06
-Sagem |F@ST2404 |?
-TP-Link |TD-8810A |3.06
-TP-Link |TD-8810B |3.06
-TP-Link |TD-8811A |3.06
-TP-Link |TD-8811B |3.06
-TP-Link |TD-W8900GB |3.06
-Tecom |GW6000 |3.00
-Tecom |GW6200 |3.10
-USR |9108 |?
-
diff --git a/target/linux/brcm63xx/image/lzma-loader/Makefile b/target/linux/brcm63xx/image/lzma-loader/Makefile
deleted file mode 100644
index 8d36691..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/Makefile
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# Copyright (C) 2011 OpenWrt.org
-# Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-LZMA_TEXT_START := 0x80a00000
-LOADER := loader.bin
-LOADER_NAME := $(basename $(notdir $(LOADER)))
-LOADER_DATA :=
-TARGET_DIR :=
-FLASH_OFFS :=
-FLASH_MAX :=
-
-ifeq ($(TARGET_DIR),)
-TARGET_DIR := $(KDIR)
-endif
-
-LOADER_BIN := $(TARGET_DIR)/$(LOADER_NAME).bin
-LOADER_GZ := $(TARGET_DIR)/$(LOADER_NAME).gz
-LOADER_ELF := $(TARGET_DIR)/$(LOADER_NAME).elf
-
-PKG_NAME := lzma-loader
-PKG_BUILD_DIR := $(KDIR)/$(PKG_NAME)
-
-.PHONY : loader-compile loader.bin loader.elf loader.gz
-
-$(PKG_BUILD_DIR)/.prepared:
- mkdir $(PKG_BUILD_DIR)
- $(CP) ./src/* $(PKG_BUILD_DIR)/
- touch $@
-
-loader-compile: $(PKG_BUILD_DIR)/.prepared
- $(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE="$(TARGET_CROSS)" \
- LZMA_TEXT_START=$(LZMA_TEXT_START) \
- LOADER_DATA=$(LOADER_DATA) \
- FLASH_OFFS=$(FLASH_OFFS) \
- FLASH_MAX=$(FLASH_MAX) \
- clean all
-
-loader.gz: $(PKG_BUILD_DIR)/loader.bin
- gzip -nc9 $< > $(LOADER_GZ)
-
-loader.elf: $(PKG_BUILD_DIR)/loader.elf
- $(CP) $< $(LOADER_ELF)
-
-loader.bin: $(PKG_BUILD_DIR)/loader.bin
- $(CP) $< $(LOADER_BIN)
-
-download:
-prepare: $(PKG_BUILD_DIR)/.prepared
-compile: loader-compile
-
-install:
-
-clean:
- rm -rf $(PKG_BUILD_DIR)
-
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.c b/target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.c
deleted file mode 100644
index cb83453..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.c
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- LzmaDecode.c
- LZMA Decoder (optimized for Speed version)
-
- LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
- http://www.7-zip.org/
-
- LZMA SDK is licensed under two licenses:
- 1) GNU Lesser General Public License (GNU LGPL)
- 2) Common Public License (CPL)
- It means that you can select one of these two licenses and
- follow rules of that license.
-
- SPECIAL EXCEPTION:
- Igor Pavlov, as the author of this Code, expressly permits you to
- statically or dynamically link your Code (or bind by name) to the
- interfaces of this file without subjecting your linked Code to the
- terms of the CPL or GNU LGPL. Any modifications or additions
- to this file, however, are subject to the LGPL or CPL terms.
-*/
-
-#include "LzmaDecode.h"
-
-#define kNumTopBits 24
-#define kTopValue ((UInt32)1 << kNumTopBits)
-
-#define kNumBitModelTotalBits 11
-#define kBitModelTotal (1 << kNumBitModelTotalBits)
-#define kNumMoveBits 5
-
-#define RC_READ_BYTE (*Buffer++)
-
-#define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \
- { int i; for(i = 0; i < 5; i++) { RC_TEST; Code = (Code << 8) | RC_READ_BYTE; }}
-
-#ifdef _LZMA_IN_CB
-
-#define RC_TEST { if (Buffer == BufferLim) \
- { SizeT size; int result = InCallback->Read(InCallback, &Buffer, &size); if (result != LZMA_RESULT_OK) return result; \
- BufferLim = Buffer + size; if (size == 0) return LZMA_RESULT_DATA_ERROR; }}
-
-#define RC_INIT Buffer = BufferLim = 0; RC_INIT2
-
-#else
-
-#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
-
-#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
-
-#endif
-
-#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
-
-#define IfBit0(p) RC_NORMALIZE; bound = (Range >> kNumBitModelTotalBits) * *(p); if (Code < bound)
-#define UpdateBit0(p) Range = bound; *(p) += (kBitModelTotal - *(p)) >> kNumMoveBits;
-#define UpdateBit1(p) Range -= bound; Code -= bound; *(p) -= (*(p)) >> kNumMoveBits;
-
-#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \
- { UpdateBit0(p); mi <<= 1; A0; } else \
- { UpdateBit1(p); mi = (mi + mi) + 1; A1; }
-
-#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
-
-#define RangeDecoderBitTreeDecode(probs, numLevels, res) \
- { int i = numLevels; res = 1; \
- do { CProb *p = probs + res; RC_GET_BIT(p, res) } while(--i != 0); \
- res -= (1 << numLevels); }
-
-
-#define kNumPosBitsMax 4
-#define kNumPosStatesMax (1 << kNumPosBitsMax)
-
-#define kLenNumLowBits 3
-#define kLenNumLowSymbols (1 << kLenNumLowBits)
-#define kLenNumMidBits 3
-#define kLenNumMidSymbols (1 << kLenNumMidBits)
-#define kLenNumHighBits 8
-#define kLenNumHighSymbols (1 << kLenNumHighBits)
-
-#define LenChoice 0
-#define LenChoice2 (LenChoice + 1)
-#define LenLow (LenChoice2 + 1)
-#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
-#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
-#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
-
-
-#define kNumStates 12
-#define kNumLitStates 7
-
-#define kStartPosModelIndex 4
-#define kEndPosModelIndex 14
-#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
-
-#define kNumPosSlotBits 6
-#define kNumLenToPosStates 4
-
-#define kNumAlignBits 4
-#define kAlignTableSize (1 << kNumAlignBits)
-
-#define kMatchMinLen 2
-
-#define IsMatch 0
-#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
-#define IsRepG0 (IsRep + kNumStates)
-#define IsRepG1 (IsRepG0 + kNumStates)
-#define IsRepG2 (IsRepG1 + kNumStates)
-#define IsRep0Long (IsRepG2 + kNumStates)
-#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
-#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
-#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
-#define LenCoder (Align + kAlignTableSize)
-#define RepLenCoder (LenCoder + kNumLenProbs)
-#define Literal (RepLenCoder + kNumLenProbs)
-
-#if Literal != LZMA_BASE_SIZE
-StopCompilingDueBUG
-#endif
-
-int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size)
-{
- unsigned char prop0;
- if (size < LZMA_PROPERTIES_SIZE)
- return LZMA_RESULT_DATA_ERROR;
- prop0 = propsData[0];
- if (prop0 >= (9 * 5 * 5))
- return LZMA_RESULT_DATA_ERROR;
- {
- for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));
- for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);
- propsRes->lc = prop0;
- /*
- unsigned char remainder = (unsigned char)(prop0 / 9);
- propsRes->lc = prop0 % 9;
- propsRes->pb = remainder / 5;
- propsRes->lp = remainder % 5;
- */
- }
-
- #ifdef _LZMA_OUT_READ
- {
- int i;
- propsRes->DictionarySize = 0;
- for (i = 0; i < 4; i++)
- propsRes->DictionarySize += (UInt32)(propsData[1 + i]) << (i * 8);
- if (propsRes->DictionarySize == 0)
- propsRes->DictionarySize = 1;
- }
- #endif
- return LZMA_RESULT_OK;
-}
-
-#define kLzmaStreamWasFinishedId (-1)
-
-int LzmaDecode(CLzmaDecoderState *vs,
- #ifdef _LZMA_IN_CB
- ILzmaInCallback *InCallback,
- #else
- const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
- #endif
- unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed)
-{
- CProb *p = vs->Probs;
- SizeT nowPos = 0;
- Byte previousByte = 0;
- UInt32 posStateMask = (1 << (vs->Properties.pb)) - 1;
- UInt32 literalPosMask = (1 << (vs->Properties.lp)) - 1;
- int lc = vs->Properties.lc;
-
- #ifdef _LZMA_OUT_READ
-
- UInt32 Range = vs->Range;
- UInt32 Code = vs->Code;
- #ifdef _LZMA_IN_CB
- const Byte *Buffer = vs->Buffer;
- const Byte *BufferLim = vs->BufferLim;
- #else
- const Byte *Buffer = inStream;
- const Byte *BufferLim = inStream + inSize;
- #endif
- int state = vs->State;
- UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
- int len = vs->RemainLen;
- UInt32 globalPos = vs->GlobalPos;
- UInt32 distanceLimit = vs->DistanceLimit;
-
- Byte *dictionary = vs->Dictionary;
- UInt32 dictionarySize = vs->Properties.DictionarySize;
- UInt32 dictionaryPos = vs->DictionaryPos;
-
- Byte tempDictionary[4];
-
- #ifndef _LZMA_IN_CB
- *inSizeProcessed = 0;
- #endif
- *outSizeProcessed = 0;
- if (len == kLzmaStreamWasFinishedId)
- return LZMA_RESULT_OK;
-
- if (dictionarySize == 0)
- {
- dictionary = tempDictionary;
- dictionarySize = 1;
- tempDictionary[0] = vs->TempDictionary[0];
- }
-
- if (len == kLzmaNeedInitId)
- {
- {
- UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
- UInt32 i;
- for (i = 0; i < numProbs; i++)
- p[i] = kBitModelTotal >> 1;
- rep0 = rep1 = rep2 = rep3 = 1;
- state = 0;
- globalPos = 0;
- distanceLimit = 0;
- dictionaryPos = 0;
- dictionary[dictionarySize - 1] = 0;
- #ifdef _LZMA_IN_CB
- RC_INIT;
- #else
- RC_INIT(inStream, inSize);
- #endif
- }
- len = 0;
- }
- while(len != 0 && nowPos < outSize)
- {
- UInt32 pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
- if (++dictionaryPos == dictionarySize)
- dictionaryPos = 0;
- len--;
- }
- if (dictionaryPos == 0)
- previousByte = dictionary[dictionarySize - 1];
- else
- previousByte = dictionary[dictionaryPos - 1];
-
- #else /* if !_LZMA_OUT_READ */
-
- int state = 0;
- UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
- int len = 0;
- const Byte *Buffer;
- const Byte *BufferLim;
- UInt32 Range;
- UInt32 Code;
-
- #ifndef _LZMA_IN_CB
- *inSizeProcessed = 0;
- #endif
- *outSizeProcessed = 0;
-
- {
- UInt32 i;
- UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + vs->Properties.lp));
- for (i = 0; i < numProbs; i++)
- p[i] = kBitModelTotal >> 1;
- }
-
- #ifdef _LZMA_IN_CB
- RC_INIT;
- #else
- RC_INIT(inStream, inSize);
- #endif
-
- #endif /* _LZMA_OUT_READ */
-
- while(nowPos < outSize)
- {
- CProb *prob;
- UInt32 bound;
- int posState = (int)(
- (nowPos
- #ifdef _LZMA_OUT_READ
- + globalPos
- #endif
- )
- & posStateMask);
-
- prob = p + IsMatch + (state << kNumPosBitsMax) + posState;
- IfBit0(prob)
- {
- int symbol = 1;
- UpdateBit0(prob)
- prob = p + Literal + (LZMA_LIT_SIZE *
- (((
- (nowPos
- #ifdef _LZMA_OUT_READ
- + globalPos
- #endif
- )
- & literalPosMask) << lc) + (previousByte >> (8 - lc))));
-
- if (state >= kNumLitStates)
- {
- int matchByte;
- #ifdef _LZMA_OUT_READ
- UInt32 pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- matchByte = dictionary[pos];
- #else
- matchByte = outStream[nowPos - rep0];
- #endif
- do
- {
- int bit;
- CProb *probLit;
- matchByte <<= 1;
- bit = (matchByte & 0x100);
- probLit = prob + 0x100 + bit + symbol;
- RC_GET_BIT2(probLit, symbol, if (bit != 0) break, if (bit == 0) break)
- }
- while (symbol < 0x100);
- }
- while (symbol < 0x100)
- {
- CProb *probLit = prob + symbol;
- RC_GET_BIT(probLit, symbol)
- }
- previousByte = (Byte)symbol;
-
- outStream[nowPos++] = previousByte;
- #ifdef _LZMA_OUT_READ
- if (distanceLimit < dictionarySize)
- distanceLimit++;
-
- dictionary[dictionaryPos] = previousByte;
- if (++dictionaryPos == dictionarySize)
- dictionaryPos = 0;
- #endif
- if (state < 4) state = 0;
- else if (state < 10) state -= 3;
- else state -= 6;
- }
- else
- {
- UpdateBit1(prob);
- prob = p + IsRep + state;
- IfBit0(prob)
- {
- UpdateBit0(prob);
- rep3 = rep2;
- rep2 = rep1;
- rep1 = rep0;
- state = state < kNumLitStates ? 0 : 3;
- prob = p + LenCoder;
- }
- else
- {
- UpdateBit1(prob);
- prob = p + IsRepG0 + state;
- IfBit0(prob)
- {
- UpdateBit0(prob);
- prob = p + IsRep0Long + (state << kNumPosBitsMax) + posState;
- IfBit0(prob)
- {
- #ifdef _LZMA_OUT_READ
- UInt32 pos;
- #endif
- UpdateBit0(prob);
-
- #ifdef _LZMA_OUT_READ
- if (distanceLimit == 0)
- #else
- if (nowPos == 0)
- #endif
- return LZMA_RESULT_DATA_ERROR;
-
- state = state < kNumLitStates ? 9 : 11;
- #ifdef _LZMA_OUT_READ
- pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- previousByte = dictionary[pos];
- dictionary[dictionaryPos] = previousByte;
- if (++dictionaryPos == dictionarySize)
- dictionaryPos = 0;
- #else
- previousByte = outStream[nowPos - rep0];
- #endif
- outStream[nowPos++] = previousByte;
- #ifdef _LZMA_OUT_READ
- if (distanceLimit < dictionarySize)
- distanceLimit++;
- #endif
-
- continue;
- }
- else
- {
- UpdateBit1(prob);
- }
- }
- else
- {
- UInt32 distance;
- UpdateBit1(prob);
- prob = p + IsRepG1 + state;
- IfBit0(prob)
- {
- UpdateBit0(prob);
- distance = rep1;
- }
- else
- {
- UpdateBit1(prob);
- prob = p + IsRepG2 + state;
- IfBit0(prob)
- {
- UpdateBit0(prob);
- distance = rep2;
- }
- else
- {
- UpdateBit1(prob);
- distance = rep3;
- rep3 = rep2;
- }
- rep2 = rep1;
- }
- rep1 = rep0;
- rep0 = distance;
- }
- state = state < kNumLitStates ? 8 : 11;
- prob = p + RepLenCoder;
- }
- {
- int numBits, offset;
- CProb *probLen = prob + LenChoice;
- IfBit0(probLen)
- {
- UpdateBit0(probLen);
- probLen = prob + LenLow + (posState << kLenNumLowBits);
- offset = 0;
- numBits = kLenNumLowBits;
- }
- else
- {
- UpdateBit1(probLen);
- probLen = prob + LenChoice2;
- IfBit0(probLen)
- {
- UpdateBit0(probLen);
- probLen = prob + LenMid + (posState << kLenNumMidBits);
- offset = kLenNumLowSymbols;
- numBits = kLenNumMidBits;
- }
- else
- {
- UpdateBit1(probLen);
- probLen = prob + LenHigh;
- offset = kLenNumLowSymbols + kLenNumMidSymbols;
- numBits = kLenNumHighBits;
- }
- }
- RangeDecoderBitTreeDecode(probLen, numBits, len);
- len += offset;
- }
-
- if (state < 4)
- {
- int posSlot;
- state += kNumLitStates;
- prob = p + PosSlot +
- ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
- kNumPosSlotBits);
- RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot);
- if (posSlot >= kStartPosModelIndex)
- {
- int numDirectBits = ((posSlot >> 1) - 1);
- rep0 = (2 | ((UInt32)posSlot & 1));
- if (posSlot < kEndPosModelIndex)
- {
- rep0 <<= numDirectBits;
- prob = p + SpecPos + rep0 - posSlot - 1;
- }
- else
- {
- numDirectBits -= kNumAlignBits;
- do
- {
- RC_NORMALIZE
- Range >>= 1;
- rep0 <<= 1;
- if (Code >= Range)
- {
- Code -= Range;
- rep0 |= 1;
- }
- }
- while (--numDirectBits != 0);
- prob = p + Align;
- rep0 <<= kNumAlignBits;
- numDirectBits = kNumAlignBits;
- }
- {
- int i = 1;
- int mi = 1;
- do
- {
- CProb *prob3 = prob + mi;
- RC_GET_BIT2(prob3, mi, ; , rep0 |= i);
- i <<= 1;
- }
- while(--numDirectBits != 0);
- }
- }
- else
- rep0 = posSlot;
- if (++rep0 == (UInt32)(0))
- {
- /* it's for stream version */
- len = kLzmaStreamWasFinishedId;
- break;
- }
- }
-
- len += kMatchMinLen;
- #ifdef _LZMA_OUT_READ
- if (rep0 > distanceLimit)
- #else
- if (rep0 > nowPos)
- #endif
- return LZMA_RESULT_DATA_ERROR;
-
- #ifdef _LZMA_OUT_READ
- if (dictionarySize - distanceLimit > (UInt32)len)
- distanceLimit += len;
- else
- distanceLimit = dictionarySize;
- #endif
-
- do
- {
- #ifdef _LZMA_OUT_READ
- UInt32 pos = dictionaryPos - rep0;
- if (pos >= dictionarySize)
- pos += dictionarySize;
- previousByte = dictionary[pos];
- dictionary[dictionaryPos] = previousByte;
- if (++dictionaryPos == dictionarySize)
- dictionaryPos = 0;
- #else
- previousByte = outStream[nowPos - rep0];
- #endif
- len--;
- outStream[nowPos++] = previousByte;
- }
- while(len != 0 && nowPos < outSize);
- }
- }
- RC_NORMALIZE;
-
- #ifdef _LZMA_OUT_READ
- vs->Range = Range;
- vs->Code = Code;
- vs->DictionaryPos = dictionaryPos;
- vs->GlobalPos = globalPos + (UInt32)nowPos;
- vs->DistanceLimit = distanceLimit;
- vs->Reps[0] = rep0;
- vs->Reps[1] = rep1;
- vs->Reps[2] = rep2;
- vs->Reps[3] = rep3;
- vs->State = state;
- vs->RemainLen = len;
- vs->TempDictionary[0] = tempDictionary[0];
- #endif
-
- #ifdef _LZMA_IN_CB
- vs->Buffer = Buffer;
- vs->BufferLim = BufferLim;
- #else
- *inSizeProcessed = (SizeT)(Buffer - inStream);
- #endif
- *outSizeProcessed = nowPos;
- return LZMA_RESULT_OK;
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.h b/target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.h
deleted file mode 100644
index 2870eeb..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/LzmaDecode.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- LzmaDecode.h
- LZMA Decoder interface
-
- LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
- http://www.7-zip.org/
-
- LZMA SDK is licensed under two licenses:
- 1) GNU Lesser General Public License (GNU LGPL)
- 2) Common Public License (CPL)
- It means that you can select one of these two licenses and
- follow rules of that license.
-
- SPECIAL EXCEPTION:
- Igor Pavlov, as the author of this code, expressly permits you to
- statically or dynamically link your code (or bind by name) to the
- interfaces of this file without subjecting your linked code to the
- terms of the CPL or GNU LGPL. Any modifications or additions
- to this file, however, are subject to the LGPL or CPL terms.
-*/
-
-#ifndef __LZMADECODE_H
-#define __LZMADECODE_H
-
-#include "LzmaTypes.h"
-
-/* #define _LZMA_IN_CB */
-/* Use callback for input data */
-
-/* #define _LZMA_OUT_READ */
-/* Use read function for output data */
-
-/* #define _LZMA_PROB32 */
-/* It can increase speed on some 32-bit CPUs,
- but memory usage will be doubled in that case */
-
-/* #define _LZMA_LOC_OPT */
-/* Enable local speed optimizations inside code */
-
-#ifdef _LZMA_PROB32
-#define CProb UInt32
-#else
-#define CProb UInt16
-#endif
-
-#define LZMA_RESULT_OK 0
-#define LZMA_RESULT_DATA_ERROR 1
-
-#ifdef _LZMA_IN_CB
-typedef struct _ILzmaInCallback
-{
- int (*Read)(void *object, const unsigned char **buffer, SizeT *bufferSize);
-} ILzmaInCallback;
-#endif
-
-#define LZMA_BASE_SIZE 1846
-#define LZMA_LIT_SIZE 768
-
-#define LZMA_PROPERTIES_SIZE 5
-
-typedef struct _CLzmaProperties
-{
- int lc;
- int lp;
- int pb;
- #ifdef _LZMA_OUT_READ
- UInt32 DictionarySize;
- #endif
-}CLzmaProperties;
-
-int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsData, int size);
-
-#define LzmaGetNumProbs(Properties) (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((Properties)->lc + (Properties)->lp)))
-
-#define kLzmaNeedInitId (-2)
-
-typedef struct _CLzmaDecoderState
-{
- CLzmaProperties Properties;
- CProb *Probs;
-
- #ifdef _LZMA_IN_CB
- const unsigned char *Buffer;
- const unsigned char *BufferLim;
- #endif
-
- #ifdef _LZMA_OUT_READ
- unsigned char *Dictionary;
- UInt32 Range;
- UInt32 Code;
- UInt32 DictionaryPos;
- UInt32 GlobalPos;
- UInt32 DistanceLimit;
- UInt32 Reps[4];
- int State;
- int RemainLen;
- unsigned char TempDictionary[4];
- #endif
-} CLzmaDecoderState;
-
-#ifdef _LZMA_OUT_READ
-#define LzmaDecoderInit(vs) { (vs)->RemainLen = kLzmaNeedInitId; }
-#endif
-
-int LzmaDecode(CLzmaDecoderState *vs,
- #ifdef _LZMA_IN_CB
- ILzmaInCallback *inCallback,
- #else
- const unsigned char *inStream, SizeT inSize, SizeT *inSizeProcessed,
- #endif
- unsigned char *outStream, SizeT outSize, SizeT *outSizeProcessed);
-
-#endif
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/LzmaTypes.h b/target/linux/brcm63xx/image/lzma-loader/src/LzmaTypes.h
deleted file mode 100644
index 9c27290..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/LzmaTypes.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-LzmaTypes.h
-
-Types for LZMA Decoder
-
-This file written and distributed to public domain by Igor Pavlov.
-This file is part of LZMA SDK 4.40 (2006-05-01)
-*/
-
-#ifndef __LZMATYPES_H
-#define __LZMATYPES_H
-
-#ifndef _7ZIP_BYTE_DEFINED
-#define _7ZIP_BYTE_DEFINED
-typedef unsigned char Byte;
-#endif
-
-#ifndef _7ZIP_UINT16_DEFINED
-#define _7ZIP_UINT16_DEFINED
-typedef unsigned short UInt16;
-#endif
-
-#ifndef _7ZIP_UINT32_DEFINED
-#define _7ZIP_UINT32_DEFINED
-#ifdef _LZMA_UINT32_IS_ULONG
-typedef unsigned long UInt32;
-#else
-typedef unsigned int UInt32;
-#endif
-#endif
-
-/* #define _LZMA_NO_SYSTEM_SIZE_T */
-/* You can use it, if you don't want <stddef.h> */
-
-#ifndef _7ZIP_SIZET_DEFINED
-#define _7ZIP_SIZET_DEFINED
-#ifdef _LZMA_NO_SYSTEM_SIZE_T
-typedef UInt32 SizeT;
-#else
-#include <stddef.h>
-typedef size_t SizeT;
-#endif
-#endif
-
-#endif
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/Makefile b/target/linux/brcm63xx/image/lzma-loader/src/Makefile
deleted file mode 100644
index 50c22d8..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/Makefile
+++ /dev/null
@@ -1,86 +0,0 @@
-#
-# Makefile for the LZMA compressed kernel loader for
-# Atheros AR7XXX/AR9XXX based boards
-#
-# Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
-#
-# Some parts of this file was based on the OpenWrt specific lzma-loader
-# for the BCM47xx and ADM5120 based boards:
-# Copyright (C) 2004 Manuel Novoa III (mjn3@codepoet.org)
-# Copyright (C) 2005 Mineharu Takahara <mtakahar@yahoo.com>
-# Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
-#
-# 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.
-#
-
-LOADADDR :=
-LZMA_TEXT_START := 0x80a00000
-LOADER_DATA :=
-
-CC := $(CROSS_COMPILE)gcc
-LD := $(CROSS_COMPILE)ld
-OBJCOPY := $(CROSS_COMPILE)objcopy
-OBJDUMP := $(CROSS_COMPILE)objdump
-
-BIN_FLAGS := -O binary -R .reginfo -R .note -R .comment -R .mdebug -S
-
-CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
- -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 \
- -mno-abicalls -fno-pic -ffunction-sections -pipe \
- -ffreestanding -fhonour-copts \
- -mabi=32 -march=mips32 \
- -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
-CFLAGS += -D_LZMA_PROB32
-
-ASFLAGS = $(CFLAGS) -D__ASSEMBLY__
-
-LDFLAGS = -static --gc-sections -no-warn-mismatch
-LDFLAGS += -e startup -T loader.lds -Ttext $(LZMA_TEXT_START)
-
-O_FORMAT = $(shell $(OBJDUMP) -i | head -2 | grep elf32)
-
-OBJECTS := head.o loader.o cache.o board.o printf.o LzmaDecode.o
-
-ifneq ($(strip $(LOADER_DATA)),)
-OBJECTS += data.o
-CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(LOADADDR)
-endif
-
-
-all: loader.elf
-
-# Don't build dependencies, this may die if $(CC) isn't gcc
-dep:
-
-install:
-
-%.o : %.c
- $(CC) $(CFLAGS) -c -o $@ $<
-
-%.o : %.S
- $(CC) $(ASFLAGS) -c -o $@ $<
-
-data.o: $(LOADER_DATA)
- $(LD) -r -b binary --oformat $(O_FORMAT) -T lzma-data.lds -o $@ $<
-
-loader: $(OBJECTS)
- $(LD) $(LDFLAGS) -o $@ $(OBJECTS)
-
-loader.bin: loader
- $(OBJCOPY) $(BIN_FLAGS) $< $@
-
-loader2.o: loader.bin
- $(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
-
-loader.elf: loader2.o
- $(LD) -e startup -T loader2.lds -Ttext $(LOADADDR) -o $@ $<
-
-mrproper: clean
-
-clean:
- rm -f loader *.elf *.bin *.o
-
-
-
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/board.c b/target/linux/brcm63xx/image/lzma-loader/src/board.c
deleted file mode 100644
index 1c715e3..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/board.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * BCM63XX specific implementation parts
- *
- * Copyright (C) 2014 Jonas Gorski <jogo@openwrt.org>
- *
- * 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 <stddef.h>
-#include "config.h"
-#include "cp0regdef.h"
-
-#define READREG(r) *(volatile unsigned int *)(r)
-#define WRITEREG(r,v) *(volatile unsigned int *)(r) = v
-
-#define UART_IR_REG 0x10
-#define UART_FIFO_REG 0x14
-
-unsigned long uart_base;
-
-static void wait_xfered(void)
-{
- unsigned int val;
-
- do {
- val = READREG(uart_base + UART_IR_REG);
- if (val & (1 << 5))
- break;
- } while (1);
-}
-
-void board_putc(int ch)
-{
- if (!uart_base)
- return;
-
- wait_xfered();
- WRITEREG(uart_base + UART_FIFO_REG, ch);
- wait_xfered();
-}
-
-#define PRID_IMP_BMIPS32_REV4 0x4000
-#define PRID_IMP_BMIPS32_REV8 0x8000
-#define PRID_IMP_BMIPS3300 0x9000
-#define PRID_IMP_BMIPS3300_ALT 0x9100
-#define PRID_IMP_BMIPS3300_BUG 0x0000
-#define PRID_IMP_BMIPS43XX 0xa000
-
-void board_init(void)
-{
- unsigned long prid, chipid, chipid_reg;
-
- prid = read_32bit_c0_register($15, 0);
-
- switch (prid & 0xff00) {
- case PRID_IMP_BMIPS32_REV4:
- case PRID_IMP_BMIPS32_REV8:
- case PRID_IMP_BMIPS3300_ALT:
- case PRID_IMP_BMIPS3300_BUG:
- chipid_reg = 0xfffe0000;
- break;
- case PRID_IMP_BMIPS3300:
- if ((prid & 0xff) >= 0x33)
- chipid_reg = 0xb0000000;
- else
- chipid_reg = 0xfffe0000;
- break;
- case PRID_IMP_BMIPS43XX:
- if ((prid & 0xff) >= 0x30)
- chipid_reg = 0xb0000000;
- else
- chipid_reg = 0xfffe0000;
- break;
- default:
- return;
- }
-
- chipid = READREG(chipid_reg);
-
- switch (chipid >> 16) {
- case 0x6318:
- case 0x6328:
- case 0x6358:
- case 0x6362:
- case 0x6368:
- case 0x6369:
- uart_base = chipid_reg + 0x100;
- break;
- case 0x6316:
- case 0x6326:
- uart_base = chipid_reg + 0x180;
- break;
- case 0x6338:
- case 0x6345:
- case 0x6348:
- uart_base = chipid_reg + 0x300;
- break;
- default:
- return;
- }
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/cache.c b/target/linux/brcm63xx/image/lzma-loader/src/cache.c
deleted file mode 100644
index 93751c3..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/cache.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
- *
- * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
- *
- * The cache manipulation routine has been taken from the U-Boot project.
- * (C) Copyright 2003
- * Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
- *
- * 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 "cache.h"
-#include "cacheops.h"
-#include "config.h"
-#include "printf.h"
-
-#define cache_op(op,addr) \
- __asm__ __volatile__( \
- " .set push \n" \
- " .set noreorder \n" \
- " .set mips3\n\t \n" \
- " cache %0, %1 \n" \
- " .set pop \n" \
- : \
- : "i" (op), "R" (*(unsigned char *)(addr)))
-
-void flush_cache(unsigned long start_addr, unsigned long size)
-{
- unsigned long lsize = CONFIG_CACHELINE_SIZE;
- unsigned long addr = start_addr & ~(lsize - 1);
- unsigned long aend = (start_addr + size + (lsize - 1)) & ~(lsize - 1);
-
- printf("blasting from 0x%08x to 0x%08x (0x%08x - 0x%08x)\n", start_addr, size, addr, aend);
-
- while (1) {
- cache_op(Hit_Writeback_Inv_D, addr);
- cache_op(Hit_Invalidate_I, addr);
- if (addr == aend)
- break;
- addr += lsize;
- }
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/cache.h b/target/linux/brcm63xx/image/lzma-loader/src/cache.h
deleted file mode 100644
index 506a235..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/cache.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
- *
- * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
- *
- * 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 __CACHE_H
-#define __CACHE_H
-
-void flush_cache(unsigned long start_addr, unsigned long size);
-
-#endif /* __CACHE_H */
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/cacheops.h b/target/linux/brcm63xx/image/lzma-loader/src/cacheops.h
deleted file mode 100644
index 70bcad7..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/cacheops.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Cache operations for the cache instruction.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * (C) Copyright 1996, 97, 99, 2002, 03 Ralf Baechle
- * (C) Copyright 1999 Silicon Graphics, Inc.
- */
-#ifndef __ASM_CACHEOPS_H
-#define __ASM_CACHEOPS_H
-
-/*
- * Cache Operations available on all MIPS processors with R4000-style caches
- */
-#define Index_Invalidate_I 0x00
-#define Index_Writeback_Inv_D 0x01
-#define Index_Load_Tag_I 0x04
-#define Index_Load_Tag_D 0x05
-#define Index_Store_Tag_I 0x08
-#define Index_Store_Tag_D 0x09
-#if defined(CONFIG_CPU_LOONGSON2)
-#define Hit_Invalidate_I 0x00
-#else
-#define Hit_Invalidate_I 0x10
-#endif
-#define Hit_Invalidate_D 0x11
-#define Hit_Writeback_Inv_D 0x15
-
-/*
- * R4000-specific cacheops
- */
-#define Create_Dirty_Excl_D 0x0d
-#define Fill 0x14
-#define Hit_Writeback_I 0x18
-#define Hit_Writeback_D 0x19
-
-/*
- * R4000SC and R4400SC-specific cacheops
- */
-#define Index_Invalidate_SI 0x02
-#define Index_Writeback_Inv_SD 0x03
-#define Index_Load_Tag_SI 0x06
-#define Index_Load_Tag_SD 0x07
-#define Index_Store_Tag_SI 0x0A
-#define Index_Store_Tag_SD 0x0B
-#define Create_Dirty_Excl_SD 0x0f
-#define Hit_Invalidate_SI 0x12
-#define Hit_Invalidate_SD 0x13
-#define Hit_Writeback_Inv_SD 0x17
-#define Hit_Writeback_SD 0x1b
-#define Hit_Set_Virtual_SI 0x1e
-#define Hit_Set_Virtual_SD 0x1f
-
-/*
- * R5000-specific cacheops
- */
-#define R5K_Page_Invalidate_S 0x17
-
-/*
- * RM7000-specific cacheops
- */
-#define Page_Invalidate_T 0x16
-
-/*
- * R10000-specific cacheops
- *
- * Cacheops 0x02, 0x06, 0x0a, 0x0c-0x0e, 0x16, 0x1a and 0x1e are unused.
- * Most of the _S cacheops are identical to the R4000SC _SD cacheops.
- */
-#define Index_Writeback_Inv_S 0x03
-#define Index_Load_Tag_S 0x07
-#define Index_Store_Tag_S 0x0B
-#define Hit_Invalidate_S 0x13
-#define Cache_Barrier 0x14
-#define Hit_Writeback_Inv_S 0x17
-#define Index_Load_Data_I 0x18
-#define Index_Load_Data_D 0x19
-#define Index_Load_Data_S 0x1b
-#define Index_Store_Data_I 0x1c
-#define Index_Store_Data_D 0x1d
-#define Index_Store_Data_S 0x1f
-
-#endif /* __ASM_CACHEOPS_H */
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/config.h b/target/linux/brcm63xx/image/lzma-loader/src/config.h
deleted file mode 100644
index ce391f8..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
- *
- * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
- *
- * 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 _CONFIG_H_
-#define _CONFIG_H_
-
-#define CONFIG_ICACHE_SIZE (32 * 1024)
-#define CONFIG_DCACHE_SIZE (32 * 1024)
-#define CONFIG_CACHELINE_SIZE 16
-
-#ifndef CONFIG_FLASH_OFFS
-#define CONFIG_FLASH_OFFS 0
-#endif
-
-#ifndef CONFIG_FLASH_MAX
-#define CONFIG_FLASH_MAX 0
-#endif
-
-#ifndef CONFIG_FLASH_STEP
-#define CONFIG_FLASH_STEP 0x1000
-#endif
-
-#endif /* _CONFIG_H_ */
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/cp0regdef.h b/target/linux/brcm63xx/image/lzma-loader/src/cp0regdef.h
deleted file mode 100644
index 0d824f4..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/cp0regdef.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001 by Ralf Baechle
- *
- * Copyright (C) 2001, Monta Vista Software
- * Author: jsun@mvista.com or jsun@junsun.net
- */
-#ifndef _cp0regdef_h_
-#define _cp0regdef_h_
-
-#define CP0_INDEX $0
-#define CP0_RANDOM $1
-#define CP0_ENTRYLO0 $2
-#define CP0_ENTRYLO1 $3
-#define CP0_CONTEXT $4
-#define CP0_PAGEMASK $5
-#define CP0_WIRED $6
-#define CP0_BADVADDR $8
-#define CP0_COUNT $9
-#define CP0_ENTRYHI $10
-#define CP0_COMPARE $11
-#define CP0_STATUS $12
-#define CP0_CAUSE $13
-#define CP0_EPC $14
-#define CP0_PRID $15
-#define CP0_CONFIG $16
-#define CP0_LLADDR $17
-#define CP0_WATCHLO $18
-#define CP0_WATCHHI $19
-#define CP0_XCONTEXT $20
-#define CP0_FRAMEMASK $21
-#define CP0_DIAGNOSTIC $22
-#define CP0_PERFORMANCE $25
-#define CP0_ECC $26
-#define CP0_CACHEERR $27
-#define CP0_TAGLO $28
-#define CP0_TAGHI $29
-#define CP0_ERROREPC $30
-
-#define read_32bit_c0_register(reg,sel) \
-({ int __res; \
- if (sel == 0) \
- __asm__ __volatile__( \
- "mfc0\t%0, " #reg "\n\t" \
- : "=r" (__res)); \
- else \
- __asm__ __volatile__( \
- ".set\tmips32\n\t" \
- "mfc0\t%0, " #reg ", " #sel "\n\t" \
- ".set mips0\n\t" \
- : "=r" (__res)); \
- __res; \
-})
-
-#endif
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/head.S b/target/linux/brcm63xx/image/lzma-loader/src/head.S
deleted file mode 100644
index 543996a..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/head.S
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
- *
- * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
- *
- * Some parts of this code was based on the OpenWrt specific lzma-loader
- * for the BCM47xx and ADM5120 based boards:
- * Copyright (C) 2004 Manuel Novoa III (mjn3@codepoet.org)
- * Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
- *
- * 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 <asm/asm.h>
-#include <asm/regdef.h>
-#include "cp0regdef.h"
-#include "cacheops.h"
-#include "config.h"
-
-#define KSEG0 0x80000000
-
- .macro ehb
- sll zero, 3
- .endm
-
- .text
-
-LEAF(startup)
- .set noreorder
- .set mips32
-
- mtc0 zero, CP0_WATCHLO # clear watch registers
- mtc0 zero, CP0_WATCHHI
- mtc0 zero, CP0_CAUSE # clear before writing status register
-
- mfc0 t0, CP0_STATUS
- li t1, 0x1000001f
- or t0, t1
- xori t0, 0x1f
- mtc0 t0, CP0_STATUS
- ehb
-
- mtc0 zero, CP0_COUNT
- mtc0 zero, CP0_COMPARE
- ehb
-
- la t0, __reloc_label # get linked address of label
- bal __reloc_label # branch and link to label to
- nop # get actual address
-__reloc_label:
- subu t0, ra, t0 # get reloc_delta
-
- beqz t0, __reloc_done # if delta is 0 we are in the right place
- nop
-
- /* Copy our code to the right place */
- la t1, _code_start # get linked address of _code_start
- la t2, _code_end # get linked address of _code_end
- addu t0, t0, t1 # calculate actual address of _code_start
-
-__reloc_copy:
- lw t3, 0(t0)
- sw t3, 0(t1)
- add t1, 4
- blt t1, t2, __reloc_copy
- add t0, 4
-
- /* flush cache */
- la t0, _code_start
- la t1, _code_end
-
- li t2, ~(CONFIG_CACHELINE_SIZE - 1)
- and t0, t2
- and t1, t2
- li t2, CONFIG_CACHELINE_SIZE
-
- b __flush_check
- nop
-
-__flush_line:
- cache Hit_Writeback_Inv_D, 0(t0)
- cache Hit_Invalidate_I, 0(t0)
- add t0, t2
-
-__flush_check:
- bne t0, t1, __flush_line
- nop
-
- sync
-
-__reloc_done:
-
- /* clear bss */
- la t0, _bss_start
- la t1, _bss_end
- b __bss_check
- nop
-
-__bss_fill:
- sw zero, 0(t0)
- addi t0, 4
-
-__bss_check:
- bne t0, t1, __bss_fill
- nop
-
- /* Setup new "C" stack */
- la sp, _stack
-
- /* jump to the decompressor routine */
- la t0, loader_main
- jr t0
- nop
-
- .set reorder
-END(startup)
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/loader.c b/target/linux/brcm63xx/image/lzma-loader/src/loader.c
deleted file mode 100644
index 0848ce6..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/loader.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * LZMA compressed kernel loader for Atheros AR7XXX/AR9XXX based boards
- *
- * Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
- *
- * Some parts of this code was based on the OpenWrt specific lzma-loader
- * for the BCM47xx and ADM5120 based boards:
- * Copyright (C) 2004 Manuel Novoa III (mjn3@codepoet.org)
- * Copyright (C) 2005 Mineharu Takahara <mtakahar@yahoo.com>
- * Copyright (C) 2005 by Oleg I. Vdovikin <oleg@cs.msu.su>
- *
- * The image_header structure has been taken from the U-Boot project.
- * (C) Copyright 2008 Semihalf
- * (C) Copyright 2000-2005
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * 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 <stddef.h>
-#include <stdint.h>
-
-#include "config.h"
-#include "cache.h"
-#include "printf.h"
-#include "LzmaDecode.h"
-
-#define KSEG0 0x80000000
-#define KSEG1 0xa0000000
-
-#define KSEG1ADDR(a) ((((unsigned)(a)) & 0x1fffffffU) | KSEG1)
-
-#undef LZMA_DEBUG
-
-#ifdef LZMA_DEBUG
-# define DBG(f, a...) printf(f, ## a)
-#else
-# define DBG(f, a...) do {} while (0)
-#endif
-
-/* beyond the image end, size not known in advance */
-extern unsigned char workspace[];
-
-
-extern void board_init(void);
-
-static CLzmaDecoderState lzma_state;
-static unsigned char *lzma_data;
-static unsigned long lzma_datasize;
-static unsigned long lzma_outsize;
-static unsigned long kernel_la;
-
-static void halt(void)
-{
- printf("\nSystem halted!\n");
- for(;;);
-}
-
-static __inline__ unsigned char lzma_get_byte(void)
-{
- unsigned char c;
-
- lzma_datasize--;
- c = *lzma_data++;
-
- return c;
-}
-
-static int lzma_init_props(void)
-{
- unsigned char props[LZMA_PROPERTIES_SIZE];
- int res;
- int i;
-
- /* read lzma properties */
- for (i = 0; i < LZMA_PROPERTIES_SIZE; i++)
- props[i] = lzma_get_byte();
-
- /* read the lower half of uncompressed size in the header */
- lzma_outsize = ((SizeT) lzma_get_byte()) +
- ((SizeT) lzma_get_byte() << 8) +
- ((SizeT) lzma_get_byte() << 16) +
- ((SizeT) lzma_get_byte() << 24);
-
- /* skip rest of the header (upper half of uncompressed size) */
- for (i = 0; i < 4; i++)
- lzma_get_byte();
-
- res = LzmaDecodeProperties(&lzma_state.Properties, props,
- LZMA_PROPERTIES_SIZE);
- return res;
-}
-
-static int lzma_decompress(unsigned char *outStream)
-{
- SizeT ip, op;
- int ret;
-
- lzma_state.Probs = (CProb *) workspace;
-
- ret = LzmaDecode(&lzma_state, lzma_data, lzma_datasize, &ip, outStream,
- lzma_outsize, &op);
-
- if (ret != LZMA_RESULT_OK) {
- int i;
-
- DBG("LzmaDecode error %d at %08x, osize:%d ip:%d op:%d\n",
- ret, lzma_data + ip, lzma_outsize, ip, op);
-
- for (i = 0; i < 16; i++)
- DBG("%02x ", lzma_data[ip + i]);
-
- DBG("\n");
- }
-
- return ret;
-}
-
-static void lzma_init_data(void)
-{
- extern unsigned char _lzma_data_start[];
- extern unsigned char _lzma_data_end[];
-
- kernel_la = LOADADDR;
- lzma_data = _lzma_data_start;
- lzma_datasize = _lzma_data_end - _lzma_data_start;
-}
-
-void loader_main(unsigned long reg_a0, unsigned long reg_a1,
- unsigned long reg_a2, unsigned long reg_a3)
-{
- void (*kernel_entry) (unsigned long, unsigned long, unsigned long,
- unsigned long);
- int res;
-
- board_init();
-
- printf("\n\nOpenWrt kernel loader for BCM63XX\n");
- printf("Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>\n");
- printf("Copyright (C) 2014 Jonas Gorski <jogo@openwrt.org>\n");
-
- lzma_init_data();
-
- res = lzma_init_props();
- if (res != LZMA_RESULT_OK) {
- printf("Incorrect LZMA stream properties!\n");
- halt();
- }
-
- printf("Decompressing kernel... ");
-
- res = lzma_decompress((unsigned char *) kernel_la);
- if (res != LZMA_RESULT_OK) {
- printf("failed, ");
- switch (res) {
- case LZMA_RESULT_DATA_ERROR:
- printf("data error!\n");
- break;
- default:
- printf("unknown error %d!\n", res);
- }
- halt();
- } else {
- printf("done!\n");
- }
-
- flush_cache(kernel_la, lzma_outsize);
-
- printf("Starting kernel at %08x...\n\n", kernel_la);
-
- kernel_entry = (void *) kernel_la;
- kernel_entry(reg_a0, reg_a1, reg_a2, reg_a3);
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/loader.lds b/target/linux/brcm63xx/image/lzma-loader/src/loader.lds
deleted file mode 100644
index 01ff852..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/loader.lds
+++ /dev/null
@@ -1,34 +0,0 @@
-OUTPUT_ARCH(mips)
-SECTIONS {
- .text : {
- _code_start = .;
- *(.text)
- *(.text.*)
- *(.rodata)
- *(.rodata.*)
- *(.data.lzma)
- }
-
- . = ALIGN(32);
- .data : {
- *(.data)
- *(.data.*)
- }
-
- . = ALIGN(32);
- _code_end = .;
-
- _bss_start = .;
- .bss : {
- *(.bss)
- *(.bss.*)
- }
-
- . = ALIGN(32);
- _bss_end = .;
-
- . = . + 8192;
- _stack = .;
-
- workspace = .;
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/loader2.lds b/target/linux/brcm63xx/image/lzma-loader/src/loader2.lds
deleted file mode 100644
index db0bb46..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/loader2.lds
+++ /dev/null
@@ -1,10 +0,0 @@
-OUTPUT_ARCH(mips)
-SECTIONS {
- .text : {
- startup = .;
- *(.text)
- *(.text.*)
- *(.data)
- *(.data.*)
- }
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/lzma-data.lds b/target/linux/brcm63xx/image/lzma-loader/src/lzma-data.lds
deleted file mode 100644
index abf756b..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/lzma-data.lds
+++ /dev/null
@@ -1,8 +0,0 @@
-OUTPUT_ARCH(mips)
-SECTIONS {
- .data.lzma : {
- _lzma_data_start = .;
- *(.data)
- _lzma_data_end = .;
- }
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/printf.c b/target/linux/brcm63xx/image/lzma-loader/src/printf.c
deleted file mode 100644
index 7bb5a86..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/printf.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (C) 2001 MontaVista Software Inc.
- * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
- *
- * 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 "printf.h"
-
-extern void board_putc(int ch);
-
-/* this is the maximum width for a variable */
-#define LP_MAX_BUF 256
-
-/* macros */
-#define IsDigit(x) ( ((x) >= '0') && ((x) <= '9') )
-#define Ctod(x) ( (x) - '0')
-
-/* forward declaration */
-static int PrintChar(char *, char, int, int);
-static int PrintString(char *, char *, int, int);
-static int PrintNum(char *, unsigned long, int, int, int, int, char, int);
-
-/* private variable */
-static const char theFatalMsg[] = "fatal error in lp_Print!";
-
-/* -*-
- * A low level printf() function.
- */
-static void
-lp_Print(void (*output)(void *, char *, int),
- void * arg,
- char *fmt,
- va_list ap)
-{
-
-#define OUTPUT(arg, s, l) \
- { if (((l) < 0) || ((l) > LP_MAX_BUF)) { \
- (*output)(arg, (char*)theFatalMsg, sizeof(theFatalMsg)-1); for(;;); \
- } else { \
- (*output)(arg, s, l); \
- } \
- }
-
- char buf[LP_MAX_BUF];
-
- char c;
- char *s;
- long int num;
-
- int longFlag;
- int negFlag;
- int width;
- int prec;
- int ladjust;
- char padc;
-
- int length;
-
- for(;;) {
- {
- /* scan for the next '%' */
- char *fmtStart = fmt;
- while ( (*fmt != '\0') && (*fmt != '%')) {
- fmt ++;
- }
-
- /* flush the string found so far */
- OUTPUT(arg, fmtStart, fmt-fmtStart);
-
- /* are we hitting the end? */
- if (*fmt == '\0') break;
- }
-
- /* we found a '%' */
- fmt ++;
-
- /* check for long */
- if (*fmt == 'l') {
- longFlag = 1;
- fmt ++;
- } else {
- longFlag = 0;
- }
-
- /* check for other prefixes */
- width = 0;
- prec = -1;
- ladjust = 0;
- padc = ' ';
-
- if (*fmt == '-') {
- ladjust = 1;
- fmt ++;
- }
-
- if (*fmt == '0') {
- padc = '0';
- fmt++;
- }
-
- if (IsDigit(*fmt)) {
- while (IsDigit(*fmt)) {
- width = 10 * width + Ctod(*fmt++);
- }
- }
-
- if (*fmt == '.') {
- fmt ++;
- if (IsDigit(*fmt)) {
- prec = 0;
- while (IsDigit(*fmt)) {
- prec = prec*10 + Ctod(*fmt++);
- }
- }
- }
-
-
- /* check format flag */
- negFlag = 0;
- switch (*fmt) {
- case 'b':
- if (longFlag) {
- num = va_arg(ap, long int);
- } else {
- num = va_arg(ap, int);
- }
- length = PrintNum(buf, num, 2, 0, width, ladjust, padc, 0);
- OUTPUT(arg, buf, length);
- break;
-
- case 'd':
- case 'D':
- if (longFlag) {
- num = va_arg(ap, long int);
- } else {
- num = va_arg(ap, int);
- }
- if (num < 0) {
- num = - num;
- negFlag = 1;
- }
- length = PrintNum(buf, num, 10, negFlag, width, ladjust, padc, 0);
- OUTPUT(arg, buf, length);
- break;
-
- case 'o':
- case 'O':
- if (longFlag) {
- num = va_arg(ap, long int);
- } else {
- num = va_arg(ap, int);
- }
- length = PrintNum(buf, num, 8, 0, width, ladjust, padc, 0);
- OUTPUT(arg, buf, length);
- break;
-
- case 'u':
- case 'U':
- if (longFlag) {
- num = va_arg(ap, long int);
- } else {
- num = va_arg(ap, int);
- }
- length = PrintNum(buf, num, 10, 0, width, ladjust, padc, 0);
- OUTPUT(arg, buf, length);
- break;
-
- case 'x':
- if (longFlag) {
- num = va_arg(ap, long int);
- } else {
- num = va_arg(ap, int);
- }
- length = PrintNum(buf, num, 16, 0, width, ladjust, padc, 0);
- OUTPUT(arg, buf, length);
- break;
-
- case 'X':
- if (longFlag) {
- num = va_arg(ap, long int);
- } else {
- num = va_arg(ap, int);
- }
- length = PrintNum(buf, num, 16, 0, width, ladjust, padc, 1);
- OUTPUT(arg, buf, length);
- break;
-
- case 'c':
- c = (char)va_arg(ap, int);
- length = PrintChar(buf, c, width, ladjust);
- OUTPUT(arg, buf, length);
- break;
-
- case 's':
- s = (char*)va_arg(ap, char *);
- length = PrintString(buf, s, width, ladjust);
- OUTPUT(arg, buf, length);
- break;
-
- case '\0':
- fmt --;
- break;
-
- default:
- /* output this char as it is */
- OUTPUT(arg, fmt, 1);
- } /* switch (*fmt) */
-
- fmt ++;
- } /* for(;;) */
-
- /* special termination call */
- OUTPUT(arg, "\0", 1);
-}
-
-
-/* --------------- local help functions --------------------- */
-static int
-PrintChar(char * buf, char c, int length, int ladjust)
-{
- int i;
-
- if (length < 1) length = 1;
- if (ladjust) {
- *buf = c;
- for (i=1; i< length; i++) buf[i] = ' ';
- } else {
- for (i=0; i< length-1; i++) buf[i] = ' ';
- buf[length - 1] = c;
- }
- return length;
-}
-
-static int
-PrintString(char * buf, char* s, int length, int ladjust)
-{
- int i;
- int len=0;
- char* s1 = s;
- while (*s1++) len++;
- if (length < len) length = len;
-
- if (ladjust) {
- for (i=0; i< len; i++) buf[i] = s[i];
- for (i=len; i< length; i++) buf[i] = ' ';
- } else {
- for (i=0; i< length-len; i++) buf[i] = ' ';
- for (i=length-len; i < length; i++) buf[i] = s[i-length+len];
- }
- return length;
-}
-
-static int
-PrintNum(char * buf, unsigned long u, int base, int negFlag,
- int length, int ladjust, char padc, int upcase)
-{
- /* algorithm :
- * 1. prints the number from left to right in reverse form.
- * 2. fill the remaining spaces with padc if length is longer than
- * the actual length
- * TRICKY : if left adjusted, no "0" padding.
- * if negtive, insert "0" padding between "0" and number.
- * 3. if (!ladjust) we reverse the whole string including paddings
- * 4. otherwise we only reverse the actual string representing the num.
- */
-
- int actualLength =0;
- char *p = buf;
- int i;
-
- do {
- int tmp = u %base;
- if (tmp <= 9) {
- *p++ = '0' + tmp;
- } else if (upcase) {
- *p++ = 'A' + tmp - 10;
- } else {
- *p++ = 'a' + tmp - 10;
- }
- u /= base;
- } while (u != 0);
-
- if (negFlag) {
- *p++ = '-';
- }
-
- /* figure out actual length and adjust the maximum length */
- actualLength = p - buf;
- if (length < actualLength) length = actualLength;
-
- /* add padding */
- if (ladjust) {
- padc = ' ';
- }
- if (negFlag && !ladjust && (padc == '0')) {
- for (i = actualLength-1; i< length-1; i++) buf[i] = padc;
- buf[length -1] = '-';
- } else {
- for (i = actualLength; i< length; i++) buf[i] = padc;
- }
-
-
- /* prepare to reverse the string */
- {
- int begin = 0;
- int end;
- if (ladjust) {
- end = actualLength - 1;
- } else {
- end = length -1;
- }
-
- while (end > begin) {
- char tmp = buf[begin];
- buf[begin] = buf[end];
- buf[end] = tmp;
- begin ++;
- end --;
- }
- }
-
- /* adjust the string pointer */
- return length;
-}
-
-static void printf_output(void *arg, char *s, int l)
-{
- int i;
-
- // special termination call
- if ((l==1) && (s[0] == '\0')) return;
-
- for (i=0; i< l; i++) {
- board_putc(s[i]);
- if (s[i] == '\n') board_putc('\r');
- }
-}
-
-void printf(char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- lp_Print(printf_output, 0, fmt, ap);
- va_end(ap);
-}
diff --git a/target/linux/brcm63xx/image/lzma-loader/src/printf.h b/target/linux/brcm63xx/image/lzma-loader/src/printf.h
deleted file mode 100644
index 9b1c1df..0000000
--- a/target/linux/brcm63xx/image/lzma-loader/src/printf.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright (C) 2001 MontaVista Software Inc.
- * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
- *
- * 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 _printf_h_
-#define _printf_h_
-
-#include <stdarg.h>
-void printf(char *fmt, ...);
-
-#endif /* _printf_h_ */
diff --git a/target/linux/brcm63xx/modules.mk b/target/linux/brcm63xx/modules.mk
deleted file mode 100644
index 48a2bf8..0000000
--- a/target/linux/brcm63xx/modules.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Copyright (C) 2010 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define KernelPackage/pcmcia-bcm63xx
- SUBMENU:=$(PCMCIA_MENU)
- TITLE:=Broadcom BCM63xx PCMCIA support
- DEPENDS:=@TARGET_brcm63xx +kmod-pcmcia-rsrc
- KCONFIG:=CONFIG_PCMCIA_BCM63XX
- FILES:=$(LINUX_DIR)/drivers/pcmcia/bcm63xx_pcmcia.ko
- AUTOLOAD:=$(call AutoLoad,41,bcm63xx_pcmcia)
-endef
-
-define KernelPackage/pcmcia-bcm63xx/description
- Kernel support for PCMCIA/CardBus controller on the BCM63xx SoC
-endef
-
-$(eval $(call KernelPackage,pcmcia-bcm63xx))
-
-define KernelPackage/bcm63xx-udc
- SUBMENU:=$(USB_MENU)
- TITLE:=Broadcom BCM63xx UDC support
- DEPENDS:=@TARGET_brcm63xx +kmod-usb-gadget
- KCONFIG:=CONFIG_USB_BCM63XX_UDC
- FILES:=$(LINUX_DIR)/drivers/usb/gadget/bcm63xx_udc.ko
- AUTOLOAD:=$(call AutoLoad,51,bcm63xx_udc)
- $(call AddDepends/usb)
-endef
-
-define KernelPackage/bcm63xx-udc/description
- Kernel support for the USB gadget (device) controller on the BCM63xx SoC
-endef
-
-$(eval $(call KernelPackage,bcm63xx-udc))
diff --git a/target/linux/brcm63xx/patches-3.14/001-of-Create-unlocked-version-of-for_each_child_of_node.patch b/target/linux/brcm63xx/patches-3.14/001-of-Create-unlocked-version-of-for_each_child_of_node.patch
deleted file mode 100644
index 1395789..0000000
--- a/target/linux/brcm63xx/patches-3.14/001-of-Create-unlocked-version-of-for_each_child_of_node.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 0d0e02d605c5696a5076510f564fefe659127aa4 Mon Sep 17 00:00:00 2001
-From: Grant Likely <grant.likely@linaro.org>
-Date: Thu, 22 May 2014 01:04:17 +0900
-Subject: [PATCH] of: Create unlocked version of for_each_child_of_node()
-
-When iterating over nodes, sometimes it needs to be done when the DT
-lock is already held. This patch makes an unlocked version of the
-for_each_child_of_node() macro.
-
-Signed-off-by: Grant Likely <grant.likely@linaro.org>
----
- drivers/of/base.c | 22 +++++++++++++++++-----
- 1 file changed, 17 insertions(+), 5 deletions(-)
-
---- a/drivers/of/base.c
-+++ b/drivers/of/base.c
-@@ -545,6 +545,22 @@ struct device_node *of_get_next_parent(s
- }
- EXPORT_SYMBOL(of_get_next_parent);
-
-+static struct device_node *__of_get_next_child(const struct device_node *node,
-+ struct device_node *prev)
-+{
-+ struct device_node *next;
-+
-+ next = prev ? prev->sibling : node->child;
-+ for (; next; next = next->sibling)
-+ if (of_node_get(next))
-+ break;
-+ of_node_put(prev);
-+ return next;
-+}
-+#define __for_each_child_of_node(parent, child) \
-+ for (child = __of_get_next_child(parent, NULL); child != NULL; \
-+ child = __of_get_next_child(parent, child))
-+
- /**
- * of_get_next_child - Iterate a node childs
- * @node: parent node
-@@ -560,11 +576,7 @@ struct device_node *of_get_next_child(co
- unsigned long flags;
-
- raw_spin_lock_irqsave(&devtree_lock, flags);
-- next = prev ? prev->sibling : node->child;
-- for (; next; next = next->sibling)
-- if (of_node_get(next))
-- break;
-- of_node_put(prev);
-+ next = __of_get_next_child(node, prev);
- raw_spin_unlock_irqrestore(&devtree_lock, flags);
- return next;
- }
diff --git a/target/linux/brcm63xx/patches-3.14/002-lib-add-glibc-style-strchrnul-variant.patch b/target/linux/brcm63xx/patches-3.14/002-lib-add-glibc-style-strchrnul-variant.patch
deleted file mode 100644
index 33d7c9f..0000000
--- a/target/linux/brcm63xx/patches-3.14/002-lib-add-glibc-style-strchrnul-variant.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 11d200e95f3e84c1102e4cc9863a3614fd41f3ad Mon Sep 17 00:00:00 2001
-From: Grant Likely <grant.likely@linaro.org>
-Date: Fri, 14 Mar 2014 17:00:14 +0000
-Subject: [PATCH] lib: add glibc style strchrnul() variant
-
-The strchrnul() variant helpfully returns a the end of the string
-instead of a NULL if the requested character is not found. This can
-simplify string parsing code since it doesn't need to expicitly check
-for a NULL return. If a valid string pointer is passed in, then a valid
-null terminated string will always come back out.
-
-Signed-off-by: Grant Likely <grant.likely@linaro.org>
----
- include/linux/string.h | 3 +++
- lib/string.c | 18 ++++++++++++++++++
- 2 files changed, 21 insertions(+)
-
---- a/include/linux/string.h
-+++ b/include/linux/string.h
-@@ -52,6 +52,9 @@ extern int strncasecmp(const char *s1, c
- #ifndef __HAVE_ARCH_STRCHR
- extern char * strchr(const char *,int);
- #endif
-+#ifndef __HAVE_ARCH_STRCHRNUL
-+extern char * strchrnul(const char *,int);
-+#endif
- #ifndef __HAVE_ARCH_STRNCHR
- extern char * strnchr(const char *, size_t, int);
- #endif
---- a/lib/string.c
-+++ b/lib/string.c
-@@ -301,6 +301,24 @@ char *strchr(const char *s, int c)
- EXPORT_SYMBOL(strchr);
- #endif
-
-+#ifndef __HAVE_ARCH_STRCHRNUL
-+/**
-+ * strchrnul - Find and return a character in a string, or end of string
-+ * @s: The string to be searched
-+ * @c: The character to search for
-+ *
-+ * Returns pointer to first occurrence of 'c' in s. If c is not found, then
-+ * return a pointer to the null byte at the end of s.
-+ */
-+char *strchrnul(const char *s, int c)
-+{
-+ while (*s && *s != (char)c)
-+ s++;
-+ return (char *)s;
-+}
-+EXPORT_SYMBOL(strchrnul);
-+#endif
-+
- #ifndef __HAVE_ARCH_STRRCHR
- /**
- * strrchr - Find the last occurrence of a character in a string
diff --git a/target/linux/brcm63xx/patches-3.14/003-of-Make-of_find_node_by_path-handle-aliases.patch b/target/linux/brcm63xx/patches-3.14/003-of-Make-of_find_node_by_path-handle-aliases.patch
deleted file mode 100644
index 9ad0780..0000000
--- a/target/linux/brcm63xx/patches-3.14/003-of-Make-of_find_node_by_path-handle-aliases.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From c22e650e66b862babe9c00bebb20b8029c7b0362 Mon Sep 17 00:00:00 2001
-From: Grant Likely <grant.likely@linaro.org>
-Date: Fri, 14 Mar 2014 17:07:12 +0000
-Subject: [PATCH] of: Make of_find_node_by_path() handle /aliases
-
-Make of_find_node_by_path() handle aliases as prefixes. To make this
-work the name search is refactored to search by path component instead
-of by full string. This should be a more efficient search, and it makes
-it possible to start a search at a subnode of a tree.
-
-Signed-off-by: David Daney <david.daney@cavium.com>
-Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
-[grant.likely: Rework to not require allocating at runtime]
-Acked-by: Rob Herring <robh@kernel.org>
-Signed-off-by: Grant Likely <grant.likely@linaro.org>
----
- drivers/of/base.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 61 insertions(+), 6 deletions(-)
-
---- a/drivers/of/base.c
-+++ b/drivers/of/base.c
-@@ -633,23 +633,78 @@ struct device_node *of_get_child_by_name
- }
- EXPORT_SYMBOL(of_get_child_by_name);
-
-+static struct device_node *__of_find_node_by_path(struct device_node *parent,
-+ const char *path)
-+{
-+ struct device_node *child;
-+ int len = strchrnul(path, '/') - path;
-+
-+ if (!len)
-+ return NULL;
-+
-+ __for_each_child_of_node(parent, child) {
-+ const char *name = strrchr(child->full_name, '/');
-+ if (WARN(!name, "malformed device_node %s\n", child->full_name))
-+ continue;
-+ name++;
-+ if (strncmp(path, name, len) == 0 && (strlen(name) == len))
-+ return child;
-+ }
-+ return NULL;
-+}
-+
- /**
- * of_find_node_by_path - Find a node matching a full OF path
-- * @path: The full path to match
-+ * @path: Either the full path to match, or if the path does not
-+ * start with '/', the name of a property of the /aliases
-+ * node (an alias). In the case of an alias, the node
-+ * matching the alias' value will be returned.
-+ *
-+ * Valid paths:
-+ * /foo/bar Full path
-+ * foo Valid alias
-+ * foo/bar Valid alias + relative path
- *
- * Returns a node pointer with refcount incremented, use
- * of_node_put() on it when done.
- */
- struct device_node *of_find_node_by_path(const char *path)
- {
-- struct device_node *np = of_allnodes;
-+ struct device_node *np = NULL;
-+ struct property *pp;
- unsigned long flags;
-
-+ if (strcmp(path, "/") == 0)
-+ return of_node_get(of_allnodes);
-+
-+ /* The path could begin with an alias */
-+ if (*path != '/') {
-+ char *p = strchrnul(path, '/');
-+ int len = p - path;
-+
-+ /* of_aliases must not be NULL */
-+ if (!of_aliases)
-+ return NULL;
-+
-+ for_each_property_of_node(of_aliases, pp) {
-+ if (strlen(pp->name) == len && !strncmp(pp->name, path, len)) {
-+ np = of_find_node_by_path(pp->value);
-+ break;
-+ }
-+ }
-+ if (!np)
-+ return NULL;
-+ path = p;
-+ }
-+
-+ /* Step down the tree matching path components */
- raw_spin_lock_irqsave(&devtree_lock, flags);
-- for (; np; np = np->allnext) {
-- if (np->full_name && (of_node_cmp(np->full_name, path) == 0)
-- && of_node_get(np))
-- break;
-+ if (!np)
-+ np = of_node_get(of_allnodes);
-+ while (np && *path == '/') {
-+ path++; /* Increment past '/' delimiter */
-+ np = __of_find_node_by_path(np, path);
-+ path = strchrnul(path, '/');
- }
- raw_spin_unlock_irqrestore(&devtree_lock, flags);
- return np;
diff --git a/target/linux/brcm63xx/patches-3.14/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch b/target/linux/brcm63xx/patches-3.14/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch
deleted file mode 100644
index 63d385b..0000000
--- a/target/linux/brcm63xx/patches-3.14/100-MIPS-BCM63XX-add-USB-host-clock-enable-delay.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 80a2f983e9f44dbc3e01ae31c62d877846a7f791 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:19 +0100
-Subject: [PATCH 01/11] MIPS: BCM63XX: add USB host clock enable delay
-
-Knowledge of the clock setup delay should remain at the clock level (so
-it can be clock specific and CPU specific). Add the 100 milliseconds
-required clock delay for the USB host clock when it gets enabled.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/clk.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -177,6 +177,11 @@ static void usbh_set(struct clk *clk, in
- bcm_hwclock_set(CKCTL_6362_USBH_EN, enable);
- else if (BCMCPU_IS_6368())
- bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
-+ else
-+ return;
-+
-+ if (enable)
-+ msleep(100);
- }
-
- static struct clk clk_usbh = {
diff --git a/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch b/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch
deleted file mode 100644
index 031dab4..0000000
--- a/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-add-USB-device-clock-enable-delay-to-cl.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 8e9bf528a122741f0171b89c297b63041116d704 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:20 +0100
-Subject: [PATCH 02/11] MIPS: BCM63XX: add USB device clock enable delay to
- clock code
-
-This patch adds the required 10 micro seconds delay to the USB device
-clock enable operation. Put this where the correct clock knowledege is,
-which is in the clock code, and remove this delay from the bcm63xx_udc
-gadget driver where it was before.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/clk.c | 5 +++++
- drivers/usb/gadget/bcm63xx_udc.c | 1 -
- 2 files changed, 5 insertions(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -199,6 +199,11 @@ static void usbd_set(struct clk *clk, in
- bcm_hwclock_set(CKCTL_6362_USBD_EN, enable);
- else if (BCMCPU_IS_6368())
- bcm_hwclock_set(CKCTL_6368_USBD_EN, enable);
-+ else
-+ return;
-+
-+ if (enable)
-+ udelay(10);
- }
-
- static struct clk clk_usbd = {
---- a/drivers/usb/gadget/bcm63xx_udc.c
-+++ b/drivers/usb/gadget/bcm63xx_udc.c
-@@ -391,7 +391,6 @@ static inline void set_clocks(struct bcm
- if (is_enabled) {
- clk_enable(udc->usbh_clk);
- clk_enable(udc->usbd_clk);
-- udelay(10);
- } else {
- clk_disable(udc->usbd_clk);
- clk_disable(udc->usbh_clk);
diff --git a/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch b/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch
deleted file mode 100644
index f303c61..0000000
--- a/target/linux/brcm63xx/patches-3.14/101-MIPS-BCM63XX-sync-mips-counter-during-cpu-bringup.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 23c21090f49a64b532755542a71e9aa3e4fc84d9 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 5 Apr 2014 20:07:25 +0200
-Subject: [PATCH] MIPS: BCM63XX: sync mips counter during cpu bringup
-
-We are using the mips counters as the clock source, so we need to ensure
-they are synced, else e.g. gettimeofday will return different values
-depending on which core it was run.
-
-Observed difference was about 8 seconds, causing ~8 seconds ping or time
-running backwards for some programs.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -132,6 +132,7 @@ config BCM63XX
- select BOOT_RAW
- select CEVT_R4K
- select CSRC_R4K
-+ select SYNC_R4K
- select DMA_NONCOHERENT
- select IRQ_CPU
- select SYS_SUPPORTS_32BIT_KERNEL
diff --git a/target/linux/brcm63xx/patches-3.14/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch b/target/linux/brcm63xx/patches-3.14/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch
deleted file mode 100644
index f98ae5b..0000000
--- a/target/linux/brcm63xx/patches-3.14/102-MIPS-BCM63XX-move-code-touching-the-USB-private-regi.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From ac9b0b574d54be28b300bf99ffe092a2c589484f Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:21 +0100
-Subject: [PATCH 03/11] MIPS: BCM63XX: move code touching the USB private
- register
-
-This patch moves the code touching the USB private register in the
-bcm63xx USB gadget driver to arch/mips/bcm63xx/usb-common.c in
-preparation for adding support for OHCI and EHCI host controllers which
-will also touch the USB private register.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/Makefile | 2 +-
- arch/mips/bcm63xx/usb-common.c | 53 ++++++++++++++++++++
- .../include/asm/mach-bcm63xx/bcm63xx_usb_priv.h | 9 ++++
- drivers/usb/gadget/bcm63xx_udc.c | 27 ++--------
- 4 files changed, 67 insertions(+), 24 deletions(-)
- create mode 100644 arch/mips/bcm63xx/usb-common.c
- create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h
-
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -1,7 +1,7 @@
- obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
-- dev-wdt.o dev-usb-usbd.o
-+ dev-wdt.o dev-usb-usbd.o usb-common.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- /dev/null
-+++ b/arch/mips/bcm63xx/usb-common.c
-@@ -0,0 +1,53 @@
-+/*
-+ * Broadcom BCM63xx common USB device configuration code
-+ *
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2012 Kevin Cernekee <cernekee@gmail.com>
-+ * Copyright (C) 2012 Broadcom Corporation
-+ *
-+ */
-+#include <linux/export.h>
-+
-+#include <bcm63xx_cpu.h>
-+#include <bcm63xx_regs.h>
-+#include <bcm63xx_io.h>
-+#include <bcm63xx_usb_priv.h>
-+
-+void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device)
-+{
-+ u32 val;
-+
-+ val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG);
-+ if (is_device) {
-+ val |= (portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT);
-+ val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-+ } else {
-+ val &= ~(portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT);
-+ val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-+ }
-+ bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG);
-+
-+ val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
-+ if (is_device)
-+ val |= USBH_PRIV_SWAP_USBD_MASK;
-+ else
-+ val &= ~USBH_PRIV_SWAP_USBD_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_SWAP_6368_REG);
-+}
-+EXPORT_SYMBOL(bcm63xx_usb_priv_select_phy_mode);
-+
-+void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on)
-+{
-+ u32 val;
-+
-+ val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG);
-+ if (is_on)
-+ val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-+ else
-+ val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-+ bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG);
-+}
-+EXPORT_SYMBOL(bcm63xx_usb_priv_select_pullup);
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h
-@@ -0,0 +1,9 @@
-+#ifndef BCM63XX_USB_PRIV_H_
-+#define BCM63XX_USB_PRIV_H_
-+
-+#include <linux/types.h>
-+
-+void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device);
-+void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on);
-+
-+#endif /* BCM63XX_USB_PRIV_H_ */
---- a/drivers/usb/gadget/bcm63xx_udc.c
-+++ b/drivers/usb/gadget/bcm63xx_udc.c
-@@ -40,6 +40,7 @@
- #include <bcm63xx_dev_usb_usbd.h>
- #include <bcm63xx_io.h>
- #include <bcm63xx_regs.h>
-+#include <bcm63xx_usb_priv.h>
-
- #define DRV_MODULE_NAME "bcm63xx_udc"
-
-@@ -868,22 +869,7 @@ static void bcm63xx_select_phy_mode(stru
- bcm_gpio_writel(val, GPIO_PINMUX_OTHR_REG);
- }
-
-- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG);
-- if (is_device) {
-- val |= (portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT);
-- val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-- } else {
-- val &= ~(portmask << USBH_PRIV_UTMI_CTL_HOSTB_SHIFT);
-- val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-- }
-- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG);
--
-- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
-- if (is_device)
-- val |= USBH_PRIV_SWAP_USBD_MASK;
-- else
-- val &= ~USBH_PRIV_SWAP_USBD_MASK;
-- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_SWAP_6368_REG);
-+ bcm63xx_usb_priv_select_phy_mode(portmask, is_device);
- }
-
- /**
-@@ -897,14 +883,9 @@ static void bcm63xx_select_phy_mode(stru
- */
- static void bcm63xx_select_pullup(struct bcm63xx_udc *udc, bool is_on)
- {
-- u32 val, portmask = BIT(udc->pd->port_no);
-+ u32 portmask = BIT(udc->pd->port_no);
-
-- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG);
-- if (is_on)
-- val &= ~(portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-- else
-- val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
-- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG);
-+ bcm63xx_usb_priv_select_pullup(portmask, is_on);
- }
-
- /**
diff --git a/target/linux/brcm63xx/patches-3.14/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch b/target/linux/brcm63xx/patches-3.14/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch
deleted file mode 100644
index 40bbe08..0000000
--- a/target/linux/brcm63xx/patches-3.14/103-MIPS-BCM63XX-add-OHCI-EHCI-configuration-bits-to-com.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From 28758a9da77954ed323f86123ef448c6a563c037 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:22 +0100
-Subject: [PATCH 04/11] MIPS: BCM63XX: add OHCI/EHCI configuration bits to
- common USB code
-
-This patch updates the common USB code touching the USB private
-registers with the specific bits to properly enable OHCI and EHCI
-controllers on BCM63xx SoCs. As a result we now need to protect access
-to Read Modify Write sequences using a spinlock because we cannot
-guarantee that any of the exposed helper will not be called
-concurrently.
-
-Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/usb-common.c | 97 ++++++++++++++++++++
- .../include/asm/mach-bcm63xx/bcm63xx_usb_priv.h | 2 +
- 2 files changed, 99 insertions(+)
-
---- a/arch/mips/bcm63xx/usb-common.c
-+++ b/arch/mips/bcm63xx/usb-common.c
-@@ -5,10 +5,12 @@
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- *
-+ * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
- * Copyright (C) 2012 Kevin Cernekee <cernekee@gmail.com>
- * Copyright (C) 2012 Broadcom Corporation
- *
- */
-+#include <linux/spinlock.h>
- #include <linux/export.h>
-
- #include <bcm63xx_cpu.h>
-@@ -16,9 +18,14 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_usb_priv.h>
-
-+static DEFINE_SPINLOCK(usb_priv_reg_lock);
-+
- void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device)
- {
- u32 val;
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&usb_priv_reg_lock, flags);
-
- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG);
- if (is_device) {
-@@ -36,12 +43,17 @@ void bcm63xx_usb_priv_select_phy_mode(u3
- else
- val &= ~USBH_PRIV_SWAP_USBD_MASK;
- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_SWAP_6368_REG);
-+
-+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags);
- }
- EXPORT_SYMBOL(bcm63xx_usb_priv_select_phy_mode);
-
- void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on)
- {
- u32 val;
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&usb_priv_reg_lock, flags);
-
- val = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_UTMI_CTL_6368_REG);
- if (is_on)
-@@ -49,5 +61,90 @@ void bcm63xx_usb_priv_select_pullup(u32
- else
- val |= (portmask << USBH_PRIV_UTMI_CTL_NODRIV_SHIFT);
- bcm_rset_writel(RSET_USBH_PRIV, val, USBH_PRIV_UTMI_CTL_6368_REG);
-+
-+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags);
- }
- EXPORT_SYMBOL(bcm63xx_usb_priv_select_pullup);
-+
-+/* The following array represents the meaning of the DESC/DATA
-+ * endian swapping with respect to the CPU configured endianness
-+ *
-+ * DATA ENDN mmio descriptor
-+ * 0 0 BE invalid
-+ * 0 1 BE LE
-+ * 1 0 BE BE
-+ * 1 1 BE invalid
-+ *
-+ * Since BCM63XX SoCs are configured to be in big-endian mode
-+ * we want configuration at line 3.
-+ */
-+void bcm63xx_usb_priv_ohci_cfg_set(void)
-+{
-+ u32 reg;
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&usb_priv_reg_lock, flags);
-+
-+ if (BCMCPU_IS_6348())
-+ bcm_rset_writel(RSET_OHCI_PRIV, 0, OHCI_PRIV_REG);
-+ else if (BCMCPU_IS_6358()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6358_REG);
-+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6358_REG);
-+ /*
-+ * The magic value comes for the original vendor BSP
-+ * and is needed for USB to work. Datasheet does not
-+ * help, so the magic value is used as-is.
-+ */
-+ bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020,
-+ USBH_PRIV_TEST_6358_REG);
-+
-+ } else if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
-+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
-+ reg |= USBH_PRIV_SETUP_IOC_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+ }
-+
-+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags);
-+}
-+
-+void bcm63xx_usb_priv_ehci_cfg_set(void)
-+{
-+ u32 reg;
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&usb_priv_reg_lock, flags);
-+
-+ if (BCMCPU_IS_6358()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6358_REG);
-+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6358_REG);
-+
-+ /*
-+ * The magic value comes for the original vendor BSP
-+ * and is needed for USB to work. Datasheet does not
-+ * help, so the magic value is used as-is.
-+ */
-+ bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020,
-+ USBH_PRIV_TEST_6358_REG);
-+
-+ } else if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
-+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
-+ reg |= USBH_PRIV_SETUP_IOC_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+ }
-+
-+ spin_unlock_irqrestore(&usb_priv_reg_lock, flags);
-+}
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_usb_priv.h
-@@ -5,5 +5,7 @@
-
- void bcm63xx_usb_priv_select_phy_mode(u32 portmask, bool is_device);
- void bcm63xx_usb_priv_select_pullup(u32 portmask, bool is_on);
-+void bcm63xx_usb_priv_ohci_cfg_set(void);
-+void bcm63xx_usb_priv_ehci_cfg_set(void);
-
- #endif /* BCM63XX_USB_PRIV_H_ */
diff --git a/target/linux/brcm63xx/patches-3.14/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch b/target/linux/brcm63xx/patches-3.14/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch
deleted file mode 100644
index 768dcca..0000000
--- a/target/linux/brcm63xx/patches-3.14/104-MIPS-BCM63XX-introduce-BCM63XX_OHCI-configuration-sy.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 94ec618bd1a6b07fafbbfc9bcc54e7f9360ff9a0 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:23 +0100
-Subject: [PATCH 05/11] MIPS: BCM63XX: introduce BCM63XX_OHCI configuration
- symbol
-
-This configuration symbol can be used by CPUs supporting the on-chip
-OHCI controller, and ensures that all relevant OHCI-related
-configuration options are correctly selected. So far, OHCI support is
-available for the 6328, 6348, 6358 and 6358 SoCs.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/Kconfig | 15 ++++++++++-----
- 1 file changed, 10 insertions(+), 5 deletions(-)
-
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -6,10 +6,17 @@ config BCM63XX_CPU_3368
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
-
-+config BCM63XX_OHCI
-+ bool
-+ select USB_ARCH_HAS_OHCI
-+ select USB_OHCI_BIG_ENDIAN_DESC if USB_OHCI_HCD
-+ select USB_OHCI_BIG_ENDIAN_MMIO if USB_OHCI_HCD
-+
- config BCM63XX_CPU_6328
- bool "support 6328 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
-+ select BCM63XX_OHCI
-
- config BCM63XX_CPU_6338
- bool "support 6338 CPU"
-@@ -24,21 +31,25 @@ config BCM63XX_CPU_6348
- bool "support 6348 CPU"
- select SYS_HAS_CPU_BMIPS32_3300
- select HW_HAS_PCI
-+ select BCM63XX_OHCI
-
- config BCM63XX_CPU_6358
- bool "support 6358 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
-+ select BCM63XX_OHCI
-
- config BCM63XX_CPU_6362
- bool "support 6362 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
-+ select BCM63XX_OHCI
-
- config BCM63XX_CPU_6368
- bool "support 6368 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
-+ select BCM63XX_OHCI
- endmenu
-
- source "arch/mips/bcm63xx/boards/Kconfig"
diff --git a/target/linux/brcm63xx/patches-3.14/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch b/target/linux/brcm63xx/patches-3.14/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch
deleted file mode 100644
index 111d481..0000000
--- a/target/linux/brcm63xx/patches-3.14/105-MIPS-BCM63XX-add-support-for-the-on-chip-OHCI-contro.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 30d22baef255c99a12c4858ce4ab0d45f0d8c9ae Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:24 +0100
-Subject: [PATCH 06/11] MIPS: BCM63XX: add support for the on-chip OHCI
- controller
-
-Broadcom BCM63XX SoCs include an on-chip OHCI controller which can be
-driven by the ohci-platform generic driver by using specific power
-on/off/suspend callback to manage clocks and hardware specific
-configuration.
-
-Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/Makefile | 2 +-
- arch/mips/bcm63xx/dev-usb-ohci.c | 94 ++++++++++++++++++++
- .../asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h | 6 ++
- 3 files changed, 101 insertions(+), 1 deletion(-)
- create mode 100644 arch/mips/bcm63xx/dev-usb-ohci.c
- create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h
-
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -1,7 +1,7 @@
- obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
-- dev-wdt.o dev-usb-usbd.o usb-common.o
-+ dev-wdt.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- /dev/null
-+++ b/arch/mips/bcm63xx/dev-usb-ohci.c
-@@ -0,0 +1,94 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
-+ * Copyright (C) 2013 Florian Fainelli <florian@openwrt.org>
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/platform_device.h>
-+#include <linux/usb/ohci_pdriver.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/clk.h>
-+#include <linux/delay.h>
-+
-+#include <bcm63xx_cpu.h>
-+#include <bcm63xx_regs.h>
-+#include <bcm63xx_io.h>
-+#include <bcm63xx_usb_priv.h>
-+#include <bcm63xx_dev_usb_ohci.h>
-+
-+static struct resource ohci_resources[] = {
-+ {
-+ .start = -1, /* filled at runtime */
-+ .end = -1, /* filled at runtime */
-+ .flags = IORESOURCE_MEM,
-+ },
-+ {
-+ .start = -1, /* filled at runtime */
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static u64 ohci_dmamask = DMA_BIT_MASK(32);
-+
-+static struct clk *usb_host_clock;
-+
-+static int bcm63xx_ohci_power_on(struct platform_device *pdev)
-+{
-+ usb_host_clock = clk_get(&pdev->dev, "usbh");
-+ if (IS_ERR_OR_NULL(usb_host_clock))
-+ return -ENODEV;
-+
-+ clk_prepare_enable(usb_host_clock);
-+
-+ bcm63xx_usb_priv_ohci_cfg_set();
-+
-+ return 0;
-+}
-+
-+static void bcm63xx_ohci_power_off(struct platform_device *pdev)
-+{
-+ if (!IS_ERR_OR_NULL(usb_host_clock)) {
-+ clk_disable_unprepare(usb_host_clock);
-+ clk_put(usb_host_clock);
-+ }
-+}
-+
-+static struct usb_ohci_pdata bcm63xx_ohci_pdata = {
-+ .big_endian_desc = 1,
-+ .big_endian_mmio = 1,
-+ .no_big_frame_no = 1,
-+ .num_ports = 1,
-+ .power_on = bcm63xx_ohci_power_on,
-+ .power_off = bcm63xx_ohci_power_off,
-+ .power_suspend = bcm63xx_ohci_power_off,
-+};
-+
-+static struct platform_device bcm63xx_ohci_device = {
-+ .name = "ohci-platform",
-+ .id = -1,
-+ .num_resources = ARRAY_SIZE(ohci_resources),
-+ .resource = ohci_resources,
-+ .dev = {
-+ .platform_data = &bcm63xx_ohci_pdata,
-+ .dma_mask = &ohci_dmamask,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ },
-+};
-+
-+int __init bcm63xx_ohci_register(void)
-+{
-+ if (BCMCPU_IS_6345() || BCMCPU_IS_6338())
-+ return -ENODEV;
-+
-+ ohci_resources[0].start = bcm63xx_regset_address(RSET_OHCI0);
-+ ohci_resources[0].end = ohci_resources[0].start;
-+ ohci_resources[0].end += RSET_OHCI_SIZE - 1;
-+ ohci_resources[1].start = bcm63xx_get_irq_number(IRQ_OHCI0);
-+
-+ return platform_device_register(&bcm63xx_ohci_device);
-+}
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h
-@@ -0,0 +1,6 @@
-+#ifndef BCM63XX_DEV_USB_OHCI_H_
-+#define BCM63XX_DEV_USB_OHCI_H_
-+
-+int bcm63xx_ohci_register(void);
-+
-+#endif /* BCM63XX_DEV_USB_OHCI_H_ */
diff --git a/target/linux/brcm63xx/patches-3.14/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch b/target/linux/brcm63xx/patches-3.14/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch
deleted file mode 100644
index 2c26482..0000000
--- a/target/linux/brcm63xx/patches-3.14/106-MIPS-BCM63XX-register-OHCI-controller-if-board-enabl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 33ef960aed15f9a98a2c51d8d794cd72418e0be4 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:25 +0100
-Subject: [PATCH 07/11] MIPS: BCM63XX: register OHCI controller if board
- enables it
-
-BCM63XX-based boards can control the registration of the OHCI controller
-by setting their has_ohci0 flag to 1. Handle this in the generic
-code dealing with board registration and call the actual helper to
-register the OHCI controller.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -26,6 +26,7 @@
- #include <bcm63xx_dev_hsspi.h>
- #include <bcm63xx_dev_pcmcia.h>
- #include <bcm63xx_dev_spi.h>
-+#include <bcm63xx_dev_usb_ohci.h>
- #include <bcm63xx_dev_usb_usbd.h>
- #include <board_bcm963xx.h>
-
-@@ -898,6 +899,9 @@ int __init board_register_devices(void)
- if (board.has_usbd)
- bcm63xx_usbd_register(&board.usbd);
-
-+ if (board.has_ohci0)
-+ bcm63xx_ohci_register();
-+
- if (board.has_dsp)
- bcm63xx_dsp_register(&board.dsp);
-
diff --git a/target/linux/brcm63xx/patches-3.14/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch b/target/linux/brcm63xx/patches-3.14/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch
deleted file mode 100644
index bce91e3..0000000
--- a/target/linux/brcm63xx/patches-3.14/107-MIPS-BCM63XX-introduce-BCM63XX_EHCI-configuration-sy.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 00da1683364e58c6430a4577123d01037f8faddc Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:26 +0100
-Subject: [PATCH 08/11] MIPS: BCM63XX: introduce BCM63XX_EHCI configuration
- symbol
-
-This configuration symbol can be used by CPUs supporting the on-chip
-EHCI controller, and ensures that all relevant EHCI-related
-configuration options are selected. So far BCM6328, BCM6358 and BCM6368
-have an EHCI controller and do select this symbol. Update
-drivers/usb/host/Kconfig with BCM63XX to update direct unmet
-dependencies.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/Kconfig | 9 +++++++++
- drivers/usb/host/Kconfig | 5 +++--
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -12,11 +12,18 @@ config BCM63XX_OHCI
- select USB_OHCI_BIG_ENDIAN_DESC if USB_OHCI_HCD
- select USB_OHCI_BIG_ENDIAN_MMIO if USB_OHCI_HCD
-
-+config BCM63XX_EHCI
-+ bool
-+ select USB_ARCH_HAS_EHCI
-+ select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD
-+ select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD
-+
- config BCM63XX_CPU_6328
- bool "support 6328 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
- select BCM63XX_OHCI
-+ select BCM63XX_EHCI
-
- config BCM63XX_CPU_6338
- bool "support 6338 CPU"
-@@ -38,18 +45,21 @@ config BCM63XX_CPU_6358
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
- select BCM63XX_OHCI
-+ select BCM63XX_EHCI
-
- config BCM63XX_CPU_6362
- bool "support 6362 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
- select BCM63XX_OHCI
-+ select BCM63XX_EHCI
-
- config BCM63XX_CPU_6368
- bool "support 6368 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
- select BCM63XX_OHCI
-+ select BCM63XX_EHCI
- endmenu
-
- source "arch/mips/bcm63xx/boards/Kconfig"
diff --git a/target/linux/brcm63xx/patches-3.14/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch b/target/linux/brcm63xx/patches-3.14/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch
deleted file mode 100644
index 8b1f8d2..0000000
--- a/target/linux/brcm63xx/patches-3.14/108-MIPS-BCM63XX-add-support-for-the-on-chip-EHCI-contro.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From e38f13bd6408769c0b565bb1079024f496eee121 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:27 +0100
-Subject: [PATCH 09/11] MIPS: BCM63XX: add support for the on-chip EHCI
- controller
-
-Broadcom BCM63XX SoCs include an on-chip EHCI controller which can be
-driven by the generic ehci-platform driver by using specific power
-on/off/suspend callbacks to manage clocks and hardware specific
-configuration.
-
-Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/Makefile | 2 +-
- arch/mips/bcm63xx/dev-usb-ehci.c | 92 ++++++++++++++++++++
- .../asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h | 6 ++
- 3 files changed, 99 insertions(+), 1 deletion(-)
- create mode 100644 arch/mips/bcm63xx/dev-usb-ehci.c
- create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h
-
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -1,7 +1,8 @@
- obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
-- dev-wdt.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o
-+ dev-wdt.o dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o \
-+ usb-common.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- /dev/null
-+++ b/arch/mips/bcm63xx/dev-usb-ehci.c
-@@ -0,0 +1,92 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
-+ * Copyright (C) 2013 Florian Fainelli <florian@openwrt.org>
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/platform_device.h>
-+#include <linux/clk.h>
-+#include <linux/delay.h>
-+#include <linux/usb/ehci_pdriver.h>
-+#include <linux/dma-mapping.h>
-+
-+#include <bcm63xx_cpu.h>
-+#include <bcm63xx_regs.h>
-+#include <bcm63xx_io.h>
-+#include <bcm63xx_usb_priv.h>
-+#include <bcm63xx_dev_usb_ehci.h>
-+
-+static struct resource ehci_resources[] = {
-+ {
-+ .start = -1, /* filled at runtime */
-+ .end = -1, /* filled at runtime */
-+ .flags = IORESOURCE_MEM,
-+ },
-+ {
-+ .start = -1, /* filled at runtime */
-+ .flags = IORESOURCE_IRQ,
-+ },
-+};
-+
-+static u64 ehci_dmamask = DMA_BIT_MASK(32);
-+
-+static struct clk *usb_host_clock;
-+
-+static int bcm63xx_ehci_power_on(struct platform_device *pdev)
-+{
-+ usb_host_clock = clk_get(&pdev->dev, "usbh");
-+ if (IS_ERR_OR_NULL(usb_host_clock))
-+ return -ENODEV;
-+
-+ clk_prepare_enable(usb_host_clock);
-+
-+ bcm63xx_usb_priv_ehci_cfg_set();
-+
-+ return 0;
-+}
-+
-+static void bcm63xx_ehci_power_off(struct platform_device *pdev)
-+{
-+ if (!IS_ERR_OR_NULL(usb_host_clock)) {
-+ clk_disable_unprepare(usb_host_clock);
-+ clk_put(usb_host_clock);
-+ }
-+}
-+
-+static struct usb_ehci_pdata bcm63xx_ehci_pdata = {
-+ .big_endian_desc = 1,
-+ .big_endian_mmio = 1,
-+ .power_on = bcm63xx_ehci_power_on,
-+ .power_off = bcm63xx_ehci_power_off,
-+ .power_suspend = bcm63xx_ehci_power_off,
-+};
-+
-+static struct platform_device bcm63xx_ehci_device = {
-+ .name = "ehci-platform",
-+ .id = -1,
-+ .num_resources = ARRAY_SIZE(ehci_resources),
-+ .resource = ehci_resources,
-+ .dev = {
-+ .platform_data = &bcm63xx_ehci_pdata,
-+ .dma_mask = &ehci_dmamask,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ },
-+};
-+
-+int __init bcm63xx_ehci_register(void)
-+{
-+ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6358() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368())
-+ return 0;
-+
-+ ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0);
-+ ehci_resources[0].end = ehci_resources[0].start;
-+ ehci_resources[0].end += RSET_EHCI_SIZE - 1;
-+ ehci_resources[1].start = bcm63xx_get_irq_number(IRQ_EHCI0);
-+
-+ return platform_device_register(&bcm63xx_ehci_device);
-+}
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h
-@@ -0,0 +1,6 @@
-+#ifndef BCM63XX_DEV_USB_EHCI_H_
-+#define BCM63XX_DEV_USB_EHCI_H_
-+
-+int bcm63xx_ehci_register(void);
-+
-+#endif /* BCM63XX_DEV_USB_EHCI_H_ */
diff --git a/target/linux/brcm63xx/patches-3.14/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch b/target/linux/brcm63xx/patches-3.14/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch
deleted file mode 100644
index 641a57c..0000000
--- a/target/linux/brcm63xx/patches-3.14/109-MIPS-BCM63XX-register-EHCI-controller-if-board-enabl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 709ef2034f5ba06da35f89856ad7baf2b7a41287 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:28 +0100
-Subject: [PATCH 10/11] MIPS: BCM63XX: register EHCI controller if board
- enables it
-
-BCM63XX-based board can control the registration of the EHCI controller
-by setting their has_ehci0 flag to 1. Handle this in the generic
-code dealing with board registration and call the actual helper to register
-the EHCI controller.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -26,6 +26,7 @@
- #include <bcm63xx_dev_hsspi.h>
- #include <bcm63xx_dev_pcmcia.h>
- #include <bcm63xx_dev_spi.h>
-+#include <bcm63xx_dev_usb_ehci.h>
- #include <bcm63xx_dev_usb_ohci.h>
- #include <bcm63xx_dev_usb_usbd.h>
- #include <board_bcm963xx.h>
-@@ -899,6 +900,9 @@ int __init board_register_devices(void)
- if (board.has_usbd)
- bcm63xx_usbd_register(&board.usbd);
-
-+ if (board.has_ehci0)
-+ bcm63xx_ehci_register();
-+
- if (board.has_ohci0)
- bcm63xx_ohci_register();
-
diff --git a/target/linux/brcm63xx/patches-3.14/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch b/target/linux/brcm63xx/patches-3.14/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch
deleted file mode 100644
index 6d91129..0000000
--- a/target/linux/brcm63xx/patches-3.14/110-MIPS-BCM63XX-EHCI-controller-does-not-support-overcu.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 111bbd770441ab34f9da5bb1d85767a9b75227b4 Mon Sep 17 00:00:00 2001
-From: Florian Fainelli <florian@openwrt.org>
-Date: Mon, 28 Jan 2013 20:06:30 +0100
-Subject: [PATCH 12/12] MIPS: BCM63XX: EHCI controller does not support
- overcurrent
-
-This patch sets the ignore_oc flag for the BCM63XX EHCI controller as it
-does not support proper overcurrent reporting.
-
-Signed-off-by: Florian Fainelli <florian@openwrt.org>
----
- arch/mips/bcm63xx/dev-usb-ehci.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/mips/bcm63xx/dev-usb-ehci.c
-+++ b/arch/mips/bcm63xx/dev-usb-ehci.c
-@@ -61,6 +61,7 @@ static void bcm63xx_ehci_power_off(struc
- static struct usb_ehci_pdata bcm63xx_ehci_pdata = {
- .big_endian_desc = 1,
- .big_endian_mmio = 1,
-+ .ignore_oc = 1,
- .power_on = bcm63xx_ehci_power_on,
- .power_off = bcm63xx_ehci_power_off,
- .power_suspend = bcm63xx_ehci_power_off,
diff --git a/target/linux/brcm63xx/patches-3.14/201-SPI-Allow-specifying-the-parsers-for-SPI-flash.patch b/target/linux/brcm63xx/patches-3.14/201-SPI-Allow-specifying-the-parsers-for-SPI-flash.patch
deleted file mode 100644
index 00dc9c9..0000000
--- a/target/linux/brcm63xx/patches-3.14/201-SPI-Allow-specifying-the-parsers-for-SPI-flash.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 3f650fc30aa0badf9d02842ce396cea3eef2eeaa Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Fri, 1 Jul 2011 23:16:47 +0200
-Subject: [PATCH 49/79] SPI: Allow specifying the parsers for SPI flash
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- include/linux/spi/flash.h | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/include/linux/spi/flash.h
-+++ b/include/linux/spi/flash.h
-@@ -2,7 +2,7 @@
- #define LINUX_SPI_FLASH_H
-
- struct mtd_partition;
--
-+struct mtd_part_parser_data;
- /**
- * struct flash_platform_data: board-specific flash data
- * @name: optional flash device name (eg, as used with mtdparts=)
-@@ -10,6 +10,8 @@ struct mtd_partition;
- * @nr_parts: number of mtd_partitions for static partitoning
- * @type: optional flash device type (e.g. m25p80 vs m25p64), for use
- * with chips that can't be queried for JEDEC or other IDs
-+ * @part_probe_types: optional list of MTD parser names to use for
-+ * partitioning
- *
- * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
- * provide information about SPI flash parts (such as DataFlash) to
-@@ -25,6 +27,7 @@ struct flash_platform_data {
-
- char *type;
-
-+ const char **part_probe_types;
- /* we'll likely add more ... use JEDEC IDs, etc */
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/202-MTD-DEVICES-m25p80-use-parsers-if-provided-in-flash-.patch b/target/linux/brcm63xx/patches-3.14/202-MTD-DEVICES-m25p80-use-parsers-if-provided-in-flash-.patch
deleted file mode 100644
index 7414a3b..0000000
--- a/target/linux/brcm63xx/patches-3.14/202-MTD-DEVICES-m25p80-use-parsers-if-provided-in-flash-.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From c7c3c338cb25d7f55ddb3f6bfbf3572758ca3896 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Thu, 10 Nov 2011 16:53:08 +0100
-Subject: [PATCH 50/79] MTD: DEVICES: m25p80: use parsers if provided in flash
- platform data
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- drivers/mtd/devices/m25p80.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -1314,7 +1314,8 @@ static int m25p_probe(struct spi_device
- /* partitions should match sector boundaries; and it may be good to
- * use readonly partitions for writeprotected sectors (BP2..BP0).
- */
-- return mtd_device_parse_register(&flash->mtd, NULL, &ppdata,
-+ return mtd_device_parse_register(&flash->mtd,
-+ data ? data->part_probe_types : NULL, &ppdata,
- data ? data->parts : NULL,
- data ? data->nr_parts : 0);
- }
diff --git a/target/linux/brcm63xx/patches-3.14/203-MTD-DEVICES-m25p80-add-support-for-limiting-reads.patch b/target/linux/brcm63xx/patches-3.14/203-MTD-DEVICES-m25p80-add-support-for-limiting-reads.patch
deleted file mode 100644
index e5676dc..0000000
--- a/target/linux/brcm63xx/patches-3.14/203-MTD-DEVICES-m25p80-add-support-for-limiting-reads.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 5fb4e8d7287ac8fcb33aae8b1e9e22c5a3c392bd Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Thu, 10 Nov 2011 17:33:40 +0100
-Subject: [PATCH 51/79] MTD: DEVICES: m25p80: add support for limiting reads
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- drivers/mtd/devices/m25p80.c | 29 +++++++++++++++++++++++++++--
- include/linux/spi/flash.h | 4 ++++
- 2 files changed, 31 insertions(+), 2 deletions(-)
-
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -115,6 +115,7 @@ struct m25p {
- u8 program_opcode;
- u8 *command;
- enum read_type flash_read;
-+ int max_transfer_len;
- };
-
- static inline struct m25p *mtd_to_m25p(struct mtd_info *mtd)
-@@ -509,10 +510,9 @@ static inline unsigned int m25p80_rx_nbi
- * Read an address range from the flash chip. The address range
- * may be any size provided it is within the physical boundaries.
- */
--static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
-+static int __m25p80_read(struct m25p *flash, loff_t from, size_t len,
- size_t *retlen, u_char *buf)
- {
-- struct m25p *flash = mtd_to_m25p(mtd);
- struct spi_transfer t[2];
- struct spi_message m;
- uint8_t opcode;
-@@ -562,6 +562,28 @@ static int m25p80_read(struct mtd_info *
- return 0;
- }
-
-+static int m25p80_read(struct mtd_info *mtd, loff_t from, size_t len,
-+ size_t *retlen, u_char *buf)
-+{
-+ struct m25p *flash = mtd_to_m25p(mtd);
-+ size_t off;
-+ size_t read_len = flash->max_transfer_len;
-+ size_t part_len;
-+ int ret = 0;
-+
-+ if (!read_len)
-+ return __m25p80_read(flash, from, len, retlen, buf);
-+
-+ *retlen = 0;
-+
-+ for (off = 0; off < len && !ret; off += read_len) {
-+ ret = __m25p80_read(flash, from + off, min(len - off, read_len),
-+ &part_len, buf + off);
-+ *retlen += part_len;
-+ }
-+
-+ return ret;
-+}
- /*
- * Write an address range to the flash chip. Data must be written in
- * FLASH_PAGESIZE chunks. The address range may be any size provided
-@@ -1159,6 +1181,9 @@ static int m25p_probe(struct spi_device
- if (!flash->command)
- return -ENOMEM;
-
-+ if (data)
-+ flash->max_transfer_len = data->max_transfer_len;
-+
- flash->spi = spi;
- mutex_init(&flash->lock);
- spi_set_drvdata(spi, flash);
---- a/include/linux/spi/flash.h
-+++ b/include/linux/spi/flash.h
-@@ -13,6 +13,8 @@ struct mtd_part_parser_data;
- * @part_probe_types: optional list of MTD parser names to use for
- * partitioning
- *
-+ * @max_transfer_len: option maximum read/write length limitation for
-+ * SPI controllers not able to transfer any length commands.
- * Board init code (in arch/.../mach-xxx/board-yyy.c files) can
- * provide information about SPI flash parts (such as DataFlash) to
- * help set up the device and its appropriate default partitioning.
-@@ -28,6 +30,8 @@ struct flash_platform_data {
- char *type;
-
- const char **part_probe_types;
-+
-+ unsigned int max_transfer_len;
- /* we'll likely add more ... use JEDEC IDs, etc */
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/204-USB-OHCI-allow-other-arches-to-use-the-BE-frame-numb.patch b/target/linux/brcm63xx/patches-3.14/204-USB-OHCI-allow-other-arches-to-use-the-BE-frame-numb.patch
deleted file mode 100644
index 6e9e6df..0000000
--- a/target/linux/brcm63xx/patches-3.14/204-USB-OHCI-allow-other-arches-to-use-the-BE-frame-numb.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b2f399dcd674a692a64bb3b300b77b78ae57b530 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 12 Jan 2014 16:47:35 +0100
-Subject: [PATCH] USB: OHCI: allow other arches to use the BE frame number
- quirk
-
-Intead of guarding it with a certain PPC SoC and expanding the list
-for each SoC requiring it, just guard it with USB_OHCI_BIG_ENDIAN_DESC.
-
-This makes it less suprising that passing no_big_frame_no = 1 for the
-platform data does not do what expected (or
-
-Checking it for all big endian descriptor setups should not impact
-performance much as USB1.1 is rather slow anyway.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- drivers/usb/host/ohci.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/usb/host/ohci.h
-+++ b/drivers/usb/host/ohci.h
-@@ -641,7 +641,7 @@ static inline u32 hc32_to_cpup (const st
- * some big-endian SOC implementations. Same thing happens with PSW access.
- */
-
--#ifdef CONFIG_PPC_MPC52xx
-+#ifdef CONFIG_USB_OHCI_BIG_ENDIAN_DESC
- #define big_endian_frame_no_quirk(ohci) (ohci->flags & OHCI_QUIRK_FRAME_NO)
- #else
- #define big_endian_frame_no_quirk(ohci) 0
diff --git a/target/linux/brcm63xx/patches-3.14/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch b/target/linux/brcm63xx/patches-3.14/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch
deleted file mode 100644
index 474171f..0000000
--- a/target/linux/brcm63xx/patches-3.14/206-USB-EHCI-allow-limiting-ports-for-ehci-platform.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 6ac09efa8f0e189ffe7dd7b0889289de56ee44cc Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 19 Jan 2014 12:18:03 +0100
-Subject: [PATCH] USB: EHCI: allow limiting ports for ehci-platform
-
-In the same way as the ohci platform driver allows limiting ports,
-enable the same for ehci. This prevents a mismatch in the available
-ports between ehci/ohci on USB 2.0 controllers.
-
-This is needed if the USB host controller always reports the maximum
-number of ports regardless of the number of available ports (because
-one might be set to be usb device).
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- drivers/usb/host/ehci-hcd.c | 4 ++++
- drivers/usb/host/ehci-platform.c | 2 ++
- drivers/usb/host/ehci.h | 1 +
- include/linux/usb/ehci_pdriver.h | 1 +
- 4 files changed, 8 insertions(+)
-
---- a/drivers/usb/host/ehci-hcd.c
-+++ b/drivers/usb/host/ehci-hcd.c
-@@ -660,6 +660,10 @@ int ehci_setup(struct usb_hcd *hcd)
-
- /* cache this readonly data; minimize chip reads */
- ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params);
-+ if (ehci->num_ports) {
-+ ehci->hcs_params &= ~0xf; /* bits 3:0, ports on HC */
-+ ehci->hcs_params |= ehci->num_ports;
-+ }
-
- ehci->sbrn = HCD_USB2;
-
---- a/drivers/usb/host/ehci-platform.c
-+++ b/drivers/usb/host/ehci-platform.c
-@@ -48,6 +48,8 @@ static int ehci_platform_reset(struct us
- ehci->big_endian_desc = pdata->big_endian_desc;
- ehci->big_endian_mmio = pdata->big_endian_mmio;
- ehci->ignore_oc = pdata->ignore_oc;
-+ if (pdata->num_ports && pdata->num_ports <= 15)
-+ ehci->num_ports = pdata->num_ports;
-
- if (pdata->pre_setup) {
- retval = pdata->pre_setup(hcd);
---- a/drivers/usb/host/ehci.h
-+++ b/drivers/usb/host/ehci.h
-@@ -213,6 +213,7 @@ struct ehci_hcd { /* one per controlle
- u32 command;
-
- /* SILICON QUIRKS */
-+ unsigned int num_ports;
- unsigned no_selective_suspend:1;
- unsigned has_fsl_port_bug:1; /* FreeScale */
- unsigned big_endian_mmio:1;
---- a/include/linux/usb/ehci_pdriver.h
-+++ b/include/linux/usb/ehci_pdriver.h
-@@ -40,6 +40,7 @@ struct usb_hcd;
- */
- struct usb_ehci_pdata {
- int caps_offset;
-+ unsigned int num_ports;
- unsigned has_tt:1;
- unsigned has_synopsys_hc_bug:1;
- unsigned big_endian_desc:1;
diff --git a/target/linux/brcm63xx/patches-3.14/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch b/target/linux/brcm63xx/patches-3.14/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch
deleted file mode 100644
index 4e5e611..0000000
--- a/target/linux/brcm63xx/patches-3.14/207-MIPS-BCM63XX-move-device-registration-code-into-its-.patch
+++ /dev/null
@@ -1,493 +0,0 @@
-From 5a50cb0d53344a2429831b00925d6183d4d332e1 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 9 Mar 2014 03:54:05 +0100
-Subject: [PATCH 40/44] MIPS: BCM63XX: move device registration code into its
- own file
-
-Move device registration code into its own file to allow sharing it
-between board implementations.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/boards/Makefile | 1 +
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 188 +-------------------------
- arch/mips/bcm63xx/boards/board_common.c | 215 ++++++++++++++++++++++++++++++
- arch/mips/bcm63xx/boards/board_common.h | 8 ++
- 4 files changed, 223 insertions(+), 183 deletions(-)
- create mode 100644 arch/mips/bcm63xx/boards/board_common.c
- create mode 100644 arch/mips/bcm63xx/boards/board_common.h
-
---- a/arch/mips/bcm63xx/boards/Makefile
-+++ b/arch/mips/bcm63xx/boards/Makefile
-@@ -1 +1,2 @@
-+obj-y += board_common.o
- obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -10,35 +10,22 @@
- #include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
--#include <linux/platform_device.h>
--#include <linux/ssb/ssb.h>
- #include <asm/addrspace.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
--#include <bcm63xx_dev_uart.h>
- #include <bcm63xx_regs.h>
- #include <bcm63xx_io.h>
- #include <bcm63xx_nvram.h>
--#include <bcm63xx_dev_pci.h>
--#include <bcm63xx_dev_enet.h>
--#include <bcm63xx_dev_dsp.h>
--#include <bcm63xx_dev_flash.h>
--#include <bcm63xx_dev_hsspi.h>
--#include <bcm63xx_dev_pcmcia.h>
--#include <bcm63xx_dev_spi.h>
--#include <bcm63xx_dev_usb_ehci.h>
--#include <bcm63xx_dev_usb_ohci.h>
--#include <bcm63xx_dev_usb_usbd.h>
- #include <board_bcm963xx.h>
-
-+#include "board_common.h"
-+
- #include <uapi/linux/bcm933xx_hcs.h>
-
- #define PFX "board_bcm963xx: "
-
- #define HCS_OFFSET_128K 0x20000
-
--static struct board_info board;
--
- /*
- * known 3368 boards
- */
-@@ -711,52 +698,6 @@ static const struct board_info __initcon
- };
-
- /*
-- * Register a sane SPROMv2 to make the on-board
-- * bcm4318 WLAN work
-- */
--#ifdef CONFIG_SSB_PCIHOST
--static struct ssb_sprom bcm63xx_sprom = {
-- .revision = 0x02,
-- .board_rev = 0x17,
-- .country_code = 0x0,
-- .ant_available_bg = 0x3,
-- .pa0b0 = 0x15ae,
-- .pa0b1 = 0xfa85,
-- .pa0b2 = 0xfe8d,
-- .pa1b0 = 0xffff,
-- .pa1b1 = 0xffff,
-- .pa1b2 = 0xffff,
-- .gpio0 = 0xff,
-- .gpio1 = 0xff,
-- .gpio2 = 0xff,
-- .gpio3 = 0xff,
-- .maxpwr_bg = 0x004c,
-- .itssi_bg = 0x00,
-- .boardflags_lo = 0x2848,
-- .boardflags_hi = 0x0000,
--};
--
--int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
--{
-- if (bus->bustype == SSB_BUSTYPE_PCI) {
-- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-- return 0;
-- } else {
-- printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n");
-- return -EINVAL;
-- }
--}
--#endif
--
--/*
-- * return board name for /proc/cpuinfo
-- */
--const char *board_get_name(void)
--{
-- return board.name;
--}
--
--/*
- * early init callback, read nvram data from flash and checksum it
- */
- void __init board_prom_init(void)
-@@ -801,141 +742,16 @@ void __init board_prom_init(void)
- if (strncmp(board_name, bcm963xx_boards[i]->name, 16))
- continue;
- /* copy, board desc array is marked initdata */
-- memcpy(&board, bcm963xx_boards[i], sizeof(board));
-+ board_early_setup(bcm963xx_boards[i]);
- break;
- }
-
-- /* bail out if board is not found, will complain later */
-- if (!board.name[0]) {
-+ /* warn if board is not found, will complain later */
-+ if (i == ARRAY_SIZE(bcm963xx_boards)) {
- char name[17];
- memcpy(name, board_name, 16);
- name[16] = 0;
- printk(KERN_ERR PFX "unknown bcm963xx board: %s\n",
- name);
-- return;
-- }
--
-- /* setup pin multiplexing depending on board enabled device,
-- * this has to be done this early since PCI init is done
-- * inside arch_initcall */
-- val = 0;
--
--#ifdef CONFIG_PCI
-- if (board.has_pci) {
-- bcm63xx_pci_enabled = 1;
-- if (BCMCPU_IS_6348())
-- val |= GPIO_MODE_6348_G2_PCI;
-- }
--#endif
--
-- if (board.has_pccard) {
-- if (BCMCPU_IS_6348())
-- val |= GPIO_MODE_6348_G1_MII_PCCARD;
-- }
--
-- if (board.has_enet0 && !board.enet0.use_internal_phy) {
-- if (BCMCPU_IS_6348())
-- val |= GPIO_MODE_6348_G3_EXT_MII |
-- GPIO_MODE_6348_G0_EXT_MII;
-- }
--
-- if (board.has_enet1 && !board.enet1.use_internal_phy) {
-- if (BCMCPU_IS_6348())
-- val |= GPIO_MODE_6348_G3_EXT_MII |
-- GPIO_MODE_6348_G0_EXT_MII;
-- }
--
-- bcm_gpio_writel(val, GPIO_MODE_REG);
--}
--
--/*
-- * second stage init callback, good time to panic if we couldn't
-- * identify on which board we're running since early printk is working
-- */
--void __init board_setup(void)
--{
-- if (!board.name[0])
-- panic("unable to detect bcm963xx board");
-- printk(KERN_INFO PFX "board name: %s\n", board.name);
--
-- /* make sure we're running on expected cpu */
-- if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
-- panic("unexpected CPU for bcm963xx board");
--}
--
--static struct gpio_led_platform_data bcm63xx_led_data;
--
--static struct platform_device bcm63xx_gpio_leds = {
-- .name = "leds-gpio",
-- .id = 0,
-- .dev.platform_data = &bcm63xx_led_data,
--};
--
--/*
-- * third stage init callback, register all board devices.
-- */
--int __init board_register_devices(void)
--{
-- if (board.has_uart0)
-- bcm63xx_uart_register(0);
--
-- if (board.has_uart1)
-- bcm63xx_uart_register(1);
--
-- if (board.has_pccard)
-- bcm63xx_pcmcia_register();
--
-- if (board.has_enet0 &&
-- !bcm63xx_nvram_get_mac_address(board.enet0.mac_addr))
-- bcm63xx_enet_register(0, &board.enet0);
--
-- if (board.has_enet1 &&
-- !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr))
-- bcm63xx_enet_register(1, &board.enet1);
--
-- if (board.has_enetsw &&
-- !bcm63xx_nvram_get_mac_address(board.enetsw.mac_addr))
-- bcm63xx_enetsw_register(&board.enetsw);
--
-- if (board.has_usbd)
-- bcm63xx_usbd_register(&board.usbd);
--
-- if (board.has_ehci0)
-- bcm63xx_ehci_register();
--
-- if (board.has_ohci0)
-- bcm63xx_ohci_register();
--
-- if (board.has_dsp)
-- bcm63xx_dsp_register(&board.dsp);
--
-- /* Generate MAC address for WLAN and register our SPROM,
-- * do this after registering enet devices
-- */
--#ifdef CONFIG_SSB_PCIHOST
-- if (!bcm63xx_nvram_get_mac_address(bcm63xx_sprom.il0mac)) {
-- memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-- memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-- if (ssb_arch_register_fallback_sprom(
-- &bcm63xx_get_fallback_sprom) < 0)
-- pr_err(PFX "failed to register fallback SPROM\n");
- }
--#endif
--
-- bcm63xx_spi_register();
--
-- bcm63xx_hsspi_register();
--
-- bcm63xx_flash_register();
--
-- bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
-- bcm63xx_led_data.leds = board.leds;
--
-- platform_device_register(&bcm63xx_gpio_leds);
--
-- if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
-- gpio_request_one(board.ephy_reset_gpio,
-- board.ephy_reset_gpio_flags, "ephy-reset");
--
-- return 0;
- }
---- /dev/null
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -0,0 +1,217 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
-+ * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <linux/platform_device.h>
-+#include <linux/ssb/ssb.h>
-+#include <asm/addrspace.h>
-+#include <bcm63xx_board.h>
-+#include <bcm63xx_cpu.h>
-+#include <bcm63xx_dev_uart.h>
-+#include <bcm63xx_regs.h>
-+#include <bcm63xx_io.h>
-+#include <bcm63xx_nvram.h>
-+#include <bcm63xx_dev_pci.h>
-+#include <bcm63xx_dev_enet.h>
-+#include <bcm63xx_dev_dsp.h>
-+#include <bcm63xx_dev_flash.h>
-+#include <bcm63xx_dev_hsspi.h>
-+#include <bcm63xx_dev_pcmcia.h>
-+#include <bcm63xx_dev_spi.h>
-+#include <bcm63xx_dev_usb_ehci.h>
-+#include <bcm63xx_dev_usb_ohci.h>
-+#include <bcm63xx_dev_usb_usbd.h>
-+#include <board_bcm963xx.h>
-+
-+#define PFX "board: "
-+
-+static struct board_info board;
-+
-+/*
-+ * Register a sane SPROMv2 to make the on-board
-+ * bcm4318 WLAN work
-+ */
-+#ifdef CONFIG_SSB_PCIHOST
-+static struct ssb_sprom bcm63xx_sprom = {
-+ .revision = 0x02,
-+ .board_rev = 0x17,
-+ .country_code = 0x0,
-+ .ant_available_bg = 0x3,
-+ .pa0b0 = 0x15ae,
-+ .pa0b1 = 0xfa85,
-+ .pa0b2 = 0xfe8d,
-+ .pa1b0 = 0xffff,
-+ .pa1b1 = 0xffff,
-+ .pa1b2 = 0xffff,
-+ .gpio0 = 0xff,
-+ .gpio1 = 0xff,
-+ .gpio2 = 0xff,
-+ .gpio3 = 0xff,
-+ .maxpwr_bg = 0x004c,
-+ .itssi_bg = 0x00,
-+ .boardflags_lo = 0x2848,
-+ .boardflags_hi = 0x0000,
-+};
-+
-+int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
-+{
-+ if (bus->bustype == SSB_BUSTYPE_PCI) {
-+ memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-+ return 0;
-+ } else {
-+ printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n");
-+ return -EINVAL;
-+ }
-+}
-+#endif
-+
-+/*
-+ * return board name for /proc/cpuinfo
-+ */
-+const char *board_get_name(void)
-+{
-+ return board.name;
-+}
-+
-+/*
-+ * setup board for device registration
-+ */
-+void __init board_early_setup(const struct board_info *target)
-+{
-+ u32 val;
-+
-+ memcpy(&board, target, sizeof(board));
-+
-+ /* setup pin multiplexing depending on board enabled device,
-+ * this has to be done this early since PCI init is done
-+ * inside arch_initcall */
-+ val = 0;
-+
-+#ifdef CONFIG_PCI
-+ if (board.has_pci) {
-+ bcm63xx_pci_enabled = 1;
-+ if (BCMCPU_IS_6348())
-+ val |= GPIO_MODE_6348_G2_PCI;
-+ }
-+#endif
-+
-+ if (board.has_pccard) {
-+ if (BCMCPU_IS_6348())
-+ val |= GPIO_MODE_6348_G1_MII_PCCARD;
-+ }
-+
-+ if (board.has_enet0 && !board.enet0.use_internal_phy) {
-+ if (BCMCPU_IS_6348())
-+ val |= GPIO_MODE_6348_G3_EXT_MII |
-+ GPIO_MODE_6348_G0_EXT_MII;
-+ }
-+
-+ if (board.has_enet1 && !board.enet1.use_internal_phy) {
-+ if (BCMCPU_IS_6348())
-+ val |= GPIO_MODE_6348_G3_EXT_MII |
-+ GPIO_MODE_6348_G0_EXT_MII;
-+ }
-+
-+ bcm_gpio_writel(val, GPIO_MODE_REG);
-+}
-+
-+
-+/*
-+ * second stage init callback, good time to panic if we couldn't
-+ * identify on which board we're running since early printk is working
-+ */
-+void __init board_setup(void)
-+{
-+ if (!board.name[0])
-+ panic("unable to detect bcm963xx board");
-+ printk(KERN_INFO PFX "board name: %s\n", board.name);
-+
-+ /* make sure we're running on expected cpu */
-+ if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
-+ panic("unexpected CPU for bcm963xx board");
-+}
-+
-+static struct gpio_led_platform_data bcm63xx_led_data;
-+
-+static struct platform_device bcm63xx_gpio_leds = {
-+ .name = "leds-gpio",
-+ .id = 0,
-+ .dev.platform_data = &bcm63xx_led_data,
-+};
-+
-+/*
-+ * third stage init callback, register all board devices.
-+ */
-+int __init board_register_devices(void)
-+{
-+ if (board.has_uart0)
-+ bcm63xx_uart_register(0);
-+
-+ if (board.has_uart1)
-+ bcm63xx_uart_register(1);
-+
-+ if (board.has_pccard)
-+ bcm63xx_pcmcia_register();
-+
-+ if (board.has_enet0 &&
-+ !bcm63xx_nvram_get_mac_address(board.enet0.mac_addr))
-+ bcm63xx_enet_register(0, &board.enet0);
-+
-+ if (board.has_enet1 &&
-+ !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr))
-+ bcm63xx_enet_register(1, &board.enet1);
-+
-+ if (board.has_enetsw &&
-+ !bcm63xx_nvram_get_mac_address(board.enetsw.mac_addr))
-+ bcm63xx_enetsw_register(&board.enetsw);
-+
-+ if (board.has_usbd)
-+ bcm63xx_usbd_register(&board.usbd);
-+
-+ if (board.has_ehci0)
-+ bcm63xx_ehci_register();
-+
-+ if (board.has_ohci0)
-+ bcm63xx_ohci_register();
-+
-+ if (board.has_dsp)
-+ bcm63xx_dsp_register(&board.dsp);
-+
-+ /* Generate MAC address for WLAN and register our SPROM,
-+ * do this after registering enet devices
-+ */
-+#ifdef CONFIG_SSB_PCIHOST
-+ if (!bcm63xx_nvram_get_mac_address(bcm63xx_sprom.il0mac)) {
-+ memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-+ memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-+ if (ssb_arch_register_fallback_sprom(
-+ &bcm63xx_get_fallback_sprom) < 0)
-+ pr_err(PFX "failed to register fallback SPROM\n");
-+ }
-+#endif
-+
-+ bcm63xx_spi_register();
-+
-+ bcm63xx_hsspi_register();
-+
-+ bcm63xx_flash_register();
-+
-+ bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
-+ bcm63xx_led_data.leds = board.leds;
-+
-+ platform_device_register(&bcm63xx_gpio_leds);
-+
-+ if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
-+ gpio_request_one(board.ephy_reset_gpio,
-+ board.ephy_reset_gpio_flags, "ephy-reset");
-+
-+ return 0;
-+}
---- /dev/null
-+++ b/arch/mips/bcm63xx/boards/board_common.h
-@@ -0,0 +1,8 @@
-+#ifndef __BOARD_COMMON_H
-+#define __BOARD_COMMON_H
-+
-+#include <board_bcm963xx.h>
-+
-+void board_early_setup(const struct board_info *board);
-+
-+#endif /* __BOARD_COMMON_H */
diff --git a/target/linux/brcm63xx/patches-3.14/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch b/target/linux/brcm63xx/patches-3.14/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch
deleted file mode 100644
index 877030f..0000000
--- a/target/linux/brcm63xx/patches-3.14/208-MIPS-BCM63XX-pass-a-mac-addresss-allocator-to-board-.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 4e9c34a37bd3442b286ba55441bfe22c1ac5b65f Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 9 Mar 2014 04:08:06 +0100
-Subject: [PATCH 41/44] MIPS: BCM63XX: pass a mac addresss allocator to board
- setup
-
-Pass a mac address allocator to board setup code to allow board
-implementations to work with third party bootloaders not using nvram
-for configuration storage.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 3 ++-
- arch/mips/bcm63xx/boards/board_common.c | 16 ++++++++++------
- arch/mips/bcm63xx/boards/board_common.h | 3 ++-
- 3 files changed, 14 insertions(+), 8 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -742,7 +742,8 @@ void __init board_prom_init(void)
- if (strncmp(board_name, bcm963xx_boards[i]->name, 16))
- continue;
- /* copy, board desc array is marked initdata */
-- board_early_setup(bcm963xx_boards[i]);
-+ board_early_setup(bcm963xx_boards[i],
-+ bcm63xx_nvram_get_mac_address);
- break;
- }
-
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -18,7 +18,6 @@
- #include <bcm63xx_dev_uart.h>
- #include <bcm63xx_regs.h>
- #include <bcm63xx_io.h>
--#include <bcm63xx_nvram.h>
- #include <bcm63xx_dev_pci.h>
- #include <bcm63xx_dev_enet.h>
- #include <bcm63xx_dev_dsp.h>
-@@ -81,15 +80,20 @@ const char *board_get_name(void)
- return board.name;
- }
-
-+static int (*board_get_mac_address)(u8 mac[ETH_ALEN]);
-+
- /*
- * setup board for device registration
- */
--void __init board_early_setup(const struct board_info *target)
-+void __init board_early_setup(const struct board_info *target,
-+ int (*get_mac_address)(u8 mac[ETH_ALEN]))
- {
- u32 val;
-
- memcpy(&board, target, sizeof(board));
-
-+ board_get_mac_address = get_mac_address;
-+
- /* setup pin multiplexing depending on board enabled device,
- * this has to be done this early since PCI init is done
- * inside arch_initcall */
-@@ -162,15 +166,15 @@ int __init board_register_devices(void)
- bcm63xx_pcmcia_register();
-
- if (board.has_enet0 &&
-- !bcm63xx_nvram_get_mac_address(board.enet0.mac_addr))
-+ !board_get_mac_address(board.enet0.mac_addr))
- bcm63xx_enet_register(0, &board.enet0);
-
- if (board.has_enet1 &&
-- !bcm63xx_nvram_get_mac_address(board.enet1.mac_addr))
-+ !board_get_mac_address(board.enet1.mac_addr))
- bcm63xx_enet_register(1, &board.enet1);
-
- if (board.has_enetsw &&
-- !bcm63xx_nvram_get_mac_address(board.enetsw.mac_addr))
-+ !board_get_mac_address(board.enetsw.mac_addr))
- bcm63xx_enetsw_register(&board.enetsw);
-
- if (board.has_usbd)
-@@ -189,7 +193,7 @@ int __init board_register_devices(void)
- * do this after registering enet devices
- */
- #ifdef CONFIG_SSB_PCIHOST
-- if (!bcm63xx_nvram_get_mac_address(bcm63xx_sprom.il0mac)) {
-+ if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
- memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
- memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
- if (ssb_arch_register_fallback_sprom(
---- a/arch/mips/bcm63xx/boards/board_common.h
-+++ b/arch/mips/bcm63xx/boards/board_common.h
-@@ -3,6 +3,7 @@
-
- #include <board_bcm963xx.h>
-
--void board_early_setup(const struct board_info *board);
-+void board_early_setup(const struct board_info *board,
-+ int (*get_mac_address)(u8 mac[ETH_ALEN]));
-
- #endif /* __BOARD_COMMON_H */
diff --git a/target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch b/target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch
deleted file mode 100644
index c64d405..0000000
--- a/target/linux/brcm63xx/patches-3.14/300-reset_buttons.patch
+++ /dev/null
@@ -1,135 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -10,6 +10,8 @@
- #include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
-+#include <linux/gpio_keys.h>
-+#include <linux/input.h>
- #include <asm/addrspace.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
-@@ -26,6 +28,9 @@
-
- #define HCS_OFFSET_128K 0x20000
-
-+#define BCM963XX_KEYS_POLL_INTERVAL 20
-+#define BCM963XX_KEYS_DEBOUNCE_INTERVAL (BCM963XX_KEYS_POLL_INTERVAL * 3)
-+
- /*
- * known 3368 boards
- */
-@@ -367,6 +372,16 @@ static struct board_info __initdata boar
- .active_low = 1,
- },
- },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
- };
-
- static struct board_info __initdata board_96348gw = {
-@@ -425,6 +440,16 @@ static struct board_info __initdata boar
- .active_low = 1,
- },
- },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 36,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
- };
-
- static struct board_info __initdata board_FAST2404 = {
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -12,6 +12,7 @@
- #include <linux/string.h>
- #include <linux/platform_device.h>
- #include <linux/ssb/ssb.h>
-+#include <linux/gpio_keys.h>
- #include <asm/addrspace.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
-@@ -32,6 +33,8 @@
-
- #define PFX "board: "
-
-+#define BCM963XX_KEYS_POLL_INTERVAL 20
-+
- static struct board_info board;
-
- /*
-@@ -151,11 +154,23 @@ static struct platform_device bcm63xx_gp
- .dev.platform_data = &bcm63xx_led_data,
- };
-
-+static struct gpio_keys_platform_data bcm63xx_gpio_keys_data = {
-+ .poll_interval = BCM963XX_KEYS_POLL_INTERVAL,
-+};
-+
-+static struct platform_device bcm63xx_gpio_keys_device = {
-+ .name = "gpio-keys-polled",
-+ .id = 0,
-+ .dev.platform_data = &bcm63xx_gpio_keys_data,
-+};
-+
- /*
- * third stage init callback, register all board devices.
- */
- int __init board_register_devices(void)
- {
-+ int button_count = 0;
-+
- if (board.has_uart0)
- bcm63xx_uart_register(0);
-
-@@ -217,5 +232,16 @@ int __init board_register_devices(void)
- gpio_request_one(board.ephy_reset_gpio,
- board.ephy_reset_gpio_flags, "ephy-reset");
-
-+ /* count number of BUTTONs defined by this device */
-+ while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc)
-+ button_count++;
-+
-+ if (button_count) {
-+ bcm63xx_gpio_keys_data.nbuttons = button_count;
-+ bcm63xx_gpio_keys_data.buttons = board.buttons;
-+
-+ platform_device_register(&bcm63xx_gpio_keys_device);
-+ }
-+
- return 0;
- }
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -3,6 +3,7 @@
-
- #include <linux/types.h>
- #include <linux/gpio.h>
-+#include <linux/gpio_keys.h>
- #include <linux/leds.h>
- #include <bcm63xx_dev_enet.h>
- #include <bcm63xx_dev_usb_usbd.h>
-@@ -48,6 +49,9 @@ struct board_info {
- /* GPIO LEDs */
- struct gpio_led leds[5];
-
-+ /* Buttons */
-+ struct gpio_keys_button buttons[4];
-+
- /* External PHY reset GPIO */
- unsigned int ephy_reset_gpio;
-
diff --git a/target/linux/brcm63xx/patches-3.14/301-led_count.patch b/target/linux/brcm63xx/patches-3.14/301-led_count.patch
deleted file mode 100644
index 49a1825..0000000
--- a/target/linux/brcm63xx/patches-3.14/301-led_count.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -170,6 +170,7 @@ static struct platform_device bcm63xx_gp
- int __init board_register_devices(void)
- {
- int button_count = 0;
-+ int led_count = 0;
-
- if (board.has_uart0)
- bcm63xx_uart_register(0);
-@@ -223,10 +224,16 @@ int __init board_register_devices(void)
-
- bcm63xx_flash_register();
-
-- bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
-- bcm63xx_led_data.leds = board.leds;
-+ /* count number of LEDs defined by this device */
-+ while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
-+ led_count++;
-+
-+ if (led_count) {
-+ bcm63xx_led_data.num_leds = led_count;
-+ bcm63xx_led_data.leds = board.leds;
-
-- platform_device_register(&bcm63xx_gpio_leds);
-+ platform_device_register(&bcm63xx_gpio_leds);
-+ }
-
- if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags)
- gpio_request_one(board.ephy_reset_gpio,
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -47,7 +47,7 @@ struct board_info {
- struct bcm63xx_dsp_platform_data dsp;
-
- /* GPIO LEDs */
-- struct gpio_led leds[5];
-+ struct gpio_led leds[14];
-
- /* Buttons */
- struct gpio_keys_button buttons[4];
diff --git a/target/linux/brcm63xx/patches-3.14/302-extended-platform-devices.patch b/target/linux/brcm63xx/patches-3.14/302-extended-platform-devices.patch
deleted file mode 100644
index cc61cee..0000000
--- a/target/linux/brcm63xx/patches-3.14/302-extended-platform-devices.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -222,6 +222,9 @@ int __init board_register_devices(void)
-
- bcm63xx_hsspi_register();
-
-+ if (board.num_devs)
-+ platform_add_devices(board.devs, board.num_devs);
-+
- bcm63xx_flash_register();
-
- /* count number of LEDs defined by this device */
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -57,6 +57,10 @@ struct board_info {
-
- /* External PHY reset GPIO flags from gpio.h */
- unsigned long ephy_reset_gpio_flags;
-+
-+ /* Additional platform devices */
-+ struct platform_device **devs;
-+ unsigned int num_devs;
- };
-
- #endif /* ! BOARD_BCM963XX_H_ */
diff --git a/target/linux/brcm63xx/patches-3.14/303-spi-board-info.patch b/target/linux/brcm63xx/patches-3.14/303-spi-board-info.patch
deleted file mode 100644
index 878e626..0000000
--- a/target/linux/brcm63xx/patches-3.14/303-spi-board-info.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -13,6 +13,7 @@
- #include <linux/platform_device.h>
- #include <linux/ssb/ssb.h>
- #include <linux/gpio_keys.h>
-+#include <linux/spi/spi.h>
- #include <asm/addrspace.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
-@@ -225,6 +226,9 @@ int __init board_register_devices(void)
- if (board.num_devs)
- platform_add_devices(board.devs, board.num_devs);
-
-+ if (board.num_spis)
-+ spi_register_board_info(board.spis, board.num_spis);
-+
- bcm63xx_flash_register();
-
- /* count number of LEDs defined by this device */
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -61,6 +61,10 @@ struct board_info {
- /* Additional platform devices */
- struct platform_device **devs;
- unsigned int num_devs;
-+
-+ /* Additional platform devices */
-+ struct spi_board_info *spis;
-+ unsigned int num_spis;
- };
-
- #endif /* ! BOARD_BCM963XX_H_ */
diff --git a/target/linux/brcm63xx/patches-3.14/308-board_leds_naming.patch b/target/linux/brcm63xx/patches-3.14/308-board_leds_naming.patch
deleted file mode 100644
index 89b7ac3..0000000
--- a/target/linux/brcm63xx/patches-3.14/308-board_leds_naming.patch
+++ /dev/null
@@ -1,267 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -130,28 +130,28 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl",
-+ .name = "96338GW:green:adsl",
- .gpio = 3,
- .active_low = 1,
- },
- {
-- .name = "ses",
-+ .name = "96338GW:green:ses",
- .gpio = 5,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96338GW:green:ppp-fail",
- .gpio = 4,
- .active_low = 1,
- },
- {
-- .name = "power",
-+ .name = "96338GW:green:power",
- .gpio = 0,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
-- .name = "stop",
-+ .name = "96338GW:green:stop",
- .gpio = 1,
- .active_low = 1,
- }
-@@ -171,28 +171,28 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl",
-+ .name = "96338W:green:adsl",
- .gpio = 3,
- .active_low = 1,
- },
- {
-- .name = "ses",
-+ .name = "96338W:green:ses",
- .gpio = 5,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96338W:green:ppp-fail",
- .gpio = 4,
- .active_low = 1,
- },
- {
-- .name = "power",
-+ .name = "96338W:green:power",
- .gpio = 0,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
-- .name = "stop",
-+ .name = "96338W:green:stop",
- .gpio = 1,
- .active_low = 1,
- },
-@@ -231,29 +231,29 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl-fail",
-+ .name = "96348R:green:adsl-fail",
- .gpio = 2,
- .active_low = 1,
- },
- {
-- .name = "ppp",
-+ .name = "96348R:green:ppp",
- .gpio = 3,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96348R:green:ppp-fail",
- .gpio = 4,
- .active_low = 1,
- },
- {
-- .name = "power",
-+ .name = "96348R:green:power",
- .gpio = 0,
- .active_low = 1,
- .default_trigger = "default-on",
-
- },
- {
-- .name = "stop",
-+ .name = "96348R:green:stop",
- .gpio = 1,
- .active_low = 1,
- },
-@@ -292,28 +292,28 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl-fail",
-+ .name = "96348GW-10:green:adsl-fail",
- .gpio = 2,
- .active_low = 1,
- },
- {
-- .name = "ppp",
-+ .name = "96348GW-10:green:ppp",
- .gpio = 3,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96348GW-10:green:ppp-fail",
- .gpio = 4,
- .active_low = 1,
- },
- {
-- .name = "power",
-+ .name = "96348GW-10:green:power",
- .gpio = 0,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
-- .name = "stop",
-+ .name = "96348GW-10:green:stop",
- .gpio = 1,
- .active_low = 1,
- },
-@@ -346,28 +346,28 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl-fail",
-+ .name = "96348GW-11:green:adsl-fail",
- .gpio = 2,
- .active_low = 1,
- },
- {
-- .name = "ppp",
-+ .name = "96348GW-11:green:ppp",
- .gpio = 3,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96348GW-11:green:ppp-fail",
- .gpio = 4,
- .active_low = 1,
- },
- {
-- .name = "power",
-+ .name = "96348GW-11:green:power",
- .gpio = 0,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
-- .name = "stop",
-+ .name = "96348GW-11:green:stop",
- .gpio = 1,
- .active_low = 1,
- },
-@@ -414,28 +414,28 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl-fail",
-+ .name = "96348GW:green:adsl-fail",
- .gpio = 2,
- .active_low = 1,
- },
- {
-- .name = "ppp",
-+ .name = "96348GW:green:ppp",
- .gpio = 3,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96348GW:green:ppp-fail",
- .gpio = 4,
- .active_low = 1,
- },
- {
-- .name = "power",
-+ .name = "96348GW:green:power",
- .gpio = 0,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
-- .name = "stop",
-+ .name = "96348GW:green:stop",
- .gpio = 1,
- .active_low = 1,
- },
-@@ -567,27 +567,27 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl-fail",
-+ .name = "96358VW:green:adsl-fail",
- .gpio = 15,
- .active_low = 1,
- },
- {
-- .name = "ppp",
-+ .name = "96358VW:green:ppp",
- .gpio = 22,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96358VW:green:ppp-fail",
- .gpio = 23,
- .active_low = 1,
- },
- {
-- .name = "power",
-+ .name = "96358VW:green:power",
- .gpio = 4,
- .default_trigger = "default-on",
- },
- {
-- .name = "stop",
-+ .name = "96358VW:green:stop",
- .gpio = 5,
- },
- },
-@@ -619,22 +619,22 @@ static struct board_info __initdata boar
-
- .leds = {
- {
-- .name = "adsl",
-+ .name = "96358VW2:green:adsl",
- .gpio = 22,
- .active_low = 1,
- },
- {
-- .name = "ppp-fail",
-+ .name = "96358VW2:green:ppp-fail",
- .gpio = 23,
- },
- {
-- .name = "power",
-+ .name = "96358VW2:green:power",
- .gpio = 5,
- .active_low = 1,
- .default_trigger = "default-on",
- },
- {
-- .name = "stop",
-+ .name = "96358VW2:green:stop",
- .gpio = 4,
- .active_low = 1,
- },
diff --git a/target/linux/brcm63xx/patches-3.14/309-cfe_version_mod.patch b/target/linux/brcm63xx/patches-3.14/309-cfe_version_mod.patch
deleted file mode 100644
index 65b75e1..0000000
--- a/target/linux/brcm63xx/patches-3.14/309-cfe_version_mod.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -747,10 +747,20 @@ void __init board_prom_init(void)
-
- /* dump cfe version */
- cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
-- if (!memcmp(cfe, "cfe-v", 5))
-- snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u",
-- cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]);
-- else
-+ if (strstarts(cfe, "cfe-")) {
-+ if(cfe[4] == 'v') {
-+ if(cfe[5] == 'd')
-+ snprintf(cfe_version, 11, "%s", (char *) &cfe[5]);
-+ else if (cfe[10] > 0)
-+ snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u-%u",
-+ cfe[5], cfe[6], cfe[7], cfe[8], cfe[9], cfe[10]);
-+ else
-+ snprintf(cfe_version, sizeof(cfe_version), "%u.%u.%u-%u.%u",
-+ cfe[5], cfe[6], cfe[7], cfe[8], cfe[9]);
-+ } else {
-+ snprintf(cfe_version, 12, "%s", (char *) &cfe[4]);
-+ }
-+ } else
- strcpy(cfe_version, "unknown");
- printk(KERN_INFO PFX "CFE version: %s\n", cfe_version);
-
diff --git a/target/linux/brcm63xx/patches-3.14/310-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-registe.patch b/target/linux/brcm63xx/patches-3.14/310-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-registe.patch
deleted file mode 100644
index 04b3426..0000000
--- a/target/linux/brcm63xx/patches-3.14/310-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-registe.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 082a49f0490008b999db80e3ccf1521c7dd21cec Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Mon, 2 Dec 2013 12:32:44 +0100
-Subject: [PATCH 1/8] MIPS: BCM63XX: remove !RUNTIME_DETECT code from register
- sets
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 33 ------------------------
- 1 file changed, 33 deletions(-)
-
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -598,10 +598,6 @@ enum bcm63xx_regs_set {
-
- extern const unsigned long *bcm63xx_regs_base;
-
--#define __GEN_RSET_BASE(__cpu, __rset) \
-- case RSET_## __rset : \
-- return BCM_## __cpu ##_## __rset ##_BASE;
--
- #define __GEN_RSET(__cpu) \
- switch (set) { \
- __GEN_RSET_BASE(__cpu, DSL_LMEM) \
-@@ -693,36 +689,7 @@ extern const unsigned long *bcm63xx_regs
-
- static inline unsigned long bcm63xx_regset_address(enum bcm63xx_regs_set set)
- {
--#ifdef BCMCPU_RUNTIME_DETECT
- return bcm63xx_regs_base[set];
--#else
--#ifdef CONFIG_BCM63XX_CPU_3368
-- __GEN_RSET(3368)
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6328
-- __GEN_RSET(6328)
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6338
-- __GEN_RSET(6338)
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6345
-- __GEN_RSET(6345)
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6348
-- __GEN_RSET(6348)
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6358
-- __GEN_RSET(6358)
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6362
-- __GEN_RSET(6362)
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6368
-- __GEN_RSET(6368)
--#endif
--#endif
-- /* unreached */
-- return 0;
- }
-
- /*
diff --git a/target/linux/brcm63xx/patches-3.14/311-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-irq-setup-co.patch b/target/linux/brcm63xx/patches-3.14/311-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-irq-setup-co.patch
deleted file mode 100644
index 9226530..0000000
--- a/target/linux/brcm63xx/patches-3.14/311-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-irq-setup-co.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 07d0224576cbb2e6ac680b4ade4bba7a49bd0a07 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Mon, 2 Dec 2013 12:34:11 +0100
-Subject: [PATCH 2/8] MIPS: BCM63XX: remove !RUNTIME_DETECT from irq setup code
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 109 ------------------------------------------------
- 1 file changed, 109 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -26,114 +26,6 @@ static void __internal_irq_mask_64(unsig
- static void __internal_irq_unmask_32(unsigned int irq) __maybe_unused;
- static void __internal_irq_unmask_64(unsigned int irq) __maybe_unused;
-
--#ifndef BCMCPU_RUNTIME_DETECT
--#ifdef CONFIG_BCM63XX_CPU_3368
--#define irq_stat_reg PERF_IRQSTAT_3368_REG
--#define irq_mask_reg PERF_IRQMASK_3368_REG
--#define irq_bits 32
--#define is_ext_irq_cascaded 0
--#define ext_irq_start 0
--#define ext_irq_end 0
--#define ext_irq_count 4
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_3368
--#define ext_irq_cfg_reg2 0
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6328
--#define irq_stat_reg PERF_IRQSTAT_6328_REG
--#define irq_mask_reg PERF_IRQMASK_6328_REG
--#define irq_bits 64
--#define is_ext_irq_cascaded 1
--#define ext_irq_start (BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE)
--#define ext_irq_end (BCM_6328_EXT_IRQ3 - IRQ_INTERNAL_BASE)
--#define ext_irq_count 4
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6328
--#define ext_irq_cfg_reg2 0
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6338
--#define irq_stat_reg PERF_IRQSTAT_6338_REG
--#define irq_mask_reg PERF_IRQMASK_6338_REG
--#define irq_bits 32
--#define is_ext_irq_cascaded 0
--#define ext_irq_start 0
--#define ext_irq_end 0
--#define ext_irq_count 4
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6338
--#define ext_irq_cfg_reg2 0
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6345
--#define irq_stat_reg PERF_IRQSTAT_6345_REG
--#define irq_mask_reg PERF_IRQMASK_6345_REG
--#define irq_bits 32
--#define is_ext_irq_cascaded 0
--#define ext_irq_start 0
--#define ext_irq_end 0
--#define ext_irq_count 4
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6345
--#define ext_irq_cfg_reg2 0
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6348
--#define irq_stat_reg PERF_IRQSTAT_6348_REG
--#define irq_mask_reg PERF_IRQMASK_6348_REG
--#define irq_bits 32
--#define is_ext_irq_cascaded 0
--#define ext_irq_start 0
--#define ext_irq_end 0
--#define ext_irq_count 4
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6348
--#define ext_irq_cfg_reg2 0
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6358
--#define irq_stat_reg PERF_IRQSTAT_6358_REG
--#define irq_mask_reg PERF_IRQMASK_6358_REG
--#define irq_bits 32
--#define is_ext_irq_cascaded 1
--#define ext_irq_start (BCM_6358_EXT_IRQ0 - IRQ_INTERNAL_BASE)
--#define ext_irq_end (BCM_6358_EXT_IRQ3 - IRQ_INTERNAL_BASE)
--#define ext_irq_count 4
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6358
--#define ext_irq_cfg_reg2 0
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6362
--#define irq_stat_reg PERF_IRQSTAT_6362_REG
--#define irq_mask_reg PERF_IRQMASK_6362_REG
--#define irq_bits 64
--#define is_ext_irq_cascaded 1
--#define ext_irq_start (BCM_6362_EXT_IRQ0 - IRQ_INTERNAL_BASE)
--#define ext_irq_end (BCM_6362_EXT_IRQ3 - IRQ_INTERNAL_BASE)
--#define ext_irq_count 4
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6362
--#define ext_irq_cfg_reg2 0
--#endif
--#ifdef CONFIG_BCM63XX_CPU_6368
--#define irq_stat_reg PERF_IRQSTAT_6368_REG
--#define irq_mask_reg PERF_IRQMASK_6368_REG
--#define irq_bits 64
--#define is_ext_irq_cascaded 1
--#define ext_irq_start (BCM_6368_EXT_IRQ0 - IRQ_INTERNAL_BASE)
--#define ext_irq_end (BCM_6368_EXT_IRQ5 - IRQ_INTERNAL_BASE)
--#define ext_irq_count 6
--#define ext_irq_cfg_reg1 PERF_EXTIRQ_CFG_REG_6368
--#define ext_irq_cfg_reg2 PERF_EXTIRQ_CFG_REG2_6368
--#endif
--
--#if irq_bits == 32
--#define dispatch_internal __dispatch_internal
--#define internal_irq_mask __internal_irq_mask_32
--#define internal_irq_unmask __internal_irq_unmask_32
--#else
--#define dispatch_internal __dispatch_internal_64
--#define internal_irq_mask __internal_irq_mask_64
--#define internal_irq_unmask __internal_irq_unmask_64
--#endif
--
--#define irq_stat_addr (bcm63xx_regset_address(RSET_PERF) + irq_stat_reg)
--#define irq_mask_addr (bcm63xx_regset_address(RSET_PERF) + irq_mask_reg)
--
--static inline void bcm63xx_init_irq(void)
--{
--}
--#else /* ! BCMCPU_RUNTIME_DETECT */
--
- static u32 irq_stat_addr, irq_mask_addr;
- static void (*dispatch_internal)(void);
- static int is_ext_irq_cascaded;
-@@ -234,7 +126,6 @@ static void bcm63xx_init_irq(void)
- internal_irq_unmask = __internal_irq_unmask_64;
- }
- }
--#endif /* ! BCMCPU_RUNTIME_DETECT */
-
- static inline u32 get_ext_irq_perf_reg(int irq)
- {
diff --git a/target/linux/brcm63xx/patches-3.14/312-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-reset-code.patch b/target/linux/brcm63xx/patches-3.14/312-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-reset-code.patch
deleted file mode 100644
index f26624e..0000000
--- a/target/linux/brcm63xx/patches-3.14/312-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-reset-code.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 72578a46543821c5b9544842e45fcbed0c1b7eb8 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 3 Dec 2013 13:35:12 +0100
-Subject: [PATCH 3/8] MIPS: BCM63XX: remove !RUNTIME_DETECT from reset code
-
----
- arch/mips/bcm63xx/reset.c | 60 -----------------------------------------------
- 1 file changed, 60 deletions(-)
-
---- a/arch/mips/bcm63xx/reset.c
-+++ b/arch/mips/bcm63xx/reset.c
-@@ -125,8 +125,6 @@
- #define BCM6368_RESET_PCIE 0
- #define BCM6368_RESET_PCIE_EXT 0
-
--#ifdef BCMCPU_RUNTIME_DETECT
--
- /*
- * core reset bits
- */
-@@ -188,64 +186,6 @@ static int __init bcm63xx_reset_bits_ini
-
- return 0;
- }
--#else
--
--#ifdef CONFIG_BCM63XX_CPU_3368
--static const u32 bcm63xx_reset_bits[] = {
-- __GEN_RESET_BITS_TABLE(3368)
--};
--#define reset_reg PERF_SOFTRESET_6358_REG
--#endif
--
--#ifdef CONFIG_BCM63XX_CPU_6328
--static const u32 bcm63xx_reset_bits[] = {
-- __GEN_RESET_BITS_TABLE(6328)
--};
--#define reset_reg PERF_SOFTRESET_6328_REG
--#endif
--
--#ifdef CONFIG_BCM63XX_CPU_6338
--static const u32 bcm63xx_reset_bits[] = {
-- __GEN_RESET_BITS_TABLE(6338)
--};
--#define reset_reg PERF_SOFTRESET_REG
--#endif
--
--#ifdef CONFIG_BCM63XX_CPU_6345
--static const u32 bcm63xx_reset_bits[] = { };
--#define reset_reg 0
--#endif
--
--#ifdef CONFIG_BCM63XX_CPU_6348
--static const u32 bcm63xx_reset_bits[] = {
-- __GEN_RESET_BITS_TABLE(6348)
--};
--#define reset_reg PERF_SOFTRESET_REG
--#endif
--
--#ifdef CONFIG_BCM63XX_CPU_6358
--static const u32 bcm63xx_reset_bits[] = {
-- __GEN_RESET_BITS_TABLE(6358)
--};
--#define reset_reg PERF_SOFTRESET_6358_REG
--#endif
--
--#ifdef CONFIG_BCM63XX_CPU_6362
--static const u32 bcm63xx_reset_bits[] = {
-- __GEN_RESET_BITS_TABLE(6362)
--};
--#define reset_reg PERF_SOFTRESET_6362_REG
--#endif
--
--#ifdef CONFIG_BCM63XX_CPU_6368
--static const u32 bcm63xx_reset_bits[] = {
-- __GEN_RESET_BITS_TABLE(6368)
--};
--#define reset_reg PERF_SOFTRESET_6368_REG
--#endif
--
--static int __init bcm63xx_reset_bits_init(void) { return 0; }
--#endif
-
- static DEFINE_SPINLOCK(reset_mutex);
-
diff --git a/target/linux/brcm63xx/patches-3.14/313-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-gpio.patch b/target/linux/brcm63xx/patches-3.14/313-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-gpio.patch
deleted file mode 100644
index 49a3475..0000000
--- a/target/linux/brcm63xx/patches-3.14/313-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-from-gpio.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 1aab93c5c97c55fef130726a6f58c9a1fd5b6240 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 3 Dec 2013 13:36:45 +0100
-Subject: [PATCH 4/8] MIPS: BCM63XX: remove !RUNTIME_DETECT code from gpio
-
----
- arch/mips/bcm63xx/gpio.c | 14 --------------
- 1 file changed, 14 deletions(-)
-
---- a/arch/mips/bcm63xx/gpio.c
-+++ b/arch/mips/bcm63xx/gpio.c
-@@ -18,19 +18,6 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_regs.h>
-
--#ifndef BCMCPU_RUNTIME_DETECT
--#define gpio_out_low_reg GPIO_DATA_LO_REG
--#ifdef CONFIG_BCM63XX_CPU_6345
--#ifdef gpio_out_low_reg
--#undef gpio_out_low_reg
--#define gpio_out_low_reg GPIO_DATA_LO_REG_6345
--#endif /* gpio_out_low_reg */
--#endif /* CONFIG_BCM63XX_CPU_6345 */
--
--static inline void bcm63xx_gpio_out_low_reg_init(void)
--{
--}
--#else /* ! BCMCPU_RUNTIME_DETECT */
- static u32 gpio_out_low_reg;
-
- static void bcm63xx_gpio_out_low_reg_init(void)
-@@ -44,7 +31,6 @@ static void bcm63xx_gpio_out_low_reg_ini
- break;
- }
- }
--#endif /* ! BCMCPU_RUNTIME_DETECT */
-
- static DEFINE_SPINLOCK(bcm63xx_gpio_lock);
- static u32 gpio_out_low, gpio_out_high;
diff --git a/target/linux/brcm63xx/patches-3.14/314-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-spi-code.patch b/target/linux/brcm63xx/patches-3.14/314-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-spi-code.patch
deleted file mode 100644
index afde39b..0000000
--- a/target/linux/brcm63xx/patches-3.14/314-MIPS-BCM63XX-remove-RUNTIME_DETECT-from-spi-code.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 94f819bc230bb61a9ff21da6c860a40ca68c2805 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 3 Dec 2013 13:43:35 +0100
-Subject: [PATCH 5/8] MIPS: BCM63XX: remove !RUNTIME_DETECT from spi code
-
----
- arch/mips/bcm63xx/dev-spi.c | 4 ---
- .../include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 31 ----------------------
- 2 files changed, 35 deletions(-)
-
---- a/arch/mips/bcm63xx/dev-spi.c
-+++ b/arch/mips/bcm63xx/dev-spi.c
-@@ -18,7 +18,6 @@
- #include <bcm63xx_dev_spi.h>
- #include <bcm63xx_regs.h>
-
--#ifdef BCMCPU_RUNTIME_DETECT
- /*
- * register offsets
- */
-@@ -41,9 +40,6 @@ static __init void bcm63xx_spi_regs_init
- BCMCPU_IS_6362() || BCMCPU_IS_6368())
- bcm63xx_regs_spi = bcm6358_regs_spi;
- }
--#else
--static __init void bcm63xx_spi_regs_init(void) { }
--#endif
-
- static struct resource spi_resources[] = {
- {
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h
-@@ -30,26 +30,6 @@ enum bcm63xx_regs_spi {
- SPI_RX_DATA,
- };
-
--#define __GEN_SPI_RSET_BASE(__cpu, __rset) \
-- case SPI_## __rset: \
-- return SPI_## __cpu ##_## __rset;
--
--#define __GEN_SPI_RSET(__cpu) \
-- switch (reg) { \
-- __GEN_SPI_RSET_BASE(__cpu, CMD) \
-- __GEN_SPI_RSET_BASE(__cpu, INT_STATUS) \
-- __GEN_SPI_RSET_BASE(__cpu, INT_MASK_ST) \
-- __GEN_SPI_RSET_BASE(__cpu, INT_MASK) \
-- __GEN_SPI_RSET_BASE(__cpu, ST) \
-- __GEN_SPI_RSET_BASE(__cpu, CLK_CFG) \
-- __GEN_SPI_RSET_BASE(__cpu, FILL_BYTE) \
-- __GEN_SPI_RSET_BASE(__cpu, MSG_TAIL) \
-- __GEN_SPI_RSET_BASE(__cpu, RX_TAIL) \
-- __GEN_SPI_RSET_BASE(__cpu, MSG_CTL) \
-- __GEN_SPI_RSET_BASE(__cpu, MSG_DATA) \
-- __GEN_SPI_RSET_BASE(__cpu, RX_DATA) \
-- }
--
- #define __GEN_SPI_REGS_TABLE(__cpu) \
- [SPI_CMD] = SPI_## __cpu ##_CMD, \
- [SPI_INT_STATUS] = SPI_## __cpu ##_INT_STATUS, \
-@@ -66,20 +46,9 @@ enum bcm63xx_regs_spi {
-
- static inline unsigned long bcm63xx_spireg(enum bcm63xx_regs_spi reg)
- {
--#ifdef BCMCPU_RUNTIME_DETECT
- extern const unsigned long *bcm63xx_regs_spi;
-
- return bcm63xx_regs_spi[reg];
--#else
--#if defined(CONFIG_BCM63XX_CPU_6338) || defined(CONFIG_BCM63XX_CPU_6348)
-- __GEN_SPI_RSET(6348)
--#endif
--#if defined(CONFIG_BCM63XX_CPU_6358) || defined(CONFIG_BCM63XX_CPU_6362) || \
-- defined(CONFIG_BCM63XX_CPU_6368)
-- __GEN_SPI_RSET(6358)
--#endif
--#endif
-- return 0;
- }
-
- #endif /* BCM63XX_DEV_SPI_H */
diff --git a/target/linux/brcm63xx/patches-3.14/315-MIPS-BCM63XX-remove-RUNTIME_DETECT-usage-from-enet-c.patch b/target/linux/brcm63xx/patches-3.14/315-MIPS-BCM63XX-remove-RUNTIME_DETECT-usage-from-enet-c.patch
deleted file mode 100644
index 0dba2e2..0000000
--- a/target/linux/brcm63xx/patches-3.14/315-MIPS-BCM63XX-remove-RUNTIME_DETECT-usage-from-enet-c.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From ed6c71de07ad042691ec02e9eb97375ddc91ed01 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 3 Dec 2013 13:45:22 +0100
-Subject: [PATCH 6/8] MIPS: BCM63XX: remove !RUNTIME_DETECT usage from enet
- code
-
----
- arch/mips/bcm63xx/dev-enet.c | 4 --
- .../include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 46 ----------------------
- 2 files changed, 50 deletions(-)
-
---- a/arch/mips/bcm63xx/dev-enet.c
-+++ b/arch/mips/bcm63xx/dev-enet.c
-@@ -14,7 +14,6 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_regs.h>
-
--#ifdef BCMCPU_RUNTIME_DETECT
- static const unsigned long bcm6348_regs_enetdmac[] = {
- [ENETDMAC_CHANCFG] = ENETDMAC_CHANCFG_REG,
- [ENETDMAC_IR] = ENETDMAC_IR_REG,
-@@ -43,9 +42,6 @@ static __init void bcm63xx_enetdmac_regs
- else
- bcm63xx_regs_enetdmac = bcm6348_regs_enetdmac;
- }
--#else
--static __init void bcm63xx_enetdmac_regs_init(void) { }
--#endif
-
- static struct resource shared_res[] = {
- {
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
-@@ -112,55 +112,9 @@ enum bcm63xx_regs_enetdmac {
-
- static inline unsigned long bcm63xx_enetdmacreg(enum bcm63xx_regs_enetdmac reg)
- {
--#ifdef BCMCPU_RUNTIME_DETECT
- extern const unsigned long *bcm63xx_regs_enetdmac;
-
- return bcm63xx_regs_enetdmac[reg];
--#else
--#ifdef CONFIG_BCM63XX_CPU_6345
-- switch (reg) {
-- case ENETDMAC_CHANCFG:
-- return ENETDMA_6345_CHANCFG_REG;
-- case ENETDMAC_IR:
-- return ENETDMA_6345_IR_REG;
-- case ENETDMAC_IRMASK:
-- return ENETDMA_6345_IRMASK_REG;
-- case ENETDMAC_MAXBURST:
-- return ENETDMA_6345_MAXBURST_REG;
-- case ENETDMAC_BUFALLOC:
-- return ENETDMA_6345_BUFALLOC_REG;
-- case ENETDMAC_RSTART:
-- return ENETDMA_6345_RSTART_REG;
-- case ENETDMAC_FC:
-- return ENETDMA_6345_FC_REG;
-- case ENETDMAC_LEN:
-- return ENETDMA_6345_LEN_REG;
-- }
--#endif
--#if defined(CONFIG_BCM63XX_CPU_6328) || \
-- defined(CONFIG_BCM63XX_CPU_6338) || \
-- defined(CONFIG_BCM63XX_CPU_6348) || \
-- defined(CONFIG_BCM63XX_CPU_6358) || \
-- defined(CONFIG_BCM63XX_CPU_6362) || \
-- defined(CONFIG_BCM63XX_CPU_6368)
-- switch (reg) {
-- case ENETDMAC_CHANCFG:
-- return ENETDMAC_CHANCFG_REG;
-- case ENETDMAC_IR:
-- return ENETDMAC_IR_REG;
-- case ENETDMAC_IRMASK:
-- return ENETDMAC_IRMASK_REG;
-- case ENETDMAC_MAXBURST:
-- return ENETDMAC_MAXBURST_REG;
-- case ENETDMAC_BUFALLOC:
-- case ENETDMAC_RSTART:
-- case ENETDMAC_FC:
-- case ENETDMAC_LEN:
-- return 0;
-- }
--#endif
--#endif
-- return 0;
- }
-
-
diff --git a/target/linux/brcm63xx/patches-3.14/316-MIPS-BCM63XX-remove-RUNTIME_DETECT-in-cpu-feature-ov.patch b/target/linux/brcm63xx/patches-3.14/316-MIPS-BCM63XX-remove-RUNTIME_DETECT-in-cpu-feature-ov.patch
deleted file mode 100644
index 6316b8d..0000000
--- a/target/linux/brcm63xx/patches-3.14/316-MIPS-BCM63XX-remove-RUNTIME_DETECT-in-cpu-feature-ov.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 12c6957004d6770f4b34d59d8a3cafd5d8bfce15 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 3 Dec 2013 14:06:12 +0100
-Subject: [PATCH 7/8] MIPS: BCM63XX: remove !RUNTIME_DETECT in
- cpu-feature-overrides
-
-All three SoCs have in common they have a BMIPS32/BMIPS3300 CPU, so
-we can replace this as no SoC with BMIPS4350 support enabled.
----
- arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/cpu-feature-overrides.h
-@@ -24,7 +24,7 @@
- #define cpu_has_smartmips 0
- #define cpu_has_vtag_icache 0
-
--#if !defined(BCMCPU_RUNTIME_DETECT) && (defined(CONFIG_BCM63XX_CPU_6348) || defined(CONFIG_BCM63XX_CPU_6345) || defined(CONFIG_BCM63XX_CPU_6338))
-+#if !defined(CONFIG_SYS_HAS_CPU_BMIPS4350)
- #define cpu_has_dc_aliases 0
- #endif
-
diff --git a/target/linux/brcm63xx/patches-3.14/317-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-for-bcmcpu_g.patch b/target/linux/brcm63xx/patches-3.14/317-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-for-bcmcpu_g.patch
deleted file mode 100644
index e40cfa0..0000000
--- a/target/linux/brcm63xx/patches-3.14/317-MIPS-BCM63XX-remove-RUNTIME_DETECT-code-for-bcmcpu_g.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-From 78c3d2e796a28ad55f6c2310a11ab22e91bb52fc Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Mon, 2 Dec 2013 12:30:44 +0100
-Subject: [PATCH 8/8] MIPS: BCM63XX: remove !RUNTIME_DETECT code for
- bcmcpu_get_id
-
-Use the same pattern as with get_*_cpu_type() to allow the compiler
-to remove code for non enabled devices.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/cpu.c | 11 +--
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 120 +++++++----------------
- 2 files changed, 38 insertions(+), 93 deletions(-)
-
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -24,7 +24,9 @@ EXPORT_SYMBOL(bcm63xx_regs_base);
- const int *bcm63xx_irqs;
- EXPORT_SYMBOL(bcm63xx_irqs);
-
--static u16 bcm63xx_cpu_id;
-+u16 bcm63xx_cpu_id __read_mostly;
-+EXPORT_SYMBOL(bcm63xx_cpu_id);
-+
- static u8 bcm63xx_cpu_rev;
- static unsigned int bcm63xx_cpu_freq;
- static unsigned int bcm63xx_memory_size;
-@@ -97,13 +99,6 @@ static const int bcm6368_irqs[] = {
-
- };
-
--u16 __bcm63xx_get_cpu_id(void)
--{
-- return bcm63xx_cpu_id;
--}
--
--EXPORT_SYMBOL(__bcm63xx_get_cpu_id);
--
- u8 bcm63xx_get_cpu_rev(void)
- {
- return bcm63xx_cpu_rev;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -19,118 +19,68 @@
- #define BCM6368_CPU_ID 0x6368
-
- void __init bcm63xx_cpu_init(void);
--u16 __bcm63xx_get_cpu_id(void);
- u8 bcm63xx_get_cpu_rev(void);
- unsigned int bcm63xx_get_cpu_freq(void);
-
-+static inline u16 __pure __bcm63xx_get_cpu_id(const u16 cpu_id)
-+{
-+ switch (cpu_id) {
- #ifdef CONFIG_BCM63XX_CPU_3368
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM3368_CPU_ID
--# endif
--# define BCMCPU_IS_3368() (bcm63xx_get_cpu_id() == BCM3368_CPU_ID)
--#else
--# define BCMCPU_IS_3368() (0)
-+ case BCM3368_CPU_ID:
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6328
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM6328_CPU_ID
--# endif
--# define BCMCPU_IS_6328() (bcm63xx_get_cpu_id() == BCM6328_CPU_ID)
--#else
--# define BCMCPU_IS_6328() (0)
-+ case BCM6328_CPU_ID:
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6338
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM6338_CPU_ID
--# endif
--# define BCMCPU_IS_6338() (bcm63xx_get_cpu_id() == BCM6338_CPU_ID)
--#else
--# define BCMCPU_IS_6338() (0)
-+ case BCM6338_CPU_ID:
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6345
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM6345_CPU_ID
--# endif
--# define BCMCPU_IS_6345() (bcm63xx_get_cpu_id() == BCM6345_CPU_ID)
--#else
--# define BCMCPU_IS_6345() (0)
-+ case BCM6345_CPU_ID:
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6348
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM6348_CPU_ID
--# endif
--# define BCMCPU_IS_6348() (bcm63xx_get_cpu_id() == BCM6348_CPU_ID)
--#else
--# define BCMCPU_IS_6348() (0)
-+ case BCM6348_CPU_ID:
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM6358_CPU_ID
--# endif
--# define BCMCPU_IS_6358() (bcm63xx_get_cpu_id() == BCM6358_CPU_ID)
--#else
--# define BCMCPU_IS_6358() (0)
-+ case BCM6358_CPU_ID:
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6362
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM6362_CPU_ID
--# endif
--# define BCMCPU_IS_6362() (bcm63xx_get_cpu_id() == BCM6362_CPU_ID)
--#else
--# define BCMCPU_IS_6362() (0)
-+ case BCM6362_CPU_ID:
- #endif
-
--
- #ifdef CONFIG_BCM63XX_CPU_6368
--# ifdef bcm63xx_get_cpu_id
--# undef bcm63xx_get_cpu_id
--# define bcm63xx_get_cpu_id() __bcm63xx_get_cpu_id()
--# define BCMCPU_RUNTIME_DETECT
--# else
--# define bcm63xx_get_cpu_id() BCM6368_CPU_ID
--# endif
--# define BCMCPU_IS_6368() (bcm63xx_get_cpu_id() == BCM6368_CPU_ID)
--#else
--# define BCMCPU_IS_6368() (0)
--#endif
--
--#ifndef bcm63xx_get_cpu_id
--#error "No CPU support configured"
-+ case BCM6368_CPU_ID:
- #endif
-+ break;
-+ default:
-+ unreachable();
-+ }
-+
-+ return cpu_id;
-+}
-+
-+extern u16 bcm63xx_cpu_id;
-+
-+static inline u16 __pure bcm63xx_get_cpu_id(void)
-+{
-+ const u16 cpu_id = bcm63xx_cpu_id;
-+
-+ return __bcm63xx_get_cpu_id(cpu_id);
-+}
-+
-+#define BCMCPU_IS_3368() (bcm63xx_get_cpu_id() == BCM3368_CPU_ID)
-+#define BCMCPU_IS_6328() (bcm63xx_get_cpu_id() == BCM6328_CPU_ID)
-+#define BCMCPU_IS_6338() (bcm63xx_get_cpu_id() == BCM6338_CPU_ID)
-+#define BCMCPU_IS_6345() (bcm63xx_get_cpu_id() == BCM6345_CPU_ID)
-+#define BCMCPU_IS_6348() (bcm63xx_get_cpu_id() == BCM6348_CPU_ID)
-+#define BCMCPU_IS_6358() (bcm63xx_get_cpu_id() == BCM6358_CPU_ID)
-+#define BCMCPU_IS_6362() (bcm63xx_get_cpu_id() == BCM6362_CPU_ID)
-+#define BCMCPU_IS_6368() (bcm63xx_get_cpu_id() == BCM6368_CPU_ID)
-
- /*
- * While registers sets are (mostly) the same across 63xx CPU, base
diff --git a/target/linux/brcm63xx/patches-3.14/318-MIPS-BCM63XX-add-width-to-__dispatch_internal.patch b/target/linux/brcm63xx/patches-3.14/318-MIPS-BCM63XX-add-width-to-__dispatch_internal.patch
deleted file mode 100644
index dc8f8b3..0000000
--- a/target/linux/brcm63xx/patches-3.14/318-MIPS-BCM63XX-add-width-to-__dispatch_internal.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From a2015bfad293a7eb79519beb60381cb996c6e298 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 21 Mar 2013 17:05:15 +0100
-Subject: [PATCH 01/10] MIPS: BCM63XX: add width to __dispatch_internal
-
-Make it follow the same naming convention as the other functions.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -19,7 +19,7 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_irq.h>
-
--static void __dispatch_internal(void) __maybe_unused;
-+static void __dispatch_internal_32(void) __maybe_unused;
- static void __dispatch_internal_64(void) __maybe_unused;
- static void __internal_irq_mask_32(unsigned int irq) __maybe_unused;
- static void __internal_irq_mask_64(unsigned int irq) __maybe_unused;
-@@ -117,7 +117,7 @@ static void bcm63xx_init_irq(void)
- }
-
- if (irq_bits == 32) {
-- dispatch_internal = __dispatch_internal;
-+ dispatch_internal = __dispatch_internal_32;
- internal_irq_mask = __internal_irq_mask_32;
- internal_irq_unmask = __internal_irq_unmask_32;
- } else {
-@@ -149,7 +149,7 @@ static inline void handle_internal(int i
- * will resume the loop where it ended the last time we left this
- * function.
- */
--static void __dispatch_internal(void)
-+static void __dispatch_internal_32(void)
- {
- u32 pending;
- static int i;
diff --git a/target/linux/brcm63xx/patches-3.14/319-MIPS-BCM63XX-move-bcm63xx_init_irq-down.patch b/target/linux/brcm63xx/patches-3.14/319-MIPS-BCM63XX-move-bcm63xx_init_irq-down.patch
deleted file mode 100644
index c9dc4ce..0000000
--- a/target/linux/brcm63xx/patches-3.14/319-MIPS-BCM63XX-move-bcm63xx_init_irq-down.patch
+++ /dev/null
@@ -1,225 +0,0 @@
-From 6e79c6dd02aa56e37eb071797f0eb5e3fb588cba Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 15 Dec 2013 20:52:53 +0100
-Subject: [PATCH 02/10] MIPS: BCM63XX: move bcm63xx_init_irq down
-
-Allows up to drop the prototypes from the top.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 190 +++++++++++++++++++++++-------------------------
- 1 file changed, 92 insertions(+), 98 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -19,13 +19,6 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_irq.h>
-
--static void __dispatch_internal_32(void) __maybe_unused;
--static void __dispatch_internal_64(void) __maybe_unused;
--static void __internal_irq_mask_32(unsigned int irq) __maybe_unused;
--static void __internal_irq_mask_64(unsigned int irq) __maybe_unused;
--static void __internal_irq_unmask_32(unsigned int irq) __maybe_unused;
--static void __internal_irq_unmask_64(unsigned int irq) __maybe_unused;
--
- static u32 irq_stat_addr, irq_mask_addr;
- static void (*dispatch_internal)(void);
- static int is_ext_irq_cascaded;
-@@ -35,97 +28,6 @@ static unsigned int ext_irq_cfg_reg1, ex
- static void (*internal_irq_mask)(unsigned int irq);
- static void (*internal_irq_unmask)(unsigned int irq);
-
--static void bcm63xx_init_irq(void)
--{
-- int irq_bits;
--
-- irq_stat_addr = bcm63xx_regset_address(RSET_PERF);
-- irq_mask_addr = bcm63xx_regset_address(RSET_PERF);
--
-- switch (bcm63xx_get_cpu_id()) {
-- case BCM3368_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_3368_REG;
-- irq_mask_addr += PERF_IRQMASK_3368_REG;
-- irq_bits = 32;
-- ext_irq_count = 4;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
-- break;
-- case BCM6328_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6328_REG;
-- irq_mask_addr += PERF_IRQMASK_6328_REG;
-- irq_bits = 64;
-- ext_irq_count = 4;
-- is_ext_irq_cascaded = 1;
-- ext_irq_start = BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-- ext_irq_end = BCM_6328_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6328;
-- break;
-- case BCM6338_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6338_REG;
-- irq_mask_addr += PERF_IRQMASK_6338_REG;
-- irq_bits = 32;
-- ext_irq_count = 4;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
-- break;
-- case BCM6345_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6345_REG;
-- irq_mask_addr += PERF_IRQMASK_6345_REG;
-- irq_bits = 32;
-- ext_irq_count = 4;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
-- break;
-- case BCM6348_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6348_REG;
-- irq_mask_addr += PERF_IRQMASK_6348_REG;
-- irq_bits = 32;
-- ext_irq_count = 4;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6348;
-- break;
-- case BCM6358_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6358_REG;
-- irq_mask_addr += PERF_IRQMASK_6358_REG;
-- irq_bits = 32;
-- ext_irq_count = 4;
-- is_ext_irq_cascaded = 1;
-- ext_irq_start = BCM_6358_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-- ext_irq_end = BCM_6358_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6358;
-- break;
-- case BCM6362_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6362_REG;
-- irq_mask_addr += PERF_IRQMASK_6362_REG;
-- irq_bits = 64;
-- ext_irq_count = 4;
-- is_ext_irq_cascaded = 1;
-- ext_irq_start = BCM_6362_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-- ext_irq_end = BCM_6362_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6362;
-- break;
-- case BCM6368_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6368_REG;
-- irq_mask_addr += PERF_IRQMASK_6368_REG;
-- irq_bits = 64;
-- ext_irq_count = 6;
-- is_ext_irq_cascaded = 1;
-- ext_irq_start = BCM_6368_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-- ext_irq_end = BCM_6368_EXT_IRQ5 - IRQ_INTERNAL_BASE;
-- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6368;
-- ext_irq_cfg_reg2 = PERF_EXTIRQ_CFG_REG2_6368;
-- break;
-- default:
-- BUG();
-- }
--
-- if (irq_bits == 32) {
-- dispatch_internal = __dispatch_internal_32;
-- internal_irq_mask = __internal_irq_mask_32;
-- internal_irq_unmask = __internal_irq_unmask_32;
-- } else {
-- dispatch_internal = __dispatch_internal_64;
-- internal_irq_mask = __internal_irq_mask_64;
-- internal_irq_unmask = __internal_irq_unmask_64;
-- }
--}
-
- static inline u32 get_ext_irq_perf_reg(int irq)
- {
-@@ -451,6 +353,98 @@ static struct irqaction cpu_ext_cascade_
- .flags = IRQF_NO_THREAD,
- };
-
-+static void bcm63xx_init_irq(void)
-+{
-+ int irq_bits;
-+
-+ irq_stat_addr = bcm63xx_regset_address(RSET_PERF);
-+ irq_mask_addr = bcm63xx_regset_address(RSET_PERF);
-+
-+ switch (bcm63xx_get_cpu_id()) {
-+ case BCM3368_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_3368_REG;
-+ irq_mask_addr += PERF_IRQMASK_3368_REG;
-+ irq_bits = 32;
-+ ext_irq_count = 4;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
-+ break;
-+ case BCM6328_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_6328_REG;
-+ irq_mask_addr += PERF_IRQMASK_6328_REG;
-+ irq_bits = 64;
-+ ext_irq_count = 4;
-+ is_ext_irq_cascaded = 1;
-+ ext_irq_start = BCM_6328_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-+ ext_irq_end = BCM_6328_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6328;
-+ break;
-+ case BCM6338_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_6338_REG;
-+ irq_mask_addr += PERF_IRQMASK_6338_REG;
-+ irq_bits = 32;
-+ ext_irq_count = 4;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
-+ break;
-+ case BCM6345_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_6345_REG;
-+ irq_mask_addr += PERF_IRQMASK_6345_REG;
-+ irq_bits = 32;
-+ ext_irq_count = 4;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
-+ break;
-+ case BCM6348_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_6348_REG;
-+ irq_mask_addr += PERF_IRQMASK_6348_REG;
-+ irq_bits = 32;
-+ ext_irq_count = 4;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6348;
-+ break;
-+ case BCM6358_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_6358_REG;
-+ irq_mask_addr += PERF_IRQMASK_6358_REG;
-+ irq_bits = 32;
-+ ext_irq_count = 4;
-+ is_ext_irq_cascaded = 1;
-+ ext_irq_start = BCM_6358_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-+ ext_irq_end = BCM_6358_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6358;
-+ break;
-+ case BCM6362_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_6362_REG;
-+ irq_mask_addr += PERF_IRQMASK_6362_REG;
-+ irq_bits = 64;
-+ ext_irq_count = 4;
-+ is_ext_irq_cascaded = 1;
-+ ext_irq_start = BCM_6362_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-+ ext_irq_end = BCM_6362_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6362;
-+ break;
-+ case BCM6368_CPU_ID:
-+ irq_stat_addr += PERF_IRQSTAT_6368_REG;
-+ irq_mask_addr += PERF_IRQMASK_6368_REG;
-+ irq_bits = 64;
-+ ext_irq_count = 6;
-+ is_ext_irq_cascaded = 1;
-+ ext_irq_start = BCM_6368_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-+ ext_irq_end = BCM_6368_EXT_IRQ5 - IRQ_INTERNAL_BASE;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6368;
-+ ext_irq_cfg_reg2 = PERF_EXTIRQ_CFG_REG2_6368;
-+ break;
-+ default:
-+ BUG();
-+ }
-+
-+ if (irq_bits == 32) {
-+ dispatch_internal = __dispatch_internal_32;
-+ internal_irq_mask = __internal_irq_mask_32;
-+ internal_irq_unmask = __internal_irq_unmask_32;
-+ } else {
-+ dispatch_internal = __dispatch_internal_64;
-+ internal_irq_mask = __internal_irq_mask_64;
-+ internal_irq_unmask = __internal_irq_unmask_64;
-+ }
-+}
-+
- void __init arch_init_irq(void)
- {
- int i;
diff --git a/target/linux/brcm63xx/patches-3.14/320-MIPS-BCM63XX-replace-irq-dispatch-code-with-a-generi.patch b/target/linux/brcm63xx/patches-3.14/320-MIPS-BCM63XX-replace-irq-dispatch-code-with-a-generi.patch
deleted file mode 100644
index 021d0d9..0000000
--- a/target/linux/brcm63xx/patches-3.14/320-MIPS-BCM63XX-replace-irq-dispatch-code-with-a-generi.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 39b46ed1c9fe71890566e129d9ac5feb8421b3b4 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 18 Apr 2013 21:14:49 +0200
-Subject: [PATCH 03/10] MIPS: BCM63XX: replace irq dispatch code with a generic
- version
-
-The generic version uses a variable length of u32 registers instead of u32/u64.
-This allows easier support for "wider" registers without having to rewrite
-everything.
-
-This "generic" version is as fast as the old version in the best case
-(i == next set bit), and twice as fast in the worst case in 64 bits.
-
-Using a macro was chosen over a (forced) inline version because gcc generated
-more compact code with the macro.
-
-The change from (signed) int to unsigned int for i and to_call was intentional
-as the value can be only between 0 and (width - 1) anyway, and allowed gcc to
-optimise the code a bit further.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 130 +++++++++++++++++++++---------------------------
- 1 file changed, 56 insertions(+), 74 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -51,47 +51,65 @@ static inline void handle_internal(int i
- * will resume the loop where it ended the last time we left this
- * function.
- */
--static void __dispatch_internal_32(void)
--{
-- u32 pending;
-- static int i;
--
-- pending = bcm_readl(irq_stat_addr) & bcm_readl(irq_mask_addr);
--
-- if (!pending)
-- return ;
--
-- while (1) {
-- int to_call = i;
-
-- i = (i + 1) & 0x1f;
-- if (pending & (1 << to_call)) {
-- handle_internal(to_call);
-- break;
-- }
-- }
-+#define BUILD_IPIC_INTERNAL(width) \
-+void __dispatch_internal_##width(void) \
-+{ \
-+ u32 pending[width / 32]; \
-+ unsigned int src, tgt; \
-+ bool irqs_pending = false; \
-+ static unsigned int i; \
-+ \
-+ /* read registers in reverse order */ \
-+ for (src = 0, tgt = (width / 32); src < (width / 32); src++) { \
-+ u32 val; \
-+ \
-+ val = bcm_readl(irq_stat_addr + src * sizeof(u32)); \
-+ val &= bcm_readl(irq_mask_addr + src * sizeof(u32)); \
-+ pending[--tgt] = val; \
-+ \
-+ if (val) \
-+ irqs_pending = true; \
-+ } \
-+ \
-+ if (!irqs_pending) \
-+ return; \
-+ \
-+ while (1) { \
-+ unsigned int to_call = i; \
-+ \
-+ i = (i + 1) & (width - 1); \
-+ if (pending[to_call / 32] & (1 << (to_call & 0x1f))) { \
-+ handle_internal(to_call); \
-+ break; \
-+ } \
-+ } \
-+} \
-+ \
-+static void __internal_irq_mask_##width(unsigned int irq) \
-+{ \
-+ u32 val; \
-+ unsigned reg = (irq / 32) ^ (width/32 - 1); \
-+ unsigned bit = irq & 0x1f; \
-+ \
-+ val = bcm_readl(irq_mask_addr + reg * sizeof(u32)); \
-+ val &= ~(1 << bit); \
-+ bcm_writel(val, irq_mask_addr + reg * sizeof(u32)); \
-+} \
-+ \
-+static void __internal_irq_unmask_##width(unsigned int irq) \
-+{ \
-+ u32 val; \
-+ unsigned reg = (irq / 32) ^ (width/32 - 1); \
-+ unsigned bit = irq & 0x1f; \
-+ \
-+ val = bcm_readl(irq_mask_addr + reg * sizeof(u32)); \
-+ val |= (1 << bit); \
-+ bcm_writel(val, irq_mask_addr + reg * sizeof(u32)); \
- }
-
--static void __dispatch_internal_64(void)
--{
-- u64 pending;
-- static int i;
--
-- pending = bcm_readq(irq_stat_addr) & bcm_readq(irq_mask_addr);
--
-- if (!pending)
-- return ;
--
-- while (1) {
-- int to_call = i;
--
-- i = (i + 1) & 0x3f;
-- if (pending & (1ull << to_call)) {
-- handle_internal(to_call);
-- break;
-- }
-- }
--}
-+BUILD_IPIC_INTERNAL(32);
-+BUILD_IPIC_INTERNAL(64);
-
- asmlinkage void plat_irq_dispatch(void)
- {
-@@ -128,42 +146,6 @@ asmlinkage void plat_irq_dispatch(void)
- * internal IRQs operations: only mask/unmask on PERF irq mask
- * register.
- */
--static void __internal_irq_mask_32(unsigned int irq)
--{
-- u32 mask;
--
-- mask = bcm_readl(irq_mask_addr);
-- mask &= ~(1 << irq);
-- bcm_writel(mask, irq_mask_addr);
--}
--
--static void __internal_irq_mask_64(unsigned int irq)
--{
-- u64 mask;
--
-- mask = bcm_readq(irq_mask_addr);
-- mask &= ~(1ull << irq);
-- bcm_writeq(mask, irq_mask_addr);
--}
--
--static void __internal_irq_unmask_32(unsigned int irq)
--{
-- u32 mask;
--
-- mask = bcm_readl(irq_mask_addr);
-- mask |= (1 << irq);
-- bcm_writel(mask, irq_mask_addr);
--}
--
--static void __internal_irq_unmask_64(unsigned int irq)
--{
-- u64 mask;
--
-- mask = bcm_readq(irq_mask_addr);
-- mask |= (1ull << irq);
-- bcm_writeq(mask, irq_mask_addr);
--}
--
- static void bcm63xx_internal_irq_mask(struct irq_data *d)
- {
- internal_irq_mask(d->irq - IRQ_INTERNAL_BASE);
diff --git a/target/linux/brcm63xx/patches-3.14/321-MIPS-BCM63XX-append-irq-line-to-irq_-stat-mask.patch b/target/linux/brcm63xx/patches-3.14/321-MIPS-BCM63XX-append-irq-line-to-irq_-stat-mask.patch
deleted file mode 100644
index 5b63488..0000000
--- a/target/linux/brcm63xx/patches-3.14/321-MIPS-BCM63XX-append-irq-line-to-irq_-stat-mask.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-From 96ce0a9d195b2781d6f8d919dea8056b1c409703 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 25 Apr 2013 00:24:06 +0200
-Subject: [PATCH 04/10] MIPS: BCM63XX: append irq line to irq_{stat,mask}*
-
-The SMP capable irq controllers have two interrupt output pins which are
-controlled through separate registers, so make the variables arrays.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 51 ++++++++++++-----------
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 16 +++----
- 2 files changed, 34 insertions(+), 33 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -19,7 +19,8 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_irq.h>
-
--static u32 irq_stat_addr, irq_mask_addr;
-+static u32 irq_stat_addr[2];
-+static u32 irq_mask_addr[2];
- static void (*dispatch_internal)(void);
- static int is_ext_irq_cascaded;
- static unsigned int ext_irq_count;
-@@ -64,8 +65,8 @@ void __dispatch_internal_##width(void)
- for (src = 0, tgt = (width / 32); src < (width / 32); src++) { \
- u32 val; \
- \
-- val = bcm_readl(irq_stat_addr + src * sizeof(u32)); \
-- val &= bcm_readl(irq_mask_addr + src * sizeof(u32)); \
-+ val = bcm_readl(irq_stat_addr[0] + src * sizeof(u32)); \
-+ val &= bcm_readl(irq_mask_addr[0] + src * sizeof(u32)); \
- pending[--tgt] = val; \
- \
- if (val) \
-@@ -92,9 +93,9 @@ static void __internal_irq_mask_##width(
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
- \
-- val = bcm_readl(irq_mask_addr + reg * sizeof(u32)); \
-+ val = bcm_readl(irq_mask_addr[0] + reg * sizeof(u32)); \
- val &= ~(1 << bit); \
-- bcm_writel(val, irq_mask_addr + reg * sizeof(u32)); \
-+ bcm_writel(val, irq_mask_addr[0] + reg * sizeof(u32)); \
- } \
- \
- static void __internal_irq_unmask_##width(unsigned int irq) \
-@@ -103,9 +104,9 @@ static void __internal_irq_unmask_##widt
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
- \
-- val = bcm_readl(irq_mask_addr + reg * sizeof(u32)); \
-+ val = bcm_readl(irq_mask_addr[0] + reg * sizeof(u32)); \
- val |= (1 << bit); \
-- bcm_writel(val, irq_mask_addr + reg * sizeof(u32)); \
-+ bcm_writel(val, irq_mask_addr[0] + reg * sizeof(u32)); \
- }
-
- BUILD_IPIC_INTERNAL(32);
-@@ -339,20 +340,20 @@ static void bcm63xx_init_irq(void)
- {
- int irq_bits;
-
-- irq_stat_addr = bcm63xx_regset_address(RSET_PERF);
-- irq_mask_addr = bcm63xx_regset_address(RSET_PERF);
-+ irq_stat_addr[0] = bcm63xx_regset_address(RSET_PERF);
-+ irq_mask_addr[0] = bcm63xx_regset_address(RSET_PERF);
-
- switch (bcm63xx_get_cpu_id()) {
- case BCM3368_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_3368_REG;
-- irq_mask_addr += PERF_IRQMASK_3368_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_3368_REG;
-+ irq_mask_addr[0] += PERF_IRQMASK_3368_REG;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
- break;
- case BCM6328_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6328_REG;
-- irq_mask_addr += PERF_IRQMASK_6328_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0);
-+ irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0);
- irq_bits = 64;
- ext_irq_count = 4;
- is_ext_irq_cascaded = 1;
-@@ -361,29 +362,29 @@ static void bcm63xx_init_irq(void)
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6328;
- break;
- case BCM6338_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6338_REG;
-- irq_mask_addr += PERF_IRQMASK_6338_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_6338_REG;
-+ irq_mask_addr[0] += PERF_IRQMASK_6338_REG;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
- break;
- case BCM6345_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6345_REG;
-- irq_mask_addr += PERF_IRQMASK_6345_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_6345_REG;
-+ irq_mask_addr[0] += PERF_IRQMASK_6345_REG;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
- break;
- case BCM6348_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6348_REG;
-- irq_mask_addr += PERF_IRQMASK_6348_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_6348_REG;
-+ irq_mask_addr[0] += PERF_IRQMASK_6348_REG;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6348;
- break;
- case BCM6358_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6358_REG;
-- irq_mask_addr += PERF_IRQMASK_6358_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_6358_REG(0);
-+ irq_mask_addr[0] += PERF_IRQMASK_6358_REG(0);
- irq_bits = 32;
- ext_irq_count = 4;
- is_ext_irq_cascaded = 1;
-@@ -392,8 +393,8 @@ static void bcm63xx_init_irq(void)
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6358;
- break;
- case BCM6362_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6362_REG;
-- irq_mask_addr += PERF_IRQMASK_6362_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_6362_REG(0);
-+ irq_mask_addr[0] += PERF_IRQMASK_6362_REG(0);
- irq_bits = 64;
- ext_irq_count = 4;
- is_ext_irq_cascaded = 1;
-@@ -402,8 +403,8 @@ static void bcm63xx_init_irq(void)
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6362;
- break;
- case BCM6368_CPU_ID:
-- irq_stat_addr += PERF_IRQSTAT_6368_REG;
-- irq_mask_addr += PERF_IRQMASK_6368_REG;
-+ irq_stat_addr[0] += PERF_IRQSTAT_6368_REG(0);
-+ irq_mask_addr[0] += PERF_IRQMASK_6368_REG(0);
- irq_bits = 64;
- ext_irq_count = 6;
- is_ext_irq_cascaded = 1;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -215,23 +215,23 @@
-
- /* Interrupt Mask register */
- #define PERF_IRQMASK_3368_REG 0xc
--#define PERF_IRQMASK_6328_REG 0x20
-+#define PERF_IRQMASK_6328_REG(x) (0x20 + (x) * 0x10)
- #define PERF_IRQMASK_6338_REG 0xc
- #define PERF_IRQMASK_6345_REG 0xc
- #define PERF_IRQMASK_6348_REG 0xc
--#define PERF_IRQMASK_6358_REG 0xc
--#define PERF_IRQMASK_6362_REG 0x20
--#define PERF_IRQMASK_6368_REG 0x20
-+#define PERF_IRQMASK_6358_REG(x) (0xc + (x) * 0x2c)
-+#define PERF_IRQMASK_6362_REG(x) (0x20 + (x) * 0x10)
-+#define PERF_IRQMASK_6368_REG(x) (0x20 + (x) * 0x10)
-
- /* Interrupt Status register */
- #define PERF_IRQSTAT_3368_REG 0x10
--#define PERF_IRQSTAT_6328_REG 0x28
-+#define PERF_IRQSTAT_6328_REG(x) (0x28 + (x) * 0x10)
- #define PERF_IRQSTAT_6338_REG 0x10
- #define PERF_IRQSTAT_6345_REG 0x10
- #define PERF_IRQSTAT_6348_REG 0x10
--#define PERF_IRQSTAT_6358_REG 0x10
--#define PERF_IRQSTAT_6362_REG 0x28
--#define PERF_IRQSTAT_6368_REG 0x28
-+#define PERF_IRQSTAT_6358_REG(x) (0x10 + (x) * 0x2c)
-+#define PERF_IRQSTAT_6362_REG(x) (0x28 + (x) * 0x10)
-+#define PERF_IRQSTAT_6368_REG(x) (0x28 + (x) * 0x10)
-
- /* External Interrupt Configuration register */
- #define PERF_EXTIRQ_CFG_REG_3368 0x14
diff --git a/target/linux/brcm63xx/patches-3.14/322-MIPS-BCM63XX-populate-irq_-stat-mask-_addr-for-secon.patch b/target/linux/brcm63xx/patches-3.14/322-MIPS-BCM63XX-populate-irq_-stat-mask-_addr-for-secon.patch
deleted file mode 100644
index 5f94583..0000000
--- a/target/linux/brcm63xx/patches-3.14/322-MIPS-BCM63XX-populate-irq_-stat-mask-_addr-for-secon.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From ff61c72a7a260ab4c4abbddb72c3cd2aea5e0687 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 25 Apr 2013 00:31:29 +0200
-Subject: [PATCH 05/10] MIPS: BCM63XX: populate irq_{stat,mask}_addr for second
- cpu
-
-Set it to zero if there is no second set.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -342,11 +342,15 @@ static void bcm63xx_init_irq(void)
-
- irq_stat_addr[0] = bcm63xx_regset_address(RSET_PERF);
- irq_mask_addr[0] = bcm63xx_regset_address(RSET_PERF);
-+ irq_stat_addr[1] = bcm63xx_regset_address(RSET_PERF);
-+ irq_mask_addr[1] = bcm63xx_regset_address(RSET_PERF);
-
- switch (bcm63xx_get_cpu_id()) {
- case BCM3368_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_3368_REG;
- irq_mask_addr[0] += PERF_IRQMASK_3368_REG;
-+ irq_stat_addr[1] = 0;
-+ irq_stat_addr[1] = 0;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
-@@ -354,6 +358,8 @@ static void bcm63xx_init_irq(void)
- case BCM6328_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0);
- irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0);
-+ irq_stat_addr[1] += PERF_IRQSTAT_6328_REG(1);
-+ irq_stat_addr[1] += PERF_IRQMASK_6328_REG(1);
- irq_bits = 64;
- ext_irq_count = 4;
- is_ext_irq_cascaded = 1;
-@@ -364,6 +370,8 @@ static void bcm63xx_init_irq(void)
- case BCM6338_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6338_REG;
- irq_mask_addr[0] += PERF_IRQMASK_6338_REG;
-+ irq_stat_addr[1] = 0;
-+ irq_mask_addr[1] = 0;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6338;
-@@ -371,6 +379,8 @@ static void bcm63xx_init_irq(void)
- case BCM6345_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6345_REG;
- irq_mask_addr[0] += PERF_IRQMASK_6345_REG;
-+ irq_stat_addr[1] = 0;
-+ irq_mask_addr[1] = 0;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6345;
-@@ -378,6 +388,8 @@ static void bcm63xx_init_irq(void)
- case BCM6348_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6348_REG;
- irq_mask_addr[0] += PERF_IRQMASK_6348_REG;
-+ irq_stat_addr[1] = 0;
-+ irq_mask_addr[1] = 0;
- irq_bits = 32;
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6348;
-@@ -385,6 +397,8 @@ static void bcm63xx_init_irq(void)
- case BCM6358_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6358_REG(0);
- irq_mask_addr[0] += PERF_IRQMASK_6358_REG(0);
-+ irq_stat_addr[1] += PERF_IRQSTAT_6358_REG(1);
-+ irq_mask_addr[1] += PERF_IRQMASK_6358_REG(1);
- irq_bits = 32;
- ext_irq_count = 4;
- is_ext_irq_cascaded = 1;
-@@ -395,6 +409,8 @@ static void bcm63xx_init_irq(void)
- case BCM6362_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6362_REG(0);
- irq_mask_addr[0] += PERF_IRQMASK_6362_REG(0);
-+ irq_stat_addr[1] += PERF_IRQSTAT_6362_REG(1);
-+ irq_mask_addr[1] += PERF_IRQMASK_6362_REG(1);
- irq_bits = 64;
- ext_irq_count = 4;
- is_ext_irq_cascaded = 1;
-@@ -405,6 +421,8 @@ static void bcm63xx_init_irq(void)
- case BCM6368_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6368_REG(0);
- irq_mask_addr[0] += PERF_IRQMASK_6368_REG(0);
-+ irq_stat_addr[1] += PERF_IRQSTAT_6368_REG(1);
-+ irq_mask_addr[1] += PERF_IRQMASK_6368_REG(1);
- irq_bits = 64;
- ext_irq_count = 6;
- is_ext_irq_cascaded = 1;
diff --git a/target/linux/brcm63xx/patches-3.14/323-MIPS-BCM63XX-add-cpu-argument-to-dispatch-internal.patch b/target/linux/brcm63xx/patches-3.14/323-MIPS-BCM63XX-add-cpu-argument-to-dispatch-internal.patch
deleted file mode 100644
index 395dc13..0000000
--- a/target/linux/brcm63xx/patches-3.14/323-MIPS-BCM63XX-add-cpu-argument-to-dispatch-internal.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 43ebef8162adfa7789cb915e60e46103965d7efd Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Fri, 26 Apr 2013 11:21:16 +0200
-Subject: [PATCH 06/10] MIPS: BCM63XX: add cpu argument to dispatch internal
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 18 ++++++++++--------
- 1 file changed, 10 insertions(+), 8 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -19,9 +19,10 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_irq.h>
-
-+
- static u32 irq_stat_addr[2];
- static u32 irq_mask_addr[2];
--static void (*dispatch_internal)(void);
-+static void (*dispatch_internal)(int cpu);
- static int is_ext_irq_cascaded;
- static unsigned int ext_irq_count;
- static unsigned int ext_irq_start, ext_irq_end;
-@@ -54,19 +55,20 @@ static inline void handle_internal(int i
- */
-
- #define BUILD_IPIC_INTERNAL(width) \
--void __dispatch_internal_##width(void) \
-+void __dispatch_internal_##width(int cpu) \
- { \
- u32 pending[width / 32]; \
- unsigned int src, tgt; \
- bool irqs_pending = false; \
-- static unsigned int i; \
-+ static unsigned int i[2]; \
-+ unsigned int *next = &i[cpu]; \
- \
- /* read registers in reverse order */ \
- for (src = 0, tgt = (width / 32); src < (width / 32); src++) { \
- u32 val; \
- \
-- val = bcm_readl(irq_stat_addr[0] + src * sizeof(u32)); \
-- val &= bcm_readl(irq_mask_addr[0] + src * sizeof(u32)); \
-+ val = bcm_readl(irq_stat_addr[cpu] + src * sizeof(u32)); \
-+ val &= bcm_readl(irq_mask_addr[cpu] + src * sizeof(u32)); \
- pending[--tgt] = val; \
- \
- if (val) \
-@@ -77,9 +79,9 @@ void __dispatch_internal_##width(void)
- return; \
- \
- while (1) { \
-- unsigned int to_call = i; \
-+ unsigned int to_call = *next; \
- \
-- i = (i + 1) & (width - 1); \
-+ *next = (*next + 1) & (width - 1); \
- if (pending[to_call / 32] & (1 << (to_call & 0x1f))) { \
- handle_internal(to_call); \
- break; \
-@@ -129,7 +131,7 @@ asmlinkage void plat_irq_dispatch(void)
- if (cause & CAUSEF_IP1)
- do_IRQ(1);
- if (cause & CAUSEF_IP2)
-- dispatch_internal();
-+ dispatch_internal(0);
- if (!is_ext_irq_cascaded) {
- if (cause & CAUSEF_IP3)
- do_IRQ(IRQ_EXT_0);
diff --git a/target/linux/brcm63xx/patches-3.14/324-MIPS-BCM63XX-protect-irq-register-accesses.patch b/target/linux/brcm63xx/patches-3.14/324-MIPS-BCM63XX-protect-irq-register-accesses.patch
deleted file mode 100644
index 18669a1..0000000
--- a/target/linux/brcm63xx/patches-3.14/324-MIPS-BCM63XX-protect-irq-register-accesses.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 5e86f3988854c62c0788e4820caf722fec7c791b Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 21 Apr 2013 15:38:56 +0200
-Subject: [PATCH 07/10] MIPS: BCM63XX: protect irq register accesses
-
-Since we will have the chance of accessing the registers concurrently,
-protect any accesses through a spinlock.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 26 ++++++++++++++++++++++++++
- 1 file changed, 26 insertions(+)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -12,6 +12,7 @@
- #include <linux/interrupt.h>
- #include <linux/module.h>
- #include <linux/irq.h>
-+#include <linux/spinlock.h>
- #include <asm/irq_cpu.h>
- #include <asm/mipsregs.h>
- #include <bcm63xx_cpu.h>
-@@ -20,6 +21,9 @@
- #include <bcm63xx_irq.h>
-
-
-+static DEFINE_SPINLOCK(ipic_lock);
-+static DEFINE_SPINLOCK(epic_lock);
-+
- static u32 irq_stat_addr[2];
- static u32 irq_mask_addr[2];
- static void (*dispatch_internal)(int cpu);
-@@ -62,8 +66,10 @@ void __dispatch_internal_##width(int cpu
- bool irqs_pending = false; \
- static unsigned int i[2]; \
- unsigned int *next = &i[cpu]; \
-+ unsigned long flags; \
- \
- /* read registers in reverse order */ \
-+ spin_lock_irqsave(&ipic_lock, flags); \
- for (src = 0, tgt = (width / 32); src < (width / 32); src++) { \
- u32 val; \
- \
-@@ -74,6 +80,7 @@ void __dispatch_internal_##width(int cpu
- if (val) \
- irqs_pending = true; \
- } \
-+ spin_unlock_irqrestore(&ipic_lock, flags); \
- \
- if (!irqs_pending) \
- return; \
-@@ -94,10 +101,13 @@ static void __internal_irq_mask_##width(
- u32 val; \
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
-+ unsigned long flags; \
- \
-+ spin_lock_irqsave(&ipic_lock, flags); \
- val = bcm_readl(irq_mask_addr[0] + reg * sizeof(u32)); \
- val &= ~(1 << bit); \
- bcm_writel(val, irq_mask_addr[0] + reg * sizeof(u32)); \
-+ spin_unlock_irqrestore(&ipic_lock, flags); \
- } \
- \
- static void __internal_irq_unmask_##width(unsigned int irq) \
-@@ -105,10 +115,13 @@ static void __internal_irq_unmask_##widt
- u32 val; \
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
-+ unsigned long flags; \
- \
-+ spin_lock_irqsave(&ipic_lock, flags); \
- val = bcm_readl(irq_mask_addr[0] + reg * sizeof(u32)); \
- val |= (1 << bit); \
- bcm_writel(val, irq_mask_addr[0] + reg * sizeof(u32)); \
-+ spin_unlock_irqrestore(&ipic_lock, flags); \
- }
-
- BUILD_IPIC_INTERNAL(32);
-@@ -167,8 +180,10 @@ static void bcm63xx_external_irq_mask(st
- {
- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE;
- u32 reg, regaddr;
-+ unsigned long flags;
-
- regaddr = get_ext_irq_perf_reg(irq);
-+ spin_lock_irqsave(&epic_lock, flags);
- reg = bcm_perf_readl(regaddr);
-
- if (BCMCPU_IS_6348())
-@@ -177,6 +192,8 @@ static void bcm63xx_external_irq_mask(st
- reg &= ~EXTIRQ_CFG_MASK(irq % 4);
-
- bcm_perf_writel(reg, regaddr);
-+ spin_unlock_irqrestore(&epic_lock, flags);
-+
- if (is_ext_irq_cascaded)
- internal_irq_mask(irq + ext_irq_start);
- }
-@@ -185,8 +202,10 @@ static void bcm63xx_external_irq_unmask(
- {
- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE;
- u32 reg, regaddr;
-+ unsigned long flags;
-
- regaddr = get_ext_irq_perf_reg(irq);
-+ spin_lock_irqsave(&epic_lock, flags);
- reg = bcm_perf_readl(regaddr);
-
- if (BCMCPU_IS_6348())
-@@ -195,6 +214,7 @@ static void bcm63xx_external_irq_unmask(
- reg |= EXTIRQ_CFG_MASK(irq % 4);
-
- bcm_perf_writel(reg, regaddr);
-+ spin_unlock_irqrestore(&epic_lock, flags);
-
- if (is_ext_irq_cascaded)
- internal_irq_unmask(irq + ext_irq_start);
-@@ -204,8 +224,10 @@ static void bcm63xx_external_irq_clear(s
- {
- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE;
- u32 reg, regaddr;
-+ unsigned long flags;
-
- regaddr = get_ext_irq_perf_reg(irq);
-+ spin_lock_irqsave(&epic_lock, flags);
- reg = bcm_perf_readl(regaddr);
-
- if (BCMCPU_IS_6348())
-@@ -214,6 +236,7 @@ static void bcm63xx_external_irq_clear(s
- reg |= EXTIRQ_CFG_CLEAR(irq % 4);
-
- bcm_perf_writel(reg, regaddr);
-+ spin_unlock_irqrestore(&epic_lock, flags);
- }
-
- static int bcm63xx_external_irq_set_type(struct irq_data *d,
-@@ -222,6 +245,7 @@ static int bcm63xx_external_irq_set_type
- unsigned int irq = d->irq - IRQ_EXTERNAL_BASE;
- u32 reg, regaddr;
- int levelsense, sense, bothedge;
-+ unsigned long flags;
-
- flow_type &= IRQ_TYPE_SENSE_MASK;
-
-@@ -256,6 +280,7 @@ static int bcm63xx_external_irq_set_type
- }
-
- regaddr = get_ext_irq_perf_reg(irq);
-+ spin_lock_irqsave(&epic_lock, flags);
- reg = bcm_perf_readl(regaddr);
- irq %= 4;
-
-@@ -300,6 +325,7 @@ static int bcm63xx_external_irq_set_type
- }
-
- bcm_perf_writel(reg, regaddr);
-+ spin_unlock_irqrestore(&epic_lock, flags);
-
- irqd_set_trigger_type(d, flow_type);
- if (flow_type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
diff --git a/target/linux/brcm63xx/patches-3.14/325-MIPS-BCM63XX-wire-up-the-second-cpu-s-irq-line.patch b/target/linux/brcm63xx/patches-3.14/325-MIPS-BCM63XX-wire-up-the-second-cpu-s-irq-line.patch
deleted file mode 100644
index 6e84890..0000000
--- a/target/linux/brcm63xx/patches-3.14/325-MIPS-BCM63XX-wire-up-the-second-cpu-s-irq-line.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 6e74b82aca08a5ecc4d2f0780254468659427e82 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Fri, 26 Apr 2013 12:03:15 +0200
-Subject: [PATCH 08/10] MIPS: BCM63XX: wire up the second cpu's irq line
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 44 +++++++++++++++++++++++++++++++++++++-------
- 1 file changed, 37 insertions(+), 7 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -102,11 +102,17 @@ static void __internal_irq_mask_##width(
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
- unsigned long flags; \
-+ int cpu; \
- \
- spin_lock_irqsave(&ipic_lock, flags); \
-- val = bcm_readl(irq_mask_addr[0] + reg * sizeof(u32)); \
-- val &= ~(1 << bit); \
-- bcm_writel(val, irq_mask_addr[0] + reg * sizeof(u32)); \
-+ for_each_present_cpu(cpu) { \
-+ if (!irq_mask_addr[cpu]) \
-+ break; \
-+ \
-+ val = bcm_readl(irq_mask_addr[cpu] + reg * sizeof(u32));\
-+ val &= ~(1 << bit); \
-+ bcm_writel(val, irq_mask_addr[cpu] + reg * sizeof(u32));\
-+ } \
- spin_unlock_irqrestore(&ipic_lock, flags); \
- } \
- \
-@@ -116,11 +122,20 @@ static void __internal_irq_unmask_##widt
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
- unsigned long flags; \
-+ int cpu; \
- \
- spin_lock_irqsave(&ipic_lock, flags); \
-- val = bcm_readl(irq_mask_addr[0] + reg * sizeof(u32)); \
-- val |= (1 << bit); \
-- bcm_writel(val, irq_mask_addr[0] + reg * sizeof(u32)); \
-+ for_each_present_cpu(cpu) { \
-+ if (!irq_mask_addr[cpu]) \
-+ break; \
-+ \
-+ val = bcm_readl(irq_mask_addr[cpu] + reg * sizeof(u32));\
-+ if (cpu_online(cpu)) \
-+ val |= (1 << bit); \
-+ else \
-+ val &= ~(1 << bit); \
-+ bcm_writel(val, irq_mask_addr[cpu] + reg * sizeof(u32));\
-+ } \
- spin_unlock_irqrestore(&ipic_lock, flags); \
- }
-
-@@ -145,7 +160,10 @@ asmlinkage void plat_irq_dispatch(void)
- do_IRQ(1);
- if (cause & CAUSEF_IP2)
- dispatch_internal(0);
-- if (!is_ext_irq_cascaded) {
-+ if (is_ext_irq_cascaded) {
-+ if (cause & CAUSEF_IP3)
-+ dispatch_internal(1);
-+ } else {
- if (cause & CAUSEF_IP3)
- do_IRQ(IRQ_EXT_0);
- if (cause & CAUSEF_IP4)
-@@ -358,6 +376,14 @@ static struct irqaction cpu_ip2_cascade_
- .flags = IRQF_NO_THREAD,
- };
-
-+#ifdef CONFIG_SMP
-+static struct irqaction cpu_ip3_cascade_action = {
-+ .handler = no_action,
-+ .name = "cascade_ip3",
-+ .flags = IRQF_NO_THREAD,
-+};
-+#endif
-+
- static struct irqaction cpu_ext_cascade_action = {
- .handler = no_action,
- .name = "cascade_extirq",
-@@ -494,4 +520,8 @@ void __init arch_init_irq(void)
- }
-
- setup_irq(MIPS_CPU_IRQ_BASE + 2, &cpu_ip2_cascade_action);
-+#ifdef CONFIG_SMP
-+ if (is_ext_irq_cascaded)
-+ setup_irq(MIPS_CPU_IRQ_BASE + 3, &cpu_ip3_cascade_action);
-+#endif
- }
diff --git a/target/linux/brcm63xx/patches-3.14/326-MIPS-BCM63XX-use-irq_desc-as-argument-for-un-mask.patch b/target/linux/brcm63xx/patches-3.14/326-MIPS-BCM63XX-use-irq_desc-as-argument-for-un-mask.patch
deleted file mode 100644
index fc07b4b..0000000
--- a/target/linux/brcm63xx/patches-3.14/326-MIPS-BCM63XX-use-irq_desc-as-argument-for-un-mask.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From e23dc903cd69d32d407ea1b7310bc9a71e00d359 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 30 Apr 2013 11:26:53 +0200
-Subject: [PATCH 09/10] MIPS: BCM63XX: use irq_desc as argument for (un)mask
-
-In preparation for applying affinity, use the irq descriptor as the
-argument for (un)mask.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 18 ++++++++++--------
- 1 file changed, 10 insertions(+), 8 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -31,8 +31,8 @@ static int is_ext_irq_cascaded;
- static unsigned int ext_irq_count;
- static unsigned int ext_irq_start, ext_irq_end;
- static unsigned int ext_irq_cfg_reg1, ext_irq_cfg_reg2;
--static void (*internal_irq_mask)(unsigned int irq);
--static void (*internal_irq_unmask)(unsigned int irq);
-+static void (*internal_irq_mask)(struct irq_data *d);
-+static void (*internal_irq_unmask)(struct irq_data *d);
-
-
- static inline u32 get_ext_irq_perf_reg(int irq)
-@@ -96,9 +96,10 @@ void __dispatch_internal_##width(int cpu
- } \
- } \
- \
--static void __internal_irq_mask_##width(unsigned int irq) \
-+static void __internal_irq_mask_##width(struct irq_data *d) \
- { \
- u32 val; \
-+ unsigned irq = d->irq - IRQ_INTERNAL_BASE; \
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
- unsigned long flags; \
-@@ -116,9 +117,10 @@ static void __internal_irq_mask_##width(
- spin_unlock_irqrestore(&ipic_lock, flags); \
- } \
- \
--static void __internal_irq_unmask_##width(unsigned int irq) \
-+static void __internal_irq_unmask_##width(struct irq_data *d) \
- { \
- u32 val; \
-+ unsigned irq = d->irq - IRQ_INTERNAL_BASE; \
- unsigned reg = (irq / 32) ^ (width/32 - 1); \
- unsigned bit = irq & 0x1f; \
- unsigned long flags; \
-@@ -182,12 +184,12 @@ asmlinkage void plat_irq_dispatch(void)
- */
- static void bcm63xx_internal_irq_mask(struct irq_data *d)
- {
-- internal_irq_mask(d->irq - IRQ_INTERNAL_BASE);
-+ internal_irq_mask(d);
- }
-
- static void bcm63xx_internal_irq_unmask(struct irq_data *d)
- {
-- internal_irq_unmask(d->irq - IRQ_INTERNAL_BASE);
-+ internal_irq_unmask(d);
- }
-
- /*
-@@ -213,7 +215,7 @@ static void bcm63xx_external_irq_mask(st
- spin_unlock_irqrestore(&epic_lock, flags);
-
- if (is_ext_irq_cascaded)
-- internal_irq_mask(irq + ext_irq_start);
-+ internal_irq_mask(irq_get_irq_data(irq + ext_irq_start));
- }
-
- static void bcm63xx_external_irq_unmask(struct irq_data *d)
-@@ -235,7 +237,7 @@ static void bcm63xx_external_irq_unmask(
- spin_unlock_irqrestore(&epic_lock, flags);
-
- if (is_ext_irq_cascaded)
-- internal_irq_unmask(irq + ext_irq_start);
-+ internal_irq_unmask(irq_get_irq_data(irq + ext_irq_start));
- }
-
- static void bcm63xx_external_irq_clear(struct irq_data *d)
diff --git a/target/linux/brcm63xx/patches-3.14/327-MIPS-BCM63XX-allow-setting-affinity-for-IPIC.patch b/target/linux/brcm63xx/patches-3.14/327-MIPS-BCM63XX-allow-setting-affinity-for-IPIC.patch
deleted file mode 100644
index a625b2e..0000000
--- a/target/linux/brcm63xx/patches-3.14/327-MIPS-BCM63XX-allow-setting-affinity-for-IPIC.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 23493b47d8caaa59b18627a01bf443c3b50bb530 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Fri, 26 Apr 2013 12:06:03 +0200
-Subject: [PATCH 10/10] MIPS: BCM63XX: allow setting affinity for IPIC
-
-Wire up the set_affinity call for the internal PIC if booting on
-a cpu supporting it.
-Affinity is kept to boot cpu as default.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/irq.c | 46 ++++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 40 insertions(+), 6 deletions(-)
-
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -32,7 +32,7 @@ static unsigned int ext_irq_count;
- static unsigned int ext_irq_start, ext_irq_end;
- static unsigned int ext_irq_cfg_reg1, ext_irq_cfg_reg2;
- static void (*internal_irq_mask)(struct irq_data *d);
--static void (*internal_irq_unmask)(struct irq_data *d);
-+static void (*internal_irq_unmask)(struct irq_data *d, const struct cpumask *m);
-
-
- static inline u32 get_ext_irq_perf_reg(int irq)
-@@ -51,6 +51,20 @@ static inline void handle_internal(int i
- do_IRQ(intbit + IRQ_INTERNAL_BASE);
- }
-
-+static inline int enable_irq_for_cpu(int cpu, struct irq_data *d,
-+ const struct cpumask *m)
-+{
-+ bool enable = cpu_online(cpu);
-+
-+#ifdef CONFIG_SMP
-+ if (m)
-+ enable &= cpu_isset(cpu, *m);
-+ else if (irqd_affinity_was_set(d))
-+ enable &= cpu_isset(cpu, *d->affinity);
-+#endif
-+ return enable;
-+}
-+
- /*
- * dispatch internal devices IRQ (uart, enet, watchdog, ...). do not
- * prioritize any interrupt relatively to another. the static counter
-@@ -117,7 +131,8 @@ static void __internal_irq_mask_##width(
- spin_unlock_irqrestore(&ipic_lock, flags); \
- } \
- \
--static void __internal_irq_unmask_##width(struct irq_data *d) \
-+static void __internal_irq_unmask_##width(struct irq_data *d, \
-+ const struct cpumask *m) \
- { \
- u32 val; \
- unsigned irq = d->irq - IRQ_INTERNAL_BASE; \
-@@ -132,7 +147,7 @@ static void __internal_irq_unmask_##widt
- break; \
- \
- val = bcm_readl(irq_mask_addr[cpu] + reg * sizeof(u32));\
-- if (cpu_online(cpu)) \
-+ if (enable_irq_for_cpu(cpu, d, m)) \
- val |= (1 << bit); \
- else \
- val &= ~(1 << bit); \
-@@ -189,7 +204,7 @@ static void bcm63xx_internal_irq_mask(st
-
- static void bcm63xx_internal_irq_unmask(struct irq_data *d)
- {
-- internal_irq_unmask(d);
-+ internal_irq_unmask(d, NULL);
- }
-
- /*
-@@ -237,7 +252,8 @@ static void bcm63xx_external_irq_unmask(
- spin_unlock_irqrestore(&epic_lock, flags);
-
- if (is_ext_irq_cascaded)
-- internal_irq_unmask(irq_get_irq_data(irq + ext_irq_start));
-+ internal_irq_unmask(irq_get_irq_data(irq + ext_irq_start),
-+ NULL);
- }
-
- static void bcm63xx_external_irq_clear(struct irq_data *d)
-@@ -356,6 +372,18 @@ static int bcm63xx_external_irq_set_type
- return IRQ_SET_MASK_OK_NOCOPY;
- }
-
-+#ifdef CONFIG_SMP
-+static int bcm63xx_internal_set_affinity(struct irq_data *data,
-+ const struct cpumask *dest,
-+ bool force)
-+{
-+ if (!irqd_irq_disabled(data))
-+ internal_irq_unmask(data, dest);
-+
-+ return 0;
-+}
-+#endif
-+
- static struct irq_chip bcm63xx_internal_irq_chip = {
- .name = "bcm63xx_ipic",
- .irq_mask = bcm63xx_internal_irq_mask,
-@@ -523,7 +551,13 @@ void __init arch_init_irq(void)
-
- setup_irq(MIPS_CPU_IRQ_BASE + 2, &cpu_ip2_cascade_action);
- #ifdef CONFIG_SMP
-- if (is_ext_irq_cascaded)
-+ if (is_ext_irq_cascaded) {
- setup_irq(MIPS_CPU_IRQ_BASE + 3, &cpu_ip3_cascade_action);
-+ bcm63xx_internal_irq_chip.irq_set_affinity =
-+ bcm63xx_internal_set_affinity;
-+
-+ cpumask_clear(irq_default_affinity);
-+ cpumask_set_cpu(smp_processor_id(), irq_default_affinity);
-+ }
- #endif
- }
diff --git a/target/linux/brcm63xx/patches-3.14/328-cfe_simplify_detection.patch b/target/linux/brcm63xx/patches-3.14/328-cfe_simplify_detection.patch
deleted file mode 100644
index e05c91d..0000000
--- a/target/linux/brcm63xx/patches-3.14/328-cfe_simplify_detection.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_board.h
-@@ -1,6 +1,8 @@
- #ifndef BCM63XX_BOARD_H_
- #define BCM63XX_BOARD_H_
-
-+#include <asm/bootinfo.h>
-+
- const char *board_get_name(void);
-
- void board_prom_init(void);
-@@ -9,4 +11,8 @@ void board_setup(void);
-
- int board_register_devices(void);
-
-+static inline bool bcm63xx_is_cfe_present(void) {
-+ return fw_arg3 == 0x43464531;
-+}
-+
- #endif /* ! BCM63XX_BOARD_H_ */
diff --git a/target/linux/brcm63xx/patches-3.14/329-bcm63xxpart_use_cfedetection.patch b/target/linux/brcm63xx/patches-3.14/329-bcm63xxpart_use_cfedetection.patch
deleted file mode 100644
index dedd728..0000000
--- a/target/linux/brcm63xx/patches-3.14/329-bcm63xxpart_use_cfedetection.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/drivers/mtd/bcm63xxpart.c
-+++ b/drivers/mtd/bcm63xxpart.c
-@@ -35,7 +35,7 @@
-
- #include <asm/mach-bcm63xx/bcm63xx_nvram.h>
- #include <linux/bcm963xx_tag.h>
--#include <asm/mach-bcm63xx/board_bcm963xx.h>
-+#include <asm/mach-bcm63xx/bcm63xx_board.h>
-
- #define BCM63XX_EXTENDED_SIZE 0xBFC00000 /* Extended flash address */
-
-@@ -43,30 +43,6 @@
-
- #define BCM63XX_CFE_MAGIC_OFFSET 0x4e0
-
--static int bcm63xx_detect_cfe(struct mtd_info *master)
--{
-- char buf[9];
-- int ret;
-- size_t retlen;
--
-- ret = mtd_read(master, BCM963XX_CFE_VERSION_OFFSET, 5, &retlen,
-- (void *)buf);
-- buf[retlen] = 0;
--
-- if (ret)
-- return ret;
--
-- if (strncmp("cfe-v", buf, 5) == 0)
-- return 0;
--
-- /* very old CFE's do not have the cfe-v string, so check for magic */
-- ret = mtd_read(master, BCM63XX_CFE_MAGIC_OFFSET, 8, &retlen,
-- (void *)buf);
-- buf[retlen] = 0;
--
-- return strncmp("CFE1CFE1", buf, 8);
--}
--
- static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
- struct mtd_partition **pparts,
- struct mtd_part_parser_data *data)
-@@ -85,7 +61,7 @@ static int bcm63xx_parse_cfe_partitions(
- u32 computed_crc;
- bool rootfs_first = false;
-
-- if (bcm63xx_detect_cfe(master))
-+ if (!bcm63xx_is_cfe_present())
- return -EINVAL;
-
- cfe_erasesize = max_t(uint32_t, master->erasesize,
diff --git a/target/linux/brcm63xx/patches-3.14/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch b/target/linux/brcm63xx/patches-3.14/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
deleted file mode 100644
index 3f24473..0000000
--- a/target/linux/brcm63xx/patches-3.14/330-MIPS-BCM63XX-add-a-new-cpu-variant-helper.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From c50acd37b425a8a907a6f7f93aa2e658256e79ce Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 7 Dec 2013 14:08:36 +0100
-Subject: [PATCH 40/53] MIPS: BCM63XX: add a new cpu variant helper
-
----
- arch/mips/bcm63xx/cpu.c | 10 ++++++++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 18 ++++++++++++++++++
- 2 files changed, 28 insertions(+)
-
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -27,6 +27,8 @@ EXPORT_SYMBOL(bcm63xx_irqs);
- u16 bcm63xx_cpu_id __read_mostly;
- EXPORT_SYMBOL(bcm63xx_cpu_id);
-
-+static u32 bcm63xx_cpu_variant __read_mostly;
-+
- static u8 bcm63xx_cpu_rev;
- static unsigned int bcm63xx_cpu_freq;
- static unsigned int bcm63xx_memory_size;
-@@ -99,6 +101,13 @@ static const int bcm6368_irqs[] = {
-
- };
-
-+u32 bcm63xx_get_cpu_variant(void)
-+{
-+ return bcm63xx_cpu_variant;
-+}
-+
-+EXPORT_SYMBOL(bcm63xx_get_cpu_variant);
-+
- u8 bcm63xx_get_cpu_rev(void)
- {
- return bcm63xx_cpu_rev;
-@@ -334,6 +343,7 @@ void __init bcm63xx_cpu_init(void)
- /* read out CPU type */
- tmp = bcm_readl(chipid_reg);
- bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT;
-+ bcm63xx_cpu_variant = bcm63xx_cpu_id;
- bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
-
- switch (bcm63xx_cpu_id) {
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -19,6 +19,7 @@
- #define BCM6368_CPU_ID 0x6368
-
- void __init bcm63xx_cpu_init(void);
-+u32 bcm63xx_get_cpu_variant(void);
- u8 bcm63xx_get_cpu_rev(void);
- unsigned int bcm63xx_get_cpu_freq(void);
-
-@@ -82,6 +83,23 @@ static inline u16 __pure bcm63xx_get_cpu
- #define BCMCPU_IS_6362() (bcm63xx_get_cpu_id() == BCM6362_CPU_ID)
- #define BCMCPU_IS_6368() (bcm63xx_get_cpu_id() == BCM6368_CPU_ID)
-
-+#define BCMCPU_VARIANT_IS_3368() \
-+ (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6328() \
-+ (bcm63xx_get_cpu_variant() == BCM6328_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6338() \
-+ (bcm63xx_get_cpu_variant() == BCM6338_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6345() \
-+ (bcm63xx_get_cpu_variant() == BCM6345_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6348() \
-+ (bcm63xx_get_cpu_variant() == BCM6348_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6358() \
-+ (bcm63xx_get_cpu_cariant() == BCM6358_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6362() \
-+ (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6368() \
-+ (bcm63xx_get_cpu_variant() == BCM6368_CPU_ID)
-+
- /*
- * While registers sets are (mostly) the same across 63xx CPU, base
- * address of these sets do change.
diff --git a/target/linux/brcm63xx/patches-3.14/331-MIPS-BCM63XX-define-variant-id-field.patch b/target/linux/brcm63xx/patches-3.14/331-MIPS-BCM63XX-define-variant-id-field.patch
deleted file mode 100644
index 2e21c65..0000000
--- a/target/linux/brcm63xx/patches-3.14/331-MIPS-BCM63XX-define-variant-id-field.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 3bd8e2535265f06f79ed9c0ad788405441e091dc Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 7 Dec 2013 14:22:41 +0100
-Subject: [PATCH 21/45] MIPS: BCM63XX: define variant id field
-
-Some SoC have a variant id field in the chip id register.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -9,6 +9,8 @@
- #define PERF_REV_REG 0x0
- #define REV_CHIPID_SHIFT 16
- #define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT)
-+#define REV_VARID_SHIFT 12
-+#define REV_VARID_MASK (0xf << REV_VARID_SHIFT)
- #define REV_REVID_SHIFT 0
- #define REV_REVID_MASK (0xff << REV_REVID_SHIFT)
-
diff --git a/target/linux/brcm63xx/patches-3.14/332-MIPS-BCM63XX-detect-BCM6328-variants.patch b/target/linux/brcm63xx/patches-3.14/332-MIPS-BCM63XX-detect-BCM6328-variants.patch
deleted file mode 100644
index dc7fbfc..0000000
--- a/target/linux/brcm63xx/patches-3.14/332-MIPS-BCM63XX-detect-BCM6328-variants.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From d59120f23279ef62a48d9f94847254b061d0a8b6 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 7 Dec 2013 14:30:59 +0100
-Subject: [PATCH 22/45] MIPS: BCM63XX: detect BCM6328 variants
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/cpu.c | 10 ++++++++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 8 ++++++--
- 2 files changed, 16 insertions(+), 2 deletions(-)
-
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -306,6 +306,7 @@ void __init bcm63xx_cpu_init(void)
- struct cpuinfo_mips *c = &current_cpu_data;
- unsigned int cpu = smp_processor_id();
- u32 chipid_reg;
-+ u8 __maybe_unused varid = 0;
-
- /* soc registers location depends on cpu type */
- chipid_reg = 0;
-@@ -345,6 +346,7 @@ void __init bcm63xx_cpu_init(void)
- bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT;
- bcm63xx_cpu_variant = bcm63xx_cpu_id;
- bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
-+ varid = (tmp & REV_VARID_MASK) >> REV_VARID_SHIFT;
-
- switch (bcm63xx_cpu_id) {
- case BCM3368_CPU_ID:
-@@ -354,6 +356,14 @@ void __init bcm63xx_cpu_init(void)
- case BCM6328_CPU_ID:
- bcm63xx_regs_base = bcm6328_regs_base;
- bcm63xx_irqs = bcm6328_irqs;
-+
-+ if (varid == 1)
-+ bcm63xx_cpu_variant = BCM63281_CPU_ID;
-+ else if (varid == 3)
-+ bcm63xx_cpu_variant = BCM63283_CPU_ID;
-+ else
-+ pr_warn("unknown BCM6328 variant: %x\n", varid);
-+
- break;
- case BCM6338_CPU_ID:
- bcm63xx_regs_base = bcm6338_regs_base;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -11,6 +11,8 @@
- */
- #define BCM3368_CPU_ID 0x3368
- #define BCM6328_CPU_ID 0x6328
-+#define BCM63281_CPU_ID 0x63281
-+#define BCM63283_CPU_ID 0x63283
- #define BCM6338_CPU_ID 0x6338
- #define BCM6345_CPU_ID 0x6345
- #define BCM6348_CPU_ID 0x6348
-@@ -85,8 +87,10 @@ static inline u16 __pure bcm63xx_get_cpu
-
- #define BCMCPU_VARIANT_IS_3368() \
- (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID)
--#define BCMCPU_VARIANT_IS_6328() \
-- (bcm63xx_get_cpu_variant() == BCM6328_CPU_ID)
-+#define BCMCPU_VARIANT_IS_63281() \
-+ (bcm63xx_get_cpu_variant() == BCM63281_CPU_ID)
-+#define BCMCPU_VARIANT_IS_63283() \
-+ (bcm63xx_get_cpu_variant() == BCM63283_CPU_ID)
- #define BCMCPU_VARIANT_IS_6338() \
- (bcm63xx_get_cpu_variant() == BCM6338_CPU_ID)
- #define BCMCPU_VARIANT_IS_6345() \
diff --git a/target/linux/brcm63xx/patches-3.14/333-MIPS-BCM63XX-detect-BCM6362-variants.patch b/target/linux/brcm63xx/patches-3.14/333-MIPS-BCM63XX-detect-BCM6362-variants.patch
deleted file mode 100644
index f70c81c..0000000
--- a/target/linux/brcm63xx/patches-3.14/333-MIPS-BCM63XX-detect-BCM6362-variants.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 04458c3db8eb79da21ecde40ab36a1dde52bef06 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 7 Dec 2013 14:33:28 +0100
-Subject: [PATCH 23/45] MIPS: BCM63XX: detect BCM6362 variants
-
----
- arch/mips/bcm63xx/cpu.c | 8 ++++++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 3 +++
- 2 files changed, 11 insertions(+)
-
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -384,6 +384,14 @@ void __init bcm63xx_cpu_init(void)
- case BCM6362_CPU_ID:
- bcm63xx_regs_base = bcm6362_regs_base;
- bcm63xx_irqs = bcm6362_irqs;
-+
-+ if (varid == 1)
-+ bcm63xx_cpu_variant = BCM6362_CPU_ID;
-+ else if (varid == 2)
-+ bcm63xx_cpu_variant = BCM6361_CPU_ID;
-+ else
-+ pr_warn("unknown BCM6362 variant: %x\n", varid);
-+
- break;
- case BCM6368_CPU_ID:
- bcm63xx_regs_base = bcm6368_regs_base;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -17,6 +17,7 @@
- #define BCM6345_CPU_ID 0x6345
- #define BCM6348_CPU_ID 0x6348
- #define BCM6358_CPU_ID 0x6358
-+#define BCM6361_CPU_ID 0x6361
- #define BCM6362_CPU_ID 0x6362
- #define BCM6368_CPU_ID 0x6368
-
-@@ -99,6 +100,8 @@ static inline u16 __pure bcm63xx_get_cpu
- (bcm63xx_get_cpu_variant() == BCM6348_CPU_ID)
- #define BCMCPU_VARIANT_IS_6358() \
- (bcm63xx_get_cpu_cariant() == BCM6358_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6361() \
-+ (bcm63xx_get_cpu_variant() == BCM6361_CPU_ID)
- #define BCMCPU_VARIANT_IS_6362() \
- (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID)
- #define BCMCPU_VARIANT_IS_6368() \
diff --git a/target/linux/brcm63xx/patches-3.14/334-MIPS-BCM63XX-detect-BCM6368-variants.patch b/target/linux/brcm63xx/patches-3.14/334-MIPS-BCM63XX-detect-BCM6368-variants.patch
deleted file mode 100644
index d4f1c5d..0000000
--- a/target/linux/brcm63xx/patches-3.14/334-MIPS-BCM63XX-detect-BCM6368-variants.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 825cc67e56b5e624a05f6850a86d91508b786848 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 7 Dec 2013 14:36:56 +0100
-Subject: [PATCH 24/44] MIPS: BCM63XX: detect BCM6368 variants
-
-The DSL-less BCM6368 variant BCM6367 uses a different chip id. Apart
-from missing DSL, there is no difference to BCM6368, so treat it such.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/cpu.c | 4 ++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 3 +++
- 2 files changed, 7 insertions(+)
-
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -394,8 +394,12 @@ void __init bcm63xx_cpu_init(void)
-
- break;
- case BCM6368_CPU_ID:
-+ case BCM6369_CPU_ID:
- bcm63xx_regs_base = bcm6368_regs_base;
- bcm63xx_irqs = bcm6368_irqs;
-+
-+ /* BCM6369 is a BCM6368 without xDSL, so treat it the same */
-+ bcm63xx_cpu_id = BCM6368_CPU_ID;
- break;
- default:
- panic("unsupported broadcom CPU %x", bcm63xx_cpu_id);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -20,6 +20,7 @@
- #define BCM6361_CPU_ID 0x6361
- #define BCM6362_CPU_ID 0x6362
- #define BCM6368_CPU_ID 0x6368
-+#define BCM6369_CPU_ID 0x6369
-
- void __init bcm63xx_cpu_init(void);
- u32 bcm63xx_get_cpu_variant(void);
-@@ -106,6 +107,8 @@ static inline u16 __pure bcm63xx_get_cpu
- (bcm63xx_get_cpu_variant() == BCM6362_CPU_ID)
- #define BCMCPU_VARIANT_IS_6368() \
- (bcm63xx_get_cpu_variant() == BCM6368_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6369() \
-+ (bcm63xx_get_cpu_variant() == BCM6369_CPU_ID)
-
- /*
- * While registers sets are (mostly) the same across 63xx CPU, base
diff --git a/target/linux/brcm63xx/patches-3.14/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch b/target/linux/brcm63xx/patches-3.14/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch
deleted file mode 100644
index 3230add..0000000
--- a/target/linux/brcm63xx/patches-3.14/335-MIPS-BCM63XX-fix-PCIe-memory-window-size.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From f67f8134b4537c8bbafe7e1975edfe808b813997 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 8 Dec 2013 03:05:54 +0100
-Subject: [PATCH 45/53] MIPS: BCM63XX: fix PCIe memory window size
-
----
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-@@ -41,7 +41,7 @@
- BCM_CB_MEM_SIZE - 1)
-
- #define BCM_PCIE_MEM_BASE_PA 0x10f00000
--#define BCM_PCIE_MEM_SIZE (16 * 1024 * 1024)
-+#define BCM_PCIE_MEM_SIZE (1 * 1024 * 1024)
- #define BCM_PCIE_MEM_END_PA (BCM_PCIE_MEM_BASE_PA + \
- BCM_PCIE_MEM_SIZE - 1)
-
diff --git a/target/linux/brcm63xx/patches-3.14/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch b/target/linux/brcm63xx/patches-3.14/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch
deleted file mode 100644
index d6eb54d..0000000
--- a/target/linux/brcm63xx/patches-3.14/336-MIPS-BCM63XX-dynamically-set-the-pcie-memory-windows.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From aa05464973bc176478af462ca7c53a9239c651d4 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 8 Dec 2013 03:13:06 +0100
-Subject: [PATCH 46/53] MIPS: BCM63XX: dynamically set the pcie memory windows
-
-Different SoCs use different memory windows (and sizes), so don't
-hardcode it.
----
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 8 ++++----
- arch/mips/pci/pci-bcm63xx.c | 15 ++++++++++-----
- 2 files changed, 14 insertions(+), 9 deletions(-)
-
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-@@ -40,10 +40,10 @@
- #define BCM_CB_MEM_END_PA (BCM_CB_MEM_BASE_PA + \
- BCM_CB_MEM_SIZE - 1)
-
--#define BCM_PCIE_MEM_BASE_PA 0x10f00000
--#define BCM_PCIE_MEM_SIZE (1 * 1024 * 1024)
--#define BCM_PCIE_MEM_END_PA (BCM_PCIE_MEM_BASE_PA + \
-- BCM_PCIE_MEM_SIZE - 1)
-+#define BCM_PCIE_MEM_BASE_PA_6328 0x10f00000
-+#define BCM_PCIE_MEM_SIZE_6328 (1 * 1024 * 1024)
-+#define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \
-+ BCM_PCIE_MEM_SIZE_6328 - 1)
-
- /*
- * Internal registers are accessed through KSEG3
---- a/arch/mips/pci/pci-bcm63xx.c
-+++ b/arch/mips/pci/pci-bcm63xx.c
-@@ -77,8 +77,8 @@ struct pci_controller bcm63xx_cb_control
-
- static struct resource bcm_pcie_mem_resource = {
- .name = "bcm63xx PCIe memory space",
-- .start = BCM_PCIE_MEM_BASE_PA,
-- .end = BCM_PCIE_MEM_END_PA,
-+ .start = 0,
-+ .end = 0,
- .flags = IORESOURCE_MEM,
- };
-
-@@ -195,12 +195,12 @@ static int __init bcm63xx_register_pcie(
- bcm_pcie_writel(val, PCIE_CONFIG2_REG);
-
- /* set bar0 to little endian */
-- val = (BCM_PCIE_MEM_BASE_PA >> 20) << BASEMASK_BASE_SHIFT;
-- val |= (BCM_PCIE_MEM_BASE_PA >> 20) << BASEMASK_MASK_SHIFT;
-+ val = (bcm_pcie_mem_resource.start >> 20) << BASEMASK_BASE_SHIFT;
-+ val |= (bcm_pcie_mem_resource.end >> 20) << BASEMASK_MASK_SHIFT;
- val |= BASEMASK_REMAP_EN;
- bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_BASEMASK_REG);
-
-- val = (BCM_PCIE_MEM_BASE_PA >> 20) << REBASE_ADDR_BASE_SHIFT;
-+ val = (bcm_pcie_mem_resource.start >> 20) << REBASE_ADDR_BASE_SHIFT;
- bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_REBASE_ADDR_REG);
-
- register_pci_controller(&bcm63xx_pcie_controller);
-@@ -334,6 +334,11 @@ static int __init bcm63xx_pci_init(void)
- if (!bcm63xx_pci_enabled)
- return -ENODEV;
-
-+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) {
-+ bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6328;
-+ bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6328;
-+ }
-+
- switch (bcm63xx_get_cpu_id()) {
- case BCM6328_CPU_ID:
- case BCM6362_CPU_ID:
diff --git a/target/linux/brcm63xx/patches-3.14/337-MIPS-BCM63XX-widen-cpuid-field.patch b/target/linux/brcm63xx/patches-3.14/337-MIPS-BCM63XX-widen-cpuid-field.patch
deleted file mode 100644
index 0ead82e..0000000
--- a/target/linux/brcm63xx/patches-3.14/337-MIPS-BCM63XX-widen-cpuid-field.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From f1477f6e3551fd6beecfee5368fed1325dcd421f Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 7 Dec 2013 14:54:51 +0100
-Subject: [PATCH 47/53] MIPS: BCM63XX: widen cpuid field
-
----
- arch/mips/bcm63xx/cpu.c | 2 +-
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 8 ++++----
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -24,7 +24,7 @@ EXPORT_SYMBOL(bcm63xx_regs_base);
- const int *bcm63xx_irqs;
- EXPORT_SYMBOL(bcm63xx_irqs);
-
--u16 bcm63xx_cpu_id __read_mostly;
-+u32 bcm63xx_cpu_id __read_mostly;
- EXPORT_SYMBOL(bcm63xx_cpu_id);
-
- static u32 bcm63xx_cpu_variant __read_mostly;
-@@ -127,7 +127,7 @@ unsigned int bcm63xx_get_memory_size(voi
-
- static unsigned int detect_cpu_clock(void)
- {
-- u16 cpu_id = bcm63xx_get_cpu_id();
-+ u32 cpu_id = bcm63xx_get_cpu_id();
-
- switch (cpu_id) {
- case BCM3368_CPU_ID:
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -27,7 +27,7 @@ u32 bcm63xx_get_cpu_variant(void);
- u8 bcm63xx_get_cpu_rev(void);
- unsigned int bcm63xx_get_cpu_freq(void);
-
--static inline u16 __pure __bcm63xx_get_cpu_id(const u16 cpu_id)
-+static inline u32 __pure __bcm63xx_get_cpu_id(const u32 cpu_id)
- {
- switch (cpu_id) {
- #ifdef CONFIG_BCM63XX_CPU_3368
-@@ -69,11 +69,11 @@ static inline u16 __pure __bcm63xx_get_c
- return cpu_id;
- }
-
--extern u16 bcm63xx_cpu_id;
-+extern u32 bcm63xx_cpu_id;
-
--static inline u16 __pure bcm63xx_get_cpu_id(void)
-+static inline u32 __pure bcm63xx_get_cpu_id(void)
- {
-- const u16 cpu_id = bcm63xx_cpu_id;
-+ const u32 cpu_id = bcm63xx_cpu_id;
-
- return __bcm63xx_get_cpu_id(cpu_id);
- }
diff --git a/target/linux/brcm63xx/patches-3.14/338-MIPS-BCM63XX-increase-number-of-IRQs.patch b/target/linux/brcm63xx/patches-3.14/338-MIPS-BCM63XX-increase-number-of-IRQs.patch
deleted file mode 100644
index 9132e42..0000000
--- a/target/linux/brcm63xx/patches-3.14/338-MIPS-BCM63XX-increase-number-of-IRQs.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 6f5658c845cf1f79213b1d20423a04967259fdaa Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 15 Dec 2013 20:46:26 +0100
-Subject: [PATCH 48/53] MIPS: BCM63XX: increase number of IRQs
-
-Newer SoCs have 128 bit wide irq registers, thus 128 available internal
-interupts.
----
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h | 4 +++-
- arch/mips/include/asm/mach-bcm63xx/irq.h | 2 +-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_irq.h
-@@ -1,10 +1,12 @@
- #ifndef BCM63XX_IRQ_H_
- #define BCM63XX_IRQ_H_
-
-+#include <irq.h>
- #include <bcm63xx_cpu.h>
-
- #define IRQ_INTERNAL_BASE 8
--#define IRQ_EXTERNAL_BASE 100
-+#define NR_INTERNAL_IRQS 128
-+#define IRQ_EXTERNAL_BASE (IRQ_INTERNAL_BASE + NR_INTERNAL_IRQS)
- #define IRQ_EXT_0 (IRQ_EXTERNAL_BASE + 0)
- #define IRQ_EXT_1 (IRQ_EXTERNAL_BASE + 1)
- #define IRQ_EXT_2 (IRQ_EXTERNAL_BASE + 2)
---- a/arch/mips/include/asm/mach-bcm63xx/irq.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/irq.h
-@@ -1,7 +1,7 @@
- #ifndef __ASM_MACH_BCM63XX_IRQ_H
- #define __ASM_MACH_BCM63XX_IRQ_H
-
--#define NR_IRQS 128
-+#define NR_IRQS 256
- #define MIPS_CPU_IRQ_BASE 0
-
- #endif
diff --git a/target/linux/brcm63xx/patches-3.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch b/target/linux/brcm63xx/patches-3.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch
deleted file mode 100644
index 797e853..0000000
--- a/target/linux/brcm63xx/patches-3.14/339-MIPS-BCM63XX-add-support-for-BCM63268.patch
+++ /dev/null
@@ -1,769 +0,0 @@
-From 98f63141190ac02c58b78d58f771bd263c61d756 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 7 Dec 2013 17:14:17 +0100
-Subject: [PATCH 48/56] MIPS: BCM63XX: add support for BCM63268
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/Kconfig | 5 +
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +-
- arch/mips/bcm63xx/clk.c | 25 ++++-
- arch/mips/bcm63xx/cpu.c | 59 +++++++++-
- arch/mips/bcm63xx/dev-flash.c | 6 +
- arch/mips/bcm63xx/dev-spi.c | 4 +-
- arch/mips/bcm63xx/irq.c | 20 +++-
- arch/mips/bcm63xx/reset.c | 21 ++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 130 ++++++++++++++++++++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h | 2 +
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 79 +++++++++++++
- arch/mips/include/asm/mach-bcm63xx/ioremap.h | 1 +
- 12 files changed, 342 insertions(+), 12 deletions(-)
-
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -60,6 +60,11 @@ config BCM63XX_CPU_6368
- select HW_HAS_PCI
- select BCM63XX_OHCI
- select BCM63XX_EHCI
-+
-+config BCM63XX_CPU_63268
-+ bool "support 63268 CPU"
-+ select SYS_HAS_CPU_BMIPS4350
-+ select HW_HAS_PCI
- endmenu
-
- source "arch/mips/bcm63xx/boards/Kconfig"
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -737,7 +737,7 @@ void __init board_prom_init(void)
- /* read base address of boot chip select (0)
- * 6328/6362 do not have MPI but boot from a fixed address
- */
-- if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) {
-+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) {
- val = 0x18000000;
- } else {
- val = bcm_mpi_readl(MPI_CSBASE_REG(0));
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -133,6 +133,8 @@ static void enetsw_set(struct clk *clk,
- CKCTL_6368_SWPKT_USB_EN |
- CKCTL_6368_SWPKT_SAR_EN,
- enable);
-+ else if (BCMCPU_IS_63268())
-+ bcm_hwclock_set(CKCTL_63268_ROBOSW_EN, enable);
- else
- return;
-
-@@ -177,6 +179,8 @@ static void usbh_set(struct clk *clk, in
- bcm_hwclock_set(CKCTL_6362_USBH_EN, enable);
- else if (BCMCPU_IS_6368())
- bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
-+ else if (BCMCPU_IS_63268())
-+ bcm_hwclock_set(CKCTL_63268_USBH_EN, enable);
- else
- return;
-
-@@ -199,6 +203,8 @@ static void usbd_set(struct clk *clk, in
- bcm_hwclock_set(CKCTL_6362_USBD_EN, enable);
- else if (BCMCPU_IS_6368())
- bcm_hwclock_set(CKCTL_6368_USBD_EN, enable);
-+ else if (BCMCPU_IS_63268())
-+ bcm_hwclock_set(CKCTL_63268_USBD_EN, enable);
- else
- return;
-
-@@ -225,9 +231,13 @@ static void spi_set(struct clk *clk, int
- mask = CKCTL_6358_SPI_EN;
- else if (BCMCPU_IS_6362())
- mask = CKCTL_6362_SPI_EN;
-- else
-- /* BCMCPU_IS_6368 */
-+ else if (BCMCPU_IS_6368())
- mask = CKCTL_6368_SPI_EN;
-+ else if (BCMCPU_IS_63268())
-+ mask = CKCTL_63268_SPI_EN;
-+ else
-+ return;
-+
- bcm_hwclock_set(mask, enable);
- }
-
-@@ -246,6 +256,8 @@ static void hsspi_set(struct clk *clk, i
- mask = CKCTL_6328_HSSPI_EN;
- else if (BCMCPU_IS_6362())
- mask = CKCTL_6362_HSSPI_EN;
-+ else if (BCMCPU_IS_63268())
-+ mask = CKCTL_63268_HSSPI_EN;
- else
- return;
-
-@@ -307,6 +319,8 @@ static void pcie_set(struct clk *clk, in
- bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable);
- else if (BCMCPU_IS_6362())
- bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable);
-+ else if (BCMCPU_IS_63268())
-+ bcm_hwclock_set(CKCTL_63268_PCIE_EN, enable);
- }
-
- static struct clk clk_pcie = {
-@@ -386,9 +400,11 @@ struct clk *clk_get(struct device *dev,
- return &clk_periph;
- if ((BCMCPU_IS_3368() || BCMCPU_IS_6358()) && !strcmp(id, "pcm"))
- return &clk_pcm;
-- if ((BCMCPU_IS_6362() || BCMCPU_IS_6368()) && !strcmp(id, "ipsec"))
-+ if ((BCMCPU_IS_6362() || BCMCPU_IS_6368() || BCMCPU_IS_63268()) &&
-+ !strcmp(id, "ipsec"))
- return &clk_ipsec;
-- if ((BCMCPU_IS_6328() || BCMCPU_IS_6362()) && !strcmp(id, "pcie"))
-+ if ((BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) &&
-+ !strcmp(id, "pcie"))
- return &clk_pcie;
- return ERR_PTR(-ENOENT);
- }
-@@ -411,6 +427,7 @@ static int __init bcm63xx_clk_init(void)
- clk_hsspi.rate = HSSPI_PLL_HZ_6328;
- break;
- case BCM6362_CPU_ID:
-+ case BCM63268_CPU_ID:
- clk_hsspi.rate = HSSPI_PLL_HZ_6362;
- break;
- }
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -101,6 +101,15 @@ static const int bcm6368_irqs[] = {
-
- };
-
-+static const unsigned long bcm63268_regs_base[] = {
-+ __GEN_CPU_REGS_TABLE(63268)
-+};
-+
-+static const int bcm63268_irqs[] = {
-+ __GEN_CPU_IRQ_TABLE(63268)
-+
-+};
-+
- u32 bcm63xx_get_cpu_variant(void)
- {
- return bcm63xx_cpu_variant;
-@@ -253,6 +262,27 @@ static unsigned int detect_cpu_clock(voi
-
- return (((64 * 1000000) / p1) * p2 * ndiv) / m1;
- }
-+ case BCM63268_CPU_ID:
-+ {
-+ unsigned int tmp, mips_pll_fcvo;
-+
-+ tmp = bcm_misc_readl(MISC_STRAPBUS_63268_REG);
-+ mips_pll_fcvo = (tmp & STRAPBUS_63268_FCVO_MASK) >>
-+ STRAPBUS_63268_FCVO_SHIFT;
-+ switch (mips_pll_fcvo) {
-+ case 0x3:
-+ case 0xe:
-+ return 320000000;
-+ case 0xa:
-+ return 333000000;
-+ case 0x2:
-+ case 0xb:
-+ case 0xf:
-+ return 400000000;
-+ default:
-+ return 0;
-+ }
-+ }
-
- default:
- panic("Failed to detect clock for CPU with id=%04X\n", cpu_id);
-@@ -267,7 +297,7 @@ static unsigned int detect_memory_size(v
- unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0;
- u32 val;
-
-- if (BCMCPU_IS_6328() || BCMCPU_IS_6362())
-+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268())
- return bcm_ddr_readl(DDR_CSEND_REG) << 24;
-
- if (BCMCPU_IS_6345()) {
-@@ -306,6 +336,7 @@ void __init bcm63xx_cpu_init(void)
- struct cpuinfo_mips *c = &current_cpu_data;
- unsigned int cpu = smp_processor_id();
- u32 chipid_reg;
-+ bool long_chipid = false;
- u8 __maybe_unused varid = 0;
-
- /* soc registers location depends on cpu type */
-@@ -327,6 +358,9 @@ void __init bcm63xx_cpu_init(void)
- case 0x10:
- chipid_reg = BCM_6345_PERF_BASE;
- break;
-+ case 0x80:
-+ long_chipid = true;
-+ /* fall-through */
- default:
- chipid_reg = BCM_6368_PERF_BASE;
- break;
-@@ -334,6 +368,7 @@ void __init bcm63xx_cpu_init(void)
- break;
- }
-
-+
- /*
- * really early to panic, but delaying panic would not help since we
- * will never get any working console
-@@ -343,10 +378,17 @@ void __init bcm63xx_cpu_init(void)
-
- /* read out CPU type */
- tmp = bcm_readl(chipid_reg);
-- bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT;
-- bcm63xx_cpu_variant = bcm63xx_cpu_id;
-+
-+ if (long_chipid) {
-+ bcm63xx_cpu_id = tmp & REV_LONG_CHIPID_MASK;
-+ bcm63xx_cpu_id >>= REV_LONG_CHIPID_SHIFT;
-+ } else {
-+ bcm63xx_cpu_id = (tmp & REV_CHIPID_MASK) >> REV_CHIPID_SHIFT;
-+ varid = (tmp & REV_VARID_MASK) >> REV_VARID_SHIFT;
-+ }
-+
- bcm63xx_cpu_rev = (tmp & REV_REVID_MASK) >> REV_REVID_SHIFT;
-- varid = (tmp & REV_VARID_MASK) >> REV_VARID_SHIFT;
-+ bcm63xx_cpu_variant = bcm63xx_cpu_id;
-
- switch (bcm63xx_cpu_id) {
- case BCM3368_CPU_ID:
-@@ -401,6 +443,15 @@ void __init bcm63xx_cpu_init(void)
- /* BCM6369 is a BCM6368 without xDSL, so treat it the same */
- bcm63xx_cpu_id = BCM6368_CPU_ID;
- break;
-+ case BCM63168_CPU_ID:
-+ case BCM63169_CPU_ID:
-+ case BCM63268_CPU_ID:
-+ case BCM63269_CPU_ID:
-+ bcm63xx_regs_base = bcm63268_regs_base;
-+ bcm63xx_irqs = bcm63268_irqs;
-+
-+ bcm63xx_cpu_id = BCM63268_CPU_ID;
-+ break;
- default:
- panic("unsupported broadcom CPU %x", bcm63xx_cpu_id);
- break;
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -94,6 +94,12 @@ static int __init bcm63xx_detect_flash_t
- case STRAPBUS_6368_BOOT_SEL_PARALLEL:
- return BCM63XX_FLASH_TYPE_PARALLEL;
- }
-+ case BCM63268_CPU_ID:
-+ val = bcm_misc_readl(MISC_STRAPBUS_63268_REG);
-+ if (val & STRAPBUS_63268_BOOT_SEL_SERIAL)
-+ return BCM63XX_FLASH_TYPE_SERIAL;
-+ else
-+ return BCM63XX_FLASH_TYPE_NAND;
- default:
- return -EINVAL;
- }
---- a/arch/mips/bcm63xx/dev-spi.c
-+++ b/arch/mips/bcm63xx/dev-spi.c
-@@ -37,7 +37,7 @@ static __init void bcm63xx_spi_regs_init
- if (BCMCPU_IS_6338() || BCMCPU_IS_6348())
- bcm63xx_regs_spi = bcm6348_regs_spi;
- if (BCMCPU_IS_3368() || BCMCPU_IS_6358() ||
-- BCMCPU_IS_6362() || BCMCPU_IS_6368())
-+ BCMCPU_IS_6362() || BCMCPU_IS_6368() || BCMCPU_IS_63268())
- bcm63xx_regs_spi = bcm6358_regs_spi;
- }
-
-@@ -85,7 +85,7 @@ int __init bcm63xx_spi_register(void)
- }
-
- if (BCMCPU_IS_3368() || BCMCPU_IS_6358() || BCMCPU_IS_6362() ||
-- BCMCPU_IS_6368()) {
-+ BCMCPU_IS_6368() || BCMCPU_IS_63268()) {
- spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1;
- spi_pdata.fifo_size = SPI_6358_MSG_DATA_SIZE;
- spi_pdata.msg_type_shift = SPI_6358_MSG_TYPE_SHIFT;
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -158,6 +158,7 @@ static void __internal_irq_unmask_##widt
-
- BUILD_IPIC_INTERNAL(32);
- BUILD_IPIC_INTERNAL(64);
-+BUILD_IPIC_INTERNAL(128);
-
- asmlinkage void plat_irq_dispatch(void)
- {
-@@ -343,6 +344,7 @@ static int bcm63xx_external_irq_set_type
- case BCM6358_CPU_ID:
- case BCM6362_CPU_ID:
- case BCM6368_CPU_ID:
-+ case BCM63268_CPU_ID:
- if (levelsense)
- reg |= EXTIRQ_CFG_LEVELSENSE(irq);
- else
-@@ -515,6 +517,18 @@ static void bcm63xx_init_irq(void)
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6368;
- ext_irq_cfg_reg2 = PERF_EXTIRQ_CFG_REG2_6368;
- break;
-+ case BCM63268_CPU_ID:
-+ irq_stat_addr[0] += PERF_IRQSTAT_63268_REG(0);
-+ irq_mask_addr[0] += PERF_IRQMASK_63268_REG(0);
-+ irq_stat_addr[1] += PERF_IRQSTAT_63268_REG(1);
-+ irq_mask_addr[1] += PERF_IRQMASK_63268_REG(1);
-+ irq_bits = 128;
-+ ext_irq_count = 4;
-+ is_ext_irq_cascaded = 1;
-+ ext_irq_start = BCM_63268_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-+ ext_irq_end = BCM_63268_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_63268;
-+ break;
- default:
- BUG();
- }
-@@ -523,10 +537,14 @@ static void bcm63xx_init_irq(void)
- dispatch_internal = __dispatch_internal_32;
- internal_irq_mask = __internal_irq_mask_32;
- internal_irq_unmask = __internal_irq_unmask_32;
-- } else {
-+ } else if (irq_bits == 64) {
- dispatch_internal = __dispatch_internal_64;
- internal_irq_mask = __internal_irq_mask_64;
- internal_irq_unmask = __internal_irq_unmask_64;
-+ } else {
-+ dispatch_internal = __dispatch_internal_128;
-+ internal_irq_mask = __internal_irq_mask_128;
-+ internal_irq_unmask = __internal_irq_unmask_128;
- }
- }
-
---- a/arch/mips/bcm63xx/reset.c
-+++ b/arch/mips/bcm63xx/reset.c
-@@ -125,6 +125,20 @@
- #define BCM6368_RESET_PCIE 0
- #define BCM6368_RESET_PCIE_EXT 0
-
-+#define BCM63268_RESET_SPI SOFTRESET_63268_SPI_MASK
-+#define BCM63268_RESET_ENET 0
-+#define BCM63268_RESET_USBH SOFTRESET_63268_USBH_MASK
-+#define BCM63268_RESET_USBD SOFTRESET_63268_USBS_MASK
-+#define BCM63268_RESET_DSL 0
-+#define BCM63268_RESET_SAR SOFTRESET_63268_SAR_MASK
-+#define BCM63268_RESET_EPHY 0
-+#define BCM63268_RESET_ENETSW SOFTRESET_63268_ENETSW_MASK
-+#define BCM63268_RESET_PCM SOFTRESET_63268_PCM_MASK
-+#define BCM63268_RESET_MPI 0
-+#define BCM63268_RESET_PCIE (SOFTRESET_63268_PCIE_MASK | \
-+ SOFTRESET_63268_PCIE_CORE_MASK)
-+#define BCM63268_RESET_PCIE_EXT SOFTRESET_63268_PCIE_EXT_MASK
-+
- /*
- * core reset bits
- */
-@@ -156,6 +170,10 @@ static const u32 bcm6368_reset_bits[] =
- __GEN_RESET_BITS_TABLE(6368)
- };
-
-+static const u32 bcm63268_reset_bits[] = {
-+ __GEN_RESET_BITS_TABLE(63268)
-+};
-+
- const u32 *bcm63xx_reset_bits;
- static int reset_reg;
-
-@@ -182,6 +200,9 @@ static int __init bcm63xx_reset_bits_ini
- } else if (BCMCPU_IS_6368()) {
- reset_reg = PERF_SOFTRESET_6368_REG;
- bcm63xx_reset_bits = bcm6368_reset_bits;
-+ } else if (BCMCPU_IS_63268()) {
-+ reset_reg = PERF_SOFTRESET_63268_REG;
-+ bcm63xx_reset_bits = bcm63268_reset_bits;
- }
-
- return 0;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -21,6 +21,10 @@
- #define BCM6362_CPU_ID 0x6362
- #define BCM6368_CPU_ID 0x6368
- #define BCM6369_CPU_ID 0x6369
-+#define BCM63168_CPU_ID 0x63168
-+#define BCM63169_CPU_ID 0x63169
-+#define BCM63268_CPU_ID 0x63268
-+#define BCM63269_CPU_ID 0x63269
-
- void __init bcm63xx_cpu_init(void);
- u32 bcm63xx_get_cpu_variant(void);
-@@ -61,6 +65,10 @@ static inline u32 __pure __bcm63xx_get_c
- #ifdef CONFIG_BCM63XX_CPU_6368
- case BCM6368_CPU_ID:
- #endif
-+
-+#ifdef CONFIG_BCM63XX_CPU_63268
-+ case BCM63268_CPU_ID:
-+#endif
- break;
- default:
- unreachable();
-@@ -86,6 +94,7 @@ static inline u32 __pure bcm63xx_get_cpu
- #define BCMCPU_IS_6358() (bcm63xx_get_cpu_id() == BCM6358_CPU_ID)
- #define BCMCPU_IS_6362() (bcm63xx_get_cpu_id() == BCM6362_CPU_ID)
- #define BCMCPU_IS_6368() (bcm63xx_get_cpu_id() == BCM6368_CPU_ID)
-+#define BCMCPU_IS_63268() (bcm63xx_get_cpu_id() == BCM63268_CPU_ID)
-
- #define BCMCPU_VARIANT_IS_3368() \
- (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID)
-@@ -109,6 +118,14 @@ static inline u32 __pure bcm63xx_get_cpu
- (bcm63xx_get_cpu_variant() == BCM6368_CPU_ID)
- #define BCMCPU_VARIANT_IS_6369() \
- (bcm63xx_get_cpu_variant() == BCM6369_CPU_ID)
-+#define BCMCPU_VARIANT_IS_63168() \
-+ (bcm63xx_get_cpu_variant() == BCM63168_CPU_ID)
-+#define BCMCPU_VARIANT_IS_63169() \
-+ (bcm63xx_get_cpu_variant() == BCM63169_CPU_ID)
-+#define BCMCPU_VARIANT_IS_63268() \
-+ (bcm63xx_get_cpu_variant() == BCM63268_CPU_ID)
-+#define BCMCPU_VARIANT_IS_63269() \
-+ (bcm63xx_get_cpu_variant() == BCM63269_CPU_ID)
-
- /*
- * While registers sets are (mostly) the same across 63xx CPU, base
-@@ -573,6 +590,52 @@ enum bcm63xx_regs_set {
- #define BCM_6368_RNG_BASE (0xb0004180)
- #define BCM_6368_MISC_BASE (0xdeadbeef)
-
-+/*
-+ * 63268 register sets base address
-+ */
-+#define BCM_63268_DSL_LMEM_BASE (0xdeadbeef)
-+#define BCM_63268_PERF_BASE (0xb0000000)
-+#define BCM_63268_TIMER_BASE (0xb0000080)
-+#define BCM_63268_WDT_BASE (0xb000009c)
-+#define BCM_63268_UART0_BASE (0xb0000180)
-+#define BCM_63268_UART1_BASE (0xb00001a0)
-+#define BCM_63268_GPIO_BASE (0xb00000c0)
-+#define BCM_63268_SPI_BASE (0xb0000800)
-+#define BCM_63268_HSSPI_BASE (0xb0001000)
-+#define BCM_63268_UDC0_BASE (0xdeadbeef)
-+#define BCM_63268_USBDMA_BASE (0xb000c800)
-+#define BCM_63268_OHCI0_BASE (0xb0002600)
-+#define BCM_63268_OHCI_PRIV_BASE (0xdeadbeef)
-+#define BCM_63268_USBH_PRIV_BASE (0xb0002700)
-+#define BCM_63268_USBD_BASE (0xb0002400)
-+#define BCM_63268_MPI_BASE (0xdeadbeef)
-+#define BCM_63268_PCMCIA_BASE (0xdeadbeef)
-+#define BCM_63268_PCIE_BASE (0xb06e0000)
-+#define BCM_63268_SDRAM_REGS_BASE (0xdeadbeef)
-+#define BCM_63268_DSL_BASE (0xdeadbeef)
-+#define BCM_63268_UBUS_BASE (0xdeadbeef)
-+#define BCM_63268_ENET0_BASE (0xdeadbeef)
-+#define BCM_63268_ENET1_BASE (0xdeadbeef)
-+#define BCM_63268_ENETDMA_BASE (0xb000d800)
-+#define BCM_63268_ENETDMAC_BASE (0xb000da00)
-+#define BCM_63268_ENETDMAS_BASE (0xb000dc00)
-+#define BCM_63268_ENETSW_BASE (0xb0700000)
-+#define BCM_63268_EHCI0_BASE (0xb0002500)
-+#define BCM_63268_SDRAM_BASE (0xdeadbeef)
-+#define BCM_63268_MEMC_BASE (0xdeadbeef)
-+#define BCM_63268_DDR_BASE (0xb0003000)
-+#define BCM_63268_M2M_BASE (0xdeadbeef)
-+#define BCM_63268_ATM_BASE (0xdeadbeef)
-+#define BCM_63268_XTM_BASE (0xb0007000)
-+#define BCM_63268_XTMDMA_BASE (0xb000b800)
-+#define BCM_63268_XTMDMAC_BASE (0xdeadbeef)
-+#define BCM_63268_XTMDMAS_BASE (0xdeadbeef)
-+#define BCM_63268_PCM_BASE (0xb000b000)
-+#define BCM_63268_PCMDMA_BASE (0xb000b800)
-+#define BCM_63268_PCMDMAC_BASE (0xdeadbeef)
-+#define BCM_63268_PCMDMAS_BASE (0xdeadbeef)
-+#define BCM_63268_RNG_BASE (0xdeadbeef)
-+#define BCM_63268_MISC_BASE (0xb0001800)
-
- extern const unsigned long *bcm63xx_regs_base;
-
-@@ -1084,6 +1147,73 @@ enum bcm63xx_irq {
- #define BCM_6368_EXT_IRQ4 (IRQ_INTERNAL_BASE + 24)
- #define BCM_6368_EXT_IRQ5 (IRQ_INTERNAL_BASE + 25)
-
-+/*
-+ * 63268 irqs
-+ */
-+#define BCM_63268_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32)
-+#define BCM_63268_VERY_HIGH_IRQ_BASE (BCM_63268_HIGH_IRQ_BASE + 32)
-+
-+#define BCM_63268_TIMER_IRQ (IRQ_INTERNAL_BASE + 0)
-+#define BCM_63268_SPI_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 16)
-+#define BCM_63268_UART0_IRQ (IRQ_INTERNAL_BASE + 5)
-+#define BCM_63268_UART1_IRQ (BCM_63268_HIGH_IRQ_BASE + 2)
-+#define BCM_63268_DSL_IRQ (IRQ_INTERNAL_BASE + 23)
-+#define BCM_63268_UDC0_IRQ 0
-+#define BCM_63268_ENET0_IRQ 0
-+#define BCM_63268_ENET1_IRQ 0
-+#define BCM_63268_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 13)
-+#define BCM_63268_HSSPI_IRQ (IRQ_INTERNAL_BASE + 6)
-+#define BCM_63268_OHCI0_IRQ (IRQ_INTERNAL_BASE + 9)
-+#define BCM_63268_EHCI0_IRQ (IRQ_INTERNAL_BASE + 10)
-+#define BCM_63268_USBD_IRQ (IRQ_INTERNAL_BASE + 11)
-+#define BCM_63268_USBD_RXDMA0_IRQ (IRQ_INTERNAL_BASE + 19)
-+#define BCM_63268_USBD_TXDMA0_IRQ (BCM_63268_HIGH_IRQ_BASE + 4)
-+#define BCM_63268_USBD_RXDMA1_IRQ (IRQ_INTERNAL_BASE + 20)
-+#define BCM_63268_USBD_TXDMA1_IRQ (BCM_63268_HIGH_IRQ_BASE + 5)
-+#define BCM_63268_USBD_RXDMA2_IRQ (IRQ_INTERNAL_BASE + 21)
-+#define BCM_63268_USBD_TXDMA2_IRQ (BCM_63268_HIGH_IRQ_BASE + 6)
-+#define BCM_63268_PCMCIA_IRQ 0
-+#define BCM_63268_ENET0_RXDMA_IRQ 0
-+#define BCM_63268_ENET0_TXDMA_IRQ 0
-+#define BCM_63268_ENET1_RXDMA_IRQ 0
-+#define BCM_63268_ENET1_TXDMA_IRQ 0
-+#define BCM_63268_PCI_IRQ (BCM_63268_HIGH_IRQ_BASE + 8)
-+#define BCM_63268_ATM_IRQ 0
-+#define BCM_63268_ENETSW_RXDMA0_IRQ (IRQ_INTERNAL_BASE + 1)
-+#define BCM_63268_ENETSW_RXDMA1_IRQ (IRQ_INTERNAL_BASE + 2)
-+#define BCM_63268_ENETSW_RXDMA2_IRQ (IRQ_INTERNAL_BASE + 3)
-+#define BCM_63268_ENETSW_RXDMA3_IRQ (IRQ_INTERNAL_BASE + 4)
-+#define BCM_63268_ENETSW_TXDMA0_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 0)
-+#define BCM_63268_ENETSW_TXDMA1_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 1)
-+#define BCM_63268_ENETSW_TXDMA2_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 2)
-+#define BCM_63268_ENETSW_TXDMA3_IRQ (BCM_63268_VERY_HIGH_IRQ_BASE + 3)
-+#define BCM_63268_XTM_IRQ (BCM_63268_HIGH_IRQ_BASE + 17)
-+#define BCM_63268_XTM_DMA0_IRQ (IRQ_INTERNAL_BASE + 26)
-+
-+#define BCM_63268_RING_OSC_IRQ (BCM_63268_HIGH_IRQ_BASE + 20)
-+#define BCM_63268_WLAN_GPIO_IRQ (BCM_63268_HIGH_IRQ_BASE + 3)
-+#define BCM_63268_WLAN_IRQ (IRQ_INTERNAL_BASE + 7)
-+#define BCM_63268_IPSEC_IRQ (IRQ_INTERNAL_BASE + 8)
-+#define BCM_63268_NAND_IRQ (BCM_63268_HIGH_IRQ_BASE + 18)
-+#define BCM_63268_PCM_IRQ (IRQ_INTERNAL_BASE + 13)
-+#define BCM_63268_DG_IRQ (IRQ_INTERNAL_BASE + 15)
-+#define BCM_63268_EPHY_ENERGY0_IRQ (IRQ_INTERNAL_BASE + 16)
-+#define BCM_63268_EPHY_ENERGY1_IRQ (IRQ_INTERNAL_BASE + 17)
-+#define BCM_63268_EPHY_ENERGY2_IRQ (IRQ_INTERNAL_BASE + 18)
-+#define BCM_63268_EPHY_ENERGY3_IRQ (IRQ_INTERNAL_BASE + 19)
-+#define BCM_63268_IPSEC_DMA0_IRQ (IRQ_INTERNAL_BASE + 22)
-+#define BCM_63268_IPSEC_DMA1_IRQ (BCM_63268_HIGH_IRQ_BASE + 7)
-+#define BCM_63268_FAP0_IRQ (IRQ_INTERNAL_BASE + 24)
-+#define BCM_63268_FAP1_IRQ (IRQ_INTERNAL_BASE + 25)
-+#define BCM_63268_PCM_DMA0_IRQ (BCM_63268_HIGH_IRQ_BASE + 10)
-+#define BCM_63268_PCM_DMA1_IRQ (BCM_63268_HIGH_IRQ_BASE + 11)
-+#define BCM_63268_DECT0_IRQ (BCM_63268_HIGH_IRQ_BASE + 0)
-+#define BCM_63268_DECT1_IRQ (BCM_63268_HIGH_IRQ_BASE + 1)
-+#define BCM_63268_EXT_IRQ0 (BCM_63268_HIGH_IRQ_BASE + 12)
-+#define BCM_63268_EXT_IRQ1 (BCM_63268_HIGH_IRQ_BASE + 13)
-+#define BCM_63268_EXT_IRQ2 (BCM_63268_HIGH_IRQ_BASE + 14)
-+#define BCM_63268_EXT_IRQ3 (BCM_63268_HIGH_IRQ_BASE + 15)
-+
- extern const int *bcm63xx_irqs;
-
- #define __GEN_CPU_IRQ_TABLE(__cpu) \
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
-@@ -22,6 +22,8 @@ static inline unsigned long bcm63xx_gpio
- return 48;
- case BCM6368_CPU_ID:
- return 38;
-+ case BCM63268_CPU_ID:
-+ return 52;
- case BCM6348_CPU_ID:
- default:
- return 37;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -9,6 +9,8 @@
- #define PERF_REV_REG 0x0
- #define REV_CHIPID_SHIFT 16
- #define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT)
-+#define REV_LONG_CHIPID_SHIFT 12
-+#define REV_LONG_CHIPID_MASK (0xfffff << REV_LONG_CHIPID_SHIFT)
- #define REV_VARID_SHIFT 12
- #define REV_VARID_MASK (0xf << REV_VARID_SHIFT)
- #define REV_REVID_SHIFT 0
-@@ -211,6 +213,52 @@
- CKCTL_6368_NAND_EN | \
- CKCTL_6368_IPSEC_EN)
-
-+#define CKCTL_63268_DISABLE_GLESS (1 << 0)
-+#define CKCTL_63268_VDSL_QPROC_EN (1 << 1)
-+#define CKCTL_63268_VDSL_AFE_EN (1 << 2)
-+#define CKCTL_63268_VDSL_EN (1 << 3)
-+#define CKCTL_63268_MIPS_EN (1 << 4)
-+#define CKCTL_63268_WLAN_OCP_EN (1 << 5)
-+#define CKCTL_63268_DECT_EN (1 << 6)
-+#define CKCTL_63268_FAP0_EN (1 << 7)
-+#define CKCTL_63268_FAP1_EN (1 << 8)
-+#define CKCTL_63268_SAR_EN (1 << 9)
-+#define CKCTL_63268_ROBOSW_EN (1 << 10)
-+#define CKCTL_63268_PCM_EN (1 << 11)
-+#define CKCTL_63268_USBD_EN (1 << 12)
-+#define CKCTL_63268_USBH_EN (1 << 13)
-+#define CKCTL_63268_IPSEC_EN (1 << 14)
-+#define CKCTL_63268_SPI_EN (1 << 15)
-+#define CKCTL_63268_HSSPI_EN (1 << 16)
-+#define CKCTL_63268_PCIE_EN (1 << 17)
-+#define CKCTL_63268_PHYMIPS_EN (1 << 18)
-+#define CKCTL_63268_GMAC_EN (1 << 19)
-+#define CKCTL_63268_NAND_EN (1 << 20)
-+#define CKCTL_63268_TBUS_EN (1 << 27)
-+#define CKCTL_63268_ROBOSW250_EN (1 << 31)
-+
-+#define CKCTL_63268_ALL_SAFE_EN (CKCTL_63268_VDSL_QPROC_EN | \
-+ CKCTL_63268_VDSL_AFE_EN | \
-+ CKCTL_63268_VDSL_EN | \
-+ CKCTL_63268_WLAN_OCP_EN | \
-+ CKCTL_63268_DECT_EN | \
-+ CKCTL_63268_FAP0_EN | \
-+ CKCTL_63268_FAP1_EN | \
-+ CKCTL_63268_SAR_EN | \
-+ CKCTL_63268_ROBOSW_EN | \
-+ CKCTL_63268_PCM_EN | \
-+ CKCTL_63268_USBD_EN | \
-+ CKCTL_63268_USBH_EN | \
-+ CKCTL_63268_IPSEC_EN | \
-+ CKCTL_63268_SPI_EN | \
-+ CKCTL_63268_HSSPI_EN | \
-+ CKCTL_63268_PCIE_EN | \
-+ CKCTL_63268_PHYMIPS_EN | \
-+ CKCTL_63268_GMAC_EN | \
-+ CKCTL_63268_NAND_EN | \
-+ CKCTL_63268_TBUS_EN | \
-+ CKCTL_63268_ROBOSW250_EN)
-+
- /* System PLL Control register */
- #define PERF_SYS_PLL_CTL_REG 0x8
- #define SYS_PLL_SOFT_RESET 0x1
-@@ -224,6 +272,7 @@
- #define PERF_IRQMASK_6358_REG(x) (0xc + (x) * 0x2c)
- #define PERF_IRQMASK_6362_REG(x) (0x20 + (x) * 0x10)
- #define PERF_IRQMASK_6368_REG(x) (0x20 + (x) * 0x10)
-+#define PERF_IRQMASK_63268_REG(x) (0x20 + (x) * 0x20)
-
- /* Interrupt Status register */
- #define PERF_IRQSTAT_3368_REG 0x10
-@@ -234,6 +283,7 @@
- #define PERF_IRQSTAT_6358_REG(x) (0x10 + (x) * 0x2c)
- #define PERF_IRQSTAT_6362_REG(x) (0x28 + (x) * 0x10)
- #define PERF_IRQSTAT_6368_REG(x) (0x28 + (x) * 0x10)
-+#define PERF_IRQSTAT_63268_REG(x) (0x30 + (x) * 0x20)
-
- /* External Interrupt Configuration register */
- #define PERF_EXTIRQ_CFG_REG_3368 0x14
-@@ -244,6 +294,7 @@
- #define PERF_EXTIRQ_CFG_REG_6358 0x14
- #define PERF_EXTIRQ_CFG_REG_6362 0x18
- #define PERF_EXTIRQ_CFG_REG_6368 0x18
-+#define PERF_EXTIRQ_CFG_REG_63268 0x18
-
- #define PERF_EXTIRQ_CFG_REG2_6368 0x1c
-
-@@ -273,6 +324,7 @@
- #define PERF_SOFTRESET_6358_REG 0x34
- #define PERF_SOFTRESET_6362_REG 0x10
- #define PERF_SOFTRESET_6368_REG 0x10
-+#define PERF_SOFTRESET_63268_REG 0x10
-
- #define SOFTRESET_3368_SPI_MASK (1 << 0)
- #define SOFTRESET_3368_ENET_MASK (1 << 2)
-@@ -366,6 +418,26 @@
- #define SOFTRESET_6368_USBH_MASK (1 << 12)
- #define SOFTRESET_6368_PCM_MASK (1 << 13)
-
-+#define SOFTRESET_63268_SPI_MASK (1 << 0)
-+#define SOFTRESET_63268_IPSEC_MASK (1 << 1)
-+#define SOFTRESET_63268_EPHY_MASK (1 << 2)
-+#define SOFTRESET_63268_SAR_MASK (1 << 3)
-+#define SOFTRESET_63268_ENETSW_MASK (1 << 4)
-+#define SOFTRESET_63268_USBS_MASK (1 << 5)
-+#define SOFTRESET_63268_USBH_MASK (1 << 6)
-+#define SOFTRESET_63268_PCM_MASK (1 << 7)
-+#define SOFTRESET_63268_PCIE_CORE_MASK (1 << 8)
-+#define SOFTRESET_63268_PCIE_MASK (1 << 9)
-+#define SOFTRESET_63268_PCIE_EXT_MASK (1 << 10)
-+#define SOFTRESET_63268_WLAN_SHIM_MASK (1 << 11)
-+#define SOFTRESET_63268_DDR_PHY_MASK (1 << 12)
-+#define SOFTRESET_63268_FAP0_MASK (1 << 13)
-+#define SOFTRESET_63268_WLAN_UBUS_MASK (1 << 14)
-+#define SOFTRESET_63268_DECT_MASK (1 << 15)
-+#define SOFTRESET_63268_FAP1_MASK (1 << 16)
-+#define SOFTRESET_63268_PCIE_HARD_MASK (1 << 17)
-+#define SOFTRESET_63268_GPHY_MASK (1 << 18)
-+
- /* MIPS PLL control register */
- #define PERF_MIPSPLLCTL_REG 0x34
- #define MIPSPLLCTL_N1_SHIFT 20
-@@ -1379,6 +1451,13 @@
- #define STRAPBUS_6362_BOOT_SEL_SERIAL (1 << 15)
- #define STRAPBUS_6362_BOOT_SEL_NAND (0 << 15)
-
-+#define MISC_STRAPBUS_63268_REG 0x14
-+#define STRAPBUS_63268_HSSPI_CLK_FAST (1 << 9)
-+#define STRAPBUS_63268_BOOT_SEL_SERIAL (1 << 11)
-+#define STRAPBUS_63268_BOOT_SEL_NAND (0 << 11)
-+#define STRAPBUS_63268_FCVO_SHIFT 21
-+#define STRAPBUS_63268_FCVO_MASK (0xf << STRAPBUS_63268_FCVO_SHIFT)
-+
- #define MISC_STRAPBUS_6328_REG 0x240
- #define STRAPBUS_6328_FCVO_SHIFT 7
- #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT)
---- a/arch/mips/include/asm/mach-bcm63xx/ioremap.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/ioremap.h
-@@ -25,6 +25,7 @@ static inline int is_bcm63xx_internal_re
- case BCM6328_CPU_ID:
- case BCM6362_CPU_ID:
- case BCM6368_CPU_ID:
-+ case BCM63268_CPU_ID:
- if (offset >= 0xb0000000 && offset < 0xb1000000)
- return 1;
- break;
---- a/arch/mips/bcm63xx/dev-hsspi.c
-+++ b/arch/mips/bcm63xx/dev-hsspi.c
-@@ -35,7 +35,7 @@ static struct platform_device bcm63xx_hs
-
- int __init bcm63xx_hsspi_register(void)
- {
-- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362())
-+ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_63268())
- return -ENODEV;
-
- spi_resources[0].start = bcm63xx_regset_address(RSET_HSSPI);
---- a/arch/mips/bcm63xx/dev-enet.c
-+++ b/arch/mips/bcm63xx/dev-enet.c
-@@ -176,7 +176,8 @@ static int __init register_shared(void)
- else
- shared_res[0].end += (RSET_ENETDMA_SIZE) - 1;
-
-- if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368())
-+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368() ||
-+ BCMCPU_IS_63268())
- chan_count = 32;
- else if (BCMCPU_IS_6345())
- chan_count = 8;
-@@ -276,7 +277,8 @@ bcm63xx_enetsw_register(const struct bcm
- {
- int ret;
-
-- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368())
-+ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368() &&
-+ !BCMCPU_IS_63268())
- return -ENODEV;
-
- ret = register_shared();
-@@ -295,8 +297,11 @@ bcm63xx_enetsw_register(const struct bcm
-
- if (BCMCPU_IS_6328())
- enetsw_pd.num_ports = ENETSW_PORTS_6328;
-- else if (BCMCPU_IS_6362() || BCMCPU_IS_6368())
-+ else if (BCMCPU_IS_6362() || BCMCPU_IS_6368() ||
-+ BCMCPU_VARIANT_IS_63168() || BCMCPU_VARIANT_IS_63169())
- enetsw_pd.num_ports = ENETSW_PORTS_6368;
-+ else if (BCMCPU_VARIANT_IS_63268() || BCMCPU_VARIANT_IS_63269())
-+ enetsw_pd.num_ports = ENETSW_PORTS_63268;
-
- enetsw_pd.dma_has_sram = true;
- enetsw_pd.dma_chan_width = ENETDMA_CHAN_WIDTH;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h
-@@ -62,6 +62,7 @@ struct bcm63xx_enet_platform_data {
- #define ENETSW_MAX_PORT 8
- #define ENETSW_PORTS_6328 5 /* 4 FE PHY + 1 RGMII */
- #define ENETSW_PORTS_6368 6 /* 4 FE PHY + 2 RGMII */
-+#define ENETSW_PORTS_63268 8 /* 3 FE PHY + 1 GE PHY + 4 RGMII */
-
- #define ENETSW_RGMII_PORT0 4
-
diff --git a/target/linux/brcm63xx/patches-3.14/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch b/target/linux/brcm63xx/patches-3.14/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch
deleted file mode 100644
index 4e8a090..0000000
--- a/target/linux/brcm63xx/patches-3.14/340-MIPS-BCM63XX-add-pcie-support-for-BCM63268.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 5c290c81dbdb4433600593fe80c88eb4af86e791 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 8 Dec 2013 03:22:40 +0100
-Subject: [PATCH 50/53] MIPS: BCM63XX: add pcie support for BCM63268
-
----
- arch/mips/bcm63xx/reset.c | 3 ++-
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 5 +++++
- arch/mips/pci/pci-bcm63xx.c | 4 ++++
- 3 files changed, 11 insertions(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/reset.c
-+++ b/arch/mips/bcm63xx/reset.c
-@@ -136,7 +136,8 @@
- #define BCM63268_RESET_PCM SOFTRESET_63268_PCM_MASK
- #define BCM63268_RESET_MPI 0
- #define BCM63268_RESET_PCIE (SOFTRESET_63268_PCIE_MASK | \
-- SOFTRESET_63268_PCIE_CORE_MASK)
-+ SOFTRESET_63268_PCIE_CORE_MASK | \
-+ SOFTRESET_63268_PCIE_HARD_MASK)
- #define BCM63268_RESET_PCIE_EXT SOFTRESET_63268_PCIE_EXT_MASK
-
- /*
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-@@ -45,6 +45,11 @@
- #define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \
- BCM_PCIE_MEM_SIZE_6328 - 1)
-
-+#define BCM_PCIE_MEM_BASE_PA_63268 0x11000000
-+#define BCM_PCIE_MEM_SIZE_63268 (15 * 1024 * 1024)
-+#define BCM_PCIE_MEM_END_PA_63268 (BCM_PCIE_MEM_BASE_PA_63268 + \
-+ BCM_PCIE_MEM_SIZE_63268 - 1)
-+
- /*
- * Internal registers are accessed through KSEG3
- */
---- a/arch/mips/pci/pci-bcm63xx.c
-+++ b/arch/mips/pci/pci-bcm63xx.c
-@@ -337,11 +337,15 @@ static int __init bcm63xx_pci_init(void)
- if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) {
- bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6328;
- bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6328;
-+ } else if (BCMCPU_IS_63268()) {
-+ bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_63268;
-+ bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_63268;
- }
-
- switch (bcm63xx_get_cpu_id()) {
- case BCM6328_CPU_ID:
- case BCM6362_CPU_ID:
-+ case BCM63268_CPU_ID:
- return bcm63xx_register_pcie();
- case BCM3368_CPU_ID:
- case BCM6348_CPU_ID:
diff --git a/target/linux/brcm63xx/patches-3.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch b/target/linux/brcm63xx/patches-3.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch
deleted file mode 100644
index 46b5f5c..0000000
--- a/target/linux/brcm63xx/patches-3.14/341-MIPS-BCM63XX-add-support-for-BCM6318.patch
+++ /dev/null
@@ -1,672 +0,0 @@
-From 60c29522a8c77d96145d965589c56befda7d4c3d Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 8 Dec 2013 01:24:09 +0100
-Subject: [PATCH 51/53] MIPS: BCM63XX: add support for BCM6318
-
----
- arch/mips/bcm63xx/Kconfig | 5 +
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +-
- arch/mips/bcm63xx/clk.c | 8 +-
- arch/mips/bcm63xx/cpu.c | 53 +++++++++++
- arch/mips/bcm63xx/dev-flash.c | 3 +
- arch/mips/bcm63xx/dev-spi.c | 2 +-
- arch/mips/bcm63xx/irq.c | 10 ++
- arch/mips/bcm63xx/prom.c | 2 +-
- arch/mips/bcm63xx/reset.c | 24 +++++
- arch/mips/bcm63xx/setup.c | 5 +-
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h | 107 ++++++++++++++++++++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 75 ++++++++++++++-
- arch/mips/include/asm/mach-bcm63xx/ioremap.h | 1 +
- 13 files changed, 291 insertions(+), 6 deletions(-)
-
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -18,6 +18,11 @@ config BCM63XX_EHCI
- select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD
- select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD
-
-+config BCM63XX_CPU_6318
-+ bool "support 6318 CPU"
-+ select SYS_HAS_CPU_BMIPS32_3300
-+ select HW_HAS_PCI
-+
- config BCM63XX_CPU_6328
- bool "support 6328 CPU"
- select SYS_HAS_CPU_BMIPS4350
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -737,7 +737,7 @@ void __init board_prom_init(void)
- /* read base address of boot chip select (0)
- * 6328/6362 do not have MPI but boot from a fixed address
- */
-- if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) {
-+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) {
- val = 0x18000000;
- } else {
- val = bcm_mpi_readl(MPI_CSBASE_REG(0));
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -252,7 +252,9 @@ static void hsspi_set(struct clk *clk, i
- {
- u32 mask;
-
-- if (BCMCPU_IS_6328())
-+ if (BCMCPU_IS_6318())
-+ mask = CKCTL_6318_HSSPI_EN;
-+ else if (BCMCPU_IS_6328())
- mask = CKCTL_6328_HSSPI_EN;
- else if (BCMCPU_IS_6362())
- mask = CKCTL_6362_HSSPI_EN;
-@@ -417,12 +419,16 @@ void clk_put(struct clk *clk)
-
- EXPORT_SYMBOL(clk_put);
-
-+#define HSSPI_PLL_HZ_6318 250000000
- #define HSSPI_PLL_HZ_6328 133333333
- #define HSSPI_PLL_HZ_6362 400000000
-
- static int __init bcm63xx_clk_init(void)
- {
- switch (bcm63xx_get_cpu_id()) {
-+ case BCM6318_CPU_ID:
-+ clk_hsspi.rate = HSSPI_PLL_HZ_6318;
-+ break;
- case BCM6328_CPU_ID:
- clk_hsspi.rate = HSSPI_PLL_HZ_6328;
- break;
---- a/arch/mips/bcm63xx/cpu.c
-+++ b/arch/mips/bcm63xx/cpu.c
-@@ -41,6 +41,14 @@ static const int bcm3368_irqs[] = {
- __GEN_CPU_IRQ_TABLE(3368)
- };
-
-+static const unsigned long bcm6318_regs_base[] = {
-+ __GEN_CPU_REGS_TABLE(6318)
-+};
-+
-+static const int bcm6318_irqs[] = {
-+ __GEN_CPU_IRQ_TABLE(6318)
-+};
-+
- static const unsigned long bcm6328_regs_base[] = {
- __GEN_CPU_REGS_TABLE(6328)
- };
-@@ -134,6 +142,10 @@ unsigned int bcm63xx_get_memory_size(voi
- return bcm63xx_memory_size;
- }
-
-+#define STRAP_OVERRIDE_BUS_REG 0x0
-+#define OVERRIDE_BUS_MIPS_FREQ_SHIFT 23
-+#define OVERRIDE_BUS_MIPS_FREQ_MASK (0x3 << OVERRIDE_BUS_MIPS_FREQ_SHIFT)
-+
- static unsigned int detect_cpu_clock(void)
- {
- u32 cpu_id = bcm63xx_get_cpu_id();
-@@ -142,6 +154,28 @@ static unsigned int detect_cpu_clock(voi
- case BCM3368_CPU_ID:
- return 300000000;
-
-+ case BCM6318_CPU_ID:
-+ {
-+ unsigned int tmp, mips_pll_fcvo;
-+
-+ tmp = bcm_readl(BCM_6318_STRAP_BASE + STRAP_OVERRIDE_BUS_REG);
-+
-+ pr_info("strap_override_bus = %08x\n", tmp);
-+
-+ mips_pll_fcvo = (tmp & OVERRIDE_BUS_MIPS_FREQ_MASK)
-+ >> OVERRIDE_BUS_MIPS_FREQ_SHIFT;
-+
-+ switch (mips_pll_fcvo) {
-+ case 0:
-+ return 166000000;
-+ case 1:
-+ return 400000000;
-+ case 2:
-+ return 250000000;
-+ case 3:
-+ return 333000000;
-+ };
-+ }
- case BCM6328_CPU_ID:
- {
- unsigned int tmp, mips_pll_fcvo;
-@@ -297,6 +331,13 @@ static unsigned int detect_memory_size(v
- unsigned int cols = 0, rows = 0, is_32bits = 0, banks = 0;
- u32 val;
-
-+ if (BCMCPU_IS_6318()) {
-+ val = bcm_sdram_readl(SDRAM_CFG_REG);
-+ val = val & SDRAM_CFG_6318_SPACE_MASK;
-+ val >>= SDRAM_CFG_6318_SPACE_SHIFT;
-+ return 1 << (val + 20);
-+ }
-+
- if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268())
- return bcm_ddr_readl(DDR_CSEND_REG) << 24;
-
-@@ -344,6 +385,12 @@ void __init bcm63xx_cpu_init(void)
-
- switch (c->cputype) {
- case CPU_BMIPS3300:
-+ if ((read_c0_prid() & 0xff) >= 0x33) {
-+ /* BCM6318 */
-+ chipid_reg = BCM_6368_PERF_BASE;
-+ break;
-+ }
-+
- if ((read_c0_prid() & PRID_IMP_MASK) != PRID_IMP_BMIPS3300_ALT)
- __cpu_name[cpu] = "Broadcom BCM6338";
- /* fall-through */
-@@ -391,6 +438,10 @@ void __init bcm63xx_cpu_init(void)
- bcm63xx_cpu_variant = bcm63xx_cpu_id;
-
- switch (bcm63xx_cpu_id) {
-+ case BCM6318_CPU_ID:
-+ bcm63xx_regs_base = bcm6318_regs_base;
-+ bcm63xx_irqs = bcm6318_irqs;
-+ break;
- case BCM3368_CPU_ID:
- bcm63xx_regs_base = bcm3368_regs_base;
- bcm63xx_irqs = bcm3368_irqs;
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -60,6 +60,9 @@ static int __init bcm63xx_detect_flash_t
- u32 val;
-
- switch (bcm63xx_get_cpu_id()) {
-+ case BCM6318_CPU_ID:
-+ /* only support serial flash */
-+ return BCM63XX_FLASH_TYPE_SERIAL;
- case BCM6328_CPU_ID:
- val = bcm_misc_readl(MISC_STRAPBUS_6328_REG);
- if (val & STRAPBUS_6328_BOOT_SEL_SERIAL)
---- a/arch/mips/bcm63xx/dev-spi.c
-+++ b/arch/mips/bcm63xx/dev-spi.c
-@@ -70,7 +70,7 @@ static struct platform_device bcm63xx_sp
-
- int __init bcm63xx_spi_register(void)
- {
-- if (BCMCPU_IS_6328() || BCMCPU_IS_6345())
-+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6345())
- return -ENODEV;
-
- spi_resources[0].start = bcm63xx_regset_address(RSET_SPI);
---- a/arch/mips/bcm63xx/irq.c
-+++ b/arch/mips/bcm63xx/irq.c
-@@ -441,6 +441,16 @@ static void bcm63xx_init_irq(void)
- ext_irq_count = 4;
- ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_3368;
- break;
-+ case BCM6318_CPU_ID:
-+ irq_stat_addr[0] += PERF_IRQSTAT_6318_REG;
-+ irq_mask_addr[0] += PERF_IRQMASK_6318_REG;
-+ irq_bits = 128;
-+ ext_irq_count = 4;
-+ is_ext_irq_cascaded = 1;
-+ ext_irq_start = BCM_6318_EXT_IRQ0 - IRQ_INTERNAL_BASE;
-+ ext_irq_end = BCM_6318_EXT_IRQ3 - IRQ_INTERNAL_BASE;
-+ ext_irq_cfg_reg1 = PERF_EXTIRQ_CFG_REG_6318;
-+ break;
- case BCM6328_CPU_ID:
- irq_stat_addr[0] += PERF_IRQSTAT_6328_REG(0);
- irq_mask_addr[0] += PERF_IRQMASK_6328_REG(0);
---- a/arch/mips/bcm63xx/prom.c
-+++ b/arch/mips/bcm63xx/prom.c
-@@ -72,7 +72,7 @@ void __init prom_init(void)
-
- if (reg & OTP_6328_REG3_TP1_DISABLED)
- bmips_smp_enabled = 0;
-- } else if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) {
-+ } else if (BCMCPU_IS_6318() || BCMCPU_IS_3368() || BCMCPU_IS_6358()) {
- bmips_smp_enabled = 0;
- }
-
---- a/arch/mips/bcm63xx/reset.c
-+++ b/arch/mips/bcm63xx/reset.c
-@@ -43,6 +43,23 @@
- #define BCM3368_RESET_PCIE 0
- #define BCM3368_RESET_PCIE_EXT 0
-
-+
-+#define BCM6318_RESET_SPI SOFTRESET_6318_SPI_MASK
-+#define BCM6318_RESET_ENET 0
-+#define BCM6318_RESET_USBH SOFTRESET_6318_USBH_MASK
-+#define BCM6318_RESET_USBD SOFTRESET_6318_USBS_MASK
-+#define BCM6318_RESET_DSL 0
-+#define BCM6318_RESET_SAR SOFTRESET_6318_SAR_MASK
-+#define BCM6318_RESET_EPHY SOFTRESET_6318_EPHY_MASK
-+#define BCM6318_RESET_ENETSW SOFTRESET_6318_ENETSW_MASK
-+#define BCM6318_RESET_PCM 0
-+#define BCM6318_RESET_MPI 0
-+#define BCM6318_RESET_PCIE \
-+ (SOFTRESET_6318_PCIE_MASK | \
-+ SOFTRESET_6318_PCIE_CORE_MASK | \
-+ SOFTRESET_6318_PCIE_HARD_MASK)
-+#define BCM6318_RESET_PCIE_EXT SOFTRESET_6318_PCIE_EXT_MASK
-+
- #define BCM6328_RESET_SPI SOFTRESET_6328_SPI_MASK
- #define BCM6328_RESET_ENET 0
- #define BCM6328_RESET_USBH SOFTRESET_6328_USBH_MASK
-@@ -147,6 +164,10 @@ static const u32 bcm3368_reset_bits[] =
- __GEN_RESET_BITS_TABLE(3368)
- };
-
-+static const u32 bcm6318_reset_bits[] = {
-+ __GEN_RESET_BITS_TABLE(6318)
-+};
-+
- static const u32 bcm6328_reset_bits[] = {
- __GEN_RESET_BITS_TABLE(6328)
- };
-@@ -183,6 +204,9 @@ static int __init bcm63xx_reset_bits_ini
- if (BCMCPU_IS_3368()) {
- reset_reg = PERF_SOFTRESET_6358_REG;
- bcm63xx_reset_bits = bcm3368_reset_bits;
-+ } else if (BCMCPU_IS_6318()) {
-+ reset_reg = PERF_SOFTRESET_6318_REG;
-+ bcm63xx_reset_bits = bcm6318_reset_bits;
- } else if (BCMCPU_IS_6328()) {
- reset_reg = PERF_SOFTRESET_6328_REG;
- bcm63xx_reset_bits = bcm6328_reset_bits;
---- a/arch/mips/bcm63xx/setup.c
-+++ b/arch/mips/bcm63xx/setup.c
-@@ -71,6 +71,9 @@ void bcm63xx_machine_reboot(void)
- case BCM3368_CPU_ID:
- perf_regs[0] = PERF_EXTIRQ_CFG_REG_3368;
- break;
-+ case BCM6318_CPU_ID:
-+ perf_regs[0] = PERF_EXTIRQ_CFG_REG_6318;
-+ break;
- case BCM6328_CPU_ID:
- perf_regs[0] = PERF_EXTIRQ_CFG_REG_6328;
- break;
-@@ -110,7 +113,7 @@ void bcm63xx_machine_reboot(void)
- bcm6348_a1_reboot();
-
- printk(KERN_INFO "triggering watchdog soft-reset...\n");
-- if (BCMCPU_IS_6328()) {
-+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328()) {
- bcm_wdt_writel(1, WDT_SOFTRESET_REG);
- } else {
- reg = bcm_perf_readl(PERF_SYS_PLL_CTL_REG);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
-@@ -10,6 +10,7 @@
- * arm mach-types)
- */
- #define BCM3368_CPU_ID 0x3368
-+#define BCM6318_CPU_ID 0x6318
- #define BCM6328_CPU_ID 0x6328
- #define BCM63281_CPU_ID 0x63281
- #define BCM63283_CPU_ID 0x63283
-@@ -38,6 +39,10 @@ static inline u32 __pure __bcm63xx_get_c
- case BCM3368_CPU_ID:
- #endif
-
-+#ifdef CONFIG_BCM63XX_CPU_6318
-+ case BCM6318_CPU_ID:
-+#endif
-+
- #ifdef CONFIG_BCM63XX_CPU_6328
- case BCM6328_CPU_ID:
- #endif
-@@ -87,6 +92,7 @@ static inline u32 __pure bcm63xx_get_cpu
- }
-
- #define BCMCPU_IS_3368() (bcm63xx_get_cpu_id() == BCM3368_CPU_ID)
-+#define BCMCPU_IS_6318() (bcm63xx_get_cpu_id() == BCM6318_CPU_ID)
- #define BCMCPU_IS_6328() (bcm63xx_get_cpu_id() == BCM6328_CPU_ID)
- #define BCMCPU_IS_6338() (bcm63xx_get_cpu_id() == BCM6338_CPU_ID)
- #define BCMCPU_IS_6345() (bcm63xx_get_cpu_id() == BCM6345_CPU_ID)
-@@ -98,6 +104,8 @@ static inline u32 __pure bcm63xx_get_cpu
-
- #define BCMCPU_VARIANT_IS_3368() \
- (bcm63xx_get_cpu_variant() == BCM3368_CPU_ID)
-+#define BCMCPU_VARIANT_IS_6318() \
-+ (bcm63xx_get_cpu_variant() == BCM6318_CPU_ID)
- #define BCMCPU_VARIANT_IS_63281() \
- (bcm63xx_get_cpu_variant() == BCM63281_CPU_ID)
- #define BCMCPU_VARIANT_IS_63283() \
-@@ -252,6 +260,56 @@ enum bcm63xx_regs_set {
- #define BCM_3368_MISC_BASE (0xdeadbeef)
-
- /*
-+ * 6318 register sets base address
-+ */
-+#define BCM_6318_DSL_LMEM_BASE (0xdeadbeef)
-+#define BCM_6318_PERF_BASE (0xb0000000)
-+#define BCM_6318_TIMER_BASE (0xb0000040)
-+#define BCM_6318_WDT_BASE (0xb0000068)
-+#define BCM_6318_UART0_BASE (0xb0000100)
-+#define BCM_6318_UART1_BASE (0xdeadbeef)
-+#define BCM_6318_GPIO_BASE (0xb0000080)
-+#define BCM_6318_SPI_BASE (0xdeadbeef)
-+#define BCM_6318_HSSPI_BASE (0xb0003000)
-+#define BCM_6318_UDC0_BASE (0xdeadbeef)
-+#define BCM_6318_USBDMA_BASE (0xb0006800)
-+#define BCM_6318_OHCI0_BASE (0xb0005100)
-+#define BCM_6318_OHCI_PRIV_BASE (0xdeadbeef)
-+#define BCM_6318_USBH_PRIV_BASE (0xb0005200)
-+#define BCM_6318_USBD_BASE (0xb0006000)
-+#define BCM_6318_MPI_BASE (0xdeadbeef)
-+#define BCM_6318_PCMCIA_BASE (0xdeadbeef)
-+#define BCM_6318_PCIE_BASE (0xb0010000)
-+#define BCM_6318_SDRAM_REGS_BASE (0xdeadbeef)
-+#define BCM_6318_DSL_BASE (0xdeadbeef)
-+#define BCM_6318_UBUS_BASE (0xdeadbeef)
-+#define BCM_6318_ENET0_BASE (0xdeadbeef)
-+#define BCM_6318_ENET1_BASE (0xdeadbeef)
-+#define BCM_6318_ENETDMA_BASE (0xb0088000)
-+#define BCM_6318_ENETDMAC_BASE (0xb0088200)
-+#define BCM_6318_ENETDMAS_BASE (0xb0088400)
-+#define BCM_6318_ENETSW_BASE (0xb0080000)
-+#define BCM_6318_EHCI0_BASE (0xb0005000)
-+#define BCM_6318_SDRAM_BASE (0xb0004000)
-+#define BCM_6318_MEMC_BASE (0xdeadbeef)
-+#define BCM_6318_DDR_BASE (0xdeadbeef)
-+#define BCM_6318_M2M_BASE (0xdeadbeef)
-+#define BCM_6318_ATM_BASE (0xdeadbeef)
-+#define BCM_6318_XTM_BASE (0xdeadbeef)
-+#define BCM_6318_XTMDMA_BASE (0xb000c000)
-+#define BCM_6318_XTMDMAC_BASE (0xdeadbeef)
-+#define BCM_6318_XTMDMAS_BASE (0xdeadbeef)
-+#define BCM_6318_PCM_BASE (0xdeadbeef)
-+#define BCM_6318_PCMDMA_BASE (0xdeadbeef)
-+#define BCM_6318_PCMDMAC_BASE (0xdeadbeef)
-+#define BCM_6318_PCMDMAS_BASE (0xdeadbeef)
-+#define BCM_6318_RNG_BASE (0xdeadbeef)
-+#define BCM_6318_MISC_BASE (0xb0000280)
-+#define BCM_6318_OTP_BASE (0xdeadbeef)
-+
-+#define BCM_6318_STRAP_BASE (0xb0000900)
-+
-+/*
- * 6328 register sets base address
- */
- #define BCM_6328_DSL_LMEM_BASE (0xdeadbeef)
-@@ -819,6 +877,55 @@ enum bcm63xx_irq {
- #define BCM_3368_EXT_IRQ2 (IRQ_INTERNAL_BASE + 27)
- #define BCM_3368_EXT_IRQ3 (IRQ_INTERNAL_BASE + 28)
-
-+/*
-+ * 6318 irqs
-+ */
-+#define BCM_6318_HIGH_IRQ_BASE (IRQ_INTERNAL_BASE + 32)
-+#define BCM_6318_VERY_HIGH_IRQ_BASE (BCM_6318_HIGH_IRQ_BASE + 32)
-+
-+#define BCM_6318_TIMER_IRQ (IRQ_INTERNAL_BASE + 31)
-+#define BCM_6318_SPI_IRQ 0
-+#define BCM_6318_UART0_IRQ (IRQ_INTERNAL_BASE + 28)
-+#define BCM_6318_UART1_IRQ 0
-+#define BCM_6318_DSL_IRQ (IRQ_INTERNAL_BASE + 21)
-+#define BCM_6318_UDC0_IRQ 0
-+#define BCM_6318_ENET0_IRQ 0
-+#define BCM_6318_ENET1_IRQ 0
-+#define BCM_6318_ENET_PHY_IRQ (IRQ_INTERNAL_BASE + 12)
-+#define BCM_6318_HSSPI_IRQ (IRQ_INTERNAL_BASE + 29)
-+#define BCM_6318_OHCI0_IRQ (BCM_6318_HIGH_IRQ_BASE + 9)
-+#define BCM_6318_EHCI0_IRQ (BCM_6318_HIGH_IRQ_BASE + 10)
-+#define BCM_6318_USBD_IRQ (IRQ_INTERNAL_BASE + 4)
-+#define BCM_6318_USBD_RXDMA0_IRQ (IRQ_INTERNAL_BASE + 5)
-+#define BCM_6318_USBD_TXDMA0_IRQ (IRQ_INTERNAL_BASE + 6)
-+#define BCM_6318_USBD_RXDMA1_IRQ (IRQ_INTERNAL_BASE + 7)
-+#define BCM_6318_USBD_TXDMA1_IRQ (IRQ_INTERNAL_BASE + 8)
-+#define BCM_6318_USBD_RXDMA2_IRQ (IRQ_INTERNAL_BASE + 9)
-+#define BCM_6318_USBD_TXDMA2_IRQ (IRQ_INTERNAL_BASE + 10)
-+#define BCM_6318_PCMCIA_IRQ 0
-+#define BCM_6318_ENET0_RXDMA_IRQ 0
-+#define BCM_6318_ENET0_TXDMA_IRQ 0
-+#define BCM_6318_ENET1_RXDMA_IRQ 0
-+#define BCM_6318_ENET1_TXDMA_IRQ 0
-+#define BCM_6318_PCI_IRQ (IRQ_INTERNAL_BASE + 23)
-+#define BCM_6318_ATM_IRQ 0
-+#define BCM_6318_ENETSW_RXDMA0_IRQ (BCM_6318_HIGH_IRQ_BASE + 0)
-+#define BCM_6318_ENETSW_RXDMA1_IRQ (BCM_6318_HIGH_IRQ_BASE + 1)
-+#define BCM_6318_ENETSW_RXDMA2_IRQ (BCM_6318_HIGH_IRQ_BASE + 2)
-+#define BCM_6318_ENETSW_RXDMA3_IRQ (BCM_6318_HIGH_IRQ_BASE + 3)
-+#define BCM_6318_ENETSW_TXDMA0_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 10)
-+#define BCM_6318_ENETSW_TXDMA1_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 11)
-+#define BCM_6318_ENETSW_TXDMA2_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 12)
-+#define BCM_6318_ENETSW_TXDMA3_IRQ (BCM_6318_VERY_HIGH_IRQ_BASE + 13)
-+#define BCM_6318_XTM_IRQ (BCM_6318_HIGH_IRQ_BASE + 31)
-+#define BCM_6318_XTM_DMA0_IRQ (BCM_6318_HIGH_IRQ_BASE + 11)
-+
-+#define BCM_6318_PCM_DMA0_IRQ (IRQ_INTERNAL_BASE + 2)
-+#define BCM_6318_PCM_DMA1_IRQ (IRQ_INTERNAL_BASE + 3)
-+#define BCM_6318_EXT_IRQ0 (IRQ_INTERNAL_BASE + 24)
-+#define BCM_6318_EXT_IRQ1 (IRQ_INTERNAL_BASE + 25)
-+#define BCM_6318_EXT_IRQ2 (IRQ_INTERNAL_BASE + 26)
-+#define BCM_6318_EXT_IRQ3 (IRQ_INTERNAL_BASE + 27)
-
- /*
- * 6328 irqs
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -52,6 +52,39 @@
- CKCTL_3368_EMUSB_EN | \
- CKCTL_3368_USBU_EN)
-
-+#define CKCTL_6318_ADSL_ASB_EN (1 << 0)
-+#define CKCTL_6318_USB_ASB_EN (1 << 1)
-+#define CKCTL_6318_MIPS_ASB_EN (1 << 2)
-+#define CKCTL_6318_PCIE_ASB_EN (1 << 3)
-+#define CKCTL_6318_PHYMIPS_ASB_EN (1 << 4)
-+#define CKCTL_6318_ROBOSW_ASB_EN (1 << 5)
-+#define CKCTL_6318_SAR_ASB_EN (1 << 6)
-+#define CKCTL_6318_SDR_ASB_EN (1 << 7)
-+#define CKCTL_6318_SWREG_ASB_EN (1 << 8)
-+#define CKCTL_6318_PERIPH_ASB_EN (1 << 9)
-+#define CKCTL_6318_CPUBUS160_EN (1 << 10)
-+#define CKCTL_6318_ADSL_EN (1 << 11)
-+#define CKCTL_6318_SAR125_EN (1 << 12)
-+#define CKCTL_6318_MIPS_EN (1 << 13)
-+#define CKCTL_6318_PCIE_EN (1 << 14)
-+#define CKCTL_6318_ROBOSW250_EN (1 << 16)
-+#define CKCTL_6318_ROBOSW025_EN (1 << 17)
-+#define CKCTL_6318_SDR_EN (1 << 19)
-+#define CKCTL_6318_USB_EN (1 << 20) /* both device and host */
-+#define CKCTL_6318_HSSPI_EN (1 << 25)
-+#define CKCTL_6318_PCIE25_EN (1 << 27)
-+#define CKCTL_6318_PHYMIPS_EN (1 << 28)
-+#define CKCTL_6318_ADSL_AFE_EN (1 << 29)
-+#define CKCTL_6318_ADSL_QPROC_EN (1 << 30)
-+
-+#define CKCTL_6318_ALL_SAFE_EN (CKCTL_6318_PHYMIPS_EN | \
-+ CKCTL_6318_ADSL_QPROC_EN | \
-+ CKCTL_6318_ADSL_AFE_EN | \
-+ CKCTL_6318_ADSL_EN | \
-+ CKCTL_6318_SAR_EN | \
-+ CKCTL_6318_USB_EN | \
-+ CKCTL_6318_PCIE_EN)
-+
- #define CKCTL_6328_PHYMIPS_EN (1 << 0)
- #define CKCTL_6328_ADSL_QPROC_EN (1 << 1)
- #define CKCTL_6328_ADSL_AFE_EN (1 << 2)
-@@ -259,12 +292,27 @@
- CKCTL_63268_TBUS_EN | \
- CKCTL_63268_ROBOSW250_EN)
-
-+/* UBUS Clock Control register */
-+#define PERF_UB_CKCTL_REG 0x10
-+
-+#define UB_CKCTL_6318_ADSL_EN (1 << 0)
-+#define UB_CKCTL_6318_ARB_EN (1 << 1)
-+#define UB_CKCTL_6318_MIPS_EN (1 << 2)
-+#define UB_CKCTL_6318_PCIE_EN (1 << 3)
-+#define UB_CKCTL_6318_PERIPH_EN (1 << 4)
-+#define UB_CKCTL_6318_PHYMIPS_EN (1 << 5)
-+#define UB_CKCTL_6318_ROBOSW_EN (1 << 6)
-+#define UB_CKCTL_6318_SAR_EN (1 << 7)
-+#define UB_CKCTL_6318_SDR_EN (1 << 8)
-+#define UB_CKCTL_6318_USB_EN (1 << 9)
-+
- /* System PLL Control register */
- #define PERF_SYS_PLL_CTL_REG 0x8
- #define SYS_PLL_SOFT_RESET 0x1
-
- /* Interrupt Mask register */
- #define PERF_IRQMASK_3368_REG 0xc
-+#define PERF_IRQMASK_6318_REG 0x20
- #define PERF_IRQMASK_6328_REG(x) (0x20 + (x) * 0x10)
- #define PERF_IRQMASK_6338_REG 0xc
- #define PERF_IRQMASK_6345_REG 0xc
-@@ -276,6 +324,7 @@
-
- /* Interrupt Status register */
- #define PERF_IRQSTAT_3368_REG 0x10
-+#define PERF_IRQSTAT_6318_REG 0x30
- #define PERF_IRQSTAT_6328_REG(x) (0x28 + (x) * 0x10)
- #define PERF_IRQSTAT_6338_REG 0x10
- #define PERF_IRQSTAT_6345_REG 0x10
-@@ -287,6 +336,7 @@
-
- /* External Interrupt Configuration register */
- #define PERF_EXTIRQ_CFG_REG_3368 0x14
-+#define PERF_EXTIRQ_CFG_REG_6318 0x18
- #define PERF_EXTIRQ_CFG_REG_6328 0x18
- #define PERF_EXTIRQ_CFG_REG_6338 0x14
- #define PERF_EXTIRQ_CFG_REG_6345 0x14
-@@ -320,6 +370,7 @@
-
- /* Soft Reset register */
- #define PERF_SOFTRESET_REG 0x28
-+#define PERF_SOFTRESET_6318_REG 0x10
- #define PERF_SOFTRESET_6328_REG 0x10
- #define PERF_SOFTRESET_6358_REG 0x34
- #define PERF_SOFTRESET_6362_REG 0x10
-@@ -333,6 +384,18 @@
- #define SOFTRESET_3368_USBS_MASK (1 << 11)
- #define SOFTRESET_3368_PCM_MASK (1 << 13)
-
-+#define SOFTRESET_6318_SPI_MASK (1 << 0)
-+#define SOFTRESET_6318_EPHY_MASK (1 << 1)
-+#define SOFTRESET_6318_SAR_MASK (1 << 2)
-+#define SOFTRESET_6318_ENETSW_MASK (1 << 3)
-+#define SOFTRESET_6318_USBS_MASK (1 << 4)
-+#define SOFTRESET_6318_USBH_MASK (1 << 5)
-+#define SOFTRESET_6318_PCIE_CORE_MASK (1 << 6)
-+#define SOFTRESET_6318_PCIE_MASK (1 << 7)
-+#define SOFTRESET_6318_PCIE_EXT_MASK (1 << 8)
-+#define SOFTRESET_6318_PCIE_HARD_MASK (1 << 9)
-+#define SOFTRESET_6318_ADSL_MASK (1 << 10)
-+
- #define SOFTRESET_6328_SPI_MASK (1 << 0)
- #define SOFTRESET_6328_EPHY_MASK (1 << 1)
- #define SOFTRESET_6328_SAR_MASK (1 << 2)
-@@ -504,8 +567,17 @@
- #define TIMER_IRQSTAT_TIMER1_IR_EN (1 << 9)
- #define TIMER_IRQSTAT_TIMER2_IR_EN (1 << 10)
-
-+#define TIMER_IRQMASK_6318_REG 0x0
-+#define TIMER_IRQSTAT_6318_REG 0x4
-+#define IRQSTATMASK_TIMER0 (1 << 0)
-+#define IRQSTATMASK_TIMER1 (1 << 1)
-+#define IRQSTATMASK_TIMER2 (1 << 2)
-+#define IRQSTATMASK_TIMER3 (1 << 3)
-+#define IRQSTATMASK_WDT (1 << 4)
-+
- /* Timer control register */
- #define TIMER_CTLx_REG(x) (0x4 + (x * 4))
-+#define TIMER_CTRx_6318_REG(x) (0x8 + (x * 4))
- #define TIMER_CTL0_REG 0x4
- #define TIMER_CTL1_REG 0x8
- #define TIMER_CTL2_REG 0xC
-@@ -1252,6 +1324,8 @@
- #define SDRAM_CFG_32B_MASK (1 << SDRAM_CFG_32B_SHIFT)
- #define SDRAM_CFG_BANK_SHIFT 13
- #define SDRAM_CFG_BANK_MASK (1 << SDRAM_CFG_BANK_SHIFT)
-+#define SDRAM_CFG_6318_SPACE_SHIFT 4
-+#define SDRAM_CFG_6318_SPACE_MASK (0xf << SDRAM_CFG_6318_SPACE_SHIFT)
-
- #define SDRAM_MBASE_REG 0xc
-
---- a/arch/mips/include/asm/mach-bcm63xx/ioremap.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/ioremap.h
-@@ -22,6 +22,7 @@ static inline int is_bcm63xx_internal_re
- if (offset >= 0xfff00000)
- return 1;
- break;
-+ case BCM6318_CPU_ID:
- case BCM6328_CPU_ID:
- case BCM6362_CPU_ID:
- case BCM6368_CPU_ID:
---- a/arch/mips/bcm63xx/dev-hsspi.c
-+++ b/arch/mips/bcm63xx/dev-hsspi.c
-@@ -35,7 +35,8 @@ static struct platform_device bcm63xx_hs
-
- int __init bcm63xx_hsspi_register(void)
- {
-- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_63268())
-+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6362() &&
-+ !BCMCPU_IS_63268())
- return -ENODEV;
-
- spi_resources[0].start = bcm63xx_regset_address(RSET_HSSPI);
---- a/arch/mips/bcm63xx/dev-usb-usbd.c
-+++ b/arch/mips/bcm63xx/dev-usb-usbd.c
-@@ -41,7 +41,7 @@ int __init bcm63xx_usbd_register(const s
- IRQ_USBD_RXDMA2, IRQ_USBD_TXDMA2 };
- int i;
-
-- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6368())
-+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6368())
- return 0;
-
- usbd_resources[0].start = bcm63xx_regset_address(RSET_USBD);
---- a/arch/mips/bcm63xx/dev-enet.c
-+++ b/arch/mips/bcm63xx/dev-enet.c
-@@ -176,8 +176,8 @@ static int __init register_shared(void)
- else
- shared_res[0].end += (RSET_ENETDMA_SIZE) - 1;
-
-- if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368() ||
-- BCMCPU_IS_63268())
-+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() ||
-+ BCMCPU_IS_6368() || BCMCPU_IS_63268())
- chan_count = 32;
- else if (BCMCPU_IS_6345())
- chan_count = 8;
-@@ -277,8 +277,8 @@ bcm63xx_enetsw_register(const struct bcm
- {
- int ret;
-
-- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368() &&
-- !BCMCPU_IS_63268())
-+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6362() &&
-+ !BCMCPU_IS_6368() && !BCMCPU_IS_63268())
- return -ENODEV;
-
- ret = register_shared();
-@@ -295,7 +295,7 @@ bcm63xx_enetsw_register(const struct bcm
-
- memcpy(bcm63xx_enetsw_device.dev.platform_data, pd, sizeof(*pd));
-
-- if (BCMCPU_IS_6328())
-+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328())
- enetsw_pd.num_ports = ENETSW_PORTS_6328;
- else if (BCMCPU_IS_6362() || BCMCPU_IS_6368() ||
- BCMCPU_VARIANT_IS_63168() || BCMCPU_VARIANT_IS_63169())
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
-@@ -9,6 +9,8 @@ int __init bcm63xx_gpio_init(void);
- static inline unsigned long bcm63xx_gpio_count(void)
- {
- switch (bcm63xx_get_cpu_id()) {
-+ case BCM6318_CPU_ID:
-+ return 50;
- case BCM6328_CPU_ID:
- return 32;
- case BCM3368_CPU_ID:
---- a/arch/mips/bcm63xx/dev-usb-ehci.c
-+++ b/arch/mips/bcm63xx/dev-usb-ehci.c
-@@ -81,7 +81,8 @@ static struct platform_device bcm63xx_eh
-
- int __init bcm63xx_ehci_register(void)
- {
-- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6358() && !BCMCPU_IS_6362() && !BCMCPU_IS_6368())
-+ if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6358() &&
-+ !BCMCPU_IS_6362() && !BCMCPU_IS_6368())
- return 0;
-
- ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0);
diff --git a/target/linux/brcm63xx/patches-3.14/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch b/target/linux/brcm63xx/patches-3.14/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch
deleted file mode 100644
index 71044f8..0000000
--- a/target/linux/brcm63xx/patches-3.14/342-MIPS-BCM63XX-split-PCIe-reset-signals.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From 4bdfacdeaf3c988c4f3256c88118893eac640b03 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 8 Dec 2013 14:17:50 +0100
-Subject: [PATCH 52/53] MIPS: BCM63XX: split PCIE reset signals
-
----
- arch/mips/bcm63xx/reset.c | 39 ++++++++++++++--------
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h | 2 ++
- arch/mips/pci/pci-bcm63xx.c | 7 ++++
- 3 files changed, 34 insertions(+), 14 deletions(-)
-
---- a/arch/mips/bcm63xx/reset.c
-+++ b/arch/mips/bcm63xx/reset.c
-@@ -28,7 +28,9 @@
- [BCM63XX_RESET_PCM] = BCM## __cpu ##_RESET_PCM, \
- [BCM63XX_RESET_MPI] = BCM## __cpu ##_RESET_MPI, \
- [BCM63XX_RESET_PCIE] = BCM## __cpu ##_RESET_PCIE, \
-- [BCM63XX_RESET_PCIE_EXT] = BCM## __cpu ##_RESET_PCIE_EXT,
-+ [BCM63XX_RESET_PCIE_EXT] = BCM## __cpu ##_RESET_PCIE_EXT, \
-+ [BCM63XX_RESET_PCIE_CORE] = BCM## __cpu ##_RESET_PCIE_CORE, \
-+ [BCM63XX_RESET_PCIE_HARD] = BCM## __cpu ##_RESET_PCIE_HARD,
-
- #define BCM3368_RESET_SPI SOFTRESET_3368_SPI_MASK
- #define BCM3368_RESET_ENET SOFTRESET_3368_ENET_MASK
-@@ -42,6 +44,8 @@
- #define BCM3368_RESET_MPI SOFTRESET_3368_MPI_MASK
- #define BCM3368_RESET_PCIE 0
- #define BCM3368_RESET_PCIE_EXT 0
-+#define BCM3368_RESET_PCIE_CORE 0
-+#define BCM3368_RESET_PCIE_HARD 0
-
-
- #define BCM6318_RESET_SPI SOFTRESET_6318_SPI_MASK
-@@ -54,11 +58,10 @@
- #define BCM6318_RESET_ENETSW SOFTRESET_6318_ENETSW_MASK
- #define BCM6318_RESET_PCM 0
- #define BCM6318_RESET_MPI 0
--#define BCM6318_RESET_PCIE \
-- (SOFTRESET_6318_PCIE_MASK | \
-- SOFTRESET_6318_PCIE_CORE_MASK | \
-- SOFTRESET_6318_PCIE_HARD_MASK)
-+#define BCM6318_RESET_PCIE SOFTRESET_6318_PCIE_MASK
- #define BCM6318_RESET_PCIE_EXT SOFTRESET_6318_PCIE_EXT_MASK
-+#define BCM6318_RESET_PCIE_CORE SOFTRESET_6318_PCIE_CORE_MASK
-+#define BCM6318_RESET_PCIE_HARD SOFTRESET_6318_PCIE_HARD_MASK
-
- #define BCM6328_RESET_SPI SOFTRESET_6328_SPI_MASK
- #define BCM6328_RESET_ENET 0
-@@ -70,11 +73,10 @@
- #define BCM6328_RESET_ENETSW SOFTRESET_6328_ENETSW_MASK
- #define BCM6328_RESET_PCM SOFTRESET_6328_PCM_MASK
- #define BCM6328_RESET_MPI 0
--#define BCM6328_RESET_PCIE \
-- (SOFTRESET_6328_PCIE_MASK | \
-- SOFTRESET_6328_PCIE_CORE_MASK | \
-- SOFTRESET_6328_PCIE_HARD_MASK)
-+#define BCM6328_RESET_PCIE SOFTRESET_6328_PCIE_MASK
- #define BCM6328_RESET_PCIE_EXT SOFTRESET_6328_PCIE_EXT_MASK
-+#define BCM6328_RESET_PCIE_CORE SOFTRESET_6328_PCIE_CORE_MASK
-+#define BCM6328_RESET_PCIE_HARD SOFTRESET_6328_PCIE_HARD_MASK
-
- #define BCM6338_RESET_SPI SOFTRESET_6338_SPI_MASK
- #define BCM6338_RESET_ENET SOFTRESET_6338_ENET_MASK
-@@ -88,6 +90,8 @@
- #define BCM6338_RESET_MPI 0
- #define BCM6338_RESET_PCIE 0
- #define BCM6338_RESET_PCIE_EXT 0
-+#define BCM6338_RESET_PCIE_CORE 0
-+#define BCM6338_RESET_PCIE_HARD 0
-
- #define BCM6348_RESET_SPI SOFTRESET_6348_SPI_MASK
- #define BCM6348_RESET_ENET SOFTRESET_6348_ENET_MASK
-@@ -101,6 +105,8 @@
- #define BCM6348_RESET_MPI 0
- #define BCM6348_RESET_PCIE 0
- #define BCM6348_RESET_PCIE_EXT 0
-+#define BCM6348_RESET_PCIE_CORE 0
-+#define BCM6348_RESET_PCIE_HARD 0
-
- #define BCM6358_RESET_SPI SOFTRESET_6358_SPI_MASK
- #define BCM6358_RESET_ENET SOFTRESET_6358_ENET_MASK
-@@ -114,6 +120,8 @@
- #define BCM6358_RESET_MPI SOFTRESET_6358_MPI_MASK
- #define BCM6358_RESET_PCIE 0
- #define BCM6358_RESET_PCIE_EXT 0
-+#define BCM6358_RESET_PCIE_CORE 0
-+#define BCM6358_RESET_PCIE_HARD 0
-
- #define BCM6362_RESET_SPI SOFTRESET_6362_SPI_MASK
- #define BCM6362_RESET_ENET 0
-@@ -125,9 +133,10 @@
- #define BCM6362_RESET_ENETSW SOFTRESET_6362_ENETSW_MASK
- #define BCM6362_RESET_PCM SOFTRESET_6362_PCM_MASK
- #define BCM6362_RESET_MPI 0
--#define BCM6362_RESET_PCIE (SOFTRESET_6362_PCIE_MASK | \
-- SOFTRESET_6362_PCIE_CORE_MASK)
-+#define BCM6362_RESET_PCIE SOFTRESET_6362_PCIE_MASK
- #define BCM6362_RESET_PCIE_EXT SOFTRESET_6362_PCIE_EXT_MASK
-+#define BCM6362_RESET_PCIE_CORE SOFTRESET_6362_PCIE_CORE_MASK
-+#define BCM6362_RESET_PCIE_HARD 0
-
- #define BCM6368_RESET_SPI SOFTRESET_6368_SPI_MASK
- #define BCM6368_RESET_ENET 0
-@@ -141,6 +150,8 @@
- #define BCM6368_RESET_MPI SOFTRESET_6368_MPI_MASK
- #define BCM6368_RESET_PCIE 0
- #define BCM6368_RESET_PCIE_EXT 0
-+#define BCM6368_RESET_PCIE_CORE 0
-+#define BCM6368_RESET_PCIE_HARD 0
-
- #define BCM63268_RESET_SPI SOFTRESET_63268_SPI_MASK
- #define BCM63268_RESET_ENET 0
-@@ -152,10 +163,10 @@
- #define BCM63268_RESET_ENETSW SOFTRESET_63268_ENETSW_MASK
- #define BCM63268_RESET_PCM SOFTRESET_63268_PCM_MASK
- #define BCM63268_RESET_MPI 0
--#define BCM63268_RESET_PCIE (SOFTRESET_63268_PCIE_MASK | \
-- SOFTRESET_63268_PCIE_CORE_MASK | \
-- SOFTRESET_63268_PCIE_HARD_MASK)
-+#define BCM63268_RESET_PCIE SOFTRESET_63268_PCIE_MASK
- #define BCM63268_RESET_PCIE_EXT SOFTRESET_63268_PCIE_EXT_MASK
-+#define BCM63268_RESET_PCIE_CORE SOFTRESET_63268_PCIE_CORE_MASK
-+#define BCM63268_RESET_PCIE_HARD SOFTRESET_63268_PCIE_HARD_MASK
-
- /*
- * core reset bits
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_reset.h
-@@ -14,6 +14,8 @@ enum bcm63xx_core_reset {
- BCM63XX_RESET_MPI,
- BCM63XX_RESET_PCIE,
- BCM63XX_RESET_PCIE_EXT,
-+ BCM63XX_RESET_PCIE_CORE,
-+ BCM63XX_RESET_PCIE_HARD,
- };
-
- void bcm63xx_core_set_reset(enum bcm63xx_core_reset, int reset);
---- a/arch/mips/pci/pci-bcm63xx.c
-+++ b/arch/mips/pci/pci-bcm63xx.c
-@@ -135,9 +135,16 @@ static void __init bcm63xx_reset_pcie(vo
-
- /* reset the PCIe core */
- bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 1);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 1);
- bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_EXT, 1);
-+ if (BCMCPU_IS_6328() || BCMCPU_IS_63268()) {
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_HARD, 1);
-+ mdelay(10);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_HARD, 0);
-+ }
- mdelay(10);
-
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 0);
- bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 0);
- mdelay(10);
-
diff --git a/target/linux/brcm63xx/patches-3.14/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch b/target/linux/brcm63xx/patches-3.14/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch
deleted file mode 100644
index 3ba3357..0000000
--- a/target/linux/brcm63xx/patches-3.14/343-MIPS-BCM63XX-add-PCIe-support-for-BCM6318.patch
+++ /dev/null
@@ -1,342 +0,0 @@
-From 11a8ab8dac4ef5d0d70199843043927edce1d4db Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 15 Dec 2013 20:47:34 +0100
-Subject: [PATCH 53/53] MIPS: BCM63XX: add PCIe support for BCM6318
-
----
- arch/mips/bcm63xx/clk.c | 25 ++++-
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h | 6 ++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 60 +++++++++++-
- arch/mips/pci/ops-bcm63xx.c | 16 +++-
- arch/mips/pci/pci-bcm63xx.c | 106 ++++++++++++++++++----
- 5 files changed, 184 insertions(+), 29 deletions(-)
-
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -50,6 +50,18 @@ static void bcm_hwclock_set(u32 mask, in
- bcm_perf_writel(reg, PERF_CKCTL_REG);
- }
-
-+static void bcm_ub_hwclock_set(u32 mask, int enable)
-+{
-+ u32 reg;
-+
-+ reg = bcm_perf_readl(PERF_UB_CKCTL_REG);
-+ if (enable)
-+ reg |= mask;
-+ else
-+ reg &= ~mask;
-+ bcm_perf_writel(reg, PERF_UB_CKCTL_REG);
-+}
-+
- /*
- * Ethernet MAC "misc" clock: dma clocks and main clock on 6348
- */
-@@ -317,12 +329,17 @@ static struct clk clk_ipsec = {
-
- static void pcie_set(struct clk *clk, int enable)
- {
-- if (BCMCPU_IS_6328())
-+ if (BCMCPU_IS_6318()) {
-+ bcm_hwclock_set(CKCTL_6318_PCIE_EN, enable);
-+ bcm_hwclock_set(CKCTL_6318_PCIE25_EN, enable);
-+ bcm_ub_hwclock_set(UB_CKCTL_6318_PCIE_EN, enable);
-+ } else if (BCMCPU_IS_6328()) {
- bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable);
-- else if (BCMCPU_IS_6362())
-+ } else if (BCMCPU_IS_6362()) {
- bcm_hwclock_set(CKCTL_6362_PCIE_EN, enable);
-- else if (BCMCPU_IS_63268())
-+ } else if (BCMCPU_IS_63268()) {
- bcm_hwclock_set(CKCTL_63268_PCIE_EN, enable);
-+ }
- }
-
- static struct clk clk_pcie = {
-@@ -405,7 +422,7 @@ struct clk *clk_get(struct device *dev,
- if ((BCMCPU_IS_6362() || BCMCPU_IS_6368() || BCMCPU_IS_63268()) &&
- !strcmp(id, "ipsec"))
- return &clk_ipsec;
-- if ((BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) &&
-+ if ((BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) &&
- !strcmp(id, "pcie"))
- return &clk_pcie;
- return ERR_PTR(-ENOENT);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_io.h
-@@ -40,6 +40,12 @@
- #define BCM_CB_MEM_END_PA (BCM_CB_MEM_BASE_PA + \
- BCM_CB_MEM_SIZE - 1)
-
-+#define BCM_PCIE_MEM_BASE_PA_6318 0x10200000
-+#define BCM_PCIE_MEM_SIZE_6318 (1 * 1024 * 1024)
-+#define BCM_PCIE_MEM_END_PA_6318 (BCM_PCIE_MEM_BASE_PA_6318 + \
-+ BCM_PCIE_MEM_SIZE_6318 - 1)
-+
-+
- #define BCM_PCIE_MEM_BASE_PA_6328 0x10f00000
- #define BCM_PCIE_MEM_SIZE_6328 (1 * 1024 * 1024)
- #define BCM_PCIE_MEM_END_PA_6328 (BCM_PCIE_MEM_BASE_PA_6328 + \
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -1542,6 +1542,17 @@
- * _REG relative to RSET_PCIE
- *************************************************************************/
-
-+#define PCIE_SPECIFIC_REG 0x188
-+#define SPECIFIC_ENDIAN_MODE_BAR1_SHIFT 0
-+#define SPECIFIC_ENDIAN_MODE_BAR1_MASK (0x3 << SPECIFIC_ENDIAN_MODE_BAR1_SHIFT)
-+#define SPECIFIC_ENDIAN_MODE_BAR2_SHIFT 2
-+#define SPECIFIC_ENDIAN_MODE_BAR2_MASK (0x3 << SPECIFIC_ENDIAN_MODE_BAR1_SHIFT)
-+#define SPECIFIC_ENDIAN_MODE_BAR3_SHIFT 4
-+#define SPECIFIC_ENDIAN_MODE_BAR3_MASK (0x3 << SPECIFIC_ENDIAN_MODE_BAR1_SHIFT)
-+#define SPECIFIC_ENDIAN_MODE_WORD_ALIGN 0
-+#define SPECIFIC_ENDIAN_MODE_HALFWORD_ALIGN 1
-+#define SPECIFIC_ENDIAN_MODE_BYTE_ALIGN 2
-+
- #define PCIE_CONFIG2_REG 0x408
- #define CONFIG2_BAR1_SIZE_EN 1
- #define CONFIG2_BAR1_SIZE_MASK 0xf
-@@ -1587,7 +1598,54 @@
- #define PCIE_RC_INT_C (1 << 2)
- #define PCIE_RC_INT_D (1 << 3)
-
--#define PCIE_DEVICE_OFFSET 0x8000
-+#define PCIE_CPU_2_PCIE_MEM_WIN0_LO_REG 0x400c
-+#define C2P_MEM_WIN_ENDIAN_MODE_MASK 0x3
-+#define C2P_MEM_WIN_ENDIAN_NO_SWAP 0
-+#define C2P_MEM_WIN_ENDIAN_HALF_WORD_SWAP 1
-+#define C2P_MEM_WIN_ENDIAN_HALF_BYTE_SWAP 2
-+#define C2P_MEM_WIN_BASE_ADDR_SHIFT 20
-+#define C2P_MEM_WIN_BASE_ADDR_MASK (0xfff << C2P_MEM_WIN_BASE_ADDR_SHIFT)
-+
-+#define PCIE_RC_BAR1_CONFIG_LO_REG 0x402c
-+#define RC_BAR_CFG_LO_SIZE_256MB 0xd
-+#define RC_BAR_CFG_LO_MATCH_ADDR_SHIFT 20
-+#define RC_BAR_CFG_LO_MATCH_ADDR_MASK (0xfff << RC_BAR_CFG_LO_MATCH_ADDR_SHIFT)
-+
-+#define PCIE_CPU_2_PCIE_MEM_WIN0_BASELIMIT_REG 0x4070
-+#define C2P_BASELIMIT_LIMIT_SHIFT 20
-+#define C2P_BASELIMIT_LIMIT_MASK (0xfff << C2P_BASELIMIT_LIMIT_SHIFT)
-+#define C2P_BASELIMIT_BASE_SHIFT 4
-+#define C2P_BASELIMIT_BASE_MASK (0xfff << C2P_BASELIMIT_BASE_SHIFT)
-+
-+#define PCIE_UBUS_BAR1_CFG_REMAP_REG 0x4088
-+#define BAR1_CFG_REMAP_OFFSET_SHIFT 20
-+#define BAR1_CFG_REMAP_OFFSET_MASK (0xfff << BAR1_CFG_REMAP_OFFSET_SHIFT)
-+#define BAR1_CFG_REMAP_ACCESS_EN 1
-+
-+#define PCIE_HARD_DEBUG_REG 0x4204
-+#define HARD_DEBUG_SERDES_IDDQ (1 << 23)
-+
-+#define PCIE_CPU_INT1_MASK_CLEAR_REG 0x830c
-+#define CPU_INT_PCIE_ERR_ATTN_CPU (1 << 0)
-+#define CPU_INT_PCIE_INTA (1 << 1)
-+#define CPU_INT_PCIE_INTB (1 << 2)
-+#define CPU_INT_PCIE_INTC (1 << 3)
-+#define CPU_INT_PCIE_INTD (1 << 4)
-+#define CPU_INT_PCIE_INTR (1 << 5)
-+#define CPU_INT_PCIE_NMI (1 << 6)
-+#define CPU_INT_PCIE_UBUS (1 << 7)
-+#define CPU_INT_IPI (1 << 8)
-+
-+#define PCIE_EXT_CFG_INDEX_REG 0x8400
-+#define EXT_CFG_FUNC_NUM_SHIFT 12
-+#define EXT_CFG_FUNC_NUM_MASK (0x7 << EXT_CFG_FUNC_NUM_SHIFT)
-+#define EXT_CFG_DEV_NUM_SHIFT 15
-+#define EXT_CFG_DEV_NUM_MASK (0xf << EXT_CFG_DEV_NUM_SHIFT)
-+#define EXT_CFG_BUS_NUM_SHIFT 20
-+#define EXT_CFG_BUS_NUM_MASK (0xff << EXT_CFG_BUS_NUM_SHIFT)
-+
-+#define PCIE_DEVICE_OFFSET_6318 0x9000
-+#define PCIE_DEVICE_OFFSET_6328 0x8000
-
- /*************************************************************************
- * _REG relative to RSET_OTP
---- a/arch/mips/pci/ops-bcm63xx.c
-+++ b/arch/mips/pci/ops-bcm63xx.c
-@@ -488,8 +488,12 @@ static int bcm63xx_pcie_read(struct pci_
- if (!bcm63xx_pcie_can_access(bus, devfn))
- return PCIBIOS_DEVICE_NOT_FOUND;
-
-- if (bus->number == PCIE_BUS_DEVICE)
-- reg += PCIE_DEVICE_OFFSET;
-+ if (bus->number == PCIE_BUS_DEVICE) {
-+ if (BCMCPU_IS_6318())
-+ reg += PCIE_DEVICE_OFFSET_6318;
-+ else
-+ reg += PCIE_DEVICE_OFFSET_6328;
-+ }
-
- data = bcm_pcie_readl(reg);
-
-@@ -508,8 +512,12 @@ static int bcm63xx_pcie_write(struct pci
- if (!bcm63xx_pcie_can_access(bus, devfn))
- return PCIBIOS_DEVICE_NOT_FOUND;
-
-- if (bus->number == PCIE_BUS_DEVICE)
-- reg += PCIE_DEVICE_OFFSET;
-+ if (bus->number == PCIE_BUS_DEVICE) {
-+ if (BCMCPU_IS_6318())
-+ reg += PCIE_DEVICE_OFFSET_6318;
-+ else
-+ reg += PCIE_DEVICE_OFFSET_6328;
-+ }
-
-
- data = bcm_pcie_readl(reg);
---- a/arch/mips/pci/pci-bcm63xx.c
-+++ b/arch/mips/pci/pci-bcm63xx.c
-@@ -118,7 +118,7 @@ static void bcm63xx_int_cfg_writel(u32 v
-
- void __iomem *pci_iospace_start;
-
--static void __init bcm63xx_reset_pcie(void)
-+static void __init bcm63xx_reset_pcie_gen1(void)
- {
- u32 val;
- u32 reg;
-@@ -152,20 +152,32 @@ static void __init bcm63xx_reset_pcie(vo
- mdelay(200);
- }
-
--static struct clk *pcie_clk;
--
--static int __init bcm63xx_register_pcie(void)
-+static void __init bcm63xx_reset_pcie_gen2(void)
- {
- u32 val;
-
-- /* enable clock */
-- pcie_clk = clk_get(NULL, "pcie");
-- if (IS_ERR_OR_NULL(pcie_clk))
-- return -ENODEV;
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_HARD, 0);
-
-- clk_prepare_enable(pcie_clk);
-+ /* reset the PCIe core */
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 1);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_EXT, 1);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 1);
-+ mdelay(10);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_EXT, 0);
-+ mdelay(10);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE, 0);
-+ mdelay(10);
-+ val = bcm_pcie_readl(PCIE_HARD_DEBUG_REG);
-+ val &= ~HARD_DEBUG_SERDES_IDDQ;
-+ bcm_pcie_writel(val, PCIE_HARD_DEBUG_REG);
-+ mdelay(10);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_PCIE_CORE, 0);
-+ mdelay(200);
-+}
-
-- bcm63xx_reset_pcie();
-+static void __init bcm63xx_init_pcie_gen1(void)
-+{
-+ u32 val;
-
- /* configure the PCIe bridge */
- val = bcm_pcie_readl(PCIE_BRIDGE_OPT1_REG);
-@@ -190,6 +202,65 @@ static int __init bcm63xx_register_pcie(
- val |= OPT2_CFG_TYPE1_BD_SEL;
- bcm_pcie_writel(val, PCIE_BRIDGE_OPT2_REG);
-
-+ /* set bar0 to little endian */
-+ val = (bcm_pcie_mem_resource.start >> 20) << BASEMASK_BASE_SHIFT;
-+ val |= (bcm_pcie_mem_resource.end >> 20) << BASEMASK_MASK_SHIFT;
-+ val |= BASEMASK_REMAP_EN;
-+ bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_BASEMASK_REG);
-+
-+ val = (bcm_pcie_mem_resource.start >> 20) << REBASE_ADDR_BASE_SHIFT;
-+ bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_REBASE_ADDR_REG);
-+}
-+
-+static void __init bcm63xx_init_pcie_gen2(void)
-+{
-+ u32 val;
-+
-+ bcm_pcie_writel(CPU_INT_PCIE_INTA | CPU_INT_PCIE_INTB |
-+ CPU_INT_PCIE_INTC | CPU_INT_PCIE_INTD,
-+ PCIE_CPU_INT1_MASK_CLEAR_REG);
-+
-+ val = bcm_pcie_mem_resource.end & C2P_BASELIMIT_LIMIT_MASK;
-+ val |= (bcm_pcie_mem_resource.start >> C2P_BASELIMIT_LIMIT_SHIFT) <<
-+ C2P_BASELIMIT_BASE_SHIFT;
-+
-+ bcm_pcie_writel(val, PCIE_CPU_2_PCIE_MEM_WIN0_BASELIMIT_REG);
-+
-+ /* set bar0 to little endian */
-+ val = bcm_pcie_readl(PCIE_CPU_2_PCIE_MEM_WIN0_LO_REG);
-+ val |= bcm_pcie_mem_resource.start & C2P_MEM_WIN_BASE_ADDR_MASK;
-+ val |= C2P_MEM_WIN_ENDIAN_HALF_BYTE_SWAP;
-+ bcm_pcie_writel(val, PCIE_CPU_2_PCIE_MEM_WIN0_LO_REG);
-+
-+ bcm_pcie_writel(SPECIFIC_ENDIAN_MODE_BYTE_ALIGN, PCIE_SPECIFIC_REG);
-+ bcm_pcie_writel(RC_BAR_CFG_LO_SIZE_256MB, PCIE_RC_BAR1_CONFIG_LO_REG);
-+ bcm_pcie_writel(BAR1_CFG_REMAP_ACCESS_EN, PCIE_UBUS_BAR1_CFG_REMAP_REG);
-+
-+ bcm_pcie_writel(PCIE_BUS_DEVICE << EXT_CFG_BUS_NUM_SHIFT,
-+ PCIE_EXT_CFG_INDEX_REG);
-+}
-+
-+static struct clk *pcie_clk;
-+
-+static int __init bcm63xx_register_pcie(void)
-+{
-+ u32 val;
-+
-+ /* enable clock */
-+ pcie_clk = clk_get(NULL, "pcie");
-+ if (IS_ERR_OR_NULL(pcie_clk))
-+ return -ENODEV;
-+
-+ clk_prepare_enable(pcie_clk);
-+
-+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_63268()) {
-+ bcm63xx_reset_pcie_gen1();
-+ bcm63xx_init_pcie_gen1();
-+ } else {
-+ bcm63xx_reset_pcie_gen2();
-+ bcm63xx_init_pcie_gen2();
-+ }
-+
- /* setup class code as bridge */
- val = bcm_pcie_readl(PCIE_IDVAL3_REG);
- val &= ~IDVAL3_CLASS_CODE_MASK;
-@@ -201,15 +272,6 @@ static int __init bcm63xx_register_pcie(
- val &= ~CONFIG2_BAR1_SIZE_MASK;
- bcm_pcie_writel(val, PCIE_CONFIG2_REG);
-
-- /* set bar0 to little endian */
-- val = (bcm_pcie_mem_resource.start >> 20) << BASEMASK_BASE_SHIFT;
-- val |= (bcm_pcie_mem_resource.end >> 20) << BASEMASK_MASK_SHIFT;
-- val |= BASEMASK_REMAP_EN;
-- bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_BASEMASK_REG);
--
-- val = (bcm_pcie_mem_resource.start >> 20) << REBASE_ADDR_BASE_SHIFT;
-- bcm_pcie_writel(val, PCIE_BRIDGE_BAR0_REBASE_ADDR_REG);
--
- register_pci_controller(&bcm63xx_pcie_controller);
-
- return 0;
-@@ -341,7 +403,10 @@ static int __init bcm63xx_pci_init(void)
- if (!bcm63xx_pci_enabled)
- return -ENODEV;
-
-- if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) {
-+ if (BCMCPU_IS_6318()) {
-+ bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6318;
-+ bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6318;
-+ } if (BCMCPU_IS_6328() || BCMCPU_IS_6362()) {
- bcm_pcie_mem_resource.start = BCM_PCIE_MEM_BASE_PA_6328;
- bcm_pcie_mem_resource.end = BCM_PCIE_MEM_END_PA_6328;
- } else if (BCMCPU_IS_63268()) {
-@@ -350,6 +415,7 @@ static int __init bcm63xx_pci_init(void)
- }
-
- switch (bcm63xx_get_cpu_id()) {
-+ case BCM6318_CPU_ID:
- case BCM6328_CPU_ID:
- case BCM6362_CPU_ID:
- case BCM63268_CPU_ID:
diff --git a/target/linux/brcm63xx/patches-3.14/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch b/target/linux/brcm63xx/patches-3.14/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch
deleted file mode 100644
index a91a29b..0000000
--- a/target/linux/brcm63xx/patches-3.14/344-MIPS-BCM63XX-detect-flash-type-early-and-store-the-r.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 9a97177b907330971aa7bf41855fafc2602e1c18 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 22 Dec 2013 12:26:57 +0100
-Subject: [PATCH 51/56] MIPS: BCM63XX: detect flash type early and store the
- result
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/dev-flash.c | 10 +++++++---
- arch/mips/bcm63xx/prom.c | 4 ++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++
- 3 files changed, 13 insertions(+), 3 deletions(-)
-
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -22,6 +22,8 @@
- #include <bcm63xx_regs.h>
- #include <bcm63xx_io.h>
-
-+static int flash_type;
-+
- static struct mtd_partition mtd_partitions[] = {
- {
- .name = "cfe",
-@@ -108,13 +110,15 @@ static int __init bcm63xx_detect_flash_t
- }
- }
-
-+void __init bcm63xx_flash_detect(void)
-+{
-+ flash_type = bcm63xx_detect_flash_type();
-+}
-+
- int __init bcm63xx_flash_register(void)
- {
-- int flash_type;
- u32 val;
-
-- flash_type = bcm63xx_detect_flash_type();
--
- switch (flash_type) {
- case BCM63XX_FLASH_TYPE_PARALLEL:
- /* read base address of boot chip select (0) */
---- a/arch/mips/bcm63xx/prom.c
-+++ b/arch/mips/bcm63xx/prom.c
-@@ -18,6 +18,7 @@
- #include <bcm63xx_io.h>
- #include <bcm63xx_regs.h>
- #include <bcm63xx_gpio.h>
-+#include <bcm63xx_dev_flash.h>
-
- void __init prom_init(void)
- {
-@@ -56,6 +57,9 @@ void __init prom_init(void)
- /* register gpiochip */
- bcm63xx_gpio_init();
-
-+ /* detect and setup flash access */
-+ bcm63xx_flash_detect();
-+
- /* do low level board init */
- board_prom_init();
-
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-@@ -7,6 +7,8 @@ enum {
- BCM63XX_FLASH_TYPE_NAND,
- };
-
-+void bcm63xx_flash_detect(void);
-+
- int __init bcm63xx_flash_register(void);
-
- #endif /* __BCM63XX_FLASH_H */
diff --git a/target/linux/brcm63xx/patches-3.14/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch b/target/linux/brcm63xx/patches-3.14/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch
deleted file mode 100644
index 2b19600..0000000
--- a/target/linux/brcm63xx/patches-3.14/345-MIPS-BCM63XX-fixup-mapped-SPI-flash-access-on-boot.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 1cacd0f7b0d35f8e3d3f8a69ecb3b5e436d6b9e8 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 22 Dec 2013 13:25:25 +0100
-Subject: [PATCH 52/56] MIPS: BCM63XX: fixup mapped SPI flash access on boot
-
-Some bootloaders leave the flash access in an invalid state with dual
-read enabled; fix it by disabling it and falling back to simple fast
-reads.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/dev-flash.c | 36 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
-
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -110,9 +110,46 @@ static int __init bcm63xx_detect_flash_t
- }
- }
-
-+#define HSSPI_FLASH_CTRL_REG 0x14
-+#define FLASH_CTRL_READ_OPCODE_MASK 0xff
-+#define FLASH_CTRL_ADDR_BYTES_MASK (0x3 << 8)
-+#define FLASH_CTRL_ADDR_BYTES_2 (0 << 8)
-+#define FLASH_CTRL_ADDR_BYTES_3 (1 << 8)
-+#define FLASH_CTRL_ADDR_BYTES_4 (2 << 8)
-+#define FLASH_CTRL_MB_EN (1 << 23)
-+
- void __init bcm63xx_flash_detect(void)
- {
- flash_type = bcm63xx_detect_flash_type();
-+
-+ /* reduce flash mapping to single i/o reads for safety */
-+ if (flash_type == BCM63XX_FLASH_TYPE_SERIAL &&
-+ (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() ||
-+ BCMCPU_IS_63268())) {
-+ u32 val = bcm_rset_readl(RSET_HSSPI, HSSPI_FLASH_CTRL_REG);
-+
-+ if (!(val & FLASH_CTRL_MB_EN))
-+ return;
-+
-+ val &= ~FLASH_CTRL_MB_EN;
-+ val &= ~FLASH_CTRL_READ_OPCODE_MASK;
-+
-+ switch (val & FLASH_CTRL_ADDR_BYTES_MASK) {
-+ case FLASH_CTRL_ADDR_BYTES_3:
-+ val |= 0x0b; /* OPCODE_FAST_READ */
-+ break;
-+ case FLASH_CTRL_ADDR_BYTES_4:
-+ val |= 0x0c; /* OPCODE_FAST_READ_4B */
-+ break;
-+ case FLASH_CTRL_ADDR_BYTES_2:
-+ default:
-+ pr_warn("unsupported address byte mode (%x), not fixing up\n",
-+ val & FLASH_CTRL_ADDR_BYTES_MASK);
-+ return;
-+ }
-+
-+ bcm_rset_writel(RSET_HSSPI, val, HSSPI_FLASH_CTRL_REG);
-+ }
- }
-
- int __init bcm63xx_flash_register(void)
diff --git a/target/linux/brcm63xx/patches-3.14/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch b/target/linux/brcm63xx/patches-3.14/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch
deleted file mode 100644
index 384702c..0000000
--- a/target/linux/brcm63xx/patches-3.14/346-MIPS-BCM63XX-USB-ENETSW-6318-clocks.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -136,7 +136,11 @@ static struct clk clk_ephy = {
- */
- static void enetsw_set(struct clk *clk, int enable)
- {
-- if (BCMCPU_IS_6328())
-+ if (BCMCPU_IS_6318()) {
-+ bcm_hwclock_set(CKCTL_6318_ROBOSW250_EN |
-+ CKCTL_6318_ROBOSW025_EN, enable);
-+ bcm_ub_hwclock_set(UB_CKCTL_6318_ROBOSW_EN, enable);
-+ } else if (BCMCPU_IS_6328())
- bcm_hwclock_set(CKCTL_6328_ROBOSW_EN, enable);
- else if (BCMCPU_IS_6362())
- bcm_hwclock_set(CKCTL_6362_ROBOSW_EN, enable);
-@@ -183,18 +187,22 @@ static struct clk clk_pcm = {
- */
- static void usbh_set(struct clk *clk, int enable)
- {
-- if (BCMCPU_IS_6328())
-+ if (BCMCPU_IS_6318()) {
-+ bcm_hwclock_set(CKCTL_6318_USB_EN, enable);
-+ bcm_ub_hwclock_set(UB_CKCTL_6318_USB_EN, enable);
-+ } else if (BCMCPU_IS_6328()) {
- bcm_hwclock_set(CKCTL_6328_USBH_EN, enable);
-- else if (BCMCPU_IS_6348())
-+ } else if (BCMCPU_IS_6348()) {
- bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
-- else if (BCMCPU_IS_6362())
-+ } else if (BCMCPU_IS_6362()) {
- bcm_hwclock_set(CKCTL_6362_USBH_EN, enable);
-- else if (BCMCPU_IS_6368())
-+ } else if (BCMCPU_IS_6368()) {
- bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
-- else if (BCMCPU_IS_63268())
-+ } else if (BCMCPU_IS_63268()) {
- bcm_hwclock_set(CKCTL_63268_USBH_EN, enable);
-- else
-+ } else {
- return;
-+ }
-
- if (enable)
- msleep(100);
-@@ -405,9 +413,9 @@ struct clk *clk_get(struct device *dev,
- return &clk_enetsw;
- if (!strcmp(id, "ephy"))
- return &clk_ephy;
-- if (!strcmp(id, "usbh"))
-+ if (!strcmp(id, "usbh") || (BCMCPU_IS_6318() && !strcmp(id, "usbd")))
- return &clk_usbh;
-- if (!strcmp(id, "usbd"))
-+ if (!strcmp(id, "usbd") && !BCMCPU_IS_6318())
- return &clk_usbd;
- if (!strcmp(id, "spi"))
- return &clk_spi;
diff --git a/target/linux/brcm63xx/patches-3.14/347-MIPS-BCM6318-USB-support.patch b/target/linux/brcm63xx/patches-3.14/347-MIPS-BCM6318-USB-support.patch
deleted file mode 100644
index c59d4f7..0000000
--- a/target/linux/brcm63xx/patches-3.14/347-MIPS-BCM6318-USB-support.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/arch/mips/bcm63xx/usb-common.c
-+++ b/arch/mips/bcm63xx/usb-common.c
-@@ -109,6 +109,27 @@ void bcm63xx_usb_priv_ohci_cfg_set(void)
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
- reg |= USBH_PRIV_SETUP_IOC_MASK;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+ } else if (BCMCPU_IS_6318()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-+ reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG);
-+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6318_REG);
-+ reg |= USBH_PRIV_SETUP_IOC_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-+ reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG);
-+ reg |= USBH_PRIV_SIM_CTRL_LADDR_SEL;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SIM_CTRL_6318_REG);
- }
-
- spin_unlock_irqrestore(&usb_priv_reg_lock, flags);
-@@ -144,6 +165,27 @@ void bcm63xx_usb_priv_ehci_cfg_set(void)
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
- reg |= USBH_PRIV_SETUP_IOC_MASK;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+ } else if (BCMCPU_IS_6318()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-+ reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG);
-+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6318_REG);
-+ reg |= USBH_PRIV_SETUP_IOC_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-+ reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG);
-+ reg |= USBH_PRIV_SIM_CTRL_LADDR_SEL;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SIM_CTRL_6318_REG);
- }
-
- spin_unlock_irqrestore(&usb_priv_reg_lock, flags);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -680,6 +680,12 @@
- #define GPIO_MODE_6368_SPI_SSN4 (1 << 30)
- #define GPIO_MODE_6368_SPI_SSN5 (1 << 31)
-
-+#define GPIO_PINMUX_SEL0_6318 0x1c
-+#define GPIO_PINMUX_SEL0_GPIO13_SHIFT 26
-+#define GPIO_PINMUX_SEL0_GPIO13_MASK (0x3 << GPIO_PINMUX_SEL0_GPIO13_SHIFT)
-+#define GPIO_PINMUX_SEL0_GPIO13_PWRON (1 << GPIO_PINMUX_SEL0_GPIO13_SHIFT)
-+#define GPIO_PINMUX_SEL0_GPIO13_LED (2 << GPIO_PINMUX_SEL0_GPIO13_SHIFT)
-+#define GPIO_PINMUX_SEL0_GPIO13_GPIO (3 << GPIO_PINMUX_SEL0_GPIO13_SHIFT)
-
- #define GPIO_PINMUX_OTHR_REG 0x24
- #define GPIO_PINMUX_OTHR_6328_USB_SHIFT 12
-@@ -998,6 +1004,7 @@
-
- #define USBH_PRIV_SWAP_6358_REG 0x0
- #define USBH_PRIV_SWAP_6368_REG 0x1c
-+#define USBH_PRIV_SWAP_6318_REG 0x0c
-
- #define USBH_PRIV_SWAP_USBD_SHIFT 6
- #define USBH_PRIV_SWAP_USBD_MASK (1 << USBH_PRIV_SWAP_USBD_SHIFT)
-@@ -1023,6 +1030,13 @@
- #define USBH_PRIV_SETUP_IOC_SHIFT 4
- #define USBH_PRIV_SETUP_IOC_MASK (1 << USBH_PRIV_SETUP_IOC_SHIFT)
-
-+#define USBH_PRIV_SETUP_6318_REG 0x00
-+#define USBH_PRIV_PLL_CTRL1_6318_REG 0x04
-+#define USBH_PRIV_PLL_CTRL1_SUSP_EN (1 << 27)
-+#define USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN (1 << 31)
-+#define USBH_PRIV_SIM_CTRL_6318_REG 0x20
-+#define USBH_PRIV_SIM_CTRL_LADDR_SEL (1 << 5)
-+
-
- /*************************************************************************
- * _REG relative to RSET_USBD
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -129,6 +129,15 @@ void __init board_early_setup(const stru
- }
-
- bcm_gpio_writel(val, GPIO_MODE_REG);
-+
-+#if IS_ENABLED(CONFIG_USB)
-+ if (BCMCPU_IS_6318() && (board.has_ehci0 || board.has_ohci0)) {
-+ val = bcm_gpio_readl(GPIO_PINMUX_SEL0_6318);
-+ val &= ~GPIO_PINMUX_SEL0_GPIO13_MASK;
-+ val |= GPIO_PINMUX_SEL0_GPIO13_PWRON;
-+ bcm_gpio_writel(val, GPIO_PINMUX_SEL0_6318);
-+ }
-+#endif
- }
-
-
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -22,6 +22,8 @@ config BCM63XX_CPU_6318
- bool "support 6318 CPU"
- select SYS_HAS_CPU_BMIPS32_3300
- select HW_HAS_PCI
-+ select BCM63XX_OHCI
-+ select BCM63XX_EHCI
-
- config BCM63XX_CPU_6328
- bool "support 6328 CPU"
diff --git a/target/linux/brcm63xx/patches-3.14/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch b/target/linux/brcm63xx/patches-3.14/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch
deleted file mode 100644
index 2489c21..0000000
--- a/target/linux/brcm63xx/patches-3.14/348-MIPS-BCM63XX-fix-BCM63268-USB-clock.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -585,6 +585,9 @@
- #define TIMER_CTL_MONOTONIC_MASK (1 << 30)
- #define TIMER_CTL_ENABLE_MASK (1 << 31)
-
-+/* Clock reset control (63268 only) */
-+#define TIMER_CLK_RST_CTL_REG 0x2c
-+#define CLK_RST_CTL_USB_REF_CLK_EN (1 << 18)
-
- /*************************************************************************
- * _REG relative to RSET_WDT
-@@ -1546,6 +1549,11 @@
- #define STRAPBUS_63268_FCVO_SHIFT 21
- #define STRAPBUS_63268_FCVO_MASK (0xf << STRAPBUS_63268_FCVO_SHIFT)
-
-+#define MISC_IDDQ_CTRL_6328_REG 0x48
-+#define MISC_IDDQ_CTRL_63268_REG 0x4c
-+
-+#define IDDQ_CTRL_63268_USBH (1 << 4)
-+
- #define MISC_STRAPBUS_6328_REG 0x240
- #define STRAPBUS_6328_FCVO_SHIFT 7
- #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT)
---- a/arch/mips/bcm63xx/clk.c
-+++ b/arch/mips/bcm63xx/clk.c
-@@ -62,6 +62,26 @@ static void bcm_ub_hwclock_set(u32 mask,
- bcm_perf_writel(reg, PERF_UB_CKCTL_REG);
- }
-
-+static void bcm_misc_iddq_set(u32 mask, int enable)
-+{
-+ u32 offset;
-+ u32 reg;
-+
-+ if (BCMCPU_IS_6328() || BCMCPU_IS_6362())
-+ offset = MISC_IDDQ_CTRL_6328_REG;
-+ else if (BCMCPU_IS_63268())
-+ offset = MISC_IDDQ_CTRL_63268_REG;
-+ else
-+ return;
-+
-+ reg = bcm_misc_readl(offset);
-+ if (enable)
-+ reg &= ~mask;
-+ else
-+ reg |= mask;
-+ bcm_misc_writel(reg, offset);
-+}
-+
- /*
- * Ethernet MAC "misc" clock: dma clocks and main clock on 6348
- */
-@@ -199,7 +219,17 @@ static void usbh_set(struct clk *clk, in
- } else if (BCMCPU_IS_6368()) {
- bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
- } else if (BCMCPU_IS_63268()) {
-+ u32 reg;
-+
- bcm_hwclock_set(CKCTL_63268_USBH_EN, enable);
-+ bcm_misc_iddq_set(IDDQ_CTRL_63268_USBH, enable);
-+ bcm63xx_core_set_reset(BCM63XX_RESET_USBH, !enable);
-+ reg = bcm_timer_readl(TIMER_CLK_RST_CTL_REG);
-+ if (enable)
-+ reg |= CLK_RST_CTL_USB_REF_CLK_EN;
-+ else
-+ reg &= ~CLK_RST_CTL_USB_REF_CLK_EN;
-+ bcm_timer_writel(reg, TIMER_CLK_RST_CTL_REG);
- } else {
- return;
- }
diff --git a/target/linux/brcm63xx/patches-3.14/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch b/target/linux/brcm63xx/patches-3.14/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch
deleted file mode 100644
index 1dff9bf..0000000
--- a/target/linux/brcm63xx/patches-3.14/349-MIPS-BCM63XX-add-BCM63268-USB-support.patch
+++ /dev/null
@@ -1,117 +0,0 @@
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -1032,11 +1032,18 @@
- #define USBH_PRIV_SETUP_6368_REG 0x28
- #define USBH_PRIV_SETUP_IOC_SHIFT 4
- #define USBH_PRIV_SETUP_IOC_MASK (1 << USBH_PRIV_SETUP_IOC_SHIFT)
-+#define USBH_PRIV_SETUP_IPP_SHIFT 5
-+#define USBH_PRIV_SETUP_IPP_MASK (1 << USBH_PRIV_SETUP_IPP_SHIFT)
-
- #define USBH_PRIV_SETUP_6318_REG 0x00
-+#define USBH_PRIV_PLL_CTRL1_6368_REG 0x18
- #define USBH_PRIV_PLL_CTRL1_6318_REG 0x04
--#define USBH_PRIV_PLL_CTRL1_SUSP_EN (1 << 27)
--#define USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN (1 << 31)
-+
-+#define USBH_PRIV_PLL_CTRL1_6318_SUSP_EN (1 << 27)
-+#define USBH_PRIV_PLL_CTRL1_6318_IDDQ_PWRDN (1 << 31)
-+#define USBH_PRIV_PLL_CTRL1_63268_IDDQ_PWRDN (1 << 9)
-+#define USBH_PRIV_PLL_CTRL1_63268_PWRDN_DELAY (1 << 10)
-+
- #define USBH_PRIV_SIM_CTRL_6318_REG 0x20
- #define USBH_PRIV_SIM_CTRL_LADDR_SEL (1 << 5)
-
---- a/arch/mips/bcm63xx/Kconfig
-+++ b/arch/mips/bcm63xx/Kconfig
-@@ -72,6 +72,8 @@ config BCM63XX_CPU_63268
- bool "support 63268 CPU"
- select SYS_HAS_CPU_BMIPS4350
- select HW_HAS_PCI
-+ select BCM63XX_OHCI
-+ select BCM63XX_EHCI
- endmenu
-
- source "arch/mips/bcm63xx/boards/Kconfig"
---- a/arch/mips/bcm63xx/dev-usb-ehci.c
-+++ b/arch/mips/bcm63xx/dev-usb-ehci.c
-@@ -82,7 +82,7 @@ static struct platform_device bcm63xx_eh
- int __init bcm63xx_ehci_register(void)
- {
- if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6358() &&
-- !BCMCPU_IS_6362() && !BCMCPU_IS_6368())
-+ !BCMCPU_IS_6362() && !BCMCPU_IS_6368() && !BCMCPU_IS_63268())
- return 0;
-
- ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0);
---- a/arch/mips/bcm63xx/usb-common.c
-+++ b/arch/mips/bcm63xx/usb-common.c
-@@ -109,9 +109,24 @@ void bcm63xx_usb_priv_ohci_cfg_set(void)
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
- reg |= USBH_PRIV_SETUP_IOC_MASK;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+ } else if (BCMCPU_IS_63268()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
-+ reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
-+ reg |= USBH_PRIV_SETUP_IOC_MASK;
-+ reg &= ~USBH_PRIV_SETUP_IPP_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6368_REG);
-+ reg &= ~(USBH_PRIV_PLL_CTRL1_63268_IDDQ_PWRDN |
-+ USBH_PRIV_PLL_CTRL1_63268_PWRDN_DELAY);
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6368_REG);
- } else if (BCMCPU_IS_6318()) {
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-- reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN;
-+ reg |= USBH_PRIV_PLL_CTRL1_6318_SUSP_EN;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG);
-@@ -124,7 +139,7 @@ void bcm63xx_usb_priv_ohci_cfg_set(void)
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG);
-
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-- reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN;
-+ reg &= ~USBH_PRIV_PLL_CTRL1_6318_IDDQ_PWRDN;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG);
-@@ -165,9 +180,24 @@ void bcm63xx_usb_priv_ehci_cfg_set(void)
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
- reg |= USBH_PRIV_SETUP_IOC_MASK;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+ } else if (BCMCPU_IS_63268()) {
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
-+ reg &= ~USBH_PRIV_SWAP_EHCI_ENDN_MASK;
-+ reg |= USBH_PRIV_SWAP_EHCI_DATA_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SWAP_6368_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SETUP_6368_REG);
-+ reg |= USBH_PRIV_SETUP_IOC_MASK;
-+ reg &= ~USBH_PRIV_SETUP_IPP_MASK;
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6368_REG);
-+
-+ reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6368_REG);
-+ reg &= ~(USBH_PRIV_PLL_CTRL1_63268_IDDQ_PWRDN |
-+ USBH_PRIV_PLL_CTRL1_63268_PWRDN_DELAY);
-+ bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6368_REG);
- } else if (BCMCPU_IS_6318()) {
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-- reg |= USBH_PRIV_PLL_CTRL1_SUSP_EN;
-+ reg |= USBH_PRIV_PLL_CTRL1_6318_SUSP_EN;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6318_REG);
-@@ -180,7 +210,7 @@ void bcm63xx_usb_priv_ehci_cfg_set(void)
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_SETUP_6318_REG);
-
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_PLL_CTRL1_6318_REG);
-- reg &= ~USBH_PRIV_PLL_CTRL1_IDDQ_PWRDN;
-+ reg &= ~USBH_PRIV_PLL_CTRL1_6318_IDDQ_PWRDN;
- bcm_rset_writel(RSET_USBH_PRIV, reg, USBH_PRIV_PLL_CTRL1_6318_REG);
-
- reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SIM_CTRL_6318_REG);
diff --git a/target/linux/brcm63xx/patches-3.14/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch b/target/linux/brcm63xx/patches-3.14/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch
deleted file mode 100644
index 41747da..0000000
--- a/target/linux/brcm63xx/patches-3.14/350-MIPS-BCM63XX-support-settings-num-usbh-ports.patch
+++ /dev/null
@@ -1,107 +0,0 @@
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -42,6 +42,7 @@ struct board_info {
-
- /* USB config */
- struct bcm63xx_usbd_platform_data usbd;
-+ unsigned int num_usbh_ports:2;
-
- /* DSP config */
- struct bcm63xx_dsp_platform_data dsp;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ehci.h
-@@ -1,6 +1,6 @@
- #ifndef BCM63XX_DEV_USB_EHCI_H_
- #define BCM63XX_DEV_USB_EHCI_H_
-
--int bcm63xx_ehci_register(void);
-+int bcm63xx_ehci_register(unsigned int num_ports);
-
- #endif /* BCM63XX_DEV_USB_EHCI_H_ */
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_usb_ohci.h
-@@ -1,6 +1,6 @@
- #ifndef BCM63XX_DEV_USB_OHCI_H_
- #define BCM63XX_DEV_USB_OHCI_H_
-
--int bcm63xx_ohci_register(void);
-+int bcm63xx_ohci_register(unsigned int num_ports);
-
- #endif /* BCM63XX_DEV_USB_OHCI_H_ */
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -181,6 +181,7 @@ int __init board_register_devices(void)
- {
- int button_count = 0;
- int led_count = 0;
-+ int usbh_ports = 0;
-
- if (board.has_uart0)
- bcm63xx_uart_register(0);
-@@ -203,14 +204,21 @@ int __init board_register_devices(void)
- !board_get_mac_address(board.enetsw.mac_addr))
- bcm63xx_enetsw_register(&board.enetsw);
-
-+ if ((board.has_ohci0 || board.has_ehci0)) {
-+ usbh_ports = board.num_usbh_ports;
-+
-+ if (!usbh_ports || WARN_ON(usbh_ports > 1 && board.has_usbd))
-+ usbh_ports = 1;
-+ }
-+
- if (board.has_usbd)
- bcm63xx_usbd_register(&board.usbd);
-
- if (board.has_ehci0)
-- bcm63xx_ehci_register();
-+ bcm63xx_ehci_register(usbh_ports);
-
- if (board.has_ohci0)
-- bcm63xx_ohci_register();
-+ bcm63xx_ohci_register(usbh_ports);
-
- if (board.has_dsp)
- bcm63xx_dsp_register(&board.dsp);
---- a/arch/mips/bcm63xx/dev-usb-ehci.c
-+++ b/arch/mips/bcm63xx/dev-usb-ehci.c
-@@ -79,12 +79,14 @@ static struct platform_device bcm63xx_eh
- },
- };
-
--int __init bcm63xx_ehci_register(void)
-+int __init bcm63xx_ehci_register(unsigned int num_ports)
- {
- if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6358() &&
- !BCMCPU_IS_6362() && !BCMCPU_IS_6368() && !BCMCPU_IS_63268())
- return 0;
-
-+ bcm63xx_ehci_pdata.num_ports = num_ports;
-+
- ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0);
- ehci_resources[0].end = ehci_resources[0].start;
- ehci_resources[0].end += RSET_EHCI_SIZE - 1;
---- a/arch/mips/bcm63xx/dev-usb-ohci.c
-+++ b/arch/mips/bcm63xx/dev-usb-ohci.c
-@@ -62,7 +62,6 @@ static struct usb_ohci_pdata bcm63xx_ohc
- .big_endian_desc = 1,
- .big_endian_mmio = 1,
- .no_big_frame_no = 1,
-- .num_ports = 1,
- .power_on = bcm63xx_ohci_power_on,
- .power_off = bcm63xx_ohci_power_off,
- .power_suspend = bcm63xx_ohci_power_off,
-@@ -80,11 +79,13 @@ static struct platform_device bcm63xx_oh
- },
- };
-
--int __init bcm63xx_ohci_register(void)
-+int __init bcm63xx_ohci_register(unsigned int num_ports)
- {
- if (BCMCPU_IS_6345() || BCMCPU_IS_6338())
- return -ENODEV;
-
-+ bcm63xx_ohci_pdata.num_ports = num_ports;
-+
- ohci_resources[0].start = bcm63xx_regset_address(RSET_OHCI0);
- ohci_resources[0].end = ohci_resources[0].start;
- ohci_resources[0].end += RSET_OHCI_SIZE - 1;
diff --git a/target/linux/brcm63xx/patches-3.14/351-set-board-usbh-ports.patch b/target/linux/brcm63xx/patches-3.14/351-set-board-usbh-ports.patch
deleted file mode 100644
index 804cb85..0000000
--- a/target/linux/brcm63xx/patches-3.14/351-set-board-usbh-ports.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -616,6 +616,7 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- .has_pccard = 1,
- .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-
- .leds = {
- {
diff --git a/target/linux/brcm63xx/patches-3.14/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch b/target/linux/brcm63xx/patches-3.14/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch
deleted file mode 100644
index b6bcdae..0000000
--- a/target/linux/brcm63xx/patches-3.14/354-MIPS-BCM63XX-allow-building-support-for-more-than-on.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 0daf361ea799fba0af5a232036d0f06cea85ad24 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sat, 21 Jun 2014 12:47:49 +0200
-Subject: [PATCH 42/44] MIPS: BCM63XX: allow building support for more than one
- board type
-
-Use the arguments passed to the kernel to detect being booted with
-CFE as the indicator for bcm963xx board support, allowing the
-non presence of CFE_EPTSEAL to assume a different board type.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/boards/Kconfig | 7 +++----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 2 +-
- arch/mips/bcm63xx/boards/board_common.c | 13 +++++++++++++
- arch/mips/bcm63xx/boards/board_common.h | 6 ++++++
- 4 files changed, 23 insertions(+), 5 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/Kconfig
-+++ b/arch/mips/bcm63xx/boards/Kconfig
-@@ -1,11 +1,10 @@
--choice
-- prompt "Board support"
-+menu "Board support"
- depends on BCM63XX
-- default BOARD_BCM963XX
-
- config BOARD_BCM963XX
- bool "Generic Broadcom 963xx boards"
- select SSB
-+ default y
- help
-
--endchoice
-+endmenu
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -726,7 +726,7 @@ static const struct board_info __initcon
- /*
- * early init callback, read nvram data from flash and checksum it
- */
--void __init board_prom_init(void)
-+void __init board_bcm963xx_init(void)
- {
- unsigned int i;
- u8 *boot_addr, *cfe;
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -15,6 +15,8 @@
- #include <linux/gpio_keys.h>
- #include <linux/spi/spi.h>
- #include <asm/addrspace.h>
-+#include <asm/bootinfo.h>
-+#include <asm/fw/cfe/cfe_api.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
- #include <bcm63xx_dev_uart.h>
-@@ -32,6 +34,8 @@
- #include <bcm63xx_dev_usb_usbd.h>
- #include <board_bcm963xx.h>
-
-+#include "board_common.h"
-+
- #define PFX "board: "
-
- #define BCM963XX_KEYS_POLL_INTERVAL 20
-@@ -84,6 +88,15 @@ const char *board_get_name(void)
- return board.name;
- }
-
-+void __init board_prom_init(void)
-+{
-+ /* detect bootloader */
-+ if (fw_arg3 == CFE_EPTSEAL)
-+ board_bcm963xx_init();
-+ else
-+ panic("unsupported bootloader detected");
-+}
-+
- static int (*board_get_mac_address)(u8 mac[ETH_ALEN]);
-
- /*
---- a/arch/mips/bcm63xx/boards/board_common.h
-+++ b/arch/mips/bcm63xx/boards/board_common.h
-@@ -6,4 +6,10 @@
- void board_early_setup(const struct board_info *board,
- int (*get_mac_address)(u8 mac[ETH_ALEN]));
-
-+#if defined(CONFIG_BOARD_BCM963XX)
-+void board_bcm963xx_init(void);
-+#else
-+static inline void board_bcm963xx_init(void) { }
-+#endif
-+
- #endif /* __BOARD_COMMON_H */
diff --git a/target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch b/target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch
deleted file mode 100644
index 7e408f6..0000000
--- a/target/linux/brcm63xx/patches-3.14/355-MIPS-BCM63XX-allow-board-implementations-to-force-fl.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 8a30097a899b975709f728666d5ad20c8b832d21 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 9 Mar 2014 04:28:14 +0100
-Subject: [PATCH 43/44] MIPS: BCM63XX: allow board implementations to force
- flash address
-
-Allow board implementations to force the physmap address.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/dev-flash.c | 19 ++++++++++++++-----
- .../mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++
- 2 files changed, 16 insertions(+), 5 deletions(-)
-
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -57,6 +57,12 @@ static struct platform_device mtd_dev =
- },
- };
-
-+void __init bcm63xx_flash_force_phys_base_address(u32 start, u32 end)
-+{
-+ mtd_resources[0].start = start;
-+ mtd_resources[0].end = end;
-+}
-+
- static int __init bcm63xx_detect_flash_type(void)
- {
- u32 val;
-@@ -158,12 +164,15 @@ int __init bcm63xx_flash_register(void)
-
- switch (flash_type) {
- case BCM63XX_FLASH_TYPE_PARALLEL:
-- /* read base address of boot chip select (0) */
-- val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-- val &= MPI_CSBASE_BASE_MASK;
-
-- mtd_resources[0].start = val;
-- mtd_resources[0].end = 0x1FFFFFFF;
-+ if (!mtd_resources[0].start) {
-+ /* read base address of boot chip select (0) */
-+ val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-+ val &= MPI_CSBASE_BASE_MASK;
-+
-+ mtd_resources[0].start = val;
-+ mtd_resources[0].end = 0x1FFFFFFF;
-+ }
-
- return platform_device_register(&mtd_dev);
- case BCM63XX_FLASH_TYPE_SERIAL:
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-@@ -9,6 +9,8 @@ enum {
-
- void bcm63xx_flash_detect(void);
-
-+void bcm63xx_flash_force_phys_base_address(u32 start, u32 end);
-+
- int __init bcm63xx_flash_register(void);
-
- #endif /* __BCM63XX_FLASH_H */
diff --git a/target/linux/brcm63xx/patches-3.14/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch b/target/linux/brcm63xx/patches-3.14/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch
deleted file mode 100644
index 450bc1d..0000000
--- a/target/linux/brcm63xx/patches-3.14/356-MIPS-BCM63XX-move-fallback-sprom-support-into-its-ow.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From cc025e749a1fece61a6cc0d64bbe7b12472259cc Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 29 Jul 2014 21:31:12 +0200
-Subject: [PATCH 01/10] MIPS: BCM63XX: move fallback sprom support into its own
- unit
-
-In preparation for enhancing it, move it into its own file. Require a
-mac address to be passed as the argument to always "reserve" the mac
-regardless of the inclusion state of SSB.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/Makefile | 2 +-
- arch/mips/bcm63xx/boards/board_common.c | 53 ++--------------
- arch/mips/bcm63xx/sprom.c | 70 ++++++++++++++++++++++
- .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 6 ++
- 4 files changed, 83 insertions(+), 48 deletions(-)
- create mode 100644 arch/mips/bcm63xx/sprom.c
- create mode 100644 arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -2,7 +2,7 @@ obj-y += clk.o cpu.o cs.o gpio.o irq.o
- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
- dev-wdt.o dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o \
-- usb-common.o
-+ usb-common.o sprom.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -43,44 +43,6 @@
- static struct board_info board;
-
- /*
-- * Register a sane SPROMv2 to make the on-board
-- * bcm4318 WLAN work
-- */
--#ifdef CONFIG_SSB_PCIHOST
--static struct ssb_sprom bcm63xx_sprom = {
-- .revision = 0x02,
-- .board_rev = 0x17,
-- .country_code = 0x0,
-- .ant_available_bg = 0x3,
-- .pa0b0 = 0x15ae,
-- .pa0b1 = 0xfa85,
-- .pa0b2 = 0xfe8d,
-- .pa1b0 = 0xffff,
-- .pa1b1 = 0xffff,
-- .pa1b2 = 0xffff,
-- .gpio0 = 0xff,
-- .gpio1 = 0xff,
-- .gpio2 = 0xff,
-- .gpio3 = 0xff,
-- .maxpwr_bg = 0x004c,
-- .itssi_bg = 0x00,
-- .boardflags_lo = 0x2848,
-- .boardflags_hi = 0x0000,
--};
--
--int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
--{
-- if (bus->bustype == SSB_BUSTYPE_PCI) {
-- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-- return 0;
-- } else {
-- printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n");
-- return -EINVAL;
-- }
--}
--#endif
--
--/*
- * return board name for /proc/cpuinfo
- */
- const char *board_get_name(void)
-@@ -195,6 +157,7 @@ int __init board_register_devices(void)
- int button_count = 0;
- int led_count = 0;
- int usbh_ports = 0;
-+ u8 mac[ETH_ALEN];
-
- if (board.has_uart0)
- bcm63xx_uart_register(0);
-@@ -239,15 +202,10 @@ int __init board_register_devices(void)
- /* Generate MAC address for WLAN and register our SPROM,
- * do this after registering enet devices
- */
--#ifdef CONFIG_SSB_PCIHOST
-- if (!board_get_mac_address(bcm63xx_sprom.il0mac)) {
-- memcpy(bcm63xx_sprom.et0mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-- memcpy(bcm63xx_sprom.et1mac, bcm63xx_sprom.il0mac, ETH_ALEN);
-- if (ssb_arch_register_fallback_sprom(
-- &bcm63xx_get_fallback_sprom) < 0)
-- pr_err(PFX "failed to register fallback SPROM\n");
-- }
--#endif
-+
-+ if (board_get_mac_address(mac) ||
-+ bcm63xx_register_fallback_sprom(mac))
-+ pr_err(PFX "failed to register fallback SPROM\n");
-
- bcm63xx_spi_register();
-
---- /dev/null
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -0,0 +1,70 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2008 Maxime Bizon <mbizon@freebox.fr>
-+ * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <linux/platform_device.h>
-+#include <linux/ssb/ssb.h>
-+#include <bcm63xx_fallback_sprom.h>
-+#include <board_bcm963xx.h>
-+
-+#define PFX "sprom: "
-+
-+/*
-+ * Register a sane SPROMv2 to make the on-board
-+ * bcm4318 WLAN work
-+ */
-+#ifdef CONFIG_SSB_PCIHOST
-+static struct ssb_sprom bcm63xx_sprom = {
-+ .revision = 0x02,
-+ .board_rev = 0x17,
-+ .country_code = 0x0,
-+ .ant_available_bg = 0x3,
-+ .pa0b0 = 0x15ae,
-+ .pa0b1 = 0xfa85,
-+ .pa0b2 = 0xfe8d,
-+ .pa1b0 = 0xffff,
-+ .pa1b1 = 0xffff,
-+ .pa1b2 = 0xffff,
-+ .gpio0 = 0xff,
-+ .gpio1 = 0xff,
-+ .gpio2 = 0xff,
-+ .gpio3 = 0xff,
-+ .maxpwr_bg = 0x004c,
-+ .itssi_bg = 0x00,
-+ .boardflags_lo = 0x2848,
-+ .boardflags_hi = 0x0000,
-+};
-+
-+int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
-+{
-+ if (bus->bustype == SSB_BUSTYPE_PCI) {
-+ memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-+ return 0;
-+ } else {
-+ printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n");
-+ return -EINVAL;
-+ }
-+}
-+#endif
-+
-+int __init bcm63xx_register_fallback_sprom(u8 *mac)
-+{
-+ int ret = 0;
-+
-+#ifdef CONFIG_SSB_PCIHOST
-+ memcpy(bcm63xx_sprom.il0mac, mac, ETH_ALEN);
-+ memcpy(bcm63xx_sprom.et0mac, mac, ETH_ALEN);
-+ memcpy(bcm63xx_sprom.et1mac, mac, ETH_ALEN);
-+
-+ ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_sprom);
-+#endif
-+ return ret;
-+}
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-@@ -0,0 +1,6 @@
-+#ifndef __BCM63XX_FALLBACK_SPROM
-+#define __BCM63XX_FALLBACK_SPROM
-+
-+int bcm63xx_register_fallback_sprom(u8 *mac);
-+
-+#endif
diff --git a/target/linux/brcm63xx/patches-3.14/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch b/target/linux/brcm63xx/patches-3.14/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch
deleted file mode 100644
index bc35c25..0000000
--- a/target/linux/brcm63xx/patches-3.14/357-MIPS-BCM63XX-use-platform-data-for-the-sprom.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 9912a8b3c240a9b0af01ff496b7e8ed9e4cc5b82 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 29 Jul 2014 21:43:49 +0200
-Subject: [PATCH 02/10] MIPS: BCM63XX: use platform data for the sprom
-
-Similar to ethernet setup, use a platform data struct for passing
-the mac. This eliminates the requirement to allocate an array on
-stack for the mac passed.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/boards/board_common.c | 6 ++----
- arch/mips/bcm63xx/sprom.c | 8 ++++----
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 8 +++++++-
- arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 4 ++++
- 4 files changed, 17 insertions(+), 9 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -157,7 +157,6 @@ int __init board_register_devices(void)
- int button_count = 0;
- int led_count = 0;
- int usbh_ports = 0;
-- u8 mac[ETH_ALEN];
-
- if (board.has_uart0)
- bcm63xx_uart_register(0);
-@@ -203,8 +202,8 @@ int __init board_register_devices(void)
- * do this after registering enet devices
- */
-
-- if (board_get_mac_address(mac) ||
-- bcm63xx_register_fallback_sprom(mac))
-+ if (board_get_mac_address(board.fallback_sprom.mac_addr) ||
-+ bcm63xx_register_fallback_sprom(&board.fallback_sprom))
- pr_err(PFX "failed to register fallback SPROM\n");
-
- bcm63xx_spi_register();
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -55,14 +55,14 @@ int bcm63xx_get_fallback_sprom(struct ss
- }
- #endif
-
--int __init bcm63xx_register_fallback_sprom(u8 *mac)
-+int __init bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data)
- {
- int ret = 0;
-
- #ifdef CONFIG_SSB_PCIHOST
-- memcpy(bcm63xx_sprom.il0mac, mac, ETH_ALEN);
-- memcpy(bcm63xx_sprom.et0mac, mac, ETH_ALEN);
-- memcpy(bcm63xx_sprom.et1mac, mac, ETH_ALEN);
-+ memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN);
-+ memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN);
-+ memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN);
-
- ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_sprom);
- #endif
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-@@ -1,6 +1,12 @@
- #ifndef __BCM63XX_FALLBACK_SPROM
- #define __BCM63XX_FALLBACK_SPROM
-
--int bcm63xx_register_fallback_sprom(u8 *mac);
-+#include <linux/if_ether.h>
-+
-+struct fallback_sprom_data {
-+ u8 mac_addr[ETH_ALEN];
-+};
-+
-+int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data);
-
- #endif
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -8,6 +8,7 @@
- #include <bcm63xx_dev_enet.h>
- #include <bcm63xx_dev_usb_usbd.h>
- #include <bcm63xx_dev_dsp.h>
-+#include <bcm63xx_fallback_sprom.h>
-
- /*
- * flash mapping
-@@ -59,6 +60,9 @@ struct board_info {
- /* External PHY reset GPIO flags from gpio.h */
- unsigned long ephy_reset_gpio_flags;
-
-+ /* fallback sprom config */
-+ struct fallback_sprom_data fallback_sprom;
-+
- /* Additional platform devices */
- struct platform_device **devs;
- unsigned int num_devs;
diff --git a/target/linux/brcm63xx/patches-3.14/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch b/target/linux/brcm63xx/patches-3.14/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch
deleted file mode 100644
index aedda96..0000000
--- a/target/linux/brcm63xx/patches-3.14/358-MIPS-BCM63XX-make-fallback-sprom-optional.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 83131acbfb59760a19f3711c09526e191c8aad54 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 29 Jul 2014 21:52:56 +0200
-Subject: [PATCH 03/10] MIPS: BCM63XX: make fallback sprom optional
-
-Some devices do not provide enough mac addresses to populate wifi in
-addition to ethernet.
-
-Use having pci enabled as a rough heuristic which boards should have it
-enabled.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 12 ++++++++++++
- arch/mips/bcm63xx/boards/board_common.c | 5 +++--
- arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 1 +
- 3 files changed, 16 insertions(+), 2 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -74,6 +74,7 @@ static struct board_info __initdata boar
- .has_uart0 = 1,
- .has_pci = 1,
- .has_usbd = 0,
-+ .use_fallback_sprom = 1,
-
- .usbd = {
- .use_fullspeed = 0,
-@@ -223,6 +224,7 @@ static struct board_info __initdata boar
- .has_uart0 = 1,
- .has_enet0 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -268,6 +270,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -328,6 +331,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -392,6 +396,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -460,6 +465,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -483,6 +489,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -501,6 +508,7 @@ static struct board_info __initdata boar
-
- .has_uart0 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
- .has_ohci0 = 1,
-
- .has_enet0 = 1,
-@@ -523,6 +531,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -549,6 +558,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -601,6 +611,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
-@@ -672,6 +683,7 @@ static struct board_info __initdata boar
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-+ .use_fallback_sprom = 1,
-
- .enet0 = {
- .has_phy = 1,
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -202,8 +202,9 @@ int __init board_register_devices(void)
- * do this after registering enet devices
- */
-
-- if (board_get_mac_address(board.fallback_sprom.mac_addr) ||
-- bcm63xx_register_fallback_sprom(&board.fallback_sprom))
-+ if (board.use_fallback_sprom &&
-+ (board_get_mac_address(board.fallback_sprom.mac_addr) ||
-+ bcm63xx_register_fallback_sprom(&board.fallback_sprom)))
- pr_err(PFX "failed to register fallback SPROM\n");
-
- bcm63xx_spi_register();
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -35,6 +35,7 @@ struct board_info {
- unsigned int has_dsp:1;
- unsigned int has_uart0:1;
- unsigned int has_uart1:1;
-+ unsigned int use_fallback_sprom:1;
-
- /* ethernet config */
- struct bcm63xx_enet_platform_data enet0;
diff --git a/target/linux/brcm63xx/patches-3.14/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch b/target/linux/brcm63xx/patches-3.14/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch
deleted file mode 100644
index 0c4a9be..0000000
--- a/target/linux/brcm63xx/patches-3.14/359-MIPS-BCM63XX-allow-different-types-of-sprom.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 1cece9f7aca1f0c193edce201f77a87008c5a405 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 29 Jul 2014 21:58:38 +0200
-Subject: [PATCH 04/10] MIPS: BCM63XX: allow different types of sprom
-
-Different chips require different sprom contents, so prepare for
-supplying the appropriate sprom type.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/sprom.c | 13 ++++++++++++-
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 5 +++++
- 2 files changed, 17 insertions(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -22,7 +22,7 @@
- * bcm4318 WLAN work
- */
- #ifdef CONFIG_SSB_PCIHOST
--static struct ssb_sprom bcm63xx_sprom = {
-+static __initconst struct ssb_sprom bcm63xx_default_sprom = {
- .revision = 0x02,
- .board_rev = 0x17,
- .country_code = 0x0,
-@@ -43,6 +43,8 @@ static struct ssb_sprom bcm63xx_sprom =
- .boardflags_hi = 0x0000,
- };
-
-+static struct ssb_sprom bcm63xx_sprom;
-+
- int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
- {
- if (bus->bustype == SSB_BUSTYPE_PCI) {
-@@ -60,6 +62,15 @@ int __init bcm63xx_register_fallback_spr
- int ret = 0;
-
- #ifdef CONFIG_SSB_PCIHOST
-+ switch (data->type) {
-+ case SPROM_DEFAULT:
-+ memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom,
-+ sizeof(bcm63xx_sprom));
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-+
- memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN);
- memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN);
- memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-@@ -3,8 +3,13 @@
-
- #include <linux/if_ether.h>
-
-+enum sprom_type {
-+ SPROM_DEFAULT, /* default fallback sprom */
-+};
-+
- struct fallback_sprom_data {
- u8 mac_addr[ETH_ALEN];
-+ enum sprom_type type;
- };
-
- int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data);
diff --git a/target/linux/brcm63xx/patches-3.14/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch b/target/linux/brcm63xx/patches-3.14/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch
deleted file mode 100644
index 42502eb..0000000
--- a/target/linux/brcm63xx/patches-3.14/360-MIPS-BCM63XX-add-support-for-raw-sproms.patch
+++ /dev/null
@@ -1,517 +0,0 @@
-From cedee63bc73f8b7d45b8c0cba1236986812c1f83 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 29 Jul 2014 22:16:36 +0200
-Subject: [PATCH 05/10] MIPS: BCM63XX: add support for "raw" sproms
-
-Allow using raw sprom content as templates.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/sprom.c | 482 ++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 482 insertions(+)
-
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -55,13 +55,492 @@ int bcm63xx_get_fallback_sprom(struct ss
- return -EINVAL;
- }
- }
-+
-+/* FIXME: use lib_sprom after submission upstream */
-+
-+/* Get the word-offset for a SSB_SPROM_XXX define. */
-+#define SPOFF(offset) ((offset) / sizeof(u16))
-+/* Helper to extract some _offset, which is one of the SSB_SPROM_XXX defines. */
-+#define SPEX16(_outvar, _offset, _mask, _shift) \
-+ out->_outvar = ((in[SPOFF(_offset)] & (_mask)) >> (_shift))
-+#define SPEX32(_outvar, _offset, _mask, _shift) \
-+ out->_outvar = ((((u32)in[SPOFF((_offset)+2)] << 16 | \
-+ in[SPOFF(_offset)]) & (_mask)) >> (_shift))
-+#define SPEX(_outvar, _offset, _mask, _shift) \
-+ SPEX16(_outvar, _offset, _mask, _shift)
-+
-+#define SPEX_ARRAY8(_field, _offset, _mask, _shift) \
-+ do { \
-+ SPEX(_field[0], _offset + 0, _mask, _shift); \
-+ SPEX(_field[1], _offset + 2, _mask, _shift); \
-+ SPEX(_field[2], _offset + 4, _mask, _shift); \
-+ SPEX(_field[3], _offset + 6, _mask, _shift); \
-+ SPEX(_field[4], _offset + 8, _mask, _shift); \
-+ SPEX(_field[5], _offset + 10, _mask, _shift); \
-+ SPEX(_field[6], _offset + 12, _mask, _shift); \
-+ SPEX(_field[7], _offset + 14, _mask, _shift); \
-+ } while (0)
-+
-+
-+static s8 r123_extract_antgain(u8 sprom_revision, const u16 *in,
-+ u16 mask, u16 shift)
-+{
-+ u16 v;
-+ u8 gain;
-+
-+ v = in[SPOFF(SSB_SPROM1_AGAIN)];
-+ gain = (v & mask) >> shift;
-+ if (gain == 0xFF)
-+ gain = 2; /* If unset use 2dBm */
-+ if (sprom_revision == 1) {
-+ /* Convert to Q5.2 */
-+ gain <<= 2;
-+ } else {
-+ /* Q5.2 Fractional part is stored in 0xC0 */
-+ gain = ((gain & 0xC0) >> 6) | ((gain & 0x3F) << 2);
-+ }
-+
-+ return (s8)gain;
-+}
-+
-+static void sprom_extract_r23(struct ssb_sprom *out, const u16 *in)
-+{
-+ SPEX(boardflags_hi, SSB_SPROM2_BFLHI, 0xFFFF, 0);
-+ SPEX(opo, SSB_SPROM2_OPO, SSB_SPROM2_OPO_VALUE, 0);
-+ SPEX(pa1lob0, SSB_SPROM2_PA1LOB0, 0xFFFF, 0);
-+ SPEX(pa1lob1, SSB_SPROM2_PA1LOB1, 0xFFFF, 0);
-+ SPEX(pa1lob2, SSB_SPROM2_PA1LOB2, 0xFFFF, 0);
-+ SPEX(pa1hib0, SSB_SPROM2_PA1HIB0, 0xFFFF, 0);
-+ SPEX(pa1hib1, SSB_SPROM2_PA1HIB1, 0xFFFF, 0);
-+ SPEX(pa1hib2, SSB_SPROM2_PA1HIB2, 0xFFFF, 0);
-+ SPEX(maxpwr_ah, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_HI, 0);
-+ SPEX(maxpwr_al, SSB_SPROM2_MAXP_A, SSB_SPROM2_MAXP_A_LO,
-+ SSB_SPROM2_MAXP_A_LO_SHIFT);
-+}
-+
-+static void sprom_extract_r123(struct ssb_sprom *out, const u16 *in)
-+{
-+ u16 loc[3];
-+
-+ if (out->revision == 3) /* rev 3 moved MAC */
-+ loc[0] = SSB_SPROM3_IL0MAC;
-+ else {
-+ loc[0] = SSB_SPROM1_IL0MAC;
-+ loc[1] = SSB_SPROM1_ET0MAC;
-+ loc[2] = SSB_SPROM1_ET1MAC;
-+ }
-+
-+ SPEX(et0phyaddr, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET0A, 0);
-+ SPEX(et1phyaddr, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET1A,
-+ SSB_SPROM1_ETHPHY_ET1A_SHIFT);
-+ SPEX(et0mdcport, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET0M, 14);
-+ SPEX(et1mdcport, SSB_SPROM1_ETHPHY, SSB_SPROM1_ETHPHY_ET1M, 15);
-+ SPEX(board_rev, SSB_SPROM1_BINF, SSB_SPROM1_BINF_BREV, 0);
-+ SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0);
-+ if (out->revision == 1)
-+ SPEX(country_code, SSB_SPROM1_BINF, SSB_SPROM1_BINF_CCODE,
-+ SSB_SPROM1_BINF_CCODE_SHIFT);
-+ SPEX(ant_available_a, SSB_SPROM1_BINF, SSB_SPROM1_BINF_ANTA,
-+ SSB_SPROM1_BINF_ANTA_SHIFT);
-+ SPEX(ant_available_bg, SSB_SPROM1_BINF, SSB_SPROM1_BINF_ANTBG,
-+ SSB_SPROM1_BINF_ANTBG_SHIFT);
-+ SPEX(pa0b0, SSB_SPROM1_PA0B0, 0xFFFF, 0);
-+ SPEX(pa0b1, SSB_SPROM1_PA0B1, 0xFFFF, 0);
-+ SPEX(pa0b2, SSB_SPROM1_PA0B2, 0xFFFF, 0);
-+ SPEX(pa1b0, SSB_SPROM1_PA1B0, 0xFFFF, 0);
-+ SPEX(pa1b1, SSB_SPROM1_PA1B1, 0xFFFF, 0);
-+ SPEX(pa1b2, SSB_SPROM1_PA1B2, 0xFFFF, 0);
-+ SPEX(gpio0, SSB_SPROM1_GPIOA, SSB_SPROM1_GPIOA_P0, 0);
-+ SPEX(gpio1, SSB_SPROM1_GPIOA, SSB_SPROM1_GPIOA_P1,
-+ SSB_SPROM1_GPIOA_P1_SHIFT);
-+ SPEX(gpio2, SSB_SPROM1_GPIOB, SSB_SPROM1_GPIOB_P2, 0);
-+ SPEX(gpio3, SSB_SPROM1_GPIOB, SSB_SPROM1_GPIOB_P3,
-+ SSB_SPROM1_GPIOB_P3_SHIFT);
-+ SPEX(maxpwr_a, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_A,
-+ SSB_SPROM1_MAXPWR_A_SHIFT);
-+ SPEX(maxpwr_bg, SSB_SPROM1_MAXPWR, SSB_SPROM1_MAXPWR_BG, 0);
-+ SPEX(itssi_a, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_A,
-+ SSB_SPROM1_ITSSI_A_SHIFT);
-+ SPEX(itssi_bg, SSB_SPROM1_ITSSI, SSB_SPROM1_ITSSI_BG, 0);
-+ SPEX(boardflags_lo, SSB_SPROM1_BFLLO, 0xFFFF, 0);
-+
-+ SPEX(alpha2[0], SSB_SPROM1_CCODE, 0xff00, 8);
-+ SPEX(alpha2[1], SSB_SPROM1_CCODE, 0x00ff, 0);
-+
-+ /* Extract the antenna gain values. */
-+ out->antenna_gain.a0 = r123_extract_antgain(out->revision, in,
-+ SSB_SPROM1_AGAIN_BG,
-+ SSB_SPROM1_AGAIN_BG_SHIFT);
-+ out->antenna_gain.a1 = r123_extract_antgain(out->revision, in,
-+ SSB_SPROM1_AGAIN_A,
-+ SSB_SPROM1_AGAIN_A_SHIFT);
-+ if (out->revision >= 2)
-+ sprom_extract_r23(out, in);
-+}
-+
-+/* Revs 4 5 and 8 have partially shared layout */
-+static void sprom_extract_r458(struct ssb_sprom *out, const u16 *in)
-+{
-+ SPEX(txpid2g[0], SSB_SPROM4_TXPID2G01,
-+ SSB_SPROM4_TXPID2G0, SSB_SPROM4_TXPID2G0_SHIFT);
-+ SPEX(txpid2g[1], SSB_SPROM4_TXPID2G01,
-+ SSB_SPROM4_TXPID2G1, SSB_SPROM4_TXPID2G1_SHIFT);
-+ SPEX(txpid2g[2], SSB_SPROM4_TXPID2G23,
-+ SSB_SPROM4_TXPID2G2, SSB_SPROM4_TXPID2G2_SHIFT);
-+ SPEX(txpid2g[3], SSB_SPROM4_TXPID2G23,
-+ SSB_SPROM4_TXPID2G3, SSB_SPROM4_TXPID2G3_SHIFT);
-+
-+ SPEX(txpid5gl[0], SSB_SPROM4_TXPID5GL01,
-+ SSB_SPROM4_TXPID5GL0, SSB_SPROM4_TXPID5GL0_SHIFT);
-+ SPEX(txpid5gl[1], SSB_SPROM4_TXPID5GL01,
-+ SSB_SPROM4_TXPID5GL1, SSB_SPROM4_TXPID5GL1_SHIFT);
-+ SPEX(txpid5gl[2], SSB_SPROM4_TXPID5GL23,
-+ SSB_SPROM4_TXPID5GL2, SSB_SPROM4_TXPID5GL2_SHIFT);
-+ SPEX(txpid5gl[3], SSB_SPROM4_TXPID5GL23,
-+ SSB_SPROM4_TXPID5GL3, SSB_SPROM4_TXPID5GL3_SHIFT);
-+
-+ SPEX(txpid5g[0], SSB_SPROM4_TXPID5G01,
-+ SSB_SPROM4_TXPID5G0, SSB_SPROM4_TXPID5G0_SHIFT);
-+ SPEX(txpid5g[1], SSB_SPROM4_TXPID5G01,
-+ SSB_SPROM4_TXPID5G1, SSB_SPROM4_TXPID5G1_SHIFT);
-+ SPEX(txpid5g[2], SSB_SPROM4_TXPID5G23,
-+ SSB_SPROM4_TXPID5G2, SSB_SPROM4_TXPID5G2_SHIFT);
-+ SPEX(txpid5g[3], SSB_SPROM4_TXPID5G23,
-+ SSB_SPROM4_TXPID5G3, SSB_SPROM4_TXPID5G3_SHIFT);
-+
-+ SPEX(txpid5gh[0], SSB_SPROM4_TXPID5GH01,
-+ SSB_SPROM4_TXPID5GH0, SSB_SPROM4_TXPID5GH0_SHIFT);
-+ SPEX(txpid5gh[1], SSB_SPROM4_TXPID5GH01,
-+ SSB_SPROM4_TXPID5GH1, SSB_SPROM4_TXPID5GH1_SHIFT);
-+ SPEX(txpid5gh[2], SSB_SPROM4_TXPID5GH23,
-+ SSB_SPROM4_TXPID5GH2, SSB_SPROM4_TXPID5GH2_SHIFT);
-+ SPEX(txpid5gh[3], SSB_SPROM4_TXPID5GH23,
-+ SSB_SPROM4_TXPID5GH3, SSB_SPROM4_TXPID5GH3_SHIFT);
-+}
-+
-+static void sprom_extract_r45(struct ssb_sprom *out, const u16 *in)
-+{
-+ u16 il0mac_offset;
-+
-+ if (out->revision == 4)
-+ il0mac_offset = SSB_SPROM4_IL0MAC;
-+ else
-+ il0mac_offset = SSB_SPROM5_IL0MAC;
-+
-+ SPEX(et0phyaddr, SSB_SPROM4_ETHPHY, SSB_SPROM4_ETHPHY_ET0A, 0);
-+ SPEX(et1phyaddr, SSB_SPROM4_ETHPHY, SSB_SPROM4_ETHPHY_ET1A,
-+ SSB_SPROM4_ETHPHY_ET1A_SHIFT);
-+ SPEX(board_rev, SSB_SPROM4_BOARDREV, 0xFFFF, 0);
-+ SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0);
-+ if (out->revision == 4) {
-+ SPEX(alpha2[0], SSB_SPROM4_CCODE, 0xff00, 8);
-+ SPEX(alpha2[1], SSB_SPROM4_CCODE, 0x00ff, 0);
-+ SPEX(boardflags_lo, SSB_SPROM4_BFLLO, 0xFFFF, 0);
-+ SPEX(boardflags_hi, SSB_SPROM4_BFLHI, 0xFFFF, 0);
-+ SPEX(boardflags2_lo, SSB_SPROM4_BFL2LO, 0xFFFF, 0);
-+ SPEX(boardflags2_hi, SSB_SPROM4_BFL2HI, 0xFFFF, 0);
-+ } else {
-+ SPEX(alpha2[0], SSB_SPROM5_CCODE, 0xff00, 8);
-+ SPEX(alpha2[1], SSB_SPROM5_CCODE, 0x00ff, 0);
-+ SPEX(boardflags_lo, SSB_SPROM5_BFLLO, 0xFFFF, 0);
-+ SPEX(boardflags_hi, SSB_SPROM5_BFLHI, 0xFFFF, 0);
-+ SPEX(boardflags2_lo, SSB_SPROM5_BFL2LO, 0xFFFF, 0);
-+ SPEX(boardflags2_hi, SSB_SPROM5_BFL2HI, 0xFFFF, 0);
-+ }
-+ SPEX(ant_available_a, SSB_SPROM4_ANTAVAIL, SSB_SPROM4_ANTAVAIL_A,
-+ SSB_SPROM4_ANTAVAIL_A_SHIFT);
-+ SPEX(ant_available_bg, SSB_SPROM4_ANTAVAIL, SSB_SPROM4_ANTAVAIL_BG,
-+ SSB_SPROM4_ANTAVAIL_BG_SHIFT);
-+ SPEX(maxpwr_bg, SSB_SPROM4_MAXP_BG, SSB_SPROM4_MAXP_BG_MASK, 0);
-+ SPEX(itssi_bg, SSB_SPROM4_MAXP_BG, SSB_SPROM4_ITSSI_BG,
-+ SSB_SPROM4_ITSSI_BG_SHIFT);
-+ SPEX(maxpwr_a, SSB_SPROM4_MAXP_A, SSB_SPROM4_MAXP_A_MASK, 0);
-+ SPEX(itssi_a, SSB_SPROM4_MAXP_A, SSB_SPROM4_ITSSI_A,
-+ SSB_SPROM4_ITSSI_A_SHIFT);
-+ if (out->revision == 4) {
-+ SPEX(gpio0, SSB_SPROM4_GPIOA, SSB_SPROM4_GPIOA_P0, 0);
-+ SPEX(gpio1, SSB_SPROM4_GPIOA, SSB_SPROM4_GPIOA_P1,
-+ SSB_SPROM4_GPIOA_P1_SHIFT);
-+ SPEX(gpio2, SSB_SPROM4_GPIOB, SSB_SPROM4_GPIOB_P2, 0);
-+ SPEX(gpio3, SSB_SPROM4_GPIOB, SSB_SPROM4_GPIOB_P3,
-+ SSB_SPROM4_GPIOB_P3_SHIFT);
-+ } else {
-+ SPEX(gpio0, SSB_SPROM5_GPIOA, SSB_SPROM5_GPIOA_P0, 0);
-+ SPEX(gpio1, SSB_SPROM5_GPIOA, SSB_SPROM5_GPIOA_P1,
-+ SSB_SPROM5_GPIOA_P1_SHIFT);
-+ SPEX(gpio2, SSB_SPROM5_GPIOB, SSB_SPROM5_GPIOB_P2, 0);
-+ SPEX(gpio3, SSB_SPROM5_GPIOB, SSB_SPROM5_GPIOB_P3,
-+ SSB_SPROM5_GPIOB_P3_SHIFT);
-+ }
-+
-+ /* Extract the antenna gain values. */
-+ SPEX(antenna_gain.a0, SSB_SPROM4_AGAIN01,
-+ SSB_SPROM4_AGAIN0, SSB_SPROM4_AGAIN0_SHIFT);
-+ SPEX(antenna_gain.a1, SSB_SPROM4_AGAIN01,
-+ SSB_SPROM4_AGAIN1, SSB_SPROM4_AGAIN1_SHIFT);
-+ SPEX(antenna_gain.a2, SSB_SPROM4_AGAIN23,
-+ SSB_SPROM4_AGAIN2, SSB_SPROM4_AGAIN2_SHIFT);
-+ SPEX(antenna_gain.a3, SSB_SPROM4_AGAIN23,
-+ SSB_SPROM4_AGAIN3, SSB_SPROM4_AGAIN3_SHIFT);
-+
-+ sprom_extract_r458(out, in);
-+
-+ /* TODO - get remaining rev 4 stuff needed */
-+}
-+
-+static void sprom_extract_r8(struct ssb_sprom *out, const u16 *in)
-+{
-+ int i;
-+ u16 o;
-+ u16 pwr_info_offset[] = {
-+ SSB_SROM8_PWR_INFO_CORE0, SSB_SROM8_PWR_INFO_CORE1,
-+ SSB_SROM8_PWR_INFO_CORE2, SSB_SROM8_PWR_INFO_CORE3
-+ };
-+ BUILD_BUG_ON(ARRAY_SIZE(pwr_info_offset) !=
-+ ARRAY_SIZE(out->core_pwr_info));
-+
-+ SPEX(board_rev, SSB_SPROM8_BOARDREV, 0xFFFF, 0);
-+ SPEX(board_type, SSB_SPROM1_SPID, 0xFFFF, 0);
-+ SPEX(alpha2[0], SSB_SPROM8_CCODE, 0xff00, 8);
-+ SPEX(alpha2[1], SSB_SPROM8_CCODE, 0x00ff, 0);
-+ SPEX(boardflags_lo, SSB_SPROM8_BFLLO, 0xFFFF, 0);
-+ SPEX(boardflags_hi, SSB_SPROM8_BFLHI, 0xFFFF, 0);
-+ SPEX(boardflags2_lo, SSB_SPROM8_BFL2LO, 0xFFFF, 0);
-+ SPEX(boardflags2_hi, SSB_SPROM8_BFL2HI, 0xFFFF, 0);
-+ SPEX(ant_available_a, SSB_SPROM8_ANTAVAIL, SSB_SPROM8_ANTAVAIL_A,
-+ SSB_SPROM8_ANTAVAIL_A_SHIFT);
-+ SPEX(ant_available_bg, SSB_SPROM8_ANTAVAIL, SSB_SPROM8_ANTAVAIL_BG,
-+ SSB_SPROM8_ANTAVAIL_BG_SHIFT);
-+ SPEX(maxpwr_bg, SSB_SPROM8_MAXP_BG, SSB_SPROM8_MAXP_BG_MASK, 0);
-+ SPEX(itssi_bg, SSB_SPROM8_MAXP_BG, SSB_SPROM8_ITSSI_BG,
-+ SSB_SPROM8_ITSSI_BG_SHIFT);
-+ SPEX(maxpwr_a, SSB_SPROM8_MAXP_A, SSB_SPROM8_MAXP_A_MASK, 0);
-+ SPEX(itssi_a, SSB_SPROM8_MAXP_A, SSB_SPROM8_ITSSI_A,
-+ SSB_SPROM8_ITSSI_A_SHIFT);
-+ SPEX(maxpwr_ah, SSB_SPROM8_MAXP_AHL, SSB_SPROM8_MAXP_AH_MASK, 0);
-+ SPEX(maxpwr_al, SSB_SPROM8_MAXP_AHL, SSB_SPROM8_MAXP_AL_MASK,
-+ SSB_SPROM8_MAXP_AL_SHIFT);
-+ SPEX(gpio0, SSB_SPROM8_GPIOA, SSB_SPROM8_GPIOA_P0, 0);
-+ SPEX(gpio1, SSB_SPROM8_GPIOA, SSB_SPROM8_GPIOA_P1,
-+ SSB_SPROM8_GPIOA_P1_SHIFT);
-+ SPEX(gpio2, SSB_SPROM8_GPIOB, SSB_SPROM8_GPIOB_P2, 0);
-+ SPEX(gpio3, SSB_SPROM8_GPIOB, SSB_SPROM8_GPIOB_P3,
-+ SSB_SPROM8_GPIOB_P3_SHIFT);
-+ SPEX(tri2g, SSB_SPROM8_TRI25G, SSB_SPROM8_TRI2G, 0);
-+ SPEX(tri5g, SSB_SPROM8_TRI25G, SSB_SPROM8_TRI5G,
-+ SSB_SPROM8_TRI5G_SHIFT);
-+ SPEX(tri5gl, SSB_SPROM8_TRI5GHL, SSB_SPROM8_TRI5GL, 0);
-+ SPEX(tri5gh, SSB_SPROM8_TRI5GHL, SSB_SPROM8_TRI5GH,
-+ SSB_SPROM8_TRI5GH_SHIFT);
-+ SPEX(rxpo2g, SSB_SPROM8_RXPO, SSB_SPROM8_RXPO2G, 0);
-+ SPEX(rxpo5g, SSB_SPROM8_RXPO, SSB_SPROM8_RXPO5G,
-+ SSB_SPROM8_RXPO5G_SHIFT);
-+ SPEX(rssismf2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_RSSISMF2G, 0);
-+ SPEX(rssismc2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_RSSISMC2G,
-+ SSB_SPROM8_RSSISMC2G_SHIFT);
-+ SPEX(rssisav2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_RSSISAV2G,
-+ SSB_SPROM8_RSSISAV2G_SHIFT);
-+ SPEX(bxa2g, SSB_SPROM8_RSSIPARM2G, SSB_SPROM8_BXA2G,
-+ SSB_SPROM8_BXA2G_SHIFT);
-+ SPEX(rssismf5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_RSSISMF5G, 0);
-+ SPEX(rssismc5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_RSSISMC5G,
-+ SSB_SPROM8_RSSISMC5G_SHIFT);
-+ SPEX(rssisav5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_RSSISAV5G,
-+ SSB_SPROM8_RSSISAV5G_SHIFT);
-+ SPEX(bxa5g, SSB_SPROM8_RSSIPARM5G, SSB_SPROM8_BXA5G,
-+ SSB_SPROM8_BXA5G_SHIFT);
-+ SPEX(pa0b0, SSB_SPROM8_PA0B0, 0xFFFF, 0);
-+ SPEX(pa0b1, SSB_SPROM8_PA0B1, 0xFFFF, 0);
-+ SPEX(pa0b2, SSB_SPROM8_PA0B2, 0xFFFF, 0);
-+ SPEX(pa1b0, SSB_SPROM8_PA1B0, 0xFFFF, 0);
-+ SPEX(pa1b1, SSB_SPROM8_PA1B1, 0xFFFF, 0);
-+ SPEX(pa1b2, SSB_SPROM8_PA1B2, 0xFFFF, 0);
-+ SPEX(pa1lob0, SSB_SPROM8_PA1LOB0, 0xFFFF, 0);
-+ SPEX(pa1lob1, SSB_SPROM8_PA1LOB1, 0xFFFF, 0);
-+ SPEX(pa1lob2, SSB_SPROM8_PA1LOB2, 0xFFFF, 0);
-+ SPEX(pa1hib0, SSB_SPROM8_PA1HIB0, 0xFFFF, 0);
-+ SPEX(pa1hib1, SSB_SPROM8_PA1HIB1, 0xFFFF, 0);
-+ SPEX(pa1hib2, SSB_SPROM8_PA1HIB2, 0xFFFF, 0);
-+ SPEX(cck2gpo, SSB_SPROM8_CCK2GPO, 0xFFFF, 0);
-+ SPEX32(ofdm2gpo, SSB_SPROM8_OFDM2GPO, 0xFFFFFFFF, 0);
-+ SPEX32(ofdm5glpo, SSB_SPROM8_OFDM5GLPO, 0xFFFFFFFF, 0);
-+ SPEX32(ofdm5gpo, SSB_SPROM8_OFDM5GPO, 0xFFFFFFFF, 0);
-+ SPEX32(ofdm5ghpo, SSB_SPROM8_OFDM5GHPO, 0xFFFFFFFF, 0);
-+
-+ /* Extract the antenna gain values. */
-+ SPEX(antenna_gain.a0, SSB_SPROM8_AGAIN01,
-+ SSB_SPROM8_AGAIN0, SSB_SPROM8_AGAIN0_SHIFT);
-+ SPEX(antenna_gain.a1, SSB_SPROM8_AGAIN01,
-+ SSB_SPROM8_AGAIN1, SSB_SPROM8_AGAIN1_SHIFT);
-+ SPEX(antenna_gain.a2, SSB_SPROM8_AGAIN23,
-+ SSB_SPROM8_AGAIN2, SSB_SPROM8_AGAIN2_SHIFT);
-+ SPEX(antenna_gain.a3, SSB_SPROM8_AGAIN23,
-+ SSB_SPROM8_AGAIN3, SSB_SPROM8_AGAIN3_SHIFT);
-+
-+ /* Extract cores power info info */
-+ for (i = 0; i < ARRAY_SIZE(pwr_info_offset); i++) {
-+ o = pwr_info_offset[i];
-+ SPEX(core_pwr_info[i].itssi_2g, o + SSB_SROM8_2G_MAXP_ITSSI,
-+ SSB_SPROM8_2G_ITSSI, SSB_SPROM8_2G_ITSSI_SHIFT);
-+ SPEX(core_pwr_info[i].maxpwr_2g, o + SSB_SROM8_2G_MAXP_ITSSI,
-+ SSB_SPROM8_2G_MAXP, 0);
-+
-+ SPEX(core_pwr_info[i].pa_2g[0], o + SSB_SROM8_2G_PA_0, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_2g[1], o + SSB_SROM8_2G_PA_1, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_2g[2], o + SSB_SROM8_2G_PA_2, ~0, 0);
-+
-+ SPEX(core_pwr_info[i].itssi_5g, o + SSB_SROM8_5G_MAXP_ITSSI,
-+ SSB_SPROM8_5G_ITSSI, SSB_SPROM8_5G_ITSSI_SHIFT);
-+ SPEX(core_pwr_info[i].maxpwr_5g, o + SSB_SROM8_5G_MAXP_ITSSI,
-+ SSB_SPROM8_5G_MAXP, 0);
-+ SPEX(core_pwr_info[i].maxpwr_5gh, o + SSB_SPROM8_5GHL_MAXP,
-+ SSB_SPROM8_5GH_MAXP, 0);
-+ SPEX(core_pwr_info[i].maxpwr_5gl, o + SSB_SPROM8_5GHL_MAXP,
-+ SSB_SPROM8_5GL_MAXP, SSB_SPROM8_5GL_MAXP_SHIFT);
-+
-+ SPEX(core_pwr_info[i].pa_5gl[0], o + SSB_SROM8_5GL_PA_0, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5gl[1], o + SSB_SROM8_5GL_PA_1, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5gl[2], o + SSB_SROM8_5GL_PA_2, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5g[0], o + SSB_SROM8_5G_PA_0, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5g[1], o + SSB_SROM8_5G_PA_1, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5g[2], o + SSB_SROM8_5G_PA_2, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5gh[0], o + SSB_SROM8_5GH_PA_0, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5gh[1], o + SSB_SROM8_5GH_PA_1, ~0, 0);
-+ SPEX(core_pwr_info[i].pa_5gh[2], o + SSB_SROM8_5GH_PA_2, ~0, 0);
-+ }
-+
-+ /* Extract FEM info */
-+ SPEX(fem.ghz2.tssipos, SSB_SPROM8_FEM2G,
-+ SSB_SROM8_FEM_TSSIPOS, SSB_SROM8_FEM_TSSIPOS_SHIFT);
-+ SPEX(fem.ghz2.extpa_gain, SSB_SPROM8_FEM2G,
-+ SSB_SROM8_FEM_EXTPA_GAIN, SSB_SROM8_FEM_EXTPA_GAIN_SHIFT);
-+ SPEX(fem.ghz2.pdet_range, SSB_SPROM8_FEM2G,
-+ SSB_SROM8_FEM_PDET_RANGE, SSB_SROM8_FEM_PDET_RANGE_SHIFT);
-+ SPEX(fem.ghz2.tr_iso, SSB_SPROM8_FEM2G,
-+ SSB_SROM8_FEM_TR_ISO, SSB_SROM8_FEM_TR_ISO_SHIFT);
-+ SPEX(fem.ghz2.antswlut, SSB_SPROM8_FEM2G,
-+ SSB_SROM8_FEM_ANTSWLUT, SSB_SROM8_FEM_ANTSWLUT_SHIFT);
-+
-+ SPEX(fem.ghz5.tssipos, SSB_SPROM8_FEM5G,
-+ SSB_SROM8_FEM_TSSIPOS, SSB_SROM8_FEM_TSSIPOS_SHIFT);
-+ SPEX(fem.ghz5.extpa_gain, SSB_SPROM8_FEM5G,
-+ SSB_SROM8_FEM_EXTPA_GAIN, SSB_SROM8_FEM_EXTPA_GAIN_SHIFT);
-+ SPEX(fem.ghz5.pdet_range, SSB_SPROM8_FEM5G,
-+ SSB_SROM8_FEM_PDET_RANGE, SSB_SROM8_FEM_PDET_RANGE_SHIFT);
-+ SPEX(fem.ghz5.tr_iso, SSB_SPROM8_FEM5G,
-+ SSB_SROM8_FEM_TR_ISO, SSB_SROM8_FEM_TR_ISO_SHIFT);
-+ SPEX(fem.ghz5.antswlut, SSB_SPROM8_FEM5G,
-+ SSB_SROM8_FEM_ANTSWLUT, SSB_SROM8_FEM_ANTSWLUT_SHIFT);
-+
-+ SPEX(leddc_on_time, SSB_SPROM8_LEDDC, SSB_SPROM8_LEDDC_ON,
-+ SSB_SPROM8_LEDDC_ON_SHIFT);
-+ SPEX(leddc_off_time, SSB_SPROM8_LEDDC, SSB_SPROM8_LEDDC_OFF,
-+ SSB_SPROM8_LEDDC_OFF_SHIFT);
-+
-+ SPEX(txchain, SSB_SPROM8_TXRXC, SSB_SPROM8_TXRXC_TXCHAIN,
-+ SSB_SPROM8_TXRXC_TXCHAIN_SHIFT);
-+ SPEX(rxchain, SSB_SPROM8_TXRXC, SSB_SPROM8_TXRXC_RXCHAIN,
-+ SSB_SPROM8_TXRXC_RXCHAIN_SHIFT);
-+ SPEX(antswitch, SSB_SPROM8_TXRXC, SSB_SPROM8_TXRXC_SWITCH,
-+ SSB_SPROM8_TXRXC_SWITCH_SHIFT);
-+
-+ SPEX(opo, SSB_SPROM8_OFDM2GPO, 0x00ff, 0);
-+
-+ SPEX_ARRAY8(mcs2gpo, SSB_SPROM8_2G_MCSPO, ~0, 0);
-+ SPEX_ARRAY8(mcs5gpo, SSB_SPROM8_5G_MCSPO, ~0, 0);
-+ SPEX_ARRAY8(mcs5glpo, SSB_SPROM8_5GL_MCSPO, ~0, 0);
-+ SPEX_ARRAY8(mcs5ghpo, SSB_SPROM8_5GH_MCSPO, ~0, 0);
-+
-+ SPEX(rawtempsense, SSB_SPROM8_RAWTS, SSB_SPROM8_RAWTS_RAWTEMP,
-+ SSB_SPROM8_RAWTS_RAWTEMP_SHIFT);
-+ SPEX(measpower, SSB_SPROM8_RAWTS, SSB_SPROM8_RAWTS_MEASPOWER,
-+ SSB_SPROM8_RAWTS_MEASPOWER_SHIFT);
-+ SPEX(tempsense_slope, SSB_SPROM8_OPT_CORRX,
-+ SSB_SPROM8_OPT_CORRX_TEMP_SLOPE,
-+ SSB_SPROM8_OPT_CORRX_TEMP_SLOPE_SHIFT);
-+ SPEX(tempcorrx, SSB_SPROM8_OPT_CORRX, SSB_SPROM8_OPT_CORRX_TEMPCORRX,
-+ SSB_SPROM8_OPT_CORRX_TEMPCORRX_SHIFT);
-+ SPEX(tempsense_option, SSB_SPROM8_OPT_CORRX,
-+ SSB_SPROM8_OPT_CORRX_TEMP_OPTION,
-+ SSB_SPROM8_OPT_CORRX_TEMP_OPTION_SHIFT);
-+ SPEX(freqoffset_corr, SSB_SPROM8_HWIQ_IQSWP,
-+ SSB_SPROM8_HWIQ_IQSWP_FREQ_CORR,
-+ SSB_SPROM8_HWIQ_IQSWP_FREQ_CORR_SHIFT);
-+ SPEX(iqcal_swp_dis, SSB_SPROM8_HWIQ_IQSWP,
-+ SSB_SPROM8_HWIQ_IQSWP_IQCAL_SWP,
-+ SSB_SPROM8_HWIQ_IQSWP_IQCAL_SWP_SHIFT);
-+ SPEX(hw_iqcal_en, SSB_SPROM8_HWIQ_IQSWP, SSB_SPROM8_HWIQ_IQSWP_HW_IQCAL,
-+ SSB_SPROM8_HWIQ_IQSWP_HW_IQCAL_SHIFT);
-+
-+ SPEX(bw40po, SSB_SPROM8_BW40PO, ~0, 0);
-+ SPEX(cddpo, SSB_SPROM8_CDDPO, ~0, 0);
-+ SPEX(stbcpo, SSB_SPROM8_STBCPO, ~0, 0);
-+ SPEX(bwduppo, SSB_SPROM8_BWDUPPO, ~0, 0);
-+
-+ SPEX(tempthresh, SSB_SPROM8_THERMAL, SSB_SPROM8_THERMAL_TRESH,
-+ SSB_SPROM8_THERMAL_TRESH_SHIFT);
-+ SPEX(tempoffset, SSB_SPROM8_THERMAL, SSB_SPROM8_THERMAL_OFFSET,
-+ SSB_SPROM8_THERMAL_OFFSET_SHIFT);
-+ SPEX(phycal_tempdelta, SSB_SPROM8_TEMPDELTA,
-+ SSB_SPROM8_TEMPDELTA_PHYCAL,
-+ SSB_SPROM8_TEMPDELTA_PHYCAL_SHIFT);
-+ SPEX(temps_period, SSB_SPROM8_TEMPDELTA, SSB_SPROM8_TEMPDELTA_PERIOD,
-+ SSB_SPROM8_TEMPDELTA_PERIOD_SHIFT);
-+ SPEX(temps_hysteresis, SSB_SPROM8_TEMPDELTA,
-+ SSB_SPROM8_TEMPDELTA_HYSTERESIS,
-+ SSB_SPROM8_TEMPDELTA_HYSTERESIS_SHIFT);
-+ sprom_extract_r458(out, in);
-+
-+ /* TODO - get remaining rev 8 stuff needed */
-+}
-+
-+static int sprom_extract(struct ssb_sprom *out, const u16 *in, u16 size)
-+{
-+ memset(out, 0, sizeof(*out));
-+
-+ out->revision = in[size - 1] & 0x00FF;
-+ memset(out->et0mac, 0xFF, 6); /* preset et0 and et1 mac */
-+ memset(out->et1mac, 0xFF, 6);
-+
-+ switch (out->revision) {
-+ case 1:
-+ case 2:
-+ case 3:
-+ sprom_extract_r123(out, in);
-+ break;
-+ case 4:
-+ case 5:
-+ sprom_extract_r45(out, in);
-+ break;
-+ case 8:
-+ sprom_extract_r8(out, in);
-+ break;
-+ default:
-+ pr_warn("Unsupported SPROM revision %d detected. Will extract v1\n",
-+ out->revision);
-+ out->revision = 1;
-+ sprom_extract_r123(out, in);
-+ }
-+
-+ if (out->boardflags_lo == 0xFFFF)
-+ out->boardflags_lo = 0; /* per specs */
-+ if (out->boardflags_hi == 0xFFFF)
-+ out->boardflags_hi = 0; /* per specs */
-+
-+ return 0;
-+}
-+
-+static __initdata u16 template_sprom[220];
- #endif
-
-+
- int __init bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data)
- {
- int ret = 0;
-
- #ifdef CONFIG_SSB_PCIHOST
-+ u16 size = 0;
-+
- switch (data->type) {
- case SPROM_DEFAULT:
- memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom,
-@@ -71,6 +550,9 @@ int __init bcm63xx_register_fallback_spr
- return -EINVAL;
- }
-
-+ if (size > 0)
-+ sprom_extract(&bcm63xx_sprom, template_sprom, size);
-+
- memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN);
- memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN);
- memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN);
diff --git a/target/linux/brcm63xx/patches-3.14/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch b/target/linux/brcm63xx/patches-3.14/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch
deleted file mode 100644
index 47b00d7..0000000
--- a/target/linux/brcm63xx/patches-3.14/361-MIPS-BCM63XX-add-raw-fallback-sproms-for-most-common.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 7be5bb46003295c9e04fd4e795593b2deaacd783 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 29 Jul 2014 22:33:38 +0200
-Subject: [PATCH 06/10] MIPS: BCM63XX: add raw fallback sproms for most common
- ssb cards
-
-Add template sproms for BCM4306, BCM4318, BCM4321, BCM4322, and BCM43222.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/sprom.c | 136 +++++++++++++++++++++
- .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 6 +
- 2 files changed, 142 insertions(+)
-
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -43,6 +43,122 @@ static __initconst struct ssb_sprom bcm6
- .boardflags_hi = 0x0000,
- };
-
-+
-+static __initconst u16 bcm4306_sprom[] = {
-+ 0x4001, 0x0000, 0x0453, 0x14e4, 0x4320, 0x8000, 0x0002, 0x0002,
-+ 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x3034, 0x14d4,
-+ 0xfa91, 0xfe60, 0xffff, 0xffff, 0x004c, 0xffff, 0xffff, 0xffff,
-+ 0x003e, 0x0a49, 0xff02, 0x0000, 0xff10, 0xffff, 0xffff, 0x0002,
-+};
-+
-+static __initconst u16 bcm4318_sprom[] = {
-+ 0x2001, 0x0000, 0x0449, 0x14e4, 0x4318, 0x8000, 0x0002, 0x0000,
-+ 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000, 0x0000, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x3046, 0x15a7,
-+ 0xfab0, 0xfe97, 0xffff, 0xffff, 0x0048, 0xffff, 0xffff, 0xffff,
-+ 0x003e, 0xea49, 0xff02, 0x0000, 0xff08, 0xffff, 0xffff, 0x0002,
-+};
-+
-+static __initconst u16 bcm4321_sprom[] = {
-+ 0x3001, 0x0000, 0x046c, 0x14e4, 0x4328, 0x8000, 0x0002, 0x0000,
-+ 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x5372, 0x0032, 0x4a01, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0x0303, 0x0202,
-+ 0xffff, 0x2728, 0x5b5b, 0x222b, 0x5b5b, 0x1927, 0x5b5b, 0x1e36,
-+ 0x5b5b, 0x303c, 0x3030, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x3e4c, 0x0000, 0x0000, 0x0000, 0x0000, 0x7838, 0x3a34, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0x3e4c,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x7838, 0x3a34, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0x0008, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x0004,
-+};
-+
-+static __initconst u16 bcm4322_sprom[] = {
-+ 0x3001, 0x0000, 0x04bc, 0x14e4, 0x432c, 0x8000, 0x0002, 0x0000,
-+ 0x1730, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x5372, 0x1209, 0x0200, 0x0000, 0x0400, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0x0303, 0x0202,
-+ 0xffff, 0x0033, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0301,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x2048, 0xfe9a, 0x1571, 0xfabd, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x2048, 0xfeb9, 0x159f, 0xfadd, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x3333, 0x5555, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x0008,
-+};
-+
-+static __initconst u16 bcm43222_sprom[] = {
-+ 0x2001, 0x0000, 0x04d4, 0x14e4, 0x4351, 0x8000, 0x0002, 0x0000,
-+ 0x1730, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x5372, 0x2305, 0x0200, 0x0000, 0x2400, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0x0303, 0x0202,
-+ 0xffff, 0x0033, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0325,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x204c, 0xfea6, 0x1717, 0xfa6d, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x204c, 0xfeb8, 0x167c, 0xfa9e, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x3333, 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x3333, 0x3333, 0x3333, 0x3333, 0x3333, 0x3333, 0x3333,
-+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x0008,
-+};
-+
- static struct ssb_sprom bcm63xx_sprom;
-
- int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
-@@ -542,6 +658,26 @@ int __init bcm63xx_register_fallback_spr
- u16 size = 0;
-
- switch (data->type) {
-+ case SPROM_BCM4306:
-+ memcpy(&template_sprom, &bcm4306_sprom, sizeof(bcm4306_sprom));
-+ size = ARRAY_SIZE(bcm4306_sprom);
-+ break;
-+ case SPROM_BCM4318:
-+ memcpy(&template_sprom, &bcm4318_sprom, sizeof(bcm4318_sprom));
-+ size = ARRAY_SIZE(bcm4306_sprom);
-+ break;
-+ case SPROM_BCM4321:
-+ memcpy(&template_sprom, &bcm4321_sprom, sizeof(bcm4321_sprom));
-+ size = ARRAY_SIZE(bcm4321_sprom);
-+ break;
-+ case SPROM_BCM4322:
-+ memcpy(&template_sprom, &bcm4322_sprom, sizeof(bcm4322_sprom));
-+ size = ARRAY_SIZE(bcm4322_sprom);
-+ break;
-+ case SPROM_BCM43222:
-+ memcpy(&template_sprom, &bcm43222_sprom, sizeof(bcm43222_sprom));
-+ size = ARRAY_SIZE(bcm43222_sprom);
-+ break;
- case SPROM_DEFAULT:
- memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom,
- sizeof(bcm63xx_sprom));
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-@@ -5,6 +5,12 @@
-
- enum sprom_type {
- SPROM_DEFAULT, /* default fallback sprom */
-+ /* SSB based */
-+ SPROM_BCM4306,
-+ SPROM_BCM4318,
-+ SPROM_BCM4321,
-+ SPROM_BCM4322,
-+ SPROM_BCM43222,
- };
-
- struct fallback_sprom_data {
diff --git a/target/linux/brcm63xx/patches-3.14/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch b/target/linux/brcm63xx/patches-3.14/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch
deleted file mode 100644
index 6475f9f..0000000
--- a/target/linux/brcm63xx/patches-3.14/362-MIPS-BCM63XX-also-register-a-fallback-sprom-for-bcma.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 03feb9db77fba3eef3d83e17a87a56979659b248 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 29 Jul 2014 22:48:26 +0200
-Subject: [PATCH 07/10] MIPS: BCM63XX: also register a fallback sprom for bcma
-
-Similar to SSB, register a fallback sprom handler for BCMA.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/boards/Kconfig | 1 +
- arch/mips/bcm63xx/sprom.c | 40 +++++++++++++++++++++++++++++++++++-----
- 2 files changed, 36 insertions(+), 5 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/Kconfig
-+++ b/arch/mips/bcm63xx/boards/Kconfig
-@@ -4,6 +4,7 @@ menu "Board support"
- config BOARD_BCM963XX
- bool "Generic Broadcom 963xx boards"
- select SSB
-+ select BCMA
- default y
- help
-
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -12,6 +12,7 @@
- #include <linux/string.h>
- #include <linux/platform_device.h>
- #include <linux/ssb/ssb.h>
-+#include <linux/bcma/bcma.h>
- #include <bcm63xx_fallback_sprom.h>
- #include <board_bcm963xx.h>
-
-@@ -21,7 +22,7 @@
- * Register a sane SPROMv2 to make the on-board
- * bcm4318 WLAN work
- */
--#ifdef CONFIG_SSB_PCIHOST
-+#if defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI)
- static __initconst struct ssb_sprom bcm63xx_default_sprom = {
- .revision = 0x02,
- .board_rev = 0x17,
-@@ -43,7 +44,7 @@ static __initconst struct ssb_sprom bcm6
- .boardflags_hi = 0x0000,
- };
-
--
-+#if defined (CONFIG_SSB_PCIHOST)
- static __initconst u16 bcm4306_sprom[] = {
- 0x4001, 0x0000, 0x0453, 0x14e4, 0x4320, 0x8000, 0x0002, 0x0002,
- 0x1000, 0x1800, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
-@@ -158,10 +159,12 @@ static __initconst u16 bcm43222_sprom[]
- 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
- 0xffff, 0xffff, 0xffff, 0x0008,
- };
-+#endif /* CONFIG_SSB_PCIHOST */
-
- static struct ssb_sprom bcm63xx_sprom;
-
--int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
-+#if defined(CONFIG_SSB_PCIHOST)
-+int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
- {
- if (bus->bustype == SSB_BUSTYPE_PCI) {
- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-@@ -171,6 +174,20 @@ int bcm63xx_get_fallback_sprom(struct ss
- return -EINVAL;
- }
- }
-+#endif
-+
-+#if defined(CONFIG_BCMA_HOST_PCI)
-+int bcm63xx_get_fallback_bcma_sprom(struct bcma_bus *bus, struct ssb_sprom *out)
-+{
-+ if (bus->hosttype == BCMA_HOSTTYPE_PCI) {
-+ memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-+ return 0;
-+ } else {
-+ printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n");
-+ return -EINVAL;
-+ }
-+}
-+#endif
-
- /* FIXME: use lib_sprom after submission upstream */
-
-@@ -654,10 +671,11 @@ int __init bcm63xx_register_fallback_spr
- {
- int ret = 0;
-
--#ifdef CONFIG_SSB_PCIHOST
-+#if defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI)
- u16 size = 0;
-
- switch (data->type) {
-+#if defined(CONFIG_SSB_PCIHOST)
- case SPROM_BCM4306:
- memcpy(&template_sprom, &bcm4306_sprom, sizeof(bcm4306_sprom));
- size = ARRAY_SIZE(bcm4306_sprom);
-@@ -678,6 +696,7 @@ int __init bcm63xx_register_fallback_spr
- memcpy(&template_sprom, &bcm43222_sprom, sizeof(bcm43222_sprom));
- size = ARRAY_SIZE(bcm43222_sprom);
- break;
-+#endif
- case SPROM_DEFAULT:
- memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom,
- sizeof(bcm63xx_sprom));
-@@ -692,8 +711,19 @@ int __init bcm63xx_register_fallback_spr
- memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN);
- memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN);
- memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN);
-+#endif /* defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI) */
-+
-+#if defined(CONFIG_SSB_PCIHOST)
-+ ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_ssb_sprom);
-+ if (ret)
-+ return ret;
-+
-+#endif
-
-- ret = ssb_arch_register_fallback_sprom(&bcm63xx_get_fallback_sprom);
-+#if defined(CONFIG_BCMA_HOST_PCI)
-+ ret = bcma_arch_register_fallback_sprom(bcm63xx_get_fallback_bcma_sprom);
-+ if (ret)
-+ return ret;
- #endif
- return ret;
- }
diff --git a/target/linux/brcm63xx/patches-3.14/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch b/target/linux/brcm63xx/patches-3.14/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch
deleted file mode 100644
index 5c0abb9..0000000
--- a/target/linux/brcm63xx/patches-3.14/363-MIPS-BCM63XX-add-BCMA-based-sprom-templates.patch
+++ /dev/null
@@ -1,303 +0,0 @@
-From 27bf70e3fe797691b17df07ecbfaf9f5a4419f49 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Wed, 30 Jul 2014 23:14:27 +0200
-Subject: [PATCH 08/10] MIPS: BCM63XX: add BCMA based sprom templates
-
-Add fallback sproms for BCM4313, BCM43131, BCM43217, BCM43225, BCM43227,
-BCM43228, and BCM4331.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/sprom.c | 256 +++++++++++++++++++++
- .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 8 +
- 2 files changed, 264 insertions(+)
-
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -161,6 +161,226 @@ static __initconst u16 bcm43222_sprom[]
- };
- #endif /* CONFIG_SSB_PCIHOST */
-
-+#if defined(CONFIG_BCMA_HOST_PCI)
-+static __initconst u16 bcm4313_sprom[] = {
-+ 0x2801, 0x0000, 0x0510, 0x14e4, 0x0078, 0xedbe, 0x0000, 0x2bc4,
-+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820,
-+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100,
-+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x4727, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x5372, 0x1215, 0x2a00, 0x0800, 0x0800, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0003, 0x0202,
-+ 0xffff, 0x0011, 0x007a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0201,
-+ 0x0000, 0x7800, 0x7c0a, 0x0398, 0x0008, 0x0000, 0x0000, 0x0000,
-+ 0x0044, 0x1684, 0xfd0d, 0xff35, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0048, 0xfed2, 0x15d9, 0xfac6, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0008,
-+};
-+
-+static __initconst u16 bcm43131_sprom[] = {
-+ 0x2801, 0x0000, 0x05f7, 0x14e4, 0x0070, 0xedbe, 0x1c00, 0x2bc4,
-+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820,
-+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100,
-+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x43aa, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x5372, 0x1280, 0x0200, 0x0000, 0x8800, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0002, 0x0202,
-+ 0xffff, 0x0022, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0415,
-+ 0x0000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x204c, 0xfe96, 0x192c, 0xfa15, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x204c, 0xfe91, 0x1950, 0xfa0a, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x4444, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x6666, 0x6666, 0x6666,
-+ 0x6666, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x0008,
-+};
-+
-+static __initconst u16 bcm43217_sprom[] = {
-+ 0x2801, 0x0000, 0x05e9, 0x14e4, 0x0070, 0xedbe, 0x0000, 0x2bc4,
-+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820,
-+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100,
-+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x43a9, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x5372, 0x1252, 0x0200, 0x0000, 0x9800, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0003, 0x0202,
-+ 0xffff, 0x0033, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0415,
-+ 0x0000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x204c, 0xfe96, 0x192c, 0xfa15, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x204c, 0xfe91, 0x1950, 0xfa0a, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x4444, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x6666, 0x6666, 0x6666,
-+ 0x6666, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x7a08,
-+};
-+
-+static __initconst u16 bcm43225_sprom[] = {
-+ 0x2801, 0x0000, 0x04da, 0x14e4, 0x0078, 0xedbe, 0x0000, 0x2bc4,
-+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820,
-+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100,
-+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0x1008, 0x0005, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x4357, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x5372, 0x1200, 0x0200, 0x0000, 0x1000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x88ff, 0xffff, 0xffff, 0x0303, 0x0202,
-+ 0xffff, 0x0033, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0325,
-+ 0xffff, 0x7800, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x204e, 0xfead, 0x1611, 0xfa9a, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x204e, 0xfec1, 0x1674, 0xfab2, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x5555, 0x5555, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x5555, 0x7555, 0x5555, 0x7555, 0x5555, 0x7555, 0x5555,
-+ 0x7555, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0002, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x0008,
-+};
-+
-+static __initconst u16 bcm43227_sprom[] = {
-+ 0x2801, 0x0000, 0x0543, 0x14e4, 0x0070, 0xedbe, 0x0000, 0x2bc4,
-+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820,
-+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100,
-+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x4358, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x5372, 0x1402, 0x0200, 0x0000, 0x0800, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0003, 0x0202,
-+ 0xffff, 0x0033, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0415,
-+ 0x0000, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x204c, 0xff36, 0x16d2, 0xfaae, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x204c, 0xfeca, 0x159b, 0xfa80, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x4444, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x6666, 0x6666, 0x6666,
-+ 0x6666, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x0008,
-+};
-+
-+static __initconst u16 bcm43228_sprom[] = {
-+ 0x2801, 0x0000, 0x0011, 0x1028, 0x0070, 0xedbe, 0x0000, 0x2bc4,
-+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820,
-+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100,
-+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x1008, 0x0305, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x4359, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x5372, 0x1203, 0x0200, 0x0000, 0x0800, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0003, 0xffff, 0x88ff, 0xffff, 0x0303, 0x0202,
-+ 0xffff, 0x0033, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0215,
-+ 0x0215, 0x7800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x204c, 0xff73, 0x1762, 0xfaa4, 0x3e34, 0x3434, 0xfea1, 0x154c,
-+ 0xfad0, 0xfea1, 0x144c, 0xfafb, 0xfe7b, 0x13fe, 0xfafc, 0x0000,
-+ 0x204c, 0xff41, 0x16a3, 0xfa8f, 0x3e34, 0x3434, 0xfe97, 0x1446,
-+ 0xfb05, 0xfe97, 0x1346, 0xfb32, 0xfeb9, 0x1516, 0xfaee, 0x0000,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x4444, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x4444, 0x4444, 0x4444, 0x4444, 0x8888, 0x8888, 0x8888,
-+ 0x8888, 0x0000, 0x0000, 0x0000, 0x0000, 0x3333, 0x3333, 0x3333,
-+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x3333, 0x3333, 0x3333,
-+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0x3333, 0x3333, 0x3333,
-+ 0x3333, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xf008,
-+};
-+
-+static __initconst u16 bcm4331_sprom[] = {
-+ 0x2801, 0x0000, 0x0525, 0x14e4, 0x0078, 0xedbe, 0x0000, 0x2bc4,
-+ 0x2a64, 0x2964, 0x2c64, 0x3ce7, 0x46ff, 0x47ff, 0x0c00, 0x0820,
-+ 0x0030, 0x1002, 0x9f28, 0x5d44, 0x8080, 0x1d8f, 0x0032, 0x0100,
-+ 0xdf00, 0x71f5, 0x8400, 0x0083, 0x8500, 0x2010, 0x0001, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0x1010, 0x0005, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x4331, 0x8000, 0x0002, 0x0000, 0x1f30, 0x1800, 0x0000, 0x0000,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x5372, 0x1104, 0x0200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0xffff, 0x88ff, 0xffff, 0x0707, 0x0202,
-+ 0xff02, 0x0077, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0x0325,
-+ 0x0325, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x2048, 0xfe56, 0x16f2, 0xfa44, 0x3e3c, 0x3c3c, 0xfe77, 0x1657,
-+ 0xfa75, 0xffff, 0xffff, 0xffff, 0xfe76, 0x15da, 0xfa85, 0x0000,
-+ 0x2048, 0xfe5c, 0x16b5, 0xfa56, 0x3e3c, 0x3c3c, 0xfe7c, 0x169d,
-+ 0xfa6b, 0xffff, 0xffff, 0xffff, 0xfe7a, 0x1597, 0xfa97, 0x0000,
-+ 0x2048, 0xfe68, 0x1734, 0xfa46, 0x3e3c, 0x3c3c, 0xfe7f, 0x15e4,
-+ 0xfa94, 0xffff, 0xffff, 0xffff, 0xfe7d, 0x1582, 0xfa9f, 0x0000,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-+ 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-+ 0xffff, 0xffff, 0xffff, 0x0009,
-+};
-+
-+#endif /* CONFIG_BCMA_HOST_PCI */
-+
- static struct ssb_sprom bcm63xx_sprom;
-
- #if defined(CONFIG_SSB_PCIHOST)
-@@ -697,6 +917,42 @@ int __init bcm63xx_register_fallback_spr
- size = ARRAY_SIZE(bcm43222_sprom);
- break;
- #endif
-+#if defined(CONFIG_BCMA_HOST_PCI)
-+ case SPROM_BCM4313:
-+ memcpy(&template_sprom, &bcm4313_sprom,
-+ sizeof(bcm4313_sprom));
-+ size = ARRAY_SIZE(bcm4313_sprom);
-+ break;
-+ case SPROM_BCM43131:
-+ memcpy(&template_sprom, &bcm43131_sprom,
-+ sizeof(bcm43131_sprom));
-+ size = ARRAY_SIZE(bcm43131_sprom);
-+ break;
-+ case SPROM_BCM43217:
-+ memcpy(&template_sprom, &bcm43217_sprom,
-+ sizeof(bcm43217_sprom));
-+ size = ARRAY_SIZE(bcm43217_sprom);
-+ break;
-+ case SPROM_BCM43225:
-+ memcpy(&template_sprom, &bcm43225_sprom,
-+ sizeof(bcm43225_sprom));
-+ size = ARRAY_SIZE(bcm43225_sprom);
-+ break;
-+ case SPROM_BCM43227:
-+ memcpy(&template_sprom, &bcm43227_sprom,
-+ sizeof(bcm43227_sprom));
-+ size = ARRAY_SIZE(bcm43227_sprom);
-+ break;
-+ case SPROM_BCM43228:
-+ memcpy(&template_sprom, &bcm43228_sprom,
-+ sizeof(bcm43228_sprom));
-+ size = ARRAY_SIZE(bcm43228_sprom);
-+ break;
-+ case SPROM_BCM4331:
-+ memcpy(&template_sprom, &bcm4331_sprom, sizeof(&bcm4331_sprom));
-+ size = ARRAY_SIZE(bcm4331_sprom);
-+ break;
-+#endif
- case SPROM_DEFAULT:
- memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom,
- sizeof(bcm63xx_sprom));
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-@@ -11,6 +11,14 @@ enum sprom_type {
- SPROM_BCM4321,
- SPROM_BCM4322,
- SPROM_BCM43222,
-+ /* BCMA based */
-+ SPROM_BCM4313,
-+ SPROM_BCM43131,
-+ SPROM_BCM43217,
-+ SPROM_BCM43225,
-+ SPROM_BCM43227,
-+ SPROM_BCM43228,
-+ SPROM_BCM4331,
- };
-
- struct fallback_sprom_data {
diff --git a/target/linux/brcm63xx/patches-3.14/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch b/target/linux/brcm63xx/patches-3.14/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch
deleted file mode 100644
index 74c2846..0000000
--- a/target/linux/brcm63xx/patches-3.14/364-MIPS-BCM63XX-allow-board-files-to-provide-sprom-fixu.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 8575548b08e33c9ff4fd540abec09dd177e33682 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 31 Jul 2014 19:12:33 +0200
-Subject: [PATCH 09/10] MIPS: BCM63XX: allow board files to provide sprom
- fixups
-
-Allow board_info files to supply fixups for the base sproms to adapt
-them to the actual used sprom contents in case they do not use the
-default ones.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/sprom.c | 14 +++++++++++++-
- .../mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 8 ++++++++
- 2 files changed, 21 insertions(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -883,6 +883,14 @@ static int sprom_extract(struct ssb_spro
- return 0;
- }
-
-+void sprom_apply_fixups(u16 *sprom, struct sprom_fixup *fixups, int n)
-+{
-+ unsigned int i;
-+
-+ for (i = 0; i < n; i++)
-+ sprom[fixups[i].offset] = fixups[i].value;
-+}
-+
- static __initdata u16 template_sprom[220];
- #endif
-
-@@ -961,8 +969,12 @@ int __init bcm63xx_register_fallback_spr
- return -EINVAL;
- }
-
-- if (size > 0)
-+ if (size > 0) {
-+ sprom_apply_fixups(template_sprom, data->board_fixups,
-+ data->num_board_fixups);
-+
- sprom_extract(&bcm63xx_sprom, template_sprom, size);
-+ }
-
- memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN);
- memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-@@ -21,9 +21,17 @@ enum sprom_type {
- SPROM_BCM4331,
- };
-
-+struct sprom_fixup {
-+ u16 offset;
-+ u16 value;
-+};
-+
- struct fallback_sprom_data {
- u8 mac_addr[ETH_ALEN];
- enum sprom_type type;
-+
-+ struct sprom_fixup *board_fixups;
-+ unsigned int num_board_fixups;
- };
-
- int bcm63xx_register_fallback_sprom(struct fallback_sprom_data *data);
diff --git a/target/linux/brcm63xx/patches-3.14/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch b/target/linux/brcm63xx/patches-3.14/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch
deleted file mode 100644
index 40591e5..0000000
--- a/target/linux/brcm63xx/patches-3.14/365-MIPS-BCM63XX-allow-setting-a-pci-bus-device-for-fall.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From f393eaacf178e7e8a61eb11a96edd7dfb35cb49d Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 31 Jul 2014 20:39:44 +0200
-Subject: [PATCH 10/10] MIPS: BCM63XX: allow setting a pci bus/device for
- fallback sprom
-
-Warn if the set pci bus/slot does not match the actual request.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/sprom.c | 31 ++++++++++++++++++----
- .../asm/mach-bcm63xx/bcm63xx_fallback_sprom.h | 3 +++
- 2 files changed, 29 insertions(+), 5 deletions(-)
-
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -381,13 +381,25 @@ static __initconst u16 bcm4331_sprom[] =
-
- #endif /* CONFIG_BCMA_HOST_PCI */
-
--static struct ssb_sprom bcm63xx_sprom;
-+struct fallback_sprom_match {
-+ u8 pci_bus;
-+ u8 pci_dev;
-+ struct ssb_sprom sprom;
-+};
-+
-+static struct fallback_sprom_match fallback_sprom;
-
- #if defined(CONFIG_SSB_PCIHOST)
- int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
- {
- if (bus->bustype == SSB_BUSTYPE_PCI) {
-- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-+ if (bus->host_pci->bus->number != fallback_sprom.pci_bus ||
-+ PCI_SLOT(bus->host_pci->devfn) != fallback_sprom.pci_dev)
-+ pr_warn("ssb_fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n",
-+ fallback_sprom.pci_bus, fallback_sprom.pci_dev,
-+ bus->host_pci->bus->number,
-+ PCI_SLOT(bus->host_pci->devfn));
-+ memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom));
- return 0;
- } else {
- printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n");
-@@ -400,7 +412,13 @@ int bcm63xx_get_fallback_ssb_sprom(struc
- int bcm63xx_get_fallback_bcma_sprom(struct bcma_bus *bus, struct ssb_sprom *out)
- {
- if (bus->hosttype == BCMA_HOSTTYPE_PCI) {
-- memcpy(out, &bcm63xx_sprom, sizeof(struct ssb_sprom));
-+ if (bus->host_pci->bus->number != fallback_sprom.pci_bus ||
-+ PCI_SLOT(bus->host_pci->devfn) != fallback_sprom.pci_dev)
-+ pr_warn("bcma_fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n",
-+ fallback_sprom.pci_bus, fallback_sprom.pci_dev,
-+ bus->host_pci->bus->number,
-+ PCI_SLOT(bus->host_pci->devfn));
-+ memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom));
- return 0;
- } else {
- printk(KERN_ERR PFX "unable to fill SPROM for given bustype.\n");
-@@ -962,8 +980,8 @@ int __init bcm63xx_register_fallback_spr
- break;
- #endif
- case SPROM_DEFAULT:
-- memcpy(&bcm63xx_sprom, &bcm63xx_default_sprom,
-- sizeof(bcm63xx_sprom));
-+ memcpy(&fallback_sprom.sprom, &bcm63xx_default_sprom,
-+ sizeof(bcm63xx_default_sprom));
- break;
- default:
- return -EINVAL;
-@@ -973,12 +991,15 @@ int __init bcm63xx_register_fallback_spr
- sprom_apply_fixups(template_sprom, data->board_fixups,
- data->num_board_fixups);
-
-- sprom_extract(&bcm63xx_sprom, template_sprom, size);
-+ sprom_extract(&fallback_sprom.sprom, template_sprom, size);
- }
-
-- memcpy(bcm63xx_sprom.il0mac, data->mac_addr, ETH_ALEN);
-- memcpy(bcm63xx_sprom.et0mac, data->mac_addr, ETH_ALEN);
-- memcpy(bcm63xx_sprom.et1mac, data->mac_addr, ETH_ALEN);
-+ memcpy(fallback_sprom.sprom.il0mac, data->mac_addr, ETH_ALEN);
-+ memcpy(fallback_sprom.sprom.et0mac, data->mac_addr, ETH_ALEN);
-+ memcpy(fallback_sprom.sprom.et1mac, data->mac_addr, ETH_ALEN);
-+
-+ fallback_sprom.pci_bus = data->pci_bus;
-+ fallback_sprom.pci_dev = data->pci_dev;
- #endif /* defined(CONFIG_SSB_PCIHOST) || defined(CONFIG_BCMA_HOST_PCI) */
-
- #if defined(CONFIG_SSB_PCIHOST)
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_fallback_sprom.h
-@@ -30,6 +30,9 @@ struct fallback_sprom_data {
- u8 mac_addr[ETH_ALEN];
- enum sprom_type type;
-
-+ u8 pci_bus;
-+ u8 pci_dev;
-+
- struct sprom_fixup *board_fixups;
- unsigned int num_board_fixups;
- };
diff --git a/target/linux/brcm63xx/patches-3.14/366-MIPS-add-support-for-vmlinux.bin-appended-DTB.patch b/target/linux/brcm63xx/patches-3.14/366-MIPS-add-support-for-vmlinux.bin-appended-DTB.patch
deleted file mode 100644
index 344e78b..0000000
--- a/target/linux/brcm63xx/patches-3.14/366-MIPS-add-support-for-vmlinux.bin-appended-DTB.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 318c1fce4aeef298cbb6153416c499c94ad7cda0 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 24 Jun 2014 10:53:15 +0200
-Subject: [PATCH RFC v3] MIPS: add support for vmlinux.bin appended DTB
-
-Add support for populating initial_boot_params through a dtb
-blob appended to raw vmlinux.bin.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
-Changes RFC v2 -> v3
-
-* fixed !smp kernels (TODO: move it to its own patch
-
-Changes RFC v1 -> v2
-
-* changed all occurences of vmlinux to vmlinux.bin
-* clarified this applies to the raw vmlinux.bin without decompressor
-* s/initial_device_params/initial_boot_params/
-
-Initial comments by me still valid:
-
-Mostly adapted from how ARM is doing it.
-
-Sent as an RFC PATCH because I am not sure if this is the right way to
-it, and whether storing the pointer in initial_boot_params is a good
-idea, or a new variable should be introduced.
-
-The reasoning for initial_boot_params is that there is no common
-MIPS interface yet, so the next best thing was using that. This also
-has the advantage of keeping the original fw_args intact.
-
-This patch works for me on bcm63xx, where the bootloader expects
-an lzma compressed kernel, so I didn't want to double compress using
-the in-kernel compressed kernel support.
-
-Completely untested on anything except MIPS32 / big endian.
-
- arch/mips/Kconfig | 18 ++++++++++++++++++
- arch/mips/kernel/head.S | 19 +++++++++++++++++++
- arch/mips/kernel/vmlinux.lds.S | 7 +++++++
- 3 files changed, 43 insertions(+)
-
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -2519,6 +2519,24 @@ config RAPIDIO
-
- source "drivers/rapidio/Kconfig"
-
-+config MIPS_APPENDED_DTB
-+ bool "Use appended device tree blob to vmlinux.bin (EXPERIMENTAL)"
-+ depends on OF
-+ help
-+ With this option, the boot code will look for a device tree binary
-+ DTB) appended to raw vmlinux.bin (without decompressor).
-+ (e.g. cat vmlinux.bin <filename>.dtb > vmlinux_w_dtb).
-+
-+ This is meant as a backward compatibility convenience for those
-+ systems with a bootloader that can't be upgraded to accommodate
-+ the documented boot protocol using a device tree.
-+
-+ Beware that there is very little in terms of protection against
-+ this option being confused by leftover garbage in memory that might
-+ look like a DTB header after a reboot if no actual DTB is appended
-+ to vmlinux.bin. Do not leave this option active in a production kernel
-+ if you don't intend to always append a DTB.
-+
- endmenu
-
- menu "Executable file formats"
---- a/arch/mips/kernel/head.S
-+++ b/arch/mips/kernel/head.S
-@@ -139,6 +139,22 @@ NESTED(kernel_entry, 16, sp) # kernel
- mtc0 t0, CP0_STATUS
- #endif /* CONFIG_MIPS_MT_SMTC */
-
-+#ifdef CONFIG_MIPS_APPENDED_DTB
-+ PTR_LA t0, __appended_dtb
-+ PTR_LI t3, 0
-+
-+#ifdef CONFIG_CPU_BIG_ENDIAN
-+ PTR_LI t1, 0xd00dfeed
-+#else
-+ PTR_LI t1, 0xedfe0dd0
-+#endif
-+ LONG_L t2, (t0)
-+ bne t1, t2, not_found
-+
-+ PTR_LA t3, __appended_dtb
-+
-+not_found:
-+#endif
- PTR_LA t0, __bss_start # clear .bss
- LONG_S zero, (t0)
- PTR_LA t1, __bss_stop - LONGSIZE
-@@ -152,6 +168,10 @@ NESTED(kernel_entry, 16, sp) # kernel
- LONG_S a2, fw_arg2
- LONG_S a3, fw_arg3
-
-+#ifdef CONFIG_MIPS_APPENDED_DTB
-+ LONG_S t3, initial_boot_params
-+#endif
-+
- MTC0 zero, CP0_CONTEXT # clear context register
- PTR_LA $28, init_thread_union
- /* Set the SP after an empty pt_regs. */
---- a/arch/mips/kernel/vmlinux.lds.S
-+++ b/arch/mips/kernel/vmlinux.lds.S
-@@ -125,8 +125,14 @@ SECTIONS
- .exit.data : {
- EXIT_DATA
- }
--
-+#ifdef CONFIG_SMP
- PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
-+#endif
-+#ifdef CONFIG_MIPS_APPENDED_DTB
-+ __appended_dtb = .;
-+ /* leave space for appended DTB */
-+ . = . + 0x100000;
-+#endif
- /*
- * Align to 64K in attempt to eliminate holes before the
- * .bss..swapper_pg_dir section at the start of .bss. This
diff --git a/target/linux/brcm63xx/patches-3.14/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch b/target/linux/brcm63xx/patches-3.14/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch
deleted file mode 100644
index 577df55..0000000
--- a/target/linux/brcm63xx/patches-3.14/367-MIPS-BCM63XX-add-support-for-loading-DTB.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From db896341299cbcb703821228574ba9b79b6a3565 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 24 Jun 2014 10:57:51 +0200
-Subject: [PATCH 45/48] MIPS: BCM63XX: add support for loading DTB
-
----
- arch/mips/bcm63xx/boards/Kconfig | 4 ++++
- arch/mips/bcm63xx/boards/board_common.c | 34 +++++++++++++++++++++++++++++++++
- 2 files changed, 38 insertions(+)
-
---- a/arch/mips/bcm63xx/boards/Kconfig
-+++ b/arch/mips/bcm63xx/boards/Kconfig
-@@ -1,6 +1,10 @@
- menu "Board support"
- depends on BCM63XX
-
-+config BOARD_BCM63XX_DT
-+ bool "Device Tree boards (experimential)"
-+ select USE_OF
-+
- config BOARD_BCM963XX
- bool "Generic Broadcom 963xx boards"
- select SSB
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -10,6 +10,8 @@
- #include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
-+#include <linux/of_fdt.h>
-+#include <linux/of_platform.h>
- #include <linux/platform_device.h>
- #include <linux/ssb/ssb.h>
- #include <linux/gpio_keys.h>
-@@ -17,6 +19,7 @@
- #include <asm/addrspace.h>
- #include <asm/bootinfo.h>
- #include <asm/fw/cfe/cfe_api.h>
-+#include <asm/prom.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
- #include <bcm63xx_dev_uart.h>
-@@ -129,8 +132,23 @@ void __init board_setup(void)
- /* make sure we're running on expected cpu */
- if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
- panic("unexpected CPU for bcm963xx board");
-+
-+#if CONFIG_OF
-+ if (initial_boot_params)
-+ __dt_setup_arch(initial_boot_params);
-+#endif
- }
-
-+#if CONFIG_OF
-+void __init device_tree_init(void)
-+{
-+ if (!initial_boot_params)
-+ return;
-+
-+ unflatten_and_copy_device_tree();
-+}
-+#endif
-+
- static struct gpio_led_platform_data bcm63xx_led_data;
-
- static struct platform_device bcm63xx_gpio_leds = {
-@@ -149,6 +167,13 @@ static struct platform_device bcm63xx_gp
- .dev.platform_data = &bcm63xx_gpio_keys_data,
- };
-
-+#if CONFIG_OF
-+static struct of_device_id of_ids[] = {
-+ { /* filled at runtime */ },
-+ { .compatible = "simple-bus" },
-+ { },
-+};
-+#endif
- /*
- * third stage init callback, register all board devices.
- */
-@@ -158,6 +183,15 @@ int __init board_register_devices(void)
- int led_count = 0;
- int usbh_ports = 0;
-
-+#if CONFIG_OF
-+ if (of_have_populated_dt()) {
-+ snprintf(of_ids[0].compatible, sizeof(of_ids[0].compatible),
-+ "brcm,bcm%x", bcm63xx_get_cpu_id());
-+
-+ of_platform_populate(NULL, of_ids, NULL, NULL);
-+ }
-+#endif
-+
- if (board.has_uart0)
- bcm63xx_uart_register(0);
-
diff --git a/target/linux/brcm63xx/patches-3.14/368-MIPS-BCM63XX-expand-board_info-with-an-of-compatible.patch b/target/linux/brcm63xx/patches-3.14/368-MIPS-BCM63XX-expand-board_info-with-an-of-compatible.patch
deleted file mode 100644
index c89873d..0000000
--- a/target/linux/brcm63xx/patches-3.14/368-MIPS-BCM63XX-expand-board_info-with-an-of-compatible.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From e8c11c43a9eb8171d150850c498bc75205681ab8 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 26 Jun 2014 12:49:33 +0200
-Subject: [PATCH 46/48] MIPS: BCM63XX: expand board_info with an of compatible
- string
-
-It will be used for matching board_info structs to a passed dtb until
-bcm63xx is fully converted.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -21,6 +21,7 @@
- */
- struct board_info {
- u8 name[16];
-+ u8 of_board_id[32];
- unsigned int expected_cpu_id;
-
- /* enabled feature/device */
diff --git a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch b/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch
deleted file mode 100644
index 190f77a..0000000
--- a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-add-support-for-matching-the-board_info.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From b9bc4eb19007fd35b57a10c4dfd442dd518ee345 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Thu, 26 Jun 2014 12:51:00 +0200
-Subject: [PATCH 47/48] MIPS: BCM63XX: add support for matching the board_info
- by dtb
-
-Allow using the passed dtb's compatible property to match board_info
-structs instead of nvram's boardname field, which is not unique anyway.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 4 ++--
- arch/mips/bcm63xx/boards/board_common.c | 13 +++++++++++++
- arch/mips/bcm63xx/boards/board_common.h | 3 +++
- 3 files changed, 18 insertions(+), 2 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -785,9 +785,9 @@ void __init board_bcm963xx_init(void)
- } else {
- board_name = bcm63xx_nvram_get_name();
- }
-- /* find board by name */
-+ /* find board by name/compat */
- for (i = 0; i < ARRAY_SIZE(bcm963xx_boards); i++) {
-- if (strncmp(board_name, bcm963xx_boards[i]->name, 16))
-+ if (!board_is_compatible(bcm963xx_boards[i], board_name))
- continue;
- /* copy, board desc array is marked initdata */
- board_early_setup(bcm963xx_boards[i],
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -281,3 +281,16 @@ int __init board_register_devices(void)
-
- return 0;
- }
-+
-+int __init board_is_compatible(const struct board_info *board,
-+ const char *board_name)
-+{
-+#ifdef CONFIG_OF
-+ if (initial_boot_params) {
-+ unsigned long dt_root = of_get_flat_dt_root();
-+
-+ return of_flat_dt_is_compatible(dt_root, board->of_board_id);
-+ }
-+#endif
-+ return !strncmp(board_name, board->name, 16);
-+}
---- a/arch/mips/bcm63xx/boards/board_common.h
-+++ b/arch/mips/bcm63xx/boards/board_common.h
-@@ -6,6 +6,9 @@
- void board_early_setup(const struct board_info *board,
- int (*get_mac_address)(u8 mac[ETH_ALEN]));
-
-+int board_is_compatible(const struct board_info *board,
-+ const char *board_name);
-+
- #if defined(CONFIG_BOARD_BCM963XX)
- void board_bcm963xx_init(void);
- #else
diff --git a/target/linux/brcm63xx/patches-3.14/370-bcm63xx-add-of_board_ids-for-all-supported-boards.patch b/target/linux/brcm63xx/patches-3.14/370-bcm63xx-add-of_board_ids-for-all-supported-boards.patch
deleted file mode 100644
index 004f526..0000000
--- a/target/linux/brcm63xx/patches-3.14/370-bcm63xx-add-of_board_ids-for-all-supported-boards.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From 020faee6d3cef9b3cdda257a255c4007a4b38720 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Tue, 8 Jul 2014 16:17:32 +0200
-Subject: [PATCH 48/48] MIPS: BCM63XX: add of_board_ids for all supported boards
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -37,6 +37,7 @@
- #ifdef CONFIG_BCM63XX_CPU_3368
- static struct board_info __initdata board_cvg834g = {
- .name = "CVG834G_E15R3921",
-+ .of_board_id = "netgear,cvg834g",
- .expected_cpu_id = 0x3368,
-
- .has_uart0 = 1,
-@@ -69,6 +70,7 @@ static struct board_info __initdata boar
- #ifdef CONFIG_BCM63XX_CPU_6328
- static struct board_info __initdata board_96328avng = {
- .name = "96328avng",
-+ .of_board_id = "brcm,bcm96328avng",
- .expected_cpu_id = 0x6328,
-
- .has_uart0 = 1,
-@@ -118,6 +120,7 @@ static struct board_info __initdata boar
- #ifdef CONFIG_BCM63XX_CPU_6338
- static struct board_info __initdata board_96338gw = {
- .name = "96338GW",
-+ .of_board_id = "brcm,bcm96338gw",
- .expected_cpu_id = 0x6338,
-
- .has_uart0 = 1,
-@@ -161,6 +164,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_96338w = {
- .name = "96338W",
-+ .of_board_id = "brcm,96338w",
- .expected_cpu_id = 0x6338,
-
- .has_uart0 = 1,
-@@ -207,6 +211,7 @@ static struct board_info __initdata boar
- #ifdef CONFIG_BCM63XX_CPU_6345
- static struct board_info __initdata board_96345gw2 = {
- .name = "96345GW2",
-+ .of_board_id = "brcm,bcm96345gw2",
- .expected_cpu_id = 0x6345,
-
- .has_uart0 = 1,
-@@ -219,6 +224,7 @@ static struct board_info __initdata boar
- #ifdef CONFIG_BCM63XX_CPU_6348
- static struct board_info __initdata board_96348r = {
- .name = "96348R",
-+ .of_board_id = "brcm,bcm96348r",
- .expected_cpu_id = 0x6348,
-
- .has_uart0 = 1,
-@@ -264,6 +270,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_96348gw_10 = {
- .name = "96348GW-10",
-+ .of_board_id = "brcm,bcm96348gw-10",
- .expected_cpu_id = 0x6348,
-
- .has_uart0 = 1,
-@@ -325,6 +332,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_96348gw_11 = {
- .name = "96348GW-11",
-+ .of_board_id = "brcm,bcm96348gw-11",
- .expected_cpu_id = 0x6348,
-
- .has_uart0 = 1,
-@@ -390,6 +398,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_96348gw = {
- .name = "96348GW",
-+ .of_board_id = "brcm,bcm96348gw",
- .expected_cpu_id = 0x6348,
-
- .has_uart0 = 1,
-@@ -459,6 +468,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_FAST2404 = {
- .name = "F@ST2404",
-+ .of_board_id = "sagem,f@st2404",
- .expected_cpu_id = 0x6348,
-
- .has_uart0 = 1,
-@@ -484,6 +494,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_rta1025w_16 = {
- .name = "RTA1025W_16",
-+ .of_board_id = "dynalink,rta1025w",
- .expected_cpu_id = 0x6348,
-
- .has_enet0 = 1,
-@@ -504,6 +515,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_DV201AMR = {
- .name = "DV201AMR",
-+ .of_board_id = "davolink,dv-201amr",
- .expected_cpu_id = 0x6348,
-
- .has_uart0 = 1,
-@@ -525,6 +537,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_96348gw_a = {
- .name = "96348GW-A",
-+ .of_board_id = "brcm,bcm96348gw-a",
- .expected_cpu_id = 0x6348,
-
- .has_uart0 = 1,
-@@ -552,6 +565,7 @@ static struct board_info __initdata boar
- #ifdef CONFIG_BCM63XX_CPU_6358
- static struct board_info __initdata board_96358vw = {
- .name = "96358VW",
-+ .of_board_id = "brcm,bcm96358vw",
- .expected_cpu_id = 0x6358,
-
- .has_uart0 = 1,
-@@ -605,6 +619,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_96358vw2 = {
- .name = "96358VW2",
-+ .of_board_id = "brcm,bcm96358vw2",
- .expected_cpu_id = 0x6358,
-
- .has_uart0 = 1,
-@@ -655,6 +670,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_AGPFS0 = {
- .name = "AGPF-S0",
-+ .of_board_id = "pirelli,agpf-s0",
- .expected_cpu_id = 0x6358,
-
- .has_uart0 = 1,
-@@ -678,6 +694,7 @@ static struct board_info __initdata boar
-
- static struct board_info __initdata board_DWVS0 = {
- .name = "DWV-S0",
-+ .of_board_id = "pirelli,a226g",
- .expected_cpu_id = 0x6358,
-
- .has_enet0 = 1,
diff --git a/target/linux/brcm63xx/patches-3.14/371_add_of_node_available_by_alias.patch b/target/linux/brcm63xx/patches-3.14/371_add_of_node_available_by_alias.patch
deleted file mode 100644
index 99d778d..0000000
--- a/target/linux/brcm63xx/patches-3.14/371_add_of_node_available_by_alias.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -147,6 +147,18 @@ void __init device_tree_init(void)
-
- unflatten_and_copy_device_tree();
- }
-+
-+int board_of_device_present(const char *alias)
-+{
-+ bool present;
-+ struct device_node *np;
-+
-+ np = of_find_node_by_path(alias);
-+ present = of_device_is_available(np);
-+ of_node_put(np);
-+
-+ return present;
-+}
- #endif
-
- static struct gpio_led_platform_data bcm63xx_led_data;
---- a/arch/mips/bcm63xx/boards/board_common.h
-+++ b/arch/mips/bcm63xx/boards/board_common.h
-@@ -15,4 +15,13 @@ void board_bcm963xx_init(void);
- static inline void board_bcm963xx_init(void) { }
- #endif
-
-+#if defined(CONFIG_OF)
-+int board_of_device_present(const char *alias);
-+#else
-+static inline void board_of_device_present(const char *alias)
-+{
-+ return 0;
-+}
-+#endif
-+
- #endif /* __BOARD_COMMON_H */
diff --git a/target/linux/brcm63xx/patches-3.14/372_dont_register_pflash_when_available_in_dtb.patch b/target/linux/brcm63xx/patches-3.14/372_dont_register_pflash_when_available_in_dtb.patch
deleted file mode 100644
index 88efc23..0000000
--- a/target/linux/brcm63xx/patches-3.14/372_dont_register_pflash_when_available_in_dtb.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -22,6 +22,8 @@
- #include <bcm63xx_regs.h>
- #include <bcm63xx_io.h>
-
-+#include "boards/board_common.h"
-+
- static int flash_type;
-
- static struct mtd_partition mtd_partitions[] = {
-@@ -164,6 +166,9 @@ int __init bcm63xx_flash_register(void)
-
- switch (flash_type) {
- case BCM63XX_FLASH_TYPE_PARALLEL:
-+ /* don't register when already registered through from dtb */
-+ if (board_of_device_present("pflash"))
-+ return 0;
-
- if (!mtd_resources[0].start) {
- /* read base address of boot chip select (0) */
diff --git a/target/linux/brcm63xx/patches-3.14/400-bcm963xx_flashmap.patch b/target/linux/brcm63xx/patches-3.14/400-bcm963xx_flashmap.patch
deleted file mode 100644
index 03534c0..0000000
--- a/target/linux/brcm63xx/patches-3.14/400-bcm963xx_flashmap.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From a4d005c91d403d9f3d0272db6cc46202c06ec774 Mon Sep 17 00:00:00 2001
-From: Axel Gembe <ago@bastart.eu.org>
-Date: Mon, 12 May 2008 18:54:09 +0200
-Subject: [PATCH] bcm963xx: flashmap support
-
-Signed-off-by: Axel Gembe <ago@bastart.eu.org>
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 19 +----------------
- drivers/mtd/maps/bcm963xx-flash.c | 32 ++++++++++++++++++++++++----
- drivers/mtd/redboot.c | 13 +++++++++--
- 3 files changed, 38 insertions(+), 26 deletions(-)
-
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -34,7 +34,7 @@ static struct mtd_partition mtd_partitio
- }
- };
-
--static const char *bcm63xx_part_types[] = { "bcm63xxpart", NULL };
-+static const char *bcm63xx_part_types[] = { "bcm63xxpart", "RedBoot", NULL };
-
- static struct physmap_flash_data flash_data = {
- .width = 2,
---- a/drivers/mtd/redboot.c
-+++ b/drivers/mtd/redboot.c
-@@ -72,6 +72,7 @@ static int parse_redboot_partitions(stru
- int nulllen = 0;
- int numslots;
- unsigned long offset;
-+ unsigned long fis_origin = 0;
- #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
- static char nullstring[] = "unallocated";
- #endif
-@@ -176,6 +177,16 @@ static int parse_redboot_partitions(stru
- goto out;
- }
-
-+ if (data && data->origin) {
-+ fis_origin = data->origin;
-+ } else {
-+ for (i = 0; i < numslots; i++) {
-+ if (!strncmp(buf[i].name, "RedBoot", 8)) {
-+ fis_origin = (buf[i].flash_base & (master->size << 1) - 1);
-+ }
-+ }
-+ }
-+
- for (i = 0; i < numslots; i++) {
- struct fis_list *new_fl, **prev;
-
-@@ -196,10 +207,10 @@ static int parse_redboot_partitions(stru
- goto out;
- }
- new_fl->img = &buf[i];
-- if (data && data->origin)
-- buf[i].flash_base -= data->origin;
-- else
-- buf[i].flash_base &= master->size-1;
-+ if (fis_origin)
-+ buf[i].flash_base -= fis_origin;
-+
-+ buf[i].flash_base &= (master->size << 1) - 1;
-
- /* I'm sure the JFFS2 code has done me permanent damage.
- * I now think the following is _normal_
diff --git a/target/linux/brcm63xx/patches-3.14/401-bcm963xx_real_rootfs_length.patch b/target/linux/brcm63xx/patches-3.14/401-bcm963xx_real_rootfs_length.patch
deleted file mode 100644
index caf8b95..0000000
--- a/target/linux/brcm63xx/patches-3.14/401-bcm963xx_real_rootfs_length.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/include/uapi/linux/bcm963xx_tag.h
-+++ b/include/uapi/linux/bcm963xx_tag.h
-@@ -85,8 +85,10 @@ struct bcm_tag {
- __u32 rootfs_crc;
- /* 224-227: CRC32 of kernel partition */
- __u32 kernel_crc;
-- /* 228-235: Unused at present */
-- char reserved1[8];
-+ /* 228-231: Image sequence number */
-+ char image_sequence[4];
-+ /* 222-235: Openwrt: real rootfs length */
-+ __u32 real_rootfs_length;
- /* 236-239: CRC32 of header excluding last 20 bytes */
- __u32 header_crc;
- /* 240-255: Unused at present */
---- a/drivers/mtd/bcm63xxpart.c
-+++ b/drivers/mtd/bcm63xxpart.c
-@@ -110,7 +110,8 @@ static int bcm63xx_parse_cfe_partitions(
- } else {
- /* OpenWrt layout */
- rootfsaddr = kerneladdr + kernellen;
-- rootfslen = spareaddr - rootfsaddr;
-+ rootfslen = buf->real_rootfs_length;
-+ spareaddr = rootfsaddr + rootfslen;
- }
- } else {
- pr_warn("CFE boot tag CRC invalid (expected %08x, actual %08x)\n",
diff --git a/target/linux/brcm63xx/patches-3.14/402_bcm63xx_enet_vlan_incoming_fixed.patch b/target/linux/brcm63xx/patches-3.14/402_bcm63xx_enet_vlan_incoming_fixed.patch
deleted file mode 100644
index fc2e8ab..0000000
--- a/target/linux/brcm63xx/patches-3.14/402_bcm63xx_enet_vlan_incoming_fixed.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -1633,7 +1633,7 @@ static int compute_hw_mtu(struct bcm_ene
- actual_mtu = mtu;
-
- /* add ethernet header + vlan tag size */
-- actual_mtu += VLAN_ETH_HLEN;
-+ actual_mtu += VLAN_ETH_HLEN + VLAN_HLEN;
-
- if (actual_mtu < 64 || actual_mtu > BCMENET_MAX_MTU)
- return -EINVAL;
diff --git a/target/linux/brcm63xx/patches-3.14/403-6358-enet1-external-mii-clk.patch b/target/linux/brcm63xx/patches-3.14/403-6358-enet1-external-mii-clk.patch
deleted file mode 100644
index f3484b6..0000000
--- a/target/linux/brcm63xx/patches-3.14/403-6358-enet1-external-mii-clk.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -104,6 +104,8 @@ void __init board_early_setup(const stru
- if (BCMCPU_IS_6348())
- val |= GPIO_MODE_6348_G3_EXT_MII |
- GPIO_MODE_6348_G0_EXT_MII;
-+ else if (BCMCPU_IS_6358())
-+ val |= GPIO_MODE_6358_ENET1_MII_CLK_INV;
- }
-
- bcm_gpio_writel(val, GPIO_MODE_REG);
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -650,6 +650,8 @@
- #define GPIO_MODE_6358_EXTRA_SPI_SS (1 << 7)
- #define GPIO_MODE_6358_SERIAL_LED (1 << 10)
- #define GPIO_MODE_6358_UTOPIA (1 << 12)
-+#define GPIO_MODE_6358_ENET1_MII_CLK_INV (1 << 30)
-+#define GPIO_MODE_6358_ENET0_MII_CLK_INV (1 << 31)
-
- #define GPIO_MODE_6368_ANALOG_AFE_0 (1 << 0)
- #define GPIO_MODE_6368_ANALOG_AFE_1 (1 << 1)
diff --git a/target/linux/brcm63xx/patches-3.14/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch b/target/linux/brcm63xx/patches-3.14/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch
deleted file mode 100644
index d8405f5..0000000
--- a/target/linux/brcm63xx/patches-3.14/404-NET-bcm63xx_enet-move-phy_-dis-connect-into-probe-re.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From b11218c750ab92cfab4408a0328f1b36ceec3f33 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Fri, 6 Jan 2012 12:24:18 +0100
-Subject: [PATCH 19/63] NET: bcm63xx_enet: move phy_(dis)connect into probe/remove
-
-Only connect/disconnect the phy during probe and remove, not during any
-open/close. The phy seldom changes during the runtime, and disconnecting
-the phy during close will prevent it from keeping any configuration over
-a down/up cycle.
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 84 +++++++++++++-------------
- 1 files changed, 41 insertions(+), 43 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -870,10 +870,8 @@ static int bcm_enet_open(struct net_devi
- struct bcm_enet_priv *priv;
- struct sockaddr addr;
- struct device *kdev;
-- struct phy_device *phydev;
- int i, ret;
- unsigned int size;
-- char phy_id[MII_BUS_ID_SIZE + 3];
- void *p;
- u32 val;
-
-@@ -881,40 +879,10 @@ static int bcm_enet_open(struct net_devi
- kdev = &priv->pdev->dev;
-
- if (priv->has_phy) {
-- /* connect to PHY */
-- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT,
-- priv->mii_bus->id, priv->phy_id);
--
-- phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link,
-- PHY_INTERFACE_MODE_MII);
--
-- if (IS_ERR(phydev)) {
-- dev_err(kdev, "could not attach to PHY\n");
-- return PTR_ERR(phydev);
-- }
--
-- /* mask with MAC supported features */
-- phydev->supported &= (SUPPORTED_10baseT_Half |
-- SUPPORTED_10baseT_Full |
-- SUPPORTED_100baseT_Half |
-- SUPPORTED_100baseT_Full |
-- SUPPORTED_Autoneg |
-- SUPPORTED_Pause |
-- SUPPORTED_MII);
-- phydev->advertising = phydev->supported;
--
-- if (priv->pause_auto && priv->pause_rx && priv->pause_tx)
-- phydev->advertising |= SUPPORTED_Pause;
-- else
-- phydev->advertising &= ~SUPPORTED_Pause;
--
-- dev_info(kdev, "attached PHY at address %d [%s]\n",
-- phydev->addr, phydev->drv->name);
--
-+ /* Reset state */
- priv->old_link = 0;
- priv->old_duplex = -1;
- priv->old_pause = -1;
-- priv->phydev = phydev;
- }
-
- /* mask all interrupts and request them */
-@@ -924,7 +892,7 @@ static int bcm_enet_open(struct net_devi
-
- ret = request_irq(dev->irq, bcm_enet_isr_mac, 0, dev->name, dev);
- if (ret)
-- goto out_phy_disconnect;
-+ return ret;
-
- ret = request_irq(priv->irq_rx, bcm_enet_isr_dma, 0,
- dev->name, dev);
-@@ -1127,9 +1095,6 @@ out_freeirq_rx:
- out_freeirq:
- free_irq(dev->irq, dev);
-
--out_phy_disconnect:
-- phy_disconnect(priv->phydev);
--
- return ret;
- }
-
-@@ -1234,12 +1199,6 @@ static int bcm_enet_stop(struct net_devi
- free_irq(priv->irq_rx, dev);
- free_irq(dev->irq, dev);
-
-- /* release phy */
-- if (priv->has_phy) {
-- phy_disconnect(priv->phydev);
-- priv->phydev = NULL;
-- }
--
- return 0;
- }
-
-@@ -1834,6 +1793,8 @@ static int bcm_enet_probe(struct platfor
-
- /* MII bus registration */
- if (priv->has_phy) {
-+ struct phy_device *phydev;
-+ char phy_id[MII_BUS_ID_SIZE + 3];
-
- priv->mii_bus = mdiobus_alloc();
- if (!priv->mii_bus) {
-@@ -1871,6 +1832,38 @@ static int bcm_enet_probe(struct platfor
- dev_err(&pdev->dev, "unable to register mdio bus\n");
- goto out_free_mdio;
- }
-+
-+ /* connect to PHY */
-+ snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT,
-+ priv->mii_bus->id, priv->phy_id);
-+
-+ phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link,
-+ PHY_INTERFACE_MODE_MII);
-+
-+ if (IS_ERR(phydev)) {
-+ dev_err(&pdev->dev, "could not attach to PHY\n");
-+ goto out_unregister_mdio;
-+ }
-+
-+ /* mask with MAC supported features */
-+ phydev->supported &= (SUPPORTED_10baseT_Half |
-+ SUPPORTED_10baseT_Full |
-+ SUPPORTED_100baseT_Half |
-+ SUPPORTED_100baseT_Full |
-+ SUPPORTED_Autoneg |
-+ SUPPORTED_Pause |
-+ SUPPORTED_MII);
-+ phydev->advertising = phydev->supported;
-+
-+ if (priv->pause_auto && priv->pause_rx && priv->pause_tx)
-+ phydev->advertising |= SUPPORTED_Pause;
-+ else
-+ phydev->advertising &= ~SUPPORTED_Pause;
-+
-+ dev_info(&pdev->dev, "attached PHY at address %d [%s]\n",
-+ phydev->addr, phydev->drv->name);
-+
-+ priv->phydev = phydev;
- } else {
-
- /* run platform code to initialize PHY device */
-@@ -1916,6 +1909,9 @@ static int bcm_enet_probe(struct platfor
- return 0;
-
- out_unregister_mdio:
-+ if (priv->phydev)
-+ phy_disconnect(priv->phydev);
-+
- if (priv->mii_bus)
- mdiobus_unregister(priv->mii_bus);
-
-@@ -1957,6 +1953,8 @@ static int bcm_enet_remove(struct platfo
- enet_writel(priv, 0, ENET_MIISC_REG);
-
- if (priv->has_phy) {
-+ phy_disconnect(priv->phydev);
-+ priv->phydev = NULL;
- mdiobus_unregister(priv->mii_bus);
- mdiobus_free(priv->mii_bus);
- } else {
diff --git a/target/linux/brcm63xx/patches-3.14/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch b/target/linux/brcm63xx/patches-3.14/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch
deleted file mode 100644
index 52c75a8..0000000
--- a/target/linux/brcm63xx/patches-3.14/408-bcm63xx_enet-enable-rgmii-clock-on-external-ports.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From d8237d704fc25eb2fc25ef4403608b78c6a6d4be Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Sun, 15 Jul 2012 20:08:57 +0200
-Subject: [PATCH 54/81] bcm63xx_enet: enable rgmii clock on external ports
-
----
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 13 +++++++++++++
- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 12 ++++++++++++
- 2 files changed, 25 insertions(+), 0 deletions(-)
-
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -966,6 +966,19 @@
- #define ENETSW_PORTOV_FDX_MASK (1 << 1)
- #define ENETSW_PORTOV_LINKUP_MASK (1 << 0)
-
-+/* Port RGMII control register */
-+#define ENETSW_RGMII_CTRL_REG(x) (0x60 + (x))
-+#define ENETSW_RGMII_CTRL_GMII_CLK_EN (1 << 7)
-+#define ENETSW_RGMII_CTRL_MII_OVERRIDE_EN (1 << 6)
-+#define ENETSW_RGMII_CTRL_MII_MODE_MASK (3 << 4)
-+#define ENETSW_RGMII_CTRL_RGMII_MODE (0 << 4)
-+#define ENETSW_RGMII_CTRL_MII_MODE (1 << 4)
-+#define ENETSW_RGMII_CTRL_RVMII_MODE (2 << 4)
-+#define ENETSW_RGMII_CTRL_TIMING_SEL_EN (1 << 0)
-+
-+/* Port RGMII timing register */
-+#define ENETSW_RGMII_TIMING_REG(x) (0x68 + (x))
-+
- /* MDIO control register */
- #define ENETSW_MDIOC_REG (0xb0)
- #define ENETSW_MDIOC_EXT_MASK (1 << 16)
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -2228,6 +2228,18 @@ static int bcm_enetsw_open(struct net_de
- priv->sw_port_link[i] = 0;
- }
-
-+ /* enable external ports */
-+ for (i = ENETSW_RGMII_PORT0; i < priv->num_ports; i++) {
-+ u8 rgmii_ctrl;
-+
-+ if (!priv->used_ports[i].used)
-+ continue;
-+
-+ rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i));
-+ rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN;
-+ enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i));
-+ }
-+
- /* reset mib */
- val = enetsw_readb(priv, ENETSW_GMCR_REG);
- val |= ENETSW_GMCR_RST_MIB_MASK;
diff --git a/target/linux/brcm63xx/patches-3.14/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch b/target/linux/brcm63xx/patches-3.14/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
deleted file mode 100644
index 5fe2078..0000000
--- a/target/linux/brcm63xx/patches-3.14/411-MIPS-BCM63XX-Register-SPI-flash-if-present.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From d135d94b3d1fe599d13e7198d5f502912d694c13 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Sun, 3 Jul 2011 15:00:38 +0200
-Subject: [PATCH 29/60] MIPS: BCM63XX: Register SPI flash if present
-
-Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
----
- arch/mips/bcm63xx/dev-flash.c | 33 +++++++++++++++++++-
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h | 2 +
- 2 files changed, 33 insertions(+), 2 deletions(-)
-
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -16,9 +16,12 @@
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
- #include <linux/mtd/physmap.h>
-+#include <linux/spi/spi.h>
-+#include <linux/spi/flash.h>
-
- #include <bcm63xx_cpu.h>
- #include <bcm63xx_dev_flash.h>
-+#include <bcm63xx_dev_hsspi.h>
- #include <bcm63xx_regs.h>
- #include <bcm63xx_io.h>
-
-@@ -65,6 +68,21 @@ void __init bcm63xx_flash_force_phys_bas
- mtd_resources[0].end = end;
- }
-
-+static struct flash_platform_data bcm63xx_flash_data = {
-+ .part_probe_types = bcm63xx_part_types,
-+};
-+
-+static struct spi_board_info bcm63xx_spi_flash_info[] = {
-+ {
-+ .bus_num = 0,
-+ .chip_select = 0,
-+ .mode = 0,
-+ .max_speed_hz = 781000,
-+ .modalias = "m25p80",
-+ .platform_data = &bcm63xx_flash_data,
-+ },
-+};
-+
- static int __init bcm63xx_detect_flash_type(void)
- {
- u32 val;
-@@ -72,9 +90,15 @@ static int __init bcm63xx_detect_flash_t
- switch (bcm63xx_get_cpu_id()) {
- case BCM6318_CPU_ID:
- /* only support serial flash */
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 62500000;
- return BCM63XX_FLASH_TYPE_SERIAL;
- case BCM6328_CPU_ID:
- val = bcm_misc_readl(MISC_STRAPBUS_6328_REG);
-+ if (val & STRAPBUS_6328_HSSPI_CLK_FAST)
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 33333334;
-+ else
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 16666667;
-+
- if (val & STRAPBUS_6328_BOOT_SEL_SERIAL)
- return BCM63XX_FLASH_TYPE_SERIAL;
- else
-@@ -93,12 +117,20 @@ static int __init bcm63xx_detect_flash_t
- return BCM63XX_FLASH_TYPE_SERIAL;
- case BCM6362_CPU_ID:
- val = bcm_misc_readl(MISC_STRAPBUS_6362_REG);
-+ if (val & STRAPBUS_6362_HSSPI_CLK_FAST)
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 50000000;
-+ else
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000;
-+
- if (val & STRAPBUS_6362_BOOT_SEL_SERIAL)
- return BCM63XX_FLASH_TYPE_SERIAL;
- else
- return BCM63XX_FLASH_TYPE_NAND;
- case BCM6368_CPU_ID:
- val = bcm_gpio_readl(GPIO_STRAPBUS_REG);
-+ if (val & STRAPBUS_6368_SPI_CLK_FAST)
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000;
-+
- switch (val & STRAPBUS_6368_BOOT_SEL_MASK) {
- case STRAPBUS_6368_BOOT_SEL_NAND:
- return BCM63XX_FLASH_TYPE_NAND;
-@@ -109,6 +141,11 @@ static int __init bcm63xx_detect_flash_t
- }
- case BCM63268_CPU_ID:
- val = bcm_misc_readl(MISC_STRAPBUS_63268_REG);
-+ if (val & STRAPBUS_63268_HSSPI_CLK_FAST)
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 50000000;
-+ else
-+ bcm63xx_spi_flash_info[0].max_speed_hz = 20000000;
-+
- if (val & STRAPBUS_63268_BOOT_SEL_SERIAL)
- return BCM63XX_FLASH_TYPE_SERIAL;
- else
-@@ -181,8 +218,15 @@ int __init bcm63xx_flash_register(void)
-
- return platform_device_register(&mtd_dev);
- case BCM63XX_FLASH_TYPE_SERIAL:
-- pr_warn("unsupported serial flash detected\n");
-- return -ENODEV;
-+ if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6362() ||
-+ BCMCPU_IS_63268())
-+ bcm63xx_spi_flash_info[0].bus_num = 1;
-+
-+ if (BCMCPU_IS_6358() || BCMCPU_IS_6368())
-+ bcm63xx_flash_data.max_transfer_len = SPI_6358_MSG_DATA_SIZE;
-+
-+ return spi_register_board_info(bcm63xx_spi_flash_info,
-+ ARRAY_SIZE(bcm63xx_spi_flash_info));
- case BCM63XX_FLASH_TYPE_NAND:
- pr_warn("unsupported NAND flash detected\n");
- return -ENODEV;
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_regs.h
-@@ -707,6 +707,7 @@
- #define GPIO_STRAPBUS_REG 0x40
- #define STRAPBUS_6358_BOOT_SEL_PARALLEL (1 << 1)
- #define STRAPBUS_6358_BOOT_SEL_SERIAL (0 << 1)
-+#define STRAPBUS_6368_SPI_CLK_FAST (1 << 6)
- #define STRAPBUS_6368_BOOT_SEL_MASK 0x3
- #define STRAPBUS_6368_BOOT_SEL_NAND 0
- #define STRAPBUS_6368_BOOT_SEL_SERIAL 1
-@@ -1577,6 +1578,7 @@
- #define IDDQ_CTRL_63268_USBH (1 << 4)
-
- #define MISC_STRAPBUS_6328_REG 0x240
-+#define STRAPBUS_6328_HSSPI_CLK_FAST (1 << 4)
- #define STRAPBUS_6328_FCVO_SHIFT 7
- #define STRAPBUS_6328_FCVO_MASK (0x1f << STRAPBUS_6328_FCVO_SHIFT)
- #define STRAPBUS_6328_BOOT_SEL_SERIAL (1 << 28)
diff --git a/target/linux/brcm63xx/patches-3.14/412-MTD-physmap-allow-passing-pp_data.patch b/target/linux/brcm63xx/patches-3.14/412-MTD-physmap-allow-passing-pp_data.patch
deleted file mode 100644
index 3511120..0000000
--- a/target/linux/brcm63xx/patches-3.14/412-MTD-physmap-allow-passing-pp_data.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 266c506f4b262bd6aba0776a03d82c98e65d9906 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Tue, 1 May 2012 17:32:36 +0200
-Subject: [PATCH 63/79] MTD: physmap: allow passing pp_data
-
----
- drivers/mtd/maps/physmap.c | 4 +++-
- include/linux/mtd/physmap.h | 1 +
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/maps/physmap.c
-+++ b/drivers/mtd/maps/physmap.c
-@@ -96,6 +96,7 @@ static int physmap_flash_probe(struct pl
- {
- struct physmap_flash_data *physmap_data;
- struct physmap_flash_info *info;
-+ struct mtd_part_parser_data *pp_data;
- const char * const *probe_type;
- const char * const *part_types;
- int err = 0;
-@@ -187,8 +188,9 @@ static int physmap_flash_probe(struct pl
- spin_lock_init(&info->vpp_lock);
-
- part_types = physmap_data->part_probe_types ? : part_probe_types;
-+ pp_data = physmap_data->pp_data ? physmap_data->pp_data : NULL;
-
-- mtd_device_parse_register(info->cmtd, part_types, NULL,
-+ mtd_device_parse_register(info->cmtd, part_types, pp_data,
- physmap_data->parts, physmap_data->nr_parts);
- return 0;
-
---- a/include/linux/mtd/physmap.h
-+++ b/include/linux/mtd/physmap.h
-@@ -31,6 +31,7 @@ struct physmap_flash_data {
- char *probe_type;
- struct mtd_partition *parts;
- const char * const *part_probe_types;
-+ struct mtd_part_parser_data *pp_data;
- };
-
- #endif /* __LINUX_MTD_PHYSMAP__ */
diff --git a/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
deleted file mode 100644
index 320c297..0000000
--- a/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 8879e209111192c5e9752d7bd203cf7582693328 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Thu, 3 May 2012 14:40:03 +0200
-Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 9 ++++++++-
- arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 10 ++++++++++
- 2 files changed, 18 insertions(+), 1 deletion(-)
-
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -36,6 +36,7 @@
- #include <bcm63xx_dev_usb_ohci.h>
- #include <bcm63xx_dev_usb_usbd.h>
- #include <board_bcm963xx.h>
-+#include <pci_ath9k_fixup.h>
-
- #include "board_common.h"
-
-@@ -196,6 +197,7 @@ int __init board_register_devices(void)
- int button_count = 0;
- int led_count = 0;
- int usbh_ports = 0;
-+ int i;
-
- #if CONFIG_OF
- if (of_have_populated_dt()) {
-@@ -293,6 +295,10 @@ int __init board_register_devices(void)
- platform_device_register(&bcm63xx_gpio_keys_device);
- }
-
-+ /* register any fixups */
-+ for (i = 0; i < board.has_caldata; i++)
-+ pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset);
-+
- return 0;
- }
-
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -9,6 +9,7 @@
- #include <bcm63xx_dev_usb_usbd.h>
- #include <bcm63xx_dev_dsp.h>
- #include <bcm63xx_fallback_sprom.h>
-+#include <pci_ath9k_fixup.h>
-
- /*
- * flash mapping
-@@ -16,6 +17,11 @@
- #define BCM963XX_CFE_VERSION_OFFSET 0x570
- #define BCM963XX_NVRAM_OFFSET 0x580
-
-+struct ath9k_caldata {
-+ unsigned int slot;
-+ u32 caldata_offset;
-+};
-+
- /*
- * board definition
- */
-@@ -37,6 +43,10 @@ struct board_info {
- unsigned int has_uart0:1;
- unsigned int has_uart1:1;
- unsigned int use_fallback_sprom:1;
-+ unsigned int has_caldata:2;
-+
-+ /* wifi calibration data config */
-+ struct ath9k_caldata caldata[2];
-
- /* ethernet config */
- struct bcm63xx_enet_platform_data enet0;
diff --git a/target/linux/brcm63xx/patches-3.14/414-MTD-m25p80-allow-passing-pp_data.patch b/target/linux/brcm63xx/patches-3.14/414-MTD-m25p80-allow-passing-pp_data.patch
deleted file mode 100644
index 01a86f3..0000000
--- a/target/linux/brcm63xx/patches-3.14/414-MTD-m25p80-allow-passing-pp_data.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 7f17dfe9009beb07a3de0e380932a725293829df Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Tue, 1 May 2012 17:33:03 +0200
-Subject: [PATCH 64/79] MTD: m25p80: allow passing pp_data
-
----
- drivers/mtd/devices/m25p80.c | 3 +++
- include/linux/spi/flash.h | 2 ++
- 2 files changed, 5 insertions(+)
-
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -1150,6 +1150,9 @@ static int m25p_probe(struct spi_device
- dev_warn(&spi->dev, "unrecognized id %s\n", data->type);
- }
-
-+ if (data && data->pp_data)
-+ memcpy(&ppdata, data->pp_data, sizeof(ppdata));
-+
- info = (void *)id->driver_data;
-
- if (info->jedec_id) {
---- a/include/linux/spi/flash.h
-+++ b/include/linux/spi/flash.h
-@@ -12,6 +12,7 @@ struct mtd_part_parser_data;
- * with chips that can't be queried for JEDEC or other IDs
- * @part_probe_types: optional list of MTD parser names to use for
- * partitioning
-+ * @pp_data: optional partition parser data.
- *
- * @max_transfer_len: option maximum read/write length limitation for
- * SPI controllers not able to transfer any length commands.
-@@ -30,6 +31,7 @@ struct flash_platform_data {
- char *type;
-
- const char **part_probe_types;
-+ struct mtd_part_parser_data *pp_data;
-
- unsigned int max_transfer_len;
- /* we'll likely add more ... use JEDEC IDs, etc */
diff --git a/target/linux/brcm63xx/patches-3.14/415-MIPS-BCM63XX-export-the-attached-flash-type.patch b/target/linux/brcm63xx/patches-3.14/415-MIPS-BCM63XX-export-the-attached-flash-type.patch
deleted file mode 100644
index 55639ca..0000000
--- a/target/linux/brcm63xx/patches-3.14/415-MIPS-BCM63XX-export-the-attached-flash-type.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 066f1e37742ee434496d32a41a9284458de96742 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Mon, 13 Jan 2014 12:12:30 +0100
-Subject: [PATCH] MIPS: BCM63XX: export the attached flash type
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- arch/mips/bcm63xx/dev-flash.c | 5 +++++
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 ++
- 2 files changed, 7 insertions(+)
-
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -236,3 +236,8 @@ int __init bcm63xx_flash_register(void)
- return -ENODEV;
- }
- }
-+
-+int bcm63xx_flash_get_type(void)
-+{
-+ return flash_type;
-+}
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-@@ -13,4 +13,6 @@ void bcm63xx_flash_force_phys_base_addre
-
- int __init bcm63xx_flash_register(void);
-
-+int bcm63xx_flash_get_type(void);
-+
- #endif /* __BCM63XX_FLASH_H */
diff --git a/target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch b/target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
deleted file mode 100644
index 7a7c825..0000000
--- a/target/linux/brcm63xx/patches-3.14/416-BCM63XX-add-a-fixup-for-ath9k-devices.patch
+++ /dev/null
@@ -1,236 +0,0 @@
-From bbebbf735a02b6d044ed928978ab4bd5f1833364 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Thu, 3 May 2012 14:36:11 +0200
-Subject: [PATCH 61/72] BCM63XX: add a fixup for ath9k devices
-
----
- arch/mips/bcm63xx/Makefile | 3 +-
- arch/mips/bcm63xx/pci-ath9k-fixup.c | 190 ++++++++++++++++++++
- .../include/asm/mach-bcm63xx/pci_ath9k_fixup.h | 7 +
- 3 files changed, 199 insertions(+), 1 deletion(-)
- create mode 100644 arch/mips/bcm63xx/pci-ath9k-fixup.c
- create mode 100644 arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
-
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -2,7 +2,7 @@ obj-y += clk.o cpu.o cs.o gpio.o irq.o
- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
- dev-wdt.o dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o \
-- usb-common.o sprom.o
-+ pci-ath9k-fixup.o usb-common.o sprom.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- /dev/null
-+++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c
-@@ -0,0 +1,199 @@
-+/*
-+ * Broadcom BCM63XX Ath9k EEPROM fixup helper.
-+ *
-+ * Copytight (C) 2012 Jonas Gorski <jonas.gorski@gmail.com>
-+ *
-+ * Based on
-+ *
-+ * Atheros AP94 reference board PCI initialization
-+ *
-+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
-+ *
-+ * 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 <linux/pci.h>
-+#include <linux/delay.h>
-+#include <linux/ath9k_platform.h>
-+
-+#include <bcm63xx_cpu.h>
-+#include <bcm63xx_io.h>
-+#include <bcm63xx_nvram.h>
-+#include <bcm63xx_dev_pci.h>
-+#include <bcm63xx_dev_flash.h>
-+#include <bcm63xx_dev_hsspi.h>
-+#include <pci_ath9k_fixup.h>
-+
-+#define bcm_hsspi_writel(v, o) bcm_rset_writel(RSET_HSSPI, (v), (o))
-+
-+struct ath9k_fixup {
-+ unsigned slot;
-+ u8 mac[ETH_ALEN];
-+ struct ath9k_platform_data pdata;
-+};
-+
-+static int ath9k_num_fixups;
-+static struct ath9k_fixup ath9k_fixups[2] = {
-+ {
-+ .slot = 255,
-+ .pdata = {
-+ .led_pin = -1,
-+ },
-+ },
-+ {
-+ .slot = 255,
-+ .pdata = {
-+ .led_pin = -1,
-+ },
-+ },
-+};
-+
-+static u16 *bcm63xx_read_eeprom(u16 *eeprom, u32 offset)
-+{
-+ u32 addr;
-+
-+ if (BCMCPU_IS_6328()) {
-+ addr = 0x18000000;
-+ } else {
-+ addr = bcm_mpi_readl(MPI_CSBASE_REG(0));
-+ addr &= MPI_CSBASE_BASE_MASK;
-+ }
-+
-+ switch (bcm63xx_flash_get_type()) {
-+ case BCM63XX_FLASH_TYPE_PARALLEL:
-+ memcpy(eeprom, (void *)KSEG1ADDR(addr + offset), ATH9K_PLAT_EEP_MAX_WORDS * sizeof(u16));
-+ return eeprom;
-+ case BCM63XX_FLASH_TYPE_SERIAL:
-+ /* the first megabyte is memory mapped */
-+ if (offset < 0x100000) {
-+ memcpy(eeprom, (void *)KSEG1ADDR(addr + offset), ATH9K_PLAT_EEP_MAX_WORDS * sizeof(u16));
-+ return eeprom;
-+ }
-+
-+ if (BCMCPU_IS_6328()) {
-+ /* we can change the memory mapped megabyte */
-+ bcm_hsspi_writel(offset & 0xf00000, 0x18);
-+ memcpy(eeprom, (void *)KSEG1ADDR(addr + (offset & 0xfffff)), ATH9K_PLAT_EEP_MAX_WORDS * sizeof(u16));
-+ bcm_hsspi_writel(0, 0x18);
-+ return eeprom;
-+ }
-+ /* can't do anything here without talking to the SPI controller. */
-+ case BCM63XX_FLASH_TYPE_NAND:
-+ default:
-+ return NULL;
-+ }
-+}
-+
-+static void ath9k_pci_fixup(struct pci_dev *dev)
-+{
-+ void __iomem *mem;
-+ struct ath9k_platform_data *pdata = NULL;
-+ struct pci_dev *bridge = pci_upstream_bridge(dev);
-+ u16 *cal_data = NULL;
-+ u16 cmd;
-+ u32 bar0;
-+ u32 val;
-+ unsigned i;
-+
-+ for (i = 0; i < ath9k_num_fixups; i++) {
-+ if (ath9k_fixups[i].slot != PCI_SLOT(dev->devfn))
-+ continue;
-+
-+ cal_data = ath9k_fixups[i].pdata.eeprom_data;
-+ pdata = &ath9k_fixups[i].pdata;
-+ break;
-+ }
-+
-+ if (cal_data == NULL)
-+ return;
-+
-+ if (*cal_data != 0xa55a) {
-+ pr_err("pci %s: invalid calibration data\n", pci_name(dev));
-+ return;
-+ }
-+
-+ pr_info("pci %s: fixup device configuration\n", pci_name(dev));
-+
-+ switch (bcm63xx_get_cpu_id()) {
-+ case BCM6328_CPU_ID:
-+ val = BCM_PCIE_MEM_BASE_PA_6328;
-+ break;
-+ case BCM6348_CPU_ID:
-+ case BCM6358_CPU_ID:
-+ case BCM6368_CPU_ID:
-+ val = BCM_PCI_MEM_BASE_PA;
-+ break;
-+ default:
-+ BUG();
-+ }
-+
-+ mem = ioremap(val, 0x10000);
-+ if (!mem) {
-+ pr_err("pci %s: ioremap error\n", pci_name(dev));
-+ return;
-+ }
-+
-+ if (bridge)
-+ pci_enable_device(bridge);
-+
-+ pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0);
-+ pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0);
-+ pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, val);
-+
-+ pci_read_config_word(dev, PCI_COMMAND, &cmd);
-+ cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
-+ pci_write_config_word(dev, PCI_COMMAND, cmd);
-+
-+ /* set offset to first reg address */
-+ cal_data += 3;
-+ while(*cal_data != 0xffff) {
-+ u32 reg;
-+ reg = *cal_data++;
-+ val = *cal_data++;
-+ val |= (*cal_data++) << 16;
-+
-+ 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);
-+
-+ if (bridge)
-+ pci_disable_device(bridge);
-+
-+ iounmap(mem);
-+
-+ dev->dev.platform_data = pdata;
-+}
-+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup);
-+
-+void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset)
-+{
-+ if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups))
-+ return;
-+
-+ ath9k_fixups[ath9k_num_fixups].slot = slot;
-+
-+ if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset))
-+ return;
-+
-+ if (bcm63xx_nvram_get_mac_address(ath9k_fixups[ath9k_num_fixups].mac))
-+ return;
-+
-+ ath9k_fixups[ath9k_num_fixups].pdata.macaddr = ath9k_fixups[ath9k_num_fixups].mac;
-+ ath9k_num_fixups++;
-+}
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
-@@ -0,0 +1,7 @@
-+#ifndef _PCI_ATH9K_FIXUP
-+#define _PCI_ATH9K_FIXUP
-+
-+
-+void pci_enable_ath9k_fixup(unsigned slot, u32 offset) __init;
-+
-+#endif /* _PCI_ATH9K_FIXUP */
diff --git a/target/linux/brcm63xx/patches-3.14/417-MTD-bcm63xxpart-allow-passing-a-caldata-offset.patch b/target/linux/brcm63xx/patches-3.14/417-MTD-bcm63xxpart-allow-passing-a-caldata-offset.patch
deleted file mode 100644
index 3b02c07..0000000
--- a/target/linux/brcm63xx/patches-3.14/417-MTD-bcm63xxpart-allow-passing-a-caldata-offset.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-Allow bcm63xxpart to receive a caldata offset if calibration data is
-contained in flash.
----
- drivers/mtd/bcm63xxpart.c | 51 ++++++++++++++++++++++++++++++++++++---
- include/linux/mtd/partitions.h | 2 +
- 2 files changed, 49 insertions(+), 4 deletions(-)
-
---- a/drivers/mtd/bcm63xxpart.c
-+++ b/drivers/mtd/bcm63xxpart.c
-@@ -53,10 +53,12 @@ static int bcm63xx_parse_cfe_partitions(
- struct mtd_partition *parts;
- int ret;
- size_t retlen;
-- unsigned int rootfsaddr, kerneladdr, spareaddr;
-+ unsigned int rootfsaddr, kerneladdr, spareaddr, nvramaddr;
- unsigned int rootfslen, kernellen, sparelen, totallen;
- unsigned int cfelen, nvramlen;
- unsigned int cfe_erasesize;
-+ unsigned int caldatalen1 = 0, caldataaddr1 = 0;
-+ unsigned int caldatalen2 = 0, caldataaddr2 = 0;
- int i;
- u32 computed_crc;
- bool rootfs_first = false;
-@@ -70,6 +72,24 @@ static int bcm63xx_parse_cfe_partitions(
- cfelen = cfe_erasesize;
- nvramlen = bcm63xx_nvram_get_psi_size() * SZ_1K;
- nvramlen = roundup(nvramlen, cfe_erasesize);
-+ nvramaddr = master->size - nvramlen;
-+
-+ if (data) {
-+ if (data->caldata[0]) {
-+ caldatalen1 = cfe_erasesize;
-+ caldataaddr1 = rounddown(data->caldata[0],
-+ cfe_erasesize);
-+ }
-+ if (data->caldata[1]) {
-+ caldatalen2 = cfe_erasesize;
-+ caldataaddr2 = rounddown(data->caldata[1],
-+ cfe_erasesize);
-+ }
-+ if (caldataaddr1 == caldataaddr2) {
-+ caldataaddr2 = 0;
-+ caldatalen2 = 0;
-+ }
-+ }
-
- /* Allocate memory for buffer */
- buf = vmalloc(sizeof(struct bcm_tag));
-@@ -121,7 +141,7 @@ static int bcm63xx_parse_cfe_partitions(
- rootfsaddr = 0;
- spareaddr = cfelen;
- }
-- sparelen = master->size - spareaddr - nvramlen;
-+ sparelen = min_not_zero(nvramaddr, caldataaddr1) - spareaddr;
-
- /* Determine number of partitions */
- if (rootfslen > 0)
-@@ -130,6 +150,12 @@ static int bcm63xx_parse_cfe_partitions(
- if (kernellen > 0)
- nrparts++;
-
-+ if (caldatalen1 > 0)
-+ nrparts++;
-+
-+ if (caldatalen2 > 0)
-+ nrparts++;
-+
- /* Ask kernel for more memory */
- parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL);
- if (!parts) {
-@@ -167,15 +193,32 @@ static int bcm63xx_parse_cfe_partitions(
- curpart++;
- }
-
-+ if (caldatalen1 > 0) {
-+ if (caldatalen2 > 0)
-+ parts[curpart].name = "cal_data1";
-+ else
-+ parts[curpart].name = "cal_data";
-+ parts[curpart].offset = caldataaddr1;
-+ parts[curpart].size = caldatalen1;
-+ curpart++;
-+ }
-+
-+ if (caldatalen2 > 0) {
-+ parts[curpart].name = "cal_data2";
-+ parts[curpart].offset = caldataaddr2;
-+ parts[curpart].size = caldatalen2;
-+ curpart++;
-+ }
-+
- parts[curpart].name = "nvram";
-- parts[curpart].offset = master->size - nvramlen;
-+ parts[curpart].offset = nvramaddr;
- parts[curpart].size = nvramlen;
- curpart++;
-
- /* Global partition "linux" to make easy firmware upgrade */
- parts[curpart].name = "linux";
- parts[curpart].offset = cfelen;
-- parts[curpart].size = master->size - cfelen - nvramlen;
-+ parts[curpart].size = min_not_zero(nvramaddr, caldataaddr1) - cfelen;
-
- for (i = 0; i < nrparts; i++)
- pr_info("Partition %d is %s offset %llx and length %llx\n", i,
---- a/include/linux/mtd/partitions.h
-+++ b/include/linux/mtd/partitions.h
-@@ -56,10 +56,12 @@ struct device_node;
- /**
- * struct mtd_part_parser_data - used to pass data to MTD partition parsers.
- * @origin: for RedBoot, start address of MTD device
-+ * @caldata: for CFE, start address of wifi calibration data
- * @of_node: for OF parsers, device node containing partitioning information
- */
- struct mtd_part_parser_data {
- unsigned long origin;
-+ unsigned long caldata[2];
- struct device_node *of_node;
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
deleted file mode 100644
index fdcfa19..0000000
--- a/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 977f8a30103b9c4992cab8f49357fe0d4274004f Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Thu, 3 May 2012 14:55:26 +0200
-Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
-
----
- arch/mips/bcm63xx/boards/board_common.c | 2 +-
- arch/mips/bcm63xx/dev-flash.c | 9 ++++++++-
- arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 4 +++-
- 3 files changed, 12 insertions(+), 3 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -267,7 +267,7 @@ int __init board_register_devices(void)
- if (board.num_spis)
- spi_register_board_info(board.spis, board.num_spis);
-
-- bcm63xx_flash_register();
-+ bcm63xx_flash_register(board.has_caldata, board.caldata);
-
- /* count number of LEDs defined by this device */
- while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -37,12 +37,15 @@ static struct mtd_partition mtd_partitio
- }
- };
-
-+static struct mtd_part_parser_data bcm63xx_parser_data;
-+
- static const char *bcm63xx_part_types[] = { "bcm63xxpart", "RedBoot", NULL };
-
- static struct physmap_flash_data flash_data = {
- .width = 2,
- .parts = mtd_partitions,
- .part_probe_types = bcm63xx_part_types,
-+ .pp_data = &bcm63xx_parser_data,
- };
-
- static struct resource mtd_resources[] = {
-@@ -70,6 +73,7 @@ void __init bcm63xx_flash_force_phys_bas
-
- static struct flash_platform_data bcm63xx_flash_data = {
- .part_probe_types = bcm63xx_part_types,
-+ .pp_data = &bcm63xx_parser_data,
- };
-
- static struct spi_board_info bcm63xx_spi_flash_info[] = {
-@@ -197,9 +201,13 @@ void __init bcm63xx_flash_detect(void)
- }
- }
-
--int __init bcm63xx_flash_register(void)
-+int __init bcm63xx_flash_register(int num_caldata, struct ath9k_caldata *caldata)
- {
- u32 val;
-+ unsigned int i;
-+
-+ for (i = 0; i < num_caldata; i++)
-+ bcm63xx_parser_data.caldata[i] = caldata[i].caldata_offset;
-
- switch (flash_type) {
- case BCM63XX_FLASH_TYPE_PARALLEL:
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-@@ -1,6 +1,8 @@
- #ifndef __BCM63XX_FLASH_H
- #define __BCM63XX_FLASH_H
-
-+#include <board_bcm963xx.h>
-+
- enum {
- BCM63XX_FLASH_TYPE_PARALLEL,
- BCM63XX_FLASH_TYPE_SERIAL,
-@@ -11,7 +13,7 @@ void bcm63xx_flash_detect(void);
-
- void bcm63xx_flash_force_phys_base_address(u32 start, u32 end);
-
--int __init bcm63xx_flash_register(void);
-+int __init bcm63xx_flash_register(int num_caldata, struct ath9k_caldata *caldata);
-
- int bcm63xx_flash_get_type(void);
-
diff --git a/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
deleted file mode 100644
index 0e01be1..0000000
--- a/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
-@@ -2,6 +2,7 @@
- #define _PCI_ATH9K_FIXUP
-
-
--void pci_enable_ath9k_fixup(unsigned slot, u32 offset) __init;
-+void pci_enable_ath9k_fixup(unsigned slot, u32 offset,
-+ unsigned endian_check) __init;
-
- #endif /* _PCI_ATH9K_FIXUP */
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -20,6 +20,7 @@
- struct ath9k_caldata {
- unsigned int slot;
- u32 caldata_offset;
-+ unsigned int endian_check:1;
- };
-
- /*
---- a/arch/mips/bcm63xx/pci-ath9k-fixup.c
-+++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c
-@@ -181,12 +181,14 @@ static void ath9k_pci_fixup(struct pci_d
- }
- DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup);
-
--void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset)
-+void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset,
-+ unsigned endian_check)
- {
- if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups))
- return;
-
- ath9k_fixups[ath9k_num_fixups].slot = slot;
-+ ath9k_fixups[ath9k_num_fixups].pdata.endian_check = endian_check;
-
- if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset))
- return;
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -297,7 +297,8 @@ int __init board_register_devices(void)
-
- /* register any fixups */
- for (i = 0; i < board.has_caldata; i++)
-- pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset);
-+ pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
-+ board.caldata[i].endian_check);
-
- return 0;
- }
diff --git a/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
deleted file mode 100644
index 27ea83f..0000000
--- a/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -298,7 +298,7 @@ int __init board_register_devices(void)
- /* register any fixups */
- for (i = 0; i < board.has_caldata; i++)
- pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
-- board.caldata[i].endian_check);
-+ board.caldata[i].endian_check, board.caldata[i].led_pin);
-
- return 0;
- }
---- a/arch/mips/bcm63xx/pci-ath9k-fixup.c
-+++ b/arch/mips/bcm63xx/pci-ath9k-fixup.c
-@@ -182,13 +182,14 @@ static void ath9k_pci_fixup(struct pci_d
- DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup);
-
- void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset,
-- unsigned endian_check)
-+ unsigned endian_check, int led_pin)
- {
- if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups))
- return;
-
- ath9k_fixups[ath9k_num_fixups].slot = slot;
- ath9k_fixups[ath9k_num_fixups].pdata.endian_check = endian_check;
-+ ath9k_fixups[ath9k_num_fixups].pdata.led_pin = led_pin;
-
- if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset))
- return;
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -21,6 +21,7 @@ struct ath9k_caldata {
- unsigned int slot;
- u32 caldata_offset;
- unsigned int endian_check:1;
-+ int led_pin;
- };
-
- /*
---- a/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h
-@@ -3,6 +3,6 @@
-
-
- void pci_enable_ath9k_fixup(unsigned slot, u32 offset,
-- unsigned endian_check) __init;
-+ unsigned endian_check, int led_pin) __init;
-
- #endif /* _PCI_ATH9K_FIXUP */
diff --git a/target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
deleted file mode 100644
index 49eb897..0000000
--- a/target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From 5ed5b5e9614fa5b02da699ab565af76c7e63d64d Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Mon, 7 Jan 2013 17:45:39 +0100
-Subject: [PATCH 72/72] 446-BCM63XX-add-a-fixup-for-rt2x00-devices
-
----
- arch/mips/bcm63xx/Makefile | 2 +-
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 17 ++++-
- arch/mips/bcm63xx/dev-flash.c | 2 +-
- arch/mips/bcm63xx/pci-rt2x00-fixup.c | 71 ++++++++++++++++++++
- .../include/asm/mach-bcm63xx/bcm63xx_dev_flash.h | 2 +-
- .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 9 ++-
- .../include/asm/mach-bcm63xx/pci_rt2x00_fixup.h | 9 +++
- 7 files changed, 104 insertions(+), 8 deletions(-)
- create mode 100644 arch/mips/bcm63xx/pci-rt2x00-fixup.c
- create mode 100644 arch/mips/include/asm/mach-bcm63xx/pci_rt2x00_fixup.h
-
---- a/arch/mips/bcm63xx/Makefile
-+++ b/arch/mips/bcm63xx/Makefile
-@@ -2,7 +2,7 @@ obj-y += clk.o cpu.o cs.o gpio.o irq.o
- setup.o timer.o dev-dsp.o dev-enet.o dev-flash.o \
- dev-pcmcia.o dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o \
- dev-wdt.o dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o \
-- pci-ath9k-fixup.o usb-common.o sprom.o
-+ pci-ath9k-fixup.o pci-rt2x00-fixup.o usb-common.o sprom.o
- obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-
- obj-y += boards/
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -37,6 +37,7 @@
- #include <bcm63xx_dev_usb_usbd.h>
- #include <board_bcm963xx.h>
- #include <pci_ath9k_fixup.h>
-+#include <pci_rt2x00_fixup.h>
-
- #include "board_common.h"
-
-@@ -296,9 +297,19 @@ int __init board_register_devices(void)
- }
-
- /* register any fixups */
-- for (i = 0; i < board.has_caldata; i++)
-- pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
-- board.caldata[i].endian_check, board.caldata[i].led_pin);
-+ for (i = 0; i < board.has_caldata; i++) {
-+ switch (board.caldata[i].vendor) {
-+ case PCI_VENDOR_ID_ATHEROS:
-+ pci_enable_ath9k_fixup(board.caldata[i].slot,
-+ board.caldata[i].caldata_offset, board.caldata[i].endian_check,
-+ board.caldata[i].led_pin);
-+ break;
-+ case PCI_VENDOR_ID_RALINK:
-+ pci_enable_rt2x00_fixup(board.caldata[i].slot,
-+ board.caldata[i].eeprom);
-+ break;
-+ }
-+ }
-
- return 0;
- }
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -201,7 +201,7 @@ void __init bcm63xx_flash_detect(void)
- }
- }
-
--int __init bcm63xx_flash_register(int num_caldata, struct ath9k_caldata *caldata)
-+int __init bcm63xx_flash_register(int num_caldata, struct bcm63xx_caldata *caldata)
- {
- u32 val;
- unsigned int i;
---- /dev/null
-+++ b/arch/mips/bcm63xx/pci-rt2x00-fixup.c
-@@ -0,0 +1,72 @@
-+/*
-+ * Broadcom BCM63XX RT2x00 EEPROM fixup helper.
-+ *
-+ * Copyright (C) 2012 Álvaro Fernández Rojas <noltari@gmail.com>
-+ *
-+ * Based on
-+ *
-+ * Broadcom BCM63XX Ath9k EEPROM fixup helper.
-+ *
-+ * Copyright (C) 2012 Jonas Gorski <jonas.gorski@gmail.com>
-+ *
-+ * 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 <linux/if_ether.h>
-+#include <linux/pci.h>
-+#include <linux/platform_device.h>
-+#include <linux/rt2x00_platform.h>
-+
-+#include <bcm63xx_nvram.h>
-+#include <pci_rt2x00_fixup.h>
-+
-+struct rt2x00_fixup {
-+ unsigned slot;
-+ u8 mac[ETH_ALEN];
-+ struct rt2x00_platform_data pdata;
-+};
-+
-+static int rt2x00_num_fixups;
-+static struct rt2x00_fixup rt2x00_fixups[2] = {
-+ {
-+ .slot = 255,
-+ },
-+ {
-+ .slot = 255,
-+ },
-+};
-+
-+static void rt2x00_pci_fixup(struct pci_dev *dev)
-+{
-+ unsigned i;
-+ struct rt2x00_platform_data *pdata = NULL;
-+
-+ for (i = 0; i < rt2x00_num_fixups; i++) {
-+ if (rt2x00_fixups[i].slot != PCI_SLOT(dev->devfn))
-+ continue;
-+
-+ pdata = &rt2x00_fixups[i].pdata;
-+ break;
-+ }
-+
-+ dev->dev.platform_data = pdata;
-+}
-+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_RALINK, PCI_ANY_ID, rt2x00_pci_fixup);
-+
-+void __init pci_enable_rt2x00_fixup(unsigned slot, char* eeprom)
-+{
-+ if (rt2x00_num_fixups >= ARRAY_SIZE(rt2x00_fixups))
-+ return;
-+
-+ rt2x00_fixups[rt2x00_num_fixups].slot = slot;
-+ rt2x00_fixups[rt2x00_num_fixups].pdata.eeprom_file_name = kstrdup(eeprom, GFP_KERNEL);
-+
-+ if (bcm63xx_nvram_get_mac_address(rt2x00_fixups[rt2x00_num_fixups].mac))
-+ return;
-+
-+ rt2x00_fixups[rt2x00_num_fixups].pdata.mac_address = rt2x00_fixups[rt2x00_num_fixups].mac;
-+ rt2x00_num_fixups++;
-+}
-+
---- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_flash.h
-@@ -13,7 +13,7 @@ void bcm63xx_flash_detect(void);
-
- void bcm63xx_flash_force_phys_base_address(u32 start, u32 end);
-
--int __init bcm63xx_flash_register(int num_caldata, struct ath9k_caldata *caldata);
-+int __init bcm63xx_flash_register(int num_caldata, struct bcm63xx_caldata *caldata);
-
- int bcm63xx_flash_get_type(void);
-
---- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
-@@ -10,6 +10,7 @@
- #include <bcm63xx_dev_dsp.h>
- #include <bcm63xx_fallback_sprom.h>
- #include <pci_ath9k_fixup.h>
-+#include <pci_rt2x00_fixup.h>
-
- /*
- * flash mapping
-@@ -17,11 +18,15 @@
- #define BCM963XX_CFE_VERSION_OFFSET 0x570
- #define BCM963XX_NVRAM_OFFSET 0x580
-
--struct ath9k_caldata {
-+struct bcm63xx_caldata {
-+ unsigned int vendor;
- unsigned int slot;
- u32 caldata_offset;
-+ /* Atheros */
- unsigned int endian_check:1;
- int led_pin;
-+ /* Ralink */
-+ char* eeprom;
- };
-
- /*
-@@ -48,7 +53,7 @@ struct board_info {
- unsigned int has_caldata:2;
-
- /* wifi calibration data config */
-- struct ath9k_caldata caldata[2];
-+ struct bcm63xx_caldata caldata[2];
-
- /* ethernet config */
- struct bcm63xx_enet_platform_data enet0;
---- /dev/null
-+++ b/arch/mips/include/asm/mach-bcm63xx/pci_rt2x00_fixup.h
-@@ -0,0 +1,9 @@
-+#ifndef _PCI_RT2X00_FIXUP
-+#define _PCI_RT2X00_FIXUP
-+
-+#define PCI_VENDOR_ID_RALINK 0x1814
-+
-+void pci_enable_rt2x00_fixup(unsigned slot, char* eeprom) __init;
-+
-+#endif /* _PCI_RT2X00_FIXUP */
-+
diff --git a/target/linux/brcm63xx/patches-3.14/423-bcm63xx_enet_add_b53_support.patch b/target/linux/brcm63xx/patches-3.14/423-bcm63xx_enet_add_b53_support.patch
deleted file mode 100644
index 271119c..0000000
--- a/target/linux/brcm63xx/patches-3.14/423-bcm63xx_enet_add_b53_support.patch
+++ /dev/null
@@ -1,169 +0,0 @@
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.h
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.h
-@@ -336,6 +336,9 @@ struct bcm_enet_priv {
- struct bcm63xx_enetsw_port used_ports[ENETSW_MAX_PORT];
- int sw_port_link[ENETSW_MAX_PORT];
-
-+ /* platform device for associated switch */
-+ struct platform_device *b53_device;
-+
- /* used to poll switch port state */
- struct timer_list swphy_poll;
- spinlock_t enetsw_mdio_lock;
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -30,6 +30,7 @@
- #include <linux/dma-mapping.h>
- #include <linux/platform_device.h>
- #include <linux/if_vlan.h>
-+#include <linux/platform_data/b53.h>
-
- #include <bcm63xx_dev_enet.h>
- #include "bcm63xx_enet.h"
-@@ -1978,7 +1979,8 @@ static int bcm_enet_remove(struct platfo
- return 0;
- }
-
--struct platform_driver bcm63xx_enet_driver = {
-+
-+static struct platform_driver bcm63xx_enet_driver = {
- .probe = bcm_enet_probe,
- .remove = bcm_enet_remove,
- .driver = {
-@@ -1987,6 +1989,42 @@ struct platform_driver bcm63xx_enet_driv
- },
- };
-
-+struct b53_platform_data bcm63xx_b53_pdata = {
-+ .chip_id = 0x6300,
-+ .big_endian = 1,
-+};
-+
-+struct platform_device bcm63xx_b53_dev = {
-+ .name = "b53-switch",
-+ .id = -1,
-+ .dev = {
-+ .platform_data = &bcm63xx_b53_pdata,
-+ },
-+};
-+
-+static int bcmenet_switch_register(struct bcm_enet_priv *priv, u16 port_mask)
-+{
-+ int ret;
-+
-+ bcm63xx_b53_pdata.regs = priv->base;
-+ bcm63xx_b53_pdata.enabled_ports = port_mask;
-+ bcm63xx_b53_pdata.alias = priv->net_dev->name;
-+
-+ ret = platform_device_register(&bcm63xx_b53_dev);
-+ if (!ret)
-+ priv->b53_device = &bcm63xx_b53_dev;
-+
-+ return ret;
-+}
-+
-+static void bcmenet_switch_unregister(struct bcm_enet_priv *priv)
-+{
-+ if (priv->b53_device)
-+ platform_device_unregister(&bcm63xx_b53_dev);
-+
-+ priv->b53_device = NULL;
-+}
-+
- /*
- * switch mii access callbacks
- */
-@@ -2240,29 +2278,6 @@ static int bcm_enetsw_open(struct net_de
- enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i));
- }
-
-- /* reset mib */
-- val = enetsw_readb(priv, ENETSW_GMCR_REG);
-- val |= ENETSW_GMCR_RST_MIB_MASK;
-- enetsw_writeb(priv, val, ENETSW_GMCR_REG);
-- mdelay(1);
-- val &= ~ENETSW_GMCR_RST_MIB_MASK;
-- enetsw_writeb(priv, val, ENETSW_GMCR_REG);
-- mdelay(1);
--
-- /* force CPU port state */
-- val = enetsw_readb(priv, ENETSW_IMPOV_REG);
-- val |= ENETSW_IMPOV_FORCE_MASK | ENETSW_IMPOV_LINKUP_MASK;
-- enetsw_writeb(priv, val, ENETSW_IMPOV_REG);
--
-- /* enable switch forward engine */
-- val = enetsw_readb(priv, ENETSW_SWMODE_REG);
-- val |= ENETSW_SWMODE_FWD_EN_MASK;
-- enetsw_writeb(priv, val, ENETSW_SWMODE_REG);
--
-- /* enable jumbo on all ports */
-- enetsw_writel(priv, 0x1ff, ENETSW_JMBCTL_PORT_REG);
-- enetsw_writew(priv, 9728, ENETSW_JMBCTL_MAXSIZE_REG);
--
- /* initialize flow control buffer allocation */
- enet_dma_writel(priv, ENETDMA_BUFALLOC_FORCE_MASK | 0,
- ENETDMA_BUFALLOC_REG(priv->rx_chan));
-@@ -2722,6 +2737,9 @@ static int bcm_enetsw_probe(struct platf
- struct bcm63xx_enetsw_platform_data *pd;
- struct resource *res_mem;
- int ret, irq_rx, irq_tx;
-+ unsigned i, num_ports = 0;
-+ u16 port_mask = BIT(8);
-+ u8 val;
-
- /* stop if shared driver failed, assume driver->probe will be
- * called in the same order we register devices (correct ?)
-@@ -2811,6 +2829,43 @@ static int bcm_enetsw_probe(struct platf
- priv->pdev = pdev;
- priv->net_dev = dev;
-
-+ /* reset mib */
-+ val = enetsw_readb(priv, ENETSW_GMCR_REG);
-+ val |= ENETSW_GMCR_RST_MIB_MASK;
-+ enetsw_writeb(priv, val, ENETSW_GMCR_REG);
-+ mdelay(1);
-+ val &= ~ENETSW_GMCR_RST_MIB_MASK;
-+ enetsw_writeb(priv, val, ENETSW_GMCR_REG);
-+ mdelay(1);
-+
-+ /* force CPU port state */
-+ val = enetsw_readb(priv, ENETSW_IMPOV_REG);
-+ val |= ENETSW_IMPOV_FORCE_MASK | ENETSW_IMPOV_LINKUP_MASK;
-+ enetsw_writeb(priv, val, ENETSW_IMPOV_REG);
-+
-+ /* enable switch forward engine */
-+ val = enetsw_readb(priv, ENETSW_SWMODE_REG);
-+ val |= ENETSW_SWMODE_FWD_EN_MASK;
-+ enetsw_writeb(priv, val, ENETSW_SWMODE_REG);
-+
-+ /* enable jumbo on all ports */
-+ enetsw_writel(priv, 0x1ff, ENETSW_JMBCTL_PORT_REG);
-+ enetsw_writew(priv, 9728, ENETSW_JMBCTL_MAXSIZE_REG);
-+
-+ for (i = 0; i < priv->num_ports; i++) {
-+ struct bcm63xx_enetsw_port *port = &priv->used_ports[i];
-+
-+ if (!port->used)
-+ continue;
-+
-+ num_ports++;
-+ port_mask |= BIT(i);
-+ }
-+
-+ /* only register if there is more than one external port */
-+ if (num_ports > 1)
-+ bcmenet_switch_register(priv, port_mask);
-+
- return 0;
-
- out_put_clk:
-@@ -2839,6 +2894,9 @@ static int bcm_enetsw_remove(struct plat
- priv = netdev_priv(dev);
- unregister_netdev(dev);
-
-+ /* remove switch */
-+ bcmenet_switch_unregister(priv);
-+
- /* release device resources */
- iounmap(priv->base);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/target/linux/brcm63xx/patches-3.14/424-bcm63xx_enet_no_request_mem_region.patch b/target/linux/brcm63xx/patches-3.14/424-bcm63xx_enet_no_request_mem_region.patch
deleted file mode 100644
index 24dd27a..0000000
--- a/target/linux/brcm63xx/patches-3.14/424-bcm63xx_enet_no_request_mem_region.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
-@@ -2784,12 +2784,6 @@ static int bcm_enetsw_probe(struct platf
- if (ret)
- goto out;
-
-- if (!request_mem_region(res_mem->start, resource_size(res_mem),
-- "bcm63xx_enetsw")) {
-- ret = -EBUSY;
-- goto out;
-- }
--
- priv->base = ioremap(res_mem->start, resource_size(res_mem));
- if (priv->base == NULL) {
- ret = -ENOMEM;
diff --git a/target/linux/brcm63xx/patches-3.14/425-bcm63xxpart_parse_paritions_from_dt.patch b/target/linux/brcm63xx/patches-3.14/425-bcm63xxpart_parse_paritions_from_dt.patch
deleted file mode 100644
index dd0ba70..0000000
--- a/target/linux/brcm63xx/patches-3.14/425-bcm63xxpart_parse_paritions_from_dt.patch
+++ /dev/null
@@ -1,349 +0,0 @@
---- a/drivers/mtd/bcm63xxpart.c
-+++ b/drivers/mtd/bcm63xxpart.c
-@@ -32,6 +32,7 @@
- #include <linux/vmalloc.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
-+#include <linux/of.h>
-
- #include <asm/mach-bcm63xx/bcm63xx_nvram.h>
- #include <linux/bcm963xx_tag.h>
-@@ -43,66 +44,35 @@
-
- #define BCM63XX_CFE_MAGIC_OFFSET 0x4e0
-
--static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
-- struct mtd_partition **pparts,
-- struct mtd_part_parser_data *data)
-+static bool node_has_compatible(struct device_node *pp)
-+{
-+ return of_get_property(pp, "compatible", NULL);
-+}
-+
-+static int parse_bcmtag(struct mtd_info *master, struct mtd_partition *pparts,
-+ int next_part, size_t offset, size_t size)
- {
-- /* CFE, NVRAM and global Linux are always present */
-- int nrparts = 3, curpart = 0;
- struct bcm_tag *buf;
-- struct mtd_partition *parts;
-+ u32 computed_crc;
- int ret;
- size_t retlen;
-- unsigned int rootfsaddr, kerneladdr, spareaddr, nvramaddr;
-- unsigned int rootfslen, kernellen, sparelen, totallen;
-- unsigned int cfelen, nvramlen;
-- unsigned int cfe_erasesize;
-- unsigned int caldatalen1 = 0, caldataaddr1 = 0;
-- unsigned int caldatalen2 = 0, caldataaddr2 = 0;
-- int i;
-- u32 computed_crc;
-+ unsigned int rootfsaddr, kerneladdr;
-+ unsigned int rootfslen, kernellen, totallen;
- bool rootfs_first = false;
--
-- if (!bcm63xx_is_cfe_present())
-- return -EINVAL;
--
-- cfe_erasesize = max_t(uint32_t, master->erasesize,
-- BCM63XX_CFE_BLOCK_SIZE);
--
-- cfelen = cfe_erasesize;
-- nvramlen = bcm63xx_nvram_get_psi_size() * SZ_1K;
-- nvramlen = roundup(nvramlen, cfe_erasesize);
-- nvramaddr = master->size - nvramlen;
--
-- if (data) {
-- if (data->caldata[0]) {
-- caldatalen1 = cfe_erasesize;
-- caldataaddr1 = rounddown(data->caldata[0],
-- cfe_erasesize);
-- }
-- if (data->caldata[1]) {
-- caldatalen2 = cfe_erasesize;
-- caldataaddr2 = rounddown(data->caldata[1],
-- cfe_erasesize);
-- }
-- if (caldataaddr1 == caldataaddr2) {
-- caldataaddr2 = 0;
-- caldatalen2 = 0;
-- }
-- }
-+ int curr_part = next_part;
-
- /* Allocate memory for buffer */
-- buf = vmalloc(sizeof(struct bcm_tag));
-+ buf = vmalloc(sizeof(*buf));
- if (!buf)
- return -ENOMEM;
-
- /* Get the tag */
-- ret = mtd_read(master, cfelen, sizeof(struct bcm_tag), &retlen,
-+ ret = mtd_read(master, offset, sizeof(*buf), &retlen,
- (void *)buf);
-
-- if (retlen != sizeof(struct bcm_tag)) {
-+ if (retlen != sizeof(*buf)) {
- vfree(buf);
-- return -EIO;
-+ return 0;
- }
-
- computed_crc = crc32_le(IMAGETAG_CRC_START, (u8 *)buf,
-@@ -121,7 +91,6 @@ static int bcm63xx_parse_cfe_partitions(
-
- kerneladdr = kerneladdr - BCM63XX_EXTENDED_SIZE;
- rootfsaddr = rootfsaddr - BCM63XX_EXTENDED_SIZE;
-- spareaddr = roundup(totallen, master->erasesize) + cfelen;
-
- if (rootfsaddr < kerneladdr) {
- /* default Broadcom layout */
-@@ -130,8 +99,8 @@ static int bcm63xx_parse_cfe_partitions(
- } else {
- /* OpenWrt layout */
- rootfsaddr = kerneladdr + kernellen;
-- rootfslen = buf->real_rootfs_length;
-- spareaddr = rootfsaddr + rootfslen;
-+ rootfslen = size - kernellen -
-+ sizeof(*buf);
- }
- } else {
- pr_warn("CFE boot tag CRC invalid (expected %08x, actual %08x)\n",
-@@ -139,16 +108,145 @@ static int bcm63xx_parse_cfe_partitions(
- kernellen = 0;
- rootfslen = 0;
- rootfsaddr = 0;
-- spareaddr = cfelen;
- }
-- sparelen = min_not_zero(nvramaddr, caldataaddr1) - spareaddr;
-
-- /* Determine number of partitions */
-- if (rootfslen > 0)
-- nrparts++;
-+ if (kernellen > 0) {
-+ int kernelpart = curr_part;
-
-- if (kernellen > 0)
-- nrparts++;
-+ if (rootfslen > 0 && rootfs_first)
-+ kernelpart++;
-+ pparts[kernelpart].name = "kernel";
-+ pparts[kernelpart].offset = kerneladdr;
-+ pparts[kernelpart].size = kernellen;
-+ curr_part++;
-+ }
-+
-+ if (rootfslen > 0) {
-+ int rootfspart = curr_part;
-+
-+ if (kernellen > 0 && rootfs_first)
-+ rootfspart--;
-+ pparts[rootfspart].name = "rootfs";
-+ pparts[rootfspart].offset = rootfsaddr;
-+ pparts[rootfspart].size = rootfslen;
-+
-+ curr_part++;
-+ }
-+
-+ vfree(buf);
-+
-+ return curr_part - next_part;
-+}
-+
-+
-+static int bcm63xx_parse_cfe_partitions_of(struct mtd_info *master,
-+ struct mtd_partition **pparts,
-+ struct mtd_part_parser_data *data)
-+{
-+ struct device_node *dp = data->of_node;
-+ struct device_node *pp;
-+ int i, nr_parts = 0;
-+ const char *partname;
-+ int len;
-+
-+ for_each_child_of_node(dp, pp) {
-+ if (node_has_compatible(pp))
-+ continue;
-+
-+ nr_parts++;
-+ }
-+
-+ *pparts = kzalloc(nr_parts * sizeof(**pparts), GFP_KERNEL);
-+ if (!*pparts)
-+ return -ENOMEM;
-+
-+ i = 0;
-+ for_each_child_of_node(dp, pp) {
-+ const __be32 *reg;
-+ int a_cells, s_cells;
-+ size_t size, offset;
-+
-+ if (node_has_compatible(pp))
-+ continue;
-+
-+ reg = of_get_property(pp, "reg", &len);
-+ if (!reg) {
-+ nr_parts--;
-+ continue;
-+ }
-+
-+ a_cells = of_n_addr_cells(pp);
-+ s_cells = of_n_size_cells(pp);
-+ offset = of_read_number(reg, a_cells);
-+ size = of_read_number(reg + a_cells, s_cells);
-+ partname = of_get_property(pp, "label", &len);
-+ if (!partname)
-+ partname = of_get_property(pp, "name", &len);
-+
-+ if (!strcmp(partname, "linux"))
-+ i += parse_bcmtag(master, *pparts, i, offset, size);
-+
-+ if (of_get_property(pp, "read-only", &len))
-+ (*pparts)[i].mask_flags |= MTD_WRITEABLE;
-+
-+ if (of_get_property(pp, "lock", &len))
-+ (*pparts)[i].mask_flags |= MTD_POWERUP_LOCK;
-+
-+ (*pparts)[i].offset = offset;
-+ (*pparts)[i].size = size;
-+ (*pparts)[i].name = partname;
-+
-+ i++;
-+ }
-+
-+ return i;
-+}
-+
-+static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
-+ struct mtd_partition **pparts,
-+ struct mtd_part_parser_data *data)
-+{
-+ /* CFE, NVRAM and global Linux are always present */
-+ int nrparts = 5, curpart = 0;
-+ struct mtd_partition *parts;
-+ unsigned int nvramaddr;
-+ unsigned int cfelen, nvramlen;
-+ unsigned int cfe_erasesize;
-+ unsigned int caldatalen1 = 0, caldataaddr1 = 0;
-+ unsigned int caldatalen2 = 0, caldataaddr2 = 0;
-+ unsigned int imageaddr, imagelen;
-+ int i;
-+
-+ if (!bcm63xx_is_cfe_present())
-+ return -EINVAL;
-+
-+ cfe_erasesize = max_t(uint32_t, master->erasesize,
-+ BCM63XX_CFE_BLOCK_SIZE);
-+
-+ cfelen = cfe_erasesize;
-+ nvramlen = bcm63xx_nvram_get_psi_size() * SZ_1K;
-+ nvramlen = roundup(nvramlen, cfe_erasesize);
-+ nvramaddr = master->size - nvramlen;
-+
-+ if (data) {
-+ if (data->caldata[0]) {
-+ caldatalen1 = cfe_erasesize;
-+ caldataaddr1 = rounddown(data->caldata[0],
-+ cfe_erasesize);
-+ }
-+ if (data->caldata[1]) {
-+ caldatalen2 = cfe_erasesize;
-+ caldataaddr2 = rounddown(data->caldata[1],
-+ cfe_erasesize);
-+ }
-+ if (caldataaddr1 == caldataaddr2) {
-+ caldataaddr2 = 0;
-+ caldatalen2 = 0;
-+ }
-+ }
-+
-+ imageaddr = cfelen;
-+ imagelen = min_not_zero(nvramaddr, caldataaddr1) - imageaddr;
-
- if (caldatalen1 > 0)
- nrparts++;
-@@ -158,10 +256,8 @@ static int bcm63xx_parse_cfe_partitions(
-
- /* Ask kernel for more memory */
- parts = kzalloc(sizeof(*parts) * nrparts + 10 * nrparts, GFP_KERNEL);
-- if (!parts) {
-- vfree(buf);
-+ if (!parts)
- return -ENOMEM;
-- }
-
- /* Start building partition list */
- parts[curpart].name = "CFE";
-@@ -169,29 +265,7 @@ static int bcm63xx_parse_cfe_partitions(
- parts[curpart].size = cfelen;
- curpart++;
-
-- if (kernellen > 0) {
-- int kernelpart = curpart;
--
-- if (rootfslen > 0 && rootfs_first)
-- kernelpart++;
-- parts[kernelpart].name = "kernel";
-- parts[kernelpart].offset = kerneladdr;
-- parts[kernelpart].size = kernellen;
-- curpart++;
-- }
--
-- if (rootfslen > 0) {
-- int rootfspart = curpart;
--
-- if (kernellen > 0 && rootfs_first)
-- rootfspart--;
-- parts[rootfspart].name = "rootfs";
-- parts[rootfspart].offset = rootfsaddr;
-- parts[rootfspart].size = rootfslen;
-- if (sparelen > 0 && !rootfs_first)
-- parts[rootfspart].size += sparelen;
-- curpart++;
-- }
-+ curpart += parse_bcmtag(master, parts, curpart, imageaddr, imagelen);
-
- if (caldatalen1 > 0) {
- if (caldatalen2 > 0)
-@@ -217,25 +291,33 @@ static int bcm63xx_parse_cfe_partitions(
-
- /* Global partition "linux" to make easy firmware upgrade */
- parts[curpart].name = "linux";
-- parts[curpart].offset = cfelen;
-- parts[curpart].size = min_not_zero(nvramaddr, caldataaddr1) - cfelen;
-+ parts[curpart].offset = imageaddr;
-+ parts[curpart].size = imagelen;
-+ curpart++;
-
-- for (i = 0; i < nrparts; i++)
-+ for (i = 0; i < curpart; i++)
- pr_info("Partition %d is %s offset %llx and length %llx\n", i,
- parts[i].name, parts[i].offset, parts[i].size);
-
-- pr_info("Spare partition is offset %x and length %x\n", spareaddr,
-- sparelen);
--
- *pparts = parts;
-- vfree(buf);
-
- return nrparts;
- };
-
-+
-+static int bcm63xx_parse_partitions(struct mtd_info *master,
-+ struct mtd_partition **pparts,
-+ struct mtd_part_parser_data *data)
-+{
-+ if (data && data->of_node)
-+ return bcm63xx_parse_cfe_partitions_of(master, pparts, data);
-+ else
-+ return bcm63xx_parse_cfe_partitions(master, pparts, data);
-+}
-+
- static struct mtd_part_parser bcm63xx_cfe_parser = {
- .owner = THIS_MODULE,
-- .parse_fn = bcm63xx_parse_cfe_partitions,
-+ .parse_fn = bcm63xx_parse_partitions,
- .name = "bcm63xxpart",
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/499-allow_better_context_for_board_patches.patch b/target/linux/brcm63xx/patches-3.14/499-allow_better_context_for_board_patches.patch
deleted file mode 100644
index fb09397..0000000
--- a/target/linux/brcm63xx/patches-3.14/499-allow_better_context_for_board_patches.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -62,7 +62,7 @@ static struct board_info __initdata boar
- .ephy_reset_gpio = 36,
- .ephy_reset_gpio_flags = GPIOF_INIT_HIGH,
- };
--#endif
-+#endif /* CONFIG_BCM63XX_CPU_3368 */
-
- /*
- * known 6328 boards
-@@ -112,7 +112,7 @@ static struct board_info __initdata boar
- },
- },
- };
--#endif
-+#endif /* CONFIG_BCM63XX_CPU_6328 */
-
- /*
- * known 6338 boards
-@@ -203,7 +203,7 @@ static struct board_info __initdata boar
- },
- },
- };
--#endif
-+#endif /* CONFIG_BCM63XX_CPU_6338 */
-
- /*
- * known 6345 boards
-@@ -216,7 +216,7 @@ static struct board_info __initdata boar
-
- .has_uart0 = 1,
- };
--#endif
-+#endif /* CONFIG_BCM63XX_CPU_6345 */
-
- /*
- * known 6348 boards
-@@ -557,7 +557,7 @@ static struct board_info __initdata boar
-
- .has_ohci0 = 1,
- };
--#endif
-+#endif /* CONFIG_BCM63XX_CPU_6348 */
-
- /*
- * known 6358 boards
-@@ -714,7 +714,7 @@ static struct board_info __initdata boar
-
- .has_ohci0 = 1,
- };
--#endif
-+#endif /* CONFIG_BCM63XX_CPU_6358 */
-
- /*
- * all boards
diff --git a/target/linux/brcm63xx/patches-3.14/500-board-D4PW.patch b/target/linux/brcm63xx/patches-3.14/500-board-D4PW.patch
deleted file mode 100644
index 8be8c9c..0000000
--- a/target/linux/brcm63xx/patches-3.14/500-board-D4PW.patch
+++ /dev/null
@@ -1,67 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -557,6 +557,56 @@ static struct board_info __initdata boar
-
- .has_ohci0 = 1,
- };
-+
-+static struct board_info __initdata board_96348_D4PW = {
-+ .name = "D-4P-W",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+ .has_uart0 = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "D-4P-W:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "D-4P-W::status",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "D-4P-W:green:internet",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "D-4P-W:red:internet",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 7,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6348 */
-
- /*
-@@ -742,6 +792,7 @@ static const struct board_info __initcon
- &board_DV201AMR,
- &board_96348gw_a,
- &board_rta1025w_16,
-+ &board_96348_D4PW,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch b/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch
deleted file mode 100644
index a332378..0000000
--- a/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch
+++ /dev/null
@@ -1,308 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -12,6 +12,12 @@
- #include <linux/string.h>
- #include <linux/gpio_keys.h>
- #include <linux/input.h>
-+#include <linux/platform_device.h>
-+#include <linux/spi/spi.h>
-+#include <linux/spi/spi_gpio.h>
-+#if 0 /* FIXME: 3.14 removed non-DT support */
-+#include <linux/spi/74x164.h>
-+#endif
- #include <asm/addrspace.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
-@@ -31,6 +37,12 @@
- #define BCM963XX_KEYS_POLL_INTERVAL 20
- #define BCM963XX_KEYS_DEBOUNCE_INTERVAL (BCM963XX_KEYS_POLL_INTERVAL * 3)
-
-+#define NB4_PID_OFFSET 0xff80
-+#define NB4_74X164_GPIO_BASE 64
-+#define NB4_SPI_GPIO_MOSI 7
-+#define NB4_SPI_GPIO_CLK 6
-+#define NB4_74HC64_GPIO(X) (NB4_74X164_GPIO_BASE + (X))
-+
- /*
- * known 3368 boards
- */
-@@ -764,6 +776,270 @@ static struct board_info __initdata boar
-
- .has_ohci0 = 1,
- };
-+
-+struct spi_gpio_platform_data nb4_spi_gpio_data = {
-+ .sck = NB4_SPI_GPIO_CLK,
-+ .mosi = NB4_SPI_GPIO_MOSI,
-+ .miso = SPI_GPIO_NO_MISO,
-+ .num_chipselect = 1,
-+};
-+
-+
-+static struct platform_device nb4_spi_gpio = {
-+ .name = "spi_gpio",
-+ .id = 1,
-+ .dev = {
-+ .platform_data = &nb4_spi_gpio_data,
-+ },
-+};
-+
-+static struct platform_device * __initdata nb4_devices[] = {
-+ &nb4_spi_gpio,
-+};
-+
-+#if 0 /* FIXME: 3.14 removed non-DT support */
-+const struct gen_74x164_chip_platform_data nb4_74x164_platform_data = {
-+ .base = NB4_74X164_GPIO_BASE
-+};
-+#endif
-+
-+static struct spi_board_info nb4_spi_devices[] = {
-+#if 0 /* FIXME: 3.14 removed non-DT support */
-+ {
-+ .modalias = "74x164",
-+ .max_speed_hz = 781000,
-+ .bus_num = 1,
-+ .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
-+ .mode = SPI_MODE_0,
-+ .platform_data = &nb4_74x164_platform_data
-+ }
-+#endif
-+};
-+
-+static struct board_info __initdata board_nb4_ser_r0 = {
-+ .name = "NB4-SER-r0",
-+ .of_board_id = "sfr,nb4-ser-r0",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+
-+ .has_ohci0 = 1,
-+ .has_pccard = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-+
-+ .leds = {
-+ {
-+ .name = "NB4-SER-r0:white:adsl",
-+ .gpio = NB4_74HC64_GPIO(4),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:white:traffic",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:white:tel",
-+ .gpio = NB4_74HC64_GPIO(3),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:white:tv",
-+ .gpio = NB4_74HC64_GPIO(2),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:white:wifi",
-+ .gpio = 15,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:white:alarm",
-+ .gpio = NB4_74HC64_GPIO(0),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:red:service",
-+ .gpio = 29,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:green:service",
-+ .gpio = 30,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-SER-r0:blue:service",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 37,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "service",
-+ .gpio = 27,
-+ .type = EV_KEY,
-+ .code = BTN_0,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "clip",
-+ .gpio = 31,
-+ .type = EV_KEY,
-+ .code = BTN_1,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+ .devs = nb4_devices,
-+ .num_devs = ARRAY_SIZE(nb4_devices),
-+ .spis = nb4_spi_devices,
-+ .num_spis = ARRAY_SIZE(nb4_spi_devices),
-+};
-+
-+static struct board_info __initdata board_nb4_fxc_r1 = {
-+ .name = "NB4-FXC-r1",
-+ .of_board_id = "sfr,nb4-fxc-r1",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+
-+ .has_ohci0 = 1,
-+ .has_pccard = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-+
-+ .leds = {
-+ {
-+ .name = "NB4-FXC-r1:white:adsl",
-+ .gpio = NB4_74HC64_GPIO(4),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:white:traffic",
-+ .gpio = 2,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:white:tel",
-+ .gpio = NB4_74HC64_GPIO(3),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:white:tv",
-+ .gpio = NB4_74HC64_GPIO(2),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:white:wifi",
-+ .gpio = 15,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:white:alarm",
-+ .gpio = NB4_74HC64_GPIO(0),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:red:service",
-+ .gpio = 29,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:green:service",
-+ .gpio = 30,
-+ },
-+ {
-+ .name = "NB4-FXC-r1:blue:service",
-+ .gpio = 4,
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 37,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "service",
-+ .gpio = 27,
-+ .type = EV_KEY,
-+ .code = BTN_0,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "clip",
-+ .gpio = 31,
-+ .type = EV_KEY,
-+ .code = BTN_1,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+ .devs = nb4_devices,
-+ .num_devs = ARRAY_SIZE(nb4_devices),
-+ .spis = nb4_spi_devices,
-+ .num_spis = ARRAY_SIZE(nb4_spi_devices),
-+};
- #endif /* CONFIG_BCM63XX_CPU_6358 */
-
- /*
-@@ -800,6 +1076,8 @@ static const struct board_info __initcon
- &board_96358vw2,
- &board_AGPFS0,
- &board_DWVS0,
-+ &board_nb4_ser_r0,
-+ &board_nb4_fxc_r1,
- #endif
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/502-board-96338W2_E7T.patch b/target/linux/brcm63xx/patches-3.14/502-board-96338W2_E7T.patch
deleted file mode 100644
index 7fb4fdd..0000000
--- a/target/linux/brcm63xx/patches-3.14/502-board-96338W2_E7T.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -215,6 +215,40 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_96338w2_e7t = {
-+ .name = "96338W2_E7T",
-+ .expected_cpu_id = 0x6338,
-+
-+ .has_enet0 = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "96338W2_E7T:green:ppp",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96338W2_E7T:green:ppp-fail",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96338W2_E7T:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6338 */
-
- /*
-@@ -1055,6 +1089,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6338
- &board_96338gw,
- &board_96338w,
-+ &board_96338w2_e7t,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6345
- &board_96345gw2,
diff --git a/target/linux/brcm63xx/patches-3.14/503-board-CPVA642.patch b/target/linux/brcm63xx/patches-3.14/503-board-CPVA642.patch
deleted file mode 100644
index 443eaaf..0000000
--- a/target/linux/brcm63xx/patches-3.14/503-board-CPVA642.patch
+++ /dev/null
@@ -1,109 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -764,6 +764,98 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_CPVA642 = {
-+ .name = "CPVA642",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "CPVA642:red:power",
-+ .gpio = 14,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA642:green:power",
-+ .gpio = 11,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "CPVA642:red:wifi",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA642:green:wifi",
-+ .gpio = 28,
-+ .active_low = 0,
-+ },
-+ {
-+ .name = "CPVA642:red:link",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA642:green:link",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA642:green:ether",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA642:green:phone1",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA642:green:phone2",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA642:green:usb",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 36,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 37,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
-+
- static struct board_info __initdata board_AGPFS0 = {
- .name = "AGPF-S0",
- .of_board_id = "pirelli,agpf-s0",
-@@ -1110,6 +1202,7 @@ static const struct board_info __initcon
- &board_96358vw,
- &board_96358vw2,
- &board_AGPFS0,
-+ &board_CPVA642,
- &board_DWVS0,
- &board_nb4_ser_r0,
- &board_nb4_fxc_r1,
diff --git a/target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch b/target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch
deleted file mode 100644
index 77b6a35..0000000
--- a/target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch
+++ /dev/null
@@ -1,73 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -903,6 +903,62 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- };
-
-+/* D-Link DSL-274xB revison C2/C3 */
-+static struct board_info __initdata board_dsl_274xb_rev_c = {
-+ .name = "AW4139",
-+ .of_board_id = "d-link,dsl-274xb-c2",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "dsl-274xb:green:power",
-+ .gpio = 5,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "dsl-274xb:red:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-274xb:green:adsl",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-274xb:green:internet",
-+ .gpio = 2,
-+ },
-+ {
-+ .name = "dsl-274xb:red:internet",
-+ .gpio = 10,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
- struct spi_gpio_platform_data nb4_spi_gpio_data = {
- .sck = NB4_SPI_GPIO_CLK,
- .mosi = NB4_SPI_GPIO_MOSI,
-@@ -1204,6 +1260,7 @@ static const struct board_info __initcon
- &board_AGPFS0,
- &board_CPVA642,
- &board_DWVS0,
-+ &board_dsl_274xb_rev_c,
- &board_nb4_ser_r0,
- &board_nb4_fxc_r1,
- #endif
diff --git a/target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch b/target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch
deleted file mode 100644
index ca84962..0000000
--- a/target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch
+++ /dev/null
@@ -1,86 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -653,6 +653,75 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_spw500v = {
-+ .name = "SPW500V",
-+ .of_board_id = "t-com,spw500v",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+
-+ .has_dsp = 1,
-+ .dsp = {
-+ .gpio_rst = 6,
-+ .gpio_int = 34,
-+ .ext_irq = 2,
-+ .cs = 2,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "SPW500V:red:power",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "SPW500V:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "SPW500V:green:ppp",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ { .name = "SPW500V:green:pstn",
-+ .gpio = 28,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "SPW500V:green:voip",
-+ .gpio = 32,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM4318,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6348 */
-
- /*
-@@ -1252,6 +1321,7 @@ static const struct board_info __initcon
- &board_96348gw_a,
- &board_rta1025w_16,
- &board_96348_D4PW,
-+ &board_spw500v,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch b/target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch
deleted file mode 100644
index 5ba01f0..0000000
--- a/target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch
+++ /dev/null
@@ -1,126 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -512,6 +512,114 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_gw6200 = {
-+ .name = "GW6200",
-+ .of_board_id = "tecom,gw6200",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+ .enet1 = {
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+
-+ .has_dsp = 1,
-+ .dsp = {
-+ .gpio_rst = 8, /* FIXME: What is real GPIO here? */
-+ .gpio_int = 34,
-+ .ext_irq = 2,
-+ .cs = 2,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "GW6200:green:line1",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "GW6200:green:line2",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "GW6200:green:line3",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "GW6200:green:tel",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 36,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
-+static struct board_info __initdata board_gw6000 = {
-+ .name = "GW6000",
-+ .of_board_id = "tecom,gw6000",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+ .enet1 = {
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+
-+ .has_dsp = 1,
-+ .dsp = {
-+ .gpio_rst = 6,
-+ .gpio_int = 34,
-+ .ext_irq = 2,
-+ .cs = 2,
-+ },
-+
-+ /* GW6000 has no GPIO-controlled leds */
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 36,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
-+
-+
- static struct board_info __initdata board_FAST2404 = {
- .name = "F@ST2404",
- .of_board_id = "sagem,f@st2404",
-@@ -1314,6 +1422,8 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6348
- &board_96348r,
- &board_96348gw,
-+ &board_gw6000,
-+ &board_gw6200,
- &board_96348gw_10,
- &board_96348gw_11,
- &board_FAST2404,
diff --git a/target/linux/brcm63xx/patches-3.14/507-board-MAGIC.patch b/target/linux/brcm63xx/patches-3.14/507-board-MAGIC.patch
deleted file mode 100644
index 36de281..0000000
--- a/target/linux/brcm63xx/patches-3.14/507-board-MAGIC.patch
+++ /dev/null
@@ -1,89 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -830,6 +830,78 @@ static struct board_info __initdata boar
- .pci_dev = 1,
- },
- };
-+
-+static struct board_info __initdata board_96348sv = {
-+ .name = "MAGIC",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+ .enet1 = {
-+ /* it has BP_ENET_EXTERNAL_PHY */
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+ .has_pccard = 1,
-+ .has_ehci0 = 1,
-+
-+ .has_dsp = 1,
-+ .dsp = {
-+ .gpio_rst = 25,
-+ .gpio_int = 34,
-+ .cs = 2,
-+ .ext_irq = 2,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "MAGIC:green:voip",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "MAGIC:green:adsl",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "MAGIC:green:wifi",
-+ .gpio = 28,
-+ },
-+ {
-+ .name = "MAGIC:green:usb",
-+ .gpio = 35,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "MAGIC:green:hpna",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "MAGIC:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "MAGIC:green:stop",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6348 */
-
- /*
-@@ -1432,6 +1504,7 @@ static const struct board_info __initcon
- &board_rta1025w_16,
- &board_96348_D4PW,
- &board_spw500v,
-+ &board_96348sv,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch b/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch
deleted file mode 100644
index 6d281ae..0000000
--- a/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1471,6 +1471,84 @@ static struct board_info __initdata boar
- .spis = nb4_spi_devices,
- .num_spis = ARRAY_SIZE(nb4_spi_devices),
- };
-+
-+static struct board_info __initdata board_HW553 = {
-+ .name = "HW553",
-+ .of_board_id = "huawei,hg553",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-+
-+ .leds = {
-+ {
-+ .name = "HW553:red:adsl",
-+ .gpio = 34,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW553:blue:adsl",
-+ .gpio = 35,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW553:red:lan",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW553:blue:lan",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW553:red:power",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW553:blue:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "HW553:red:wifi",
-+ .gpio = 25,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW553:red:hspa",
-+ .gpio = 12,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW553:blue:hspa",
-+ .gpio = 13,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM4318,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6358 */
-
- /*
-@@ -1516,6 +1594,7 @@ static const struct board_info __initcon
- &board_dsl_274xb_rev_c,
- &board_nb4_ser_r0,
- &board_nb4_fxc_r1,
-+ &board_HW553,
- #endif
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch b/target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch
deleted file mode 100644
index 8349104..0000000
--- a/target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -249,6 +249,45 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_rta1320_16m = {
-+ .name = "RTA1320_16M",
-+ .expected_cpu_id = 0x6338,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "RTA1320_16M:green:adsl",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "RTA1320_16M:green:ppp",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "RTA1320_16M:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "RTA1320_16M:green:stop",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6338 */
-
- /*
-@@ -1565,6 +1604,7 @@ static const struct board_info __initcon
- &board_96338gw,
- &board_96338w,
- &board_96338w2_e7t,
-+ &board_rta1320_16m,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6345
- &board_96345gw2,
diff --git a/target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch b/target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch
deleted file mode 100644
index 8a5c747..0000000
--- a/target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch
+++ /dev/null
@@ -1,83 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1588,6 +1588,72 @@ static struct board_info __initdata boar
- .pci_dev = 1,
- },
- };
-+
-+ /* T-Home Speedport W 303V Typ B */
-+static struct board_info __initdata board_spw303v = {
-+ .name = "96358-502V",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "spw303v:green:power+adsl",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "spw303v:red:power+adsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "spw303v:green:ppp",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "spw303v:green:ses",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "spw303v:green:voip",
-+ .gpio = 27,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "spw303v:green:pots",
-+ .gpio = 31,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 11,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "ses",
-+ .gpio = 37,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ }
-+};
- #endif /* CONFIG_BCM63XX_CPU_6358 */
-
- /*
-@@ -1635,6 +1701,7 @@ static const struct board_info __initcon
- &board_nb4_ser_r0,
- &board_nb4_fxc_r1,
- &board_HW553,
-+ &board_spw303v,
- #endif
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/511-board_V2500V.patch b/target/linux/brcm63xx/patches-3.14/511-board_V2500V.patch
deleted file mode 100644
index e96a1a0..0000000
--- a/target/linux/brcm63xx/patches-3.14/511-board_V2500V.patch
+++ /dev/null
@@ -1,123 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -941,6 +941,65 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_V2500V_BB = {
-+ .name = "V2500V_BB",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "V2500V_BB:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "V2500V_BB:red:power",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "V2500V_BB:green:adsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ { .name = "V2500V_BB:green:ppp",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "V2500V_BB:green:wireless",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 31,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6348 */
-
- /*
-@@ -1689,6 +1748,7 @@ static const struct board_info __initcon
- &board_96348_D4PW,
- &board_spw500v,
- &board_96348sv,
-+ &board_V2500V_BB,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
-@@ -1727,6 +1787,22 @@ void __init board_bcm963xx_init(void)
- val &= MPI_CSBASE_BASE_MASK;
- }
- boot_addr = (u8 *)KSEG1ADDR(val);
-+ printk(KERN_INFO PFX "Boot address 0x%08x\n",(unsigned int)boot_addr);
-+
-+ /* BT Voyager 2500V (RTA1046VW PCB) has 8 Meg flash used as two */
-+ /* banks of 4 Meg. The byte at 0xBF800000 identifies the back to use.*/
-+ /* Loading firmware from the CFE Prompt always loads to Bank 0 */
-+ /* Do an early check of CFE and then select bank 0 */
-+
-+ if (boot_addr == (u8 *)0xbf800000) {
-+ u8 *tmp_boot_addr = (u8*)0xbfc00000;
-+
-+ bcm63xx_nvram_init(tmp_boot_addr + BCM963XX_NVRAM_OFFSET);
-+ if (!strcmp(bcm63xx_nvram_get_name(), "V2500V_BB")) {
-+ printk(KERN_INFO PFX "V2500V: nvram bank 0\n");
-+ boot_addr = tmp_boot_addr;
-+ }
-+ }
-
- /* dump cfe version */
- cfe = boot_addr + BCM963XX_CFE_VERSION_OFFSET;
---- a/arch/mips/bcm63xx/dev-flash.c
-+++ b/arch/mips/bcm63xx/dev-flash.c
-@@ -19,6 +19,7 @@
- #include <linux/spi/spi.h>
- #include <linux/spi/flash.h>
-
-+#include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
- #include <bcm63xx_dev_flash.h>
- #include <bcm63xx_dev_hsspi.h>
-@@ -220,6 +221,13 @@ int __init bcm63xx_flash_register(int nu
- val = bcm_mpi_readl(MPI_CSBASE_REG(0));
- val &= MPI_CSBASE_BASE_MASK;
-
-+ /* BT Voyager 2500V has 8 Meg flash in two 4 Meg banks */
-+ /* Loading from CFE always uses Bank 0 */
-+ if (!strcmp(board_get_name(), "V2500V_BB")) {
-+ pr_info("V2500V: Start in Bank 0\n");
-+ val = val + 0x400000; // Select Bank 0 start address
-+ }
-+
- mtd_resources[0].start = val;
- mtd_resources[0].end = 0x1FFFFFFF;
- }
diff --git a/target/linux/brcm63xx/patches-3.14/512-board_BTV2110.patch b/target/linux/brcm63xx/patches-3.14/512-board_BTV2110.patch
deleted file mode 100644
index b9af2da..0000000
--- a/target/linux/brcm63xx/patches-3.14/512-board_BTV2110.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -481,6 +481,64 @@ static struct board_info __initdata boar
- },
- };
-
-+
-+/* BT Voyager 2110 */
-+static struct board_info __initdata board_V2110 = {
-+ .name = "V2110",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "V2110:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "V2110:red:power",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "V2110:green:adsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ { .name = "V2110:green:ppp",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "V2110:green:wireless",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
-+
- static struct board_info __initdata board_96348gw = {
- .name = "96348GW",
- .of_board_id = "brcm,bcm96348gw",
-@@ -1749,6 +1807,7 @@ static const struct board_info __initcon
- &board_spw500v,
- &board_96348sv,
- &board_V2500V_BB,
-+ &board_V2110,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch b/target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
deleted file mode 100644
index 2f7bf49..0000000
--- a/target/linux/brcm63xx/patches-3.14/513-MIPS-BCM63XX-add-inventel-Livebox-support.patch
+++ /dev/null
@@ -1,260 +0,0 @@
-From 7e6b22225e16fbb22dbf7f2113d8c6d65333818c Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 9 Mar 2014 04:55:52 +0100
-Subject: [PATCH 44/44] MIPS: BCM63XX: add inventel Livebox support
-
----
- arch/mips/bcm63xx/boards/Kconfig | 6 +
- arch/mips/bcm63xx/boards/Makefile | 1 +
- arch/mips/bcm63xx/boards/board_common.c | 2 +-
- arch/mips/bcm63xx/boards/board_common.h | 6 +
- arch/mips/bcm63xx/boards/board_livebox.c | 193 +++++++++++++++++++++++++++++++
- 5 files changed, 207 insertions(+), 1 deletion(-)
- create mode 100644 arch/mips/bcm63xx/boards/board_livebox.c
-
---- a/arch/mips/bcm63xx/boards/Kconfig
-+++ b/arch/mips/bcm63xx/boards/Kconfig
-@@ -12,4 +12,10 @@ config BOARD_BCM963XX
- default y
- help
-
-+config BOARD_LIVEBOX
-+ bool "Inventel Livebox(es) boards"
-+ select SSB
-+ help
-+ Inventel Livebox boards using the RedBoot bootloader.
-+
- endmenu
---- a/arch/mips/bcm63xx/boards/Makefile
-+++ b/arch/mips/bcm63xx/boards/Makefile
-@@ -1,2 +1,3 @@
- obj-y += board_common.o
- obj-$(CONFIG_BOARD_BCM963XX) += board_bcm963xx.o
-+obj-$(CONFIG_BOARD_LIVEBOX) += board_livebox.o
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -61,7 +61,7 @@ void __init board_prom_init(void)
- if (fw_arg3 == CFE_EPTSEAL)
- board_bcm963xx_init();
- else
-- panic("unsupported bootloader detected");
-+ board_livebox_init();
- }
-
- static int (*board_get_mac_address)(u8 mac[ETH_ALEN]);
---- a/arch/mips/bcm63xx/boards/board_common.h
-+++ b/arch/mips/bcm63xx/boards/board_common.h
-@@ -24,4 +24,10 @@ static inline void board_of_device_prese
- }
- #endif
-
-+#if defined(CONFIG_BOARD_LIVEBOX)
-+void board_livebox_init(void);
-+#else
-+static inline void board_livebox_init(void) { }
-+#endif
-+
- #endif /* __BOARD_COMMON_H */
---- /dev/null
-+++ b/arch/mips/bcm63xx/boards/board_livebox.c
-@@ -0,0 +1,200 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License. See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
-+ */
-+
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/string.h>
-+#include <linux/input.h>
-+#include <asm/addrspace.h>
-+#include <bcm63xx_board.h>
-+#include <bcm63xx_cpu.h>
-+#include <bcm63xx_regs.h>
-+#include <bcm63xx_io.h>
-+#include <bcm63xx_dev_flash.h>
-+#include <board_bcm963xx.h>
-+
-+#include "board_common.h"
-+
-+#define PFX "board_livebox: "
-+
-+#define LIVEBOX_KEYS_POLL_INTERVAL 20
-+#define LIVEBOX_KEYS_DEBOUNCE_INTERVAL (LIVEBOX_KEYS_POLL_INTERVAL * 3)
-+
-+static unsigned int mac_addr_used = 0;
-+
-+/*
-+ * known 6348 boards
-+ */
-+#ifdef CONFIG_BCM63XX_CPU_6348
-+static struct board_info __initdata board_livebox_blue5g = {
-+ .name = "Livebox-blue-5g",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 31,
-+ },
-+
-+ .ephy_reset_gpio = 6,
-+ .ephy_reset_gpio_flags = GPIOF_INIT_HIGH,
-+
-+ .has_ohci0 = 1,
-+ .has_pccard = 1,
-+
-+ .has_dsp = 0, /*TODO some Liveboxes have dsp*/
-+ .dsp = {
-+ .gpio_rst = 6,
-+ .gpio_int = 35,
-+ .cs = 2,
-+ .ext_irq = 2,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "Livebox-blue-5g:red:adsl-fail",
-+ .gpio = 0,
-+ .active_low = 0,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "Livebox-blue-5g:red:adsl",
-+ .gpio = 1,
-+ },
-+ {
-+ .name = "Livebox-blue-5g:red:traffic",
-+ .gpio = 2,
-+ },
-+ {
-+ .name = "Livebox-blue-5g:red:phone",
-+ .gpio = 3,
-+ },
-+ {
-+ .name = "Livebox-blue-5g:red:wifi",
-+ .gpio = 4,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "BTN_1",
-+ .gpio = 36,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = BTN_1,
-+ .debounce_interval = LIVEBOX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "BTN_2",
-+ .gpio = 7,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = BTN_2,
-+ .debounce_interval = LIVEBOX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+
-+ },
-+
-+ .ephy_reset_gpio = 6,
-+ .ephy_reset_gpio_flags = GPIOF_INIT_HIGH,
-+};
-+#endif
-+
-+/*
-+ * all boards
-+ */
-+static const struct board_info __initdata *bcm963xx_boards[] = {
-+#ifdef CONFIG_BCM63XX_CPU_6348
-+ &board_livebox_blue5g
-+#endif
-+};
-+
-+/*
-+ * register & return a new board mac address
-+ */
-+static int livebox_get_mac_address(u8 *mac)
-+{
-+ u8 *p;
-+ int count;
-+
-+ memcpy(mac, (u8 *)0xBEBFF377, ETH_ALEN);
-+
-+ p = mac + ETH_ALEN - 1;
-+ count = mac_addr_used;
-+
-+ while (count--) {
-+ do {
-+ (*p)++;
-+ if (*p != 0)
-+ break;
-+ p--;
-+ } while (p != mac);
-+ }
-+
-+ if (p == mac) {
-+ printk(KERN_ERR PFX "unable to fetch mac address\n");
-+ return -ENODEV;
-+ }
-+ mac_addr_used++;
-+
-+ return 0;
-+}
-+
-+/*
-+ * early init callback
-+ */
-+#define LIVEBOX_GPIO_DETECT_MASK 0x000000ff
-+#define LIVEBOX_BOOT_ADDR 0x1e400000
-+
-+#define LIVEBOX_HW_BLUE5G_9 0x90
-+
-+void __init board_livebox_init(void)
-+{
-+ u32 val;
-+ u8 hw_version;
-+ const struct board_info *board;
-+
-+ /* Get hardware version */
-+ val = bcm_gpio_readl(GPIO_CTL_LO_REG);
-+ val &= ~LIVEBOX_GPIO_DETECT_MASK;
-+ bcm_gpio_writel(val, GPIO_CTL_LO_REG);
-+
-+ hw_version = bcm_gpio_readl(GPIO_DATA_LO_REG) & LIVEBOX_GPIO_DETECT_MASK;
-+ switch (hw_version) {
-+ case LIVEBOX_HW_BLUE5G_9:
-+ printk(KERN_INFO PFX "Livebox BLUE5G.9\n");
-+ board = bcm963xx_boards[0];
-+ break;
-+ default:
-+ printk(KERN_INFO PFX "Unknown livebox version: %02x\n", hw_version);
-+ /* use default livebox configuration */
-+ board = bcm963xx_boards[0];
-+ break;
-+ }
-+
-+ /* use default livebox configuration */
-+ board_early_setup(board, livebox_get_mac_address);
-+
-+ /* read base address of boot chip select (0) */
-+ val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-+ val &= MPI_CSBASE_BASE_MASK;
-+ if (val != LIVEBOX_BOOT_ADDR) {
-+ printk(KERN_NOTICE PFX "flash address is: 0x%08x, forcing to: 0x%08x\n",
-+ val, LIVEBOX_BOOT_ADDR);
-+ bcm63xx_flash_force_phys_base_address(LIVEBOX_BOOT_ADDR, 0x1ebfffff);
-+ }
-+}
diff --git a/target/linux/brcm63xx/patches-3.14/514-board_ct536_ct5621.patch b/target/linux/brcm63xx/patches-3.14/514-board_ct536_ct5621.patch
deleted file mode 100644
index 06f2a70..0000000
--- a/target/linux/brcm63xx/patches-3.14/514-board_ct536_ct5621.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -539,6 +539,59 @@ static struct board_info __initdata boar
- };
-
-
-+static struct board_info __initdata board_ct536_ct5621 = {
-+ .name = "CT536_CT5621",
-+ .of_board_id = "comtrend,ct-536+",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 0,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+ .has_pccard = 1,
-+ .has_ehci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "CT536_CT5621:green:adsl-fail",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CT536_CT5621:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM4318,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ },
-+};
-+
- static struct board_info __initdata board_96348gw = {
- .name = "96348GW",
- .of_board_id = "brcm,bcm96348gw",
-@@ -1808,6 +1861,7 @@ static const struct board_info __initcon
- &board_96348sv,
- &board_V2500V_BB,
- &board_V2110,
-+ &board_ct536_ct5621,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/515-board_DWV-S0_fixes.patch b/target/linux/brcm63xx/patches-3.14/515-board_DWV-S0_fixes.patch
deleted file mode 100644
index 695db8e..0000000
--- a/target/linux/brcm63xx/patches-3.14/515-board_DWV-S0_fixes.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1343,6 +1343,8 @@ static struct board_info __initdata boar
- .of_board_id = "pirelli,a226g",
- .expected_cpu_id = 0x6358,
-
-+ .has_uart0 = 1,
-+
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
-@@ -1359,6 +1361,7 @@ static struct board_info __initdata boar
- },
-
- .has_ohci0 = 1,
-+ .has_ehci0 = 1,
- };
-
- /* D-Link DSL-274xB revison C2/C3 */
diff --git a/target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch b/target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch
deleted file mode 100644
index 21c2a03..0000000
--- a/target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch
+++ /dev/null
@@ -1,88 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -592,6 +592,77 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_96348A_122 = {
-+ .name = "96348A-122",
-+ .of_board_id = "comtrend,ct-5365",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "96348A-122:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "96348A-122:red:alarm",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96348A-122:green:wps",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wlan",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 35,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM4318,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ },
-+};
-+
- static struct board_info __initdata board_96348gw = {
- .name = "96348GW",
- .of_board_id = "brcm,bcm96348gw",
-@@ -1865,6 +1936,7 @@ static const struct board_info __initcon
- &board_V2500V_BB,
- &board_V2110,
- &board_ct536_ct5621,
-+ &board_96348A_122,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch b/target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch
deleted file mode 100644
index 1a2dda7..0000000
--- a/target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -872,6 +872,7 @@ static struct board_info __initdata boar
- .of_board_id = "dynalink,rta1025w",
- .expected_cpu_id = 0x6348,
-
-+ .has_uart0 = 1,
- .has_enet0 = 1,
- .has_enet1 = 1,
- .has_pci = 1,
diff --git a/target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch b/target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch
deleted file mode 100644
index fb5bc60..0000000
--- a/target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -538,6 +538,40 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_CPVA502plus = {
-+ .name = "CPVA502+",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "CPVA502+:green:phone",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CPVA502+:amber:link",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .ephy_reset_gpio = 4,
-+ .ephy_reset_gpio_flags = GPIOF_INIT_HIGH,
-+};
-
- static struct board_info __initdata board_ct536_ct5621 = {
- .name = "CT536_CT5621",
-@@ -1938,6 +1972,7 @@ static const struct board_info __initcon
- &board_V2110,
- &board_ct536_ct5621,
- &board_96348A_122,
-+ &board_CPVA502plus,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/520-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/brcm63xx/patches-3.14/520-bcm63xx-add-support-for-96368MVWG-board.patch
deleted file mode 100644
index c320f77..0000000
--- a/target/linux/brcm63xx/patches-3.14/520-bcm63xx-add-support-for-96368MVWG-board.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From eeacc2529942051504bc957726aa178671344421 Mon Sep 17 00:00:00 2001
-From: Maxime Bizon <mbizon@freebox.fr>
-Date: Wed, 20 Jan 2010 16:21:30 +0100
-Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 95 ++++++++++++++++++++
- .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +
- 2 files changed, 97 insertions(+), 0 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1936,6 +1936,85 @@ static struct board_info __initdata boar
- #endif /* CONFIG_BCM63XX_CPU_6358 */
-
- /*
-+ * known 6368 boards
-+ */
-+#ifdef CONFIG_BCM63XX_CPU_6368
-+static struct board_info __initdata board_96368mvwg = {
-+ .name = "96368MVWG",
-+ .expected_cpu_id = 0x6368,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+
-+ .has_usbd = 1,
-+
-+ .usbd = {
-+ .use_fullspeed = 0,
-+ .port_no = 0,
-+ },
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "port1",
-+ },
-+
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "port2",
-+ },
-+
-+ [4] = {
-+ .used = 1,
-+ .phy_id = 0x12,
-+ .name = "port0",
-+ },
-+
-+ [5] = {
-+ .used = 1,
-+ .phy_id = 0x11,
-+ .name = "port3",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "96368MVWG:green:adsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96368MVWG:green:ppp",
-+ .gpio = 5,
-+ },
-+ {
-+ .name = "96368MVWG:green:power",
-+ .gpio = 22,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "96368MVWG:green:wps",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96368MVWG:red:ppp-fail",
-+ .gpio = 31,
-+ },
-+ },
-+
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+};
-+#endif /* CONFIG_BCM63XX_CPU_6368 */
-+
-+/*
- * all boards
- */
- static const struct board_info __initconst *bcm963xx_boards[] = {
-@@ -1987,6 +2066,10 @@ static const struct board_info __initcon
- &board_HW553,
- &board_spw303v,
- #endif
-+
-+#ifdef CONFIG_BCM63XX_CPU_6368
-+ &board_96368mvwg,
-+#endif
- };
-
- /*
---- a/arch/mips/bcm63xx/boards/board_common.c
-+++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -88,12 +88,25 @@ void __init board_early_setup(const stru
- bcm63xx_pci_enabled = 1;
- if (BCMCPU_IS_6348())
- val |= GPIO_MODE_6348_G2_PCI;
-+
-+ if (BCMCPU_IS_6368())
-+ val |= GPIO_MODE_6368_PCI_REQ1 |
-+ GPIO_MODE_6368_PCI_GNT1 |
-+ GPIO_MODE_6368_PCI_INTB |
-+ GPIO_MODE_6368_PCI_REQ0 |
-+ GPIO_MODE_6368_PCI_GNT0;
- }
- #endif
-
- if (board.has_pccard) {
- if (BCMCPU_IS_6348())
- val |= GPIO_MODE_6348_G1_MII_PCCARD;
-+
-+ if (BCMCPU_IS_6368())
-+ val |= GPIO_MODE_6368_PCMCIA_CD1 |
-+ GPIO_MODE_6368_PCMCIA_CD2 |
-+ GPIO_MODE_6368_PCMCIA_VS1 |
-+ GPIO_MODE_6368_PCMCIA_VS2;
- }
-
- if (board.has_enet0 && !board.enet0.use_internal_phy) {
diff --git a/target/linux/brcm63xx/patches-3.14/521-bcm63xx-add-support-for-96368MVNgr-board.patch b/target/linux/brcm63xx/patches-3.14/521-bcm63xx-add-support-for-96368MVNgr-board.patch
deleted file mode 100644
index fadf2eb..0000000
--- a/target/linux/brcm63xx/patches-3.14/521-bcm63xx-add-support-for-96368MVNgr-board.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From f457fc2eb9bb915b5a4d251c7c68d4694cf07b01 Mon Sep 17 00:00:00 2001
-From: Maxime Bizon <mbizon@freebox.fr>
-Date: Fri, 4 Nov 2011 12:33:48 +0100
-Subject: [PATCH 33/63] bcm63xx: add support for 96368MVNgr board.
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 67 +++++++++++++++++++++++++++++
- 1 files changed, 67 insertions(+), 0 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2012,6 +2012,72 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- .has_ehci0 = 1,
- };
-+
-+static struct board_info __initdata board_96368mvngr = {
-+ .name = "96368MVNgr",
-+ .expected_cpu_id = 0x6368,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "port1",
-+ },
-+
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "port2",
-+ },
-+
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "port3",
-+ },
-+
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "port4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "96368MVNgr:green:adsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96368MVNgr:green:inet",
-+ .gpio = 5,
-+ },
-+ {
-+ .name = "96368MVNgr:green:power",
-+ .gpio = 22,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "96368MVNgr:green:wps",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96368MVNgr:green:inet-fail",
-+ .gpio = 3,
-+ },
-+ },
-+
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+};
- #endif /* CONFIG_BCM63XX_CPU_6368 */
-
- /*
-@@ -2069,6 +2135,7 @@ static const struct board_info __initcon
-
- #ifdef CONFIG_BCM63XX_CPU_6368
- &board_96368mvwg,
-+ &board_96368mvngr,
- #endif
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/522-MIPS-BCM63XX-add-96328avng-reference-board.patch b/target/linux/brcm63xx/patches-3.14/522-MIPS-BCM63XX-add-96328avng-reference-board.patch
deleted file mode 100644
index 055777b..0000000
--- a/target/linux/brcm63xx/patches-3.14/522-MIPS-BCM63XX-add-96328avng-reference-board.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From c93c2bbf0cc96da5a47d77f01daf6c983cfe4216 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Tue, 29 May 2012 10:52:25 +0200
-Subject: [PATCH] MIPS: BCM63XX: add 96328avng reference board
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 77 +++++++++++++++++++++++++++++
- 1 files changed, 77 insertions(+), 0 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -95,13 +95,45 @@ static struct board_info __initdata boar
- .port_no = 0,
- },
-
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
- .leds = {
- {
-- .name = "96328avng::ppp-fail",
-+ .name = "96328avng::internet-fail",
- .gpio = 2,
- .active_low = 1,
- },
- {
-+ .name = "96328avng::dsl",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
- .name = "96328avng::power",
- .gpio = 4,
- .active_low = 1,
-@@ -118,7 +150,7 @@ static struct board_info __initdata boar
- .active_low = 1,
- },
- {
-- .name = "96328avng::ppp",
-+ .name = "96328avng::internet",
- .gpio = 11,
- .active_low = 1,
- },
diff --git a/target/linux/brcm63xx/patches-3.14/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch b/target/linux/brcm63xx/patches-3.14/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch
deleted file mode 100644
index 665c71e..0000000
--- a/target/linux/brcm63xx/patches-3.14/523-MIPS-BCM63XX-add-963281TAN-reference-board.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From f0649f7b7c672cf452a1796a1422bf615e1973f8 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Tue, 29 May 2012 11:01:12 +0200
-Subject: [PATCH] MIPS: BCM63XX: add 963281TAN reference board
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 71 +++++++++++++++++++++++++++++
- 1 files changed, 71 insertions(+), 0 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -156,6 +156,76 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_963281TAN = {
-+ .name = "963281TAN",
-+ .expected_cpu_id = 0x6328,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "963281TAN::internet",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963281TAN::power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "963281TAN::internet-fail",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963281TAN::power-fail",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963281TAN::wps",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963281TAN::dsl",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6328 */
-
- /*
-@@ -2121,6 +2191,7 @@ static const struct board_info __initcon
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
-+ &board_963281TAN,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6338
- &board_96338gw,
diff --git a/target/linux/brcm63xx/patches-3.14/524-board_dsl_274xb_rev_f.patch b/target/linux/brcm63xx/patches-3.14/524-board_dsl_274xb_rev_f.patch
deleted file mode 100644
index 7b3fba3..0000000
--- a/target/linux/brcm63xx/patches-3.14/524-board_dsl_274xb_rev_f.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 66808f706b3dcd83a9f5157997ff478a880a2906 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jonas.gorski@gmail.com>
-Date: Mon, 30 Apr 2012 09:10:51 +0200
-Subject: [PATCH 70/79] MIPS: BCM63XX: Add board definition for D-Link
- DSL-274xB rev F1
-
----
- arch/mips/bcm63xx/boards/board_bcm963xx.c | 104 +++++++++++++++++++++++++++++
- 1 files changed, 104 insertions(+), 0 deletions(-)
-
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -226,6 +226,111 @@ static struct board_info __initdata boar
-
- },
- };
-+
-+static struct board_info __initdata board_dsl_274xb_f1 = {
-+ .name = "AW4339U",
-+ .expected_cpu_id = 0x6328,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+
-+ .has_caldata = 1,
-+ .caldata = {
-+ {
-+ .vendor = PCI_VENDOR_ID_ATHEROS,
-+ .caldata_offset = 0x7d1000,
-+ .slot = 0,
-+ .led_pin = -1,
-+ },
-+ },
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 4",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 3",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 2",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 1",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "dsl-274xb:red:internet",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-274xb:green:dsl",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-274xb:green:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "dsl-274xb:red:power",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-274xb:blue:wps",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-274xb:green:internet",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "wifi",
-+ .gpio = 10,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = BTN_0,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 23,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 24,
-+ .active_low = 1,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6328 */
-
- /*
-@@ -2192,6 +2297,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
- &board_963281TAN,
-+ &board_dsl_274xb_f1,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6338
- &board_96338gw,
diff --git a/target/linux/brcm63xx/patches-3.14/525-board_96348w3.patch b/target/linux/brcm63xx/patches-3.14/525-board_96348w3.patch
deleted file mode 100644
index 72542c6..0000000
--- a/target/linux/brcm63xx/patches-3.14/525-board_96348w3.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1175,6 +1175,59 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- };
-
-+/* NetGear DG834G v4 */
-+static struct board_info __initdata board_96348W3 = {
-+ .name = "96348W3",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .has_ohci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "96348W3:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "96348W3:red:power",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96348W3::adsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96348W3::internet",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 6,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
- static struct board_info __initdata board_96348_D4PW = {
- .name = "D-4P-W",
- .expected_cpu_id = 0x6348,
-@@ -2327,6 +2380,7 @@ static const struct board_info __initcon
- &board_ct536_ct5621,
- &board_96348A_122,
- &board_CPVA502plus,
-+ &board_96348W3,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/526-board_CT6373-1.patch b/target/linux/brcm63xx/patches-3.14/526-board_CT6373-1.patch
deleted file mode 100644
index 34a135d..0000000
--- a/target/linux/brcm63xx/patches-3.14/526-board_CT6373-1.patch
+++ /dev/null
@@ -1,149 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -43,6 +43,12 @@
- #define NB4_SPI_GPIO_CLK 6
- #define NB4_74HC64_GPIO(X) (NB4_74X164_GPIO_BASE + (X))
-
-+#define CT6373_PID_OFFSET 0xff80
-+#define CT6373_74X164_GPIO_BASE 64
-+#define CT6373_SPI_GPIO_MOSI 7
-+#define CT6373_SPI_GPIO_CLK 6
-+#define CT6373_74HC64_GPIO(X) (CT6373_74X164_GPIO_BASE + (X))
-+
- /*
- * known 3368 boards
- */
-@@ -2050,6 +2056,125 @@ static struct board_info __initdata boar
- .num_spis = ARRAY_SIZE(nb4_spi_devices),
- };
-
-+
-+struct spi_gpio_platform_data ct6373_spi_gpio_data = {
-+ .sck = CT6373_SPI_GPIO_CLK,
-+ .mosi = CT6373_SPI_GPIO_MOSI,
-+ .miso = SPI_GPIO_NO_MISO,
-+ .num_chipselect = 1,
-+};
-+
-+static struct platform_device ct6373_spi_gpio = {
-+ .name = "spi_gpio",
-+ .id = 1,
-+ .dev = {
-+ .platform_data = &ct6373_spi_gpio_data,
-+ },
-+};
-+
-+static struct platform_device * __initdata ct6373_devices[] = {
-+ &ct6373_spi_gpio,
-+};
-+
-+#if 0 /* FIXME: 3.14 dropped non-DT support */
-+const struct gen_74x164_chip_platform_data ct6373_74x164_platform_data = {
-+ .base = CT6373_74X164_GPIO_BASE
-+};
-+#endif
-+
-+static struct spi_board_info ct6373_spi_devices[] = {
-+#if 0 /* FIXME: 3.14 dropped non-DT support */
-+ {
-+ .modalias = "74x164",
-+ .max_speed_hz = 781000,
-+ .bus_num = 1,
-+ .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
-+ .mode = SPI_MODE_0,
-+ .platform_data = &ct6373_74x164_platform_data
-+ }
-+#endif
-+};
-+
-+static struct board_info __initdata board_ct6373_1 = {
-+ .name = "CT6373-1",
-+ .of_board_id = "comtrend,ct-6373",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+
-+ .has_enet1 = 1,
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "CT6373-1:green:power",
-+ .gpio = 0,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "CT6373-1:green:usb",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CT6373-1:green:wlan",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CT6373-1:green:adsl",
-+ .gpio = CT6373_74HC64_GPIO(0),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CT6373-1:green:line",
-+ .gpio = CT6373_74HC64_GPIO(1),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CT6373-1:green:fxs1",
-+ .gpio = CT6373_74HC64_GPIO(2),
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "CT6373-1:green:fxs2",
-+ .gpio = CT6373_74HC64_GPIO(3),
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 35,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM4318,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ },
-+
-+ .devs = ct6373_devices,
-+ .num_devs = ARRAY_SIZE(ct6373_devices),
-+ .spis = ct6373_spi_devices,
-+ .num_spis = ARRAY_SIZE(ct6373_spi_devices),
-+};
-+
- static struct board_info __initdata board_HW553 = {
- .name = "HW553",
- .of_board_id = "huawei,hg553",
-@@ -2392,6 +2517,7 @@ static const struct board_info __initcon
- &board_dsl_274xb_rev_c,
- &board_nb4_ser_r0,
- &board_nb4_fxc_r1,
-+ &board_ct6373_1,
- &board_HW553,
- &board_spw303v,
- #endif
diff --git a/target/linux/brcm63xx/patches-3.14/527-board_dva-g3810bn-tl-1.patch b/target/linux/brcm63xx/patches-3.14/527-board_dva-g3810bn-tl-1.patch
deleted file mode 100644
index a245ca1..0000000
--- a/target/linux/brcm63xx/patches-3.14/527-board_dva-g3810bn-tl-1.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2318,6 +2318,74 @@ static struct board_info __initdata boar
- },
- }
- };
-+
-+/* D-Link DVA-G3810BN/TL */
-+static struct board_info __initdata board_DVAG3810BN = {
-+ .name = "DVAG3810BN",
-+ .of_board_id = "d-link,dva-g3810bn/tl",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_enet0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet0 = {
-+ .has_phy = 0,
-+ .use_internal_phy = 1,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+
-+ .has_ohci0 = 1,
-+ .has_pccard = 1,
-+ .has_ehci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "DVAG3810BN::voip",
-+ .gpio = 1,
-+ },
-+ {
-+ .name = "DVAG3810BN::dsl",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DVAG3810BN::internet",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DVAG3810BN::power",
-+ .gpio = 4,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "DVAG3810BN::stop",
-+ .gpio = 5,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6358 */
-
- /*
-@@ -2520,6 +2588,7 @@ static const struct board_info __initcon
- &board_ct6373_1,
- &board_HW553,
- &board_spw303v,
-+ &board_DVAG3810BN,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6368
diff --git a/target/linux/brcm63xx/patches-3.14/528-board_nb6.patch b/target/linux/brcm63xx/patches-3.14/528-board_nb6.patch
deleted file mode 100644
index 7c0c133..0000000
--- a/target/linux/brcm63xx/patches-3.14/528-board_nb6.patch
+++ /dev/null
@@ -1,136 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -18,6 +18,7 @@
- #if 0 /* FIXME: 3.14 removed non-DT support */
- #include <linux/spi/74x164.h>
- #endif
-+#include <linux/rtl8367.h>
- #include <asm/addrspace.h>
- #include <bcm63xx_board.h>
- #include <bcm63xx_cpu.h>
-@@ -42,6 +43,8 @@
- #define NB4_SPI_GPIO_MOSI 7
- #define NB4_SPI_GPIO_CLK 6
- #define NB4_74HC64_GPIO(X) (NB4_74X164_GPIO_BASE + (X))
-+#define NB6_GPIO_RTL8367_SDA 18
-+#define NB6_GPIO_RTL8367_SCK 20
-
- #define CT6373_PID_OFFSET 0xff80
- #define CT6373_74X164_GPIO_BASE 64
-@@ -2388,6 +2391,105 @@ static struct board_info __initdata boar
- };
- #endif /* CONFIG_BCM63XX_CPU_6358 */
-
-+#ifdef CONFIG_BCM63XX_CPU_6362
-+static struct rtl8367_extif_config nb6_rtl8367_extif0_cfg = {
-+ .mode = RTL8367_EXTIF_MODE_RGMII,
-+ .txdelay = 1,
-+ .rxdelay = 5,
-+ .ability = {
-+ .force_mode = 1,
-+ .txpause = 1,
-+ .rxpause = 1,
-+ .link = 1,
-+ .duplex = 1,
-+ .speed = RTL8367_PORT_SPEED_1000,
-+ },
-+};
-+
-+static struct rtl8367_platform_data nb6_rtl8367_data = {
-+ .gpio_sda = NB6_GPIO_RTL8367_SDA,
-+ .gpio_sck = NB6_GPIO_RTL8367_SCK,
-+ .extif0_cfg = &nb6_rtl8367_extif0_cfg,
-+};
-+
-+static struct platform_device nb6_rtl8367_device = {
-+ .name = RTL8367_DRIVER_NAME,
-+ .id = -1,
-+ .dev = {
-+ .platform_data = &nb6_rtl8367_data,
-+ }
-+};
-+
-+static struct platform_device * __initdata nb6_devices[] = {
-+ &nb6_rtl8367_device,
-+};
-+
-+static struct board_info __initdata board_nb6 = {
-+ .name = "NB6",
-+ .of_board_id = "sfr,nb6-ser-r0",
-+ .expected_cpu_id = 0x6362,
-+
-+ .has_uart0 = 1,
-+
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [4] = {
-+ .used = 1,
-+ .phy_id = 0xff,
-+ .bypass_link = 1,
-+ .force_speed = 1000,
-+ .force_duplex_full = 1,
-+ .name = "RGMII",
-+ },
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 24,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 25,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ {
-+ .desc = "wlan",
-+ .gpio = 12,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ {
-+ .desc = "service",
-+ .gpio = 10,
-+ .type = EV_KEY,
-+ .code = BTN_0,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .devs = nb6_devices,
-+ .num_devs = ARRAY_SIZE(nb6_devices),
-+};
-+#endif /* CONFIG_BCM63XX_CPU_6362 */
-+
- /*
- * known 6368 boards
- */
-@@ -2591,6 +2693,10 @@ static const struct board_info __initcon
- &board_DVAG3810BN,
- #endif
-
-+#ifdef CONFIG_BCM63XX_CPU_6362
-+ &board_nb6,
-+#endif
-+
- #ifdef CONFIG_BCM63XX_CPU_6368
- &board_96368mvwg,
- &board_96368mvngr,
diff --git a/target/linux/brcm63xx/patches-3.14/529-board_fast2604.patch b/target/linux/brcm63xx/patches-3.14/529-board_fast2604.patch
deleted file mode 100644
index a505393..0000000
--- a/target/linux/brcm63xx/patches-3.14/529-board_fast2604.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1117,6 +1117,57 @@ static struct board_info __initdata boar
- .has_ehci0 = 1,
- };
-
-+static struct board_info __initdata board_FAST2604 = {
-+ .name = "F@ST2604",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .has_ohci0 = 1,
-+
-+ .has_enet1 = 1,
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "F@ST2604:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "F@ST2604:red:power",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "F@ST2604:red:inet",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "F@ST2604:green:wps",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
- static struct board_info __initdata board_rta1025w_16 = {
- .name = "RTA1025W_16",
- .of_board_id = "dynalink,rta1025w",
-@@ -2664,6 +2715,7 @@ static const struct board_info __initcon
- &board_96348gw_10,
- &board_96348gw_11,
- &board_FAST2404,
-+ &board_FAST2604,
- &board_DV201AMR,
- &board_96348gw_a,
- &board_rta1025w_16,
diff --git a/target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch b/target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch
deleted file mode 100644
index b85b961..0000000
--- a/target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch
+++ /dev/null
@@ -1,145 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -236,6 +236,134 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_A4001N1 = {
-+ .name = "963281T_TEF",
-+ .of_board_id = "adb,a4001n1",
-+ .expected_cpu_id = 0x6328,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 1,
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "A4001N1:green:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "A4001N1:red:power",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:green:inet",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:red:inet",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:green:ppp",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:red:ppp",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:green:3g",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:red:3g",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:green:wlan",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:red:wlan",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:green:eth",
-+ .gpio = 31,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N1:red:eth",
-+ .gpio = 20,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 23,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wlan",
-+ .gpio = 24,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43225,
-+ .pci_bus = 1,
-+ .pci_dev = 0,
-+ },
-+};
-+
- static struct board_info __initdata board_dsl_274xb_f1 = {
- .name = "AW4339U",
- .expected_cpu_id = 0x6328,
-@@ -2696,6 +2824,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
- &board_963281TAN,
-+ &board_A4001N1,
- &board_dsl_274xb_f1,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6338
diff --git a/target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch b/target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch
deleted file mode 100644
index 3194899..0000000
--- a/target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch
+++ /dev/null
@@ -1,127 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -166,6 +166,116 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct sprom_fixup __initdata ar5387un_fixups[] = {
-+ { .offset = 2, .value = 0x05bb },
-+ { .offset = 65, .value = 0x1204 },
-+ { .offset = 78, .value = 0x0303 },
-+ { .offset = 79, .value = 0x0202 },
-+ { .offset = 80, .value = 0xff02 },
-+ { .offset = 87, .value = 0x0315 },
-+ { .offset = 88, .value = 0x0315 },
-+ { .offset = 96, .value = 0x2048 },
-+ { .offset = 97, .value = 0xff11 },
-+ { .offset = 98, .value = 0x1567 },
-+ { .offset = 99, .value = 0xfb24 },
-+ { .offset = 100, .value = 0x3e3c },
-+ { .offset = 101, .value = 0x4038 },
-+ { .offset = 102, .value = 0xfe7f },
-+ { .offset = 103, .value = 0x1279 },
-+ { .offset = 112, .value = 0x2048 },
-+ { .offset = 113, .value = 0xff03 },
-+ { .offset = 114, .value = 0x154c },
-+ { .offset = 115, .value = 0xfb27 },
-+ { .offset = 116, .value = 0x3e3c },
-+ { .offset = 117, .value = 0x4038 },
-+ { .offset = 118, .value = 0xfe87 },
-+ { .offset = 119, .value = 0x1233 },
-+ { .offset = 203, .value = 0x2226 },
-+};
-+
-+static struct board_info __initdata board_AR5387un = {
-+ .name = "96328A-1441N1",
-+ .of_board_id = "comtrend,ar-5387un",
-+ .expected_cpu_id = 0x6328,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 1,
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "AR-5387un:green:power",
-+ .gpio = 8,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "AR-5387un:red:power",
-+ .gpio = 4,
-+ },
-+ {
-+ .name = "AR-5387un:green:inet",
-+ .gpio = 7,
-+ },
-+ {
-+ .name = "AR-5387un:red:inet",
-+ .gpio = 1,
-+ },
-+ {
-+ .name = "AR-5387un:green:dsl",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 23,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43225,
-+ .pci_bus = 1,
-+ .pci_dev = 0,
-+ .board_fixups = ar5387un_fixups,
-+ .num_board_fixups = ARRAY_SIZE(ar5387un_fixups),
-+ },
-+};
-+
- static struct board_info __initdata board_963281TAN = {
- .name = "963281TAN",
- .expected_cpu_id = 0x6328,
-@@ -2823,6 +2933,7 @@ static const struct board_info __initcon
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
-+ &board_AR5387un,
- &board_963281TAN,
- &board_A4001N1,
- &board_dsl_274xb_f1,
diff --git a/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch b/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch
deleted file mode 100644
index e80009a..0000000
--- a/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -166,6 +166,92 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct sprom_fixup __initdata ar5381u_fixups[] = {
-+ { .offset = 97, .value = 0xfee5 },
-+ { .offset = 98, .value = 0x157c },
-+ { .offset = 99, .value = 0xfae7 },
-+ { .offset = 113, .value = 0xfefa },
-+ { .offset = 114, .value = 0x15d6 },
-+ { .offset = 115, .value = 0xfaf8 },
-+};
-+
-+static struct board_info __initdata board_AR5381u = {
-+ .name = "96328A-1241N",
-+ .of_board_id = "comtrend,ar-5381u",
-+ .expected_cpu_id = 0x6328,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 1,
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "AR-5381u:green:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "AR-5381u:red:alarm",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AR-5381u:green:inet",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 23,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43225,
-+ .pci_bus = 1,
-+ .pci_dev = 0,
-+ .board_fixups = ar5381u_fixups,
-+ .num_board_fixups = ARRAY_SIZE(ar5381u_fixups),
-+ },
-+};
-+
- static struct sprom_fixup __initdata ar5387un_fixups[] = {
- { .offset = 2, .value = 0x05bb },
- { .offset = 65, .value = 0x1204 },
-@@ -2933,6 +3019,7 @@ static const struct board_info __initcon
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
-+ &board_AR5381u,
- &board_AR5387un,
- &board_963281TAN,
- &board_A4001N1,
diff --git a/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch b/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch
deleted file mode 100644
index e3fa823..0000000
--- a/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -841,6 +841,55 @@ static struct board_info __initdata boar
-
- .has_uart0 = 1,
- };
-+
-+static struct board_info __initdata board_rta770bw = {
-+ .name = "RTA770BW",
-+ .expected_cpu_id = 0x6345,
-+
-+ .has_uart0 = 1,
-+
-+ .has_enet0 = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "RTA770BW:green:usb",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "RTA770BW:green:adsl",
-+ .gpio = 8,
-+ },
-+ {
-+ .name = "RTA770BW:green:diag",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "RTA770BW:green:wlan",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 13,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6345 */
-
- /*
-@@ -3033,6 +3082,7 @@ static const struct board_info __initcon
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6345
- &board_96345gw2,
-+ &board_rta770bw,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6348
- &board_96348r,
diff --git a/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch b/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch
deleted file mode 100644
index f6b39c4..0000000
--- a/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch
+++ /dev/null
@@ -1,426 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -12,6 +12,7 @@
- #include <linux/string.h>
- #include <linux/gpio_keys.h>
- #include <linux/input.h>
-+#include <linux/pci_ids.h>
- #include <linux/platform_device.h>
- #include <linux/spi/spi.h>
- #include <linux/spi/spi_gpio.h>
-@@ -2680,6 +2681,405 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_HW556_C = {
-+ .name = "HW556_C",
-+ .of_board_id = "huawei,hg556a-c",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-+
-+ .has_caldata = 1,
-+ .caldata = {
-+ {
-+ .vendor = PCI_VENDOR_ID_RALINK,
-+ .caldata_offset = 0xeffe00,
-+ .slot = 1,
-+ .eeprom = "rt2x00.eeprom",
-+ },
-+ },
-+
-+ .has_enet1 = 1,
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "HW556:green:lan1",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan2",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:dsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:power",
-+ .gpio = 3,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "HW556:red:message",
-+ .gpio = 12,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan1",
-+ .gpio = 13,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:hspa",
-+ .gpio = 15,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan2",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan3",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan3",
-+ .gpio = 26,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan4",
-+ .gpio = 27,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan4",
-+ .gpio = 28,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "help",
-+ .gpio = 8,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_HELP,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wlan",
-+ .gpio = 9,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "restart",
-+ .gpio = 10,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 11,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_CONFIG,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+static struct board_info __initdata board_HW556_A = {
-+ .name = "HW556_A",
-+ .of_board_id = "huawei,hg556a-a",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-+
-+ .has_caldata = 1,
-+ .caldata = {
-+ {
-+ .vendor = PCI_VENDOR_ID_ATHEROS,
-+ .caldata_offset = 0xf7e000,
-+ .slot = 1,
-+ .endian_check = 1,
-+ .led_pin = 2,
-+ },
-+ },
-+
-+ .has_enet1 = 1,
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "HW556:red:message",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:hspa",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:dsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:power",
-+ .gpio = 3,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "HW556:red:all",
-+ .gpio = 6,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "HW556:green:lan1",
-+ .gpio = 12,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan1",
-+ .gpio = 13,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan2",
-+ .gpio = 15,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan2",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan3",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan3",
-+ .gpio = 26,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan4",
-+ .gpio = 27,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan4",
-+ .gpio = 28,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "help",
-+ .gpio = 8,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_HELP,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wlan",
-+ .gpio = 9,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "restart",
-+ .gpio = 10,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 11,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_CONFIG,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+static struct board_info __initdata board_HW556_B = {
-+ .name = "HW556_B",
-+ .of_board_id = "huawei,hg556a-b",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 2,
-+
-+ .has_caldata = 1,
-+ .caldata = {
-+ {
-+ .vendor = PCI_VENDOR_ID_ATHEROS,
-+ .caldata_offset = 0xefe000,
-+ .slot = 1,
-+ .endian_check = 1,
-+ .led_pin = 2,
-+ },
-+ },
-+
-+ .has_enet1 = 1,
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "HW556:red:message",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:hspa",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:dsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:power",
-+ .gpio = 3,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "HW556:red:all",
-+ .gpio = 6,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "HW556:green:lan1",
-+ .gpio = 12,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan1",
-+ .gpio = 13,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan2",
-+ .gpio = 15,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan2",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan3",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan3",
-+ .gpio = 26,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:green:lan4",
-+ .gpio = 27,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "HW556:red:lan4",
-+ .gpio = 28,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "help",
-+ .gpio = 8,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_HELP,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wlan",
-+ .gpio = 9,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "restart",
-+ .gpio = 10,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 11,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_CONFIG,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
- /* T-Home Speedport W 303V Typ B */
- static struct board_info __initdata board_spw303v = {
- .name = "96358-502V",
-@@ -3118,6 +3518,9 @@ static const struct board_info __initcon
- &board_nb4_fxc_r1,
- &board_ct6373_1,
- &board_HW553,
-+ &board_HW556_A,
-+ &board_HW556_B,
-+ &board_HW556_C,
- &board_spw303v,
- &board_DVAG3810BN,
- #endif
diff --git a/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch b/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch
deleted file mode 100644
index 509e41e..0000000
--- a/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -891,6 +891,60 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+// Actually this board is the very same as the rta770bw,
-+// where the additional 'b' within the name just
-+// just indicates 'Annex B'. The ADSL Modem itself is able
-+// to handle both Annex A as well as Annex B -
-+// the loaded firmware makes the only difference
-+static struct board_info __initdata board_rta770w = {
-+ .name = "RTA770W",
-+ .expected_cpu_id = 0x6345,
-+
-+ .has_uart0 = 1,
-+
-+ .has_enet0 = 1,
-+
-+ .enet0 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "RTA770W:green:usb",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "RTA770W:green:adsl",
-+ .gpio = 8,
-+ },
-+ {
-+ .name = "RTA770W:green:diag",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "RTA770W:green:wlan",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 13,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .active_low = 1,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6345 */
-
- /*
-@@ -3483,6 +3537,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6345
- &board_96345gw2,
- &board_rta770bw,
-+ &board_rta770w,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6348
- &board_96348r,
diff --git a/target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch b/target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch
deleted file mode 100644
index cd03100..0000000
--- a/target/linux/brcm63xx/patches-3.14/536-board_fast2704.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From: Marcin Jurkowski <marcin1j@gmail.com>
-Date: Thu, 31 Oct 2013 22:33:10 +0000
-Subject: [PATCH] bcm63xx: Add kernel support for Sagemcom F@ST2704V2 ADSL
- router
-
-This adds kernel support support for Sagemcom F@st 2704 wireless ADSL
-router.
-It's a BCM6328-based 802.11n wireless router with USB port and ADSL2+
-modem equipped with 64 MiB RAM and 8 MiB flash.
-
-Signed-off-by: Marcin Jurkowski <marcin1j@gmail.com>
----
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -665,6 +665,122 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_FAST2704V2 = {
-+ .name = "F@ST2704V2",
-+ .expected_cpu_id = 0x6328,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .has_usbd = 1,
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ /* front LEDs */
-+ {
-+ .name = "F@ST2704V2:green:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "F@ST2704V2:red:power",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "F@ST2704V2:red:inet",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "F@ST2704V2:green:dsl",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "F@ST2704V2:green:inet",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "F@ST2704V2:green:usb",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+
-+ /* side button LEDs */
-+ {
-+ .name = "F@ST2704V2:green:wps",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+
-+ /* FIXME: can't control gpio0 line in "out" state, needs further investigation */
-+ /*
-+ {
-+ .name = "F@ST2704V2:green:rfkill",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ */
-+
-+ },
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 23,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 24,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "rfkill",
-+ .gpio = 15,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6328 */
-
- /*
-@@ -3527,6 +3643,7 @@ static const struct board_info __initcon
- &board_963281TAN,
- &board_A4001N1,
- &board_dsl_274xb_f1,
-+ &board_FAST2704V2,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6338
- &board_96338gw,
diff --git a/target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch b/target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch
deleted file mode 100644
index cedeac8..0000000
--- a/target/linux/brcm63xx/patches-3.14/537-board_fast2504n.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From: Max Staudt <openwrt.max@enpas.org>
-Date: Wed, 15 Jan 2014 18:51:13 +0000
-Subject: [PATCH] brcm63xx: F@ST2504n board support (Linux-3.10.26)
-
-Signed-off-by: Max Staudt <openwrt.max@enpas.org>
----
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -3482,6 +3482,96 @@ static struct board_info __initdata boar
- .devs = nb6_devices,
- .num_devs = ARRAY_SIZE(nb6_devices),
- };
-+
-+static struct board_info __initdata board_fast2504n = {
-+ .name = "F@ST2504n",
-+ .expected_cpu_id = 0x6362,
-+
-+ .has_uart0 = 1,
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "fast2504n:orange:power",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "fast2504n:green:power",
-+ .gpio = 10,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "fast2504n:red:internet",
-+ .gpio = 26,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "fast2504n:green:ok",
-+ .gpio = 28,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "fast2504n:orange:ok",
-+ .gpio = 29,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "fast2504n:orange:wlan",
-+ .gpio = 30,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 24,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 25,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6362 */
-
- /*
-@@ -3699,6 +3789,7 @@ static const struct board_info __initcon
-
- #ifdef CONFIG_BCM63XX_CPU_6362
- &board_nb6,
-+ &board_fast2504n,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6368
diff --git a/target/linux/brcm63xx/patches-3.14/550-alice_gate2_leds.patch b/target/linux/brcm63xx/patches-3.14/550-alice_gate2_leds.patch
deleted file mode 100644
index 10ac316..0000000
--- a/target/linux/brcm63xx/patches-3.14/550-alice_gate2_leds.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2306,6 +2306,99 @@ static struct board_info __initdata boar
-
- .has_ohci0 = 1,
- .has_ehci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "AGPF-S0:red:power",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:green:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "AGPF-S0:red:service",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:green:service",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:green:adsl",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:red:adsl",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:red:wifi",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:green:wifi",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:green:internet",
-+ .gpio = 25,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:red:internet",
-+ .gpio = 24,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:red:usr1",
-+ .gpio = 27,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:green:usr1",
-+ .gpio = 26,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:red:usr2",
-+ .gpio = 30,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AGPF-S0:green:usr2",
-+ .gpio = 29,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 37,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
- };
-
- static struct board_info __initdata board_DWVS0 = {
diff --git a/target/linux/brcm63xx/patches-3.14/551-96348gw_a_leds.patch b/target/linux/brcm63xx/patches-3.14/551-96348gw_a_leds.patch
deleted file mode 100644
index 7b1443b..0000000
--- a/target/linux/brcm63xx/patches-3.14/551-96348gw_a_leds.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1777,6 +1777,19 @@ static struct board_info __initdata boar
- },
-
- .has_ohci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "96348GW-A::adsl",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96348GW-A::usb",
-+ .gpio = 0,
-+ .active_low = 1,
-+ }
-+ },
- };
-
- /* NetGear DG834G v4 */
diff --git a/target/linux/brcm63xx/patches-3.14/552-board_96348gw-10_reset_button.patch b/target/linux/brcm63xx/patches-3.14/552-board_96348gw-10_reset_button.patch
deleted file mode 100644
index 5a249c5..0000000
--- a/target/linux/brcm63xx/patches-3.14/552-board_96348gw-10_reset_button.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1173,6 +1173,17 @@ static struct board_info __initdata boar
- .active_low = 1,
- },
- },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 6,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
- };
-
- static struct board_info __initdata board_96348gw_11 = {
diff --git a/target/linux/brcm63xx/patches-3.14/553-boards_probe_switch.patch b/target/linux/brcm63xx/patches-3.14/553-boards_probe_switch.patch
deleted file mode 100644
index 4fa865d..0000000
--- a/target/linux/brcm63xx/patches-3.14/553-boards_probe_switch.patch
+++ /dev/null
@@ -1,119 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -795,6 +795,8 @@ static struct board_info __initdata boar
- .has_uart0 = 1,
- .has_enet0 = 1,
- .enet0 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -839,6 +841,8 @@ static struct board_info __initdata boar
- .has_uart0 = 1,
- .has_enet0 = 1,
- .enet0 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -1129,6 +1133,8 @@ static struct board_info __initdata boar
- .use_internal_phy = 1,
- },
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -1203,6 +1209,8 @@ static struct board_info __initdata boar
- },
-
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -1484,6 +1492,8 @@ static struct board_info __initdata boar
- .use_internal_phy = 1,
- },
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -1663,6 +1673,8 @@ static struct board_info __initdata boar
- },
-
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -1739,6 +1751,8 @@ static struct board_info __initdata boar
- .use_internal_phy = 1,
- },
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -1762,6 +1776,8 @@ static struct board_info __initdata boar
- .use_internal_phy = 1,
- },
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -1783,6 +1799,8 @@ static struct board_info __initdata boar
- .use_internal_phy = 1,
- },
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -2128,6 +2146,8 @@ static struct board_info __initdata boar
- },
-
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -2182,6 +2202,8 @@ static struct board_info __initdata boar
- },
-
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -2324,6 +2346,8 @@ static struct board_info __initdata boar
- },
-
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
-@@ -2443,6 +2467,8 @@ static struct board_info __initdata boar
- },
-
- .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
- .force_speed_100 = 1,
- .force_duplex_full = 1,
- },
diff --git a/target/linux/brcm63xx/patches-3.14/554-board_DWVS0_leds_buttons.patch b/target/linux/brcm63xx/patches-3.14/554-board_DWVS0_leds_buttons.patch
deleted file mode 100644
index 4ebe502..0000000
--- a/target/linux/brcm63xx/patches-3.14/554-board_DWVS0_leds_buttons.patch
+++ /dev/null
@@ -1,97 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -2475,6 +2475,94 @@ static struct board_info __initdata boar
-
- .has_ohci0 = 1,
- .has_ehci0 = 1,
-+
-+ .leds = {
-+ {
-+ .name = "DWV-S0:red:power",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:green:power",
-+ .gpio = 4,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "DWV-S0:red:internet",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:green:internet",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:green:ADSL",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:red:ADSL",
-+ .gpio = 12,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:red:wifi",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:green:VoIP",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:red:VoIP",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:red:ethernet",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:green:ethernet",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:red:USB",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "DWV-S0:green:USB",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 37,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
- };
-
- /* D-Link DSL-274xB revison C2/C3 */
diff --git a/target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch b/target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch
deleted file mode 100644
index 7b9fa91..0000000
--- a/target/linux/brcm63xx/patches-3.14/555-board_96318ref.patch
+++ /dev/null
@@ -1,106 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -87,6 +87,93 @@ static struct board_info __initdata boar
- #endif /* CONFIG_BCM63XX_CPU_3368 */
-
- /*
-+ * known 6318 boards
-+ */
-+#ifdef CONFIG_BCM63XX_CPU_6318
-+static struct board_info __initdata board_96318ref = {
-+ .name = "96318REF",
-+ .expected_cpu_id = 0x6318,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+
-+ .has_usbd = 1,
-+
-+ .usbd = {
-+ .use_fullspeed = 0,
-+ .port_no = 0,
-+ },
-+
-+ .has_enetsw = 1,
-+
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "96318REF:red:post-failed",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96318REF:green:inet",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96318REF:red:inet-fail",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "wps",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+#endif /* CONFIG_BCM63XX_CPU_6318 */
-+
-+/*
- * known 6328 boards
- */
- #ifdef CONFIG_BCM63XX_CPU_6328
-@@ -3957,6 +4044,9 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_3368
- &board_cvg834g,
- #endif
-+#ifdef CONFIG_BCM63XX_CPU_6318
-+ &board_96318ref,
-+#endif
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
- &board_AR5381u,
diff --git a/target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch b/target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch
deleted file mode 100644
index 38fe755..0000000
--- a/target/linux/brcm63xx/patches-3.14/556-board_96318ref_p300.patch
+++ /dev/null
@@ -1,105 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -171,6 +171,94 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_96318ref_p300 = {
-+ .name = "96318REF_P300",
-+ .expected_cpu_id = 0x6318,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+
-+ .has_usbd = 1,
-+
-+ .usbd = {
-+ .use_fullspeed = 0,
-+ .port_no = 0,
-+ },
-+
-+ .has_enetsw = 1,
-+
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "96318REF_P300:red:post-failed",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96318REF_P300:green:inet",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96318REF_P300:red:inet-fail",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "96318REF_P300::usb-pwron",
-+ .gpio = 13,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "wps",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6318 */
-
- /*
-@@ -4046,6 +4134,7 @@ static const struct board_info __initcon
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6318
- &board_96318ref,
-+ &board_96318ref_p300,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
diff --git a/target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch b/target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch
deleted file mode 100644
index 7a3cea5..0000000
--- a/target/linux/brcm63xx/patches-3.14/557-board_bcm963269bhr.patch
+++ /dev/null
@@ -1,88 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4126,6 +4126,75 @@ static struct board_info __initdata boar
- #endif /* CONFIG_BCM63XX_CPU_6368 */
-
- /*
-+ * known 63268/63269 boards
-+ */
-+#ifdef CONFIG_BCM63XX_CPU_63268
-+static struct board_info __initdata board_963269bhr = {
-+ .name = "963269BHR",
-+ .expected_cpu_id = 0x63268,
-+
-+ .has_uart0 = 1,
-+
-+ .has_pci = 1,
-+
-+ .has_ehci0 = 1,
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "port1",
-+ },
-+
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "port2",
-+ },
-+
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "port3",
-+ },
-+
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "port4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "963629BHR:green:usb1",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963629BHR:green:usb2",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 32,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+#endif /* CONFIG_BCM63XX_CPU_63268 */
-+
-+/*
- * all boards
- */
- static const struct board_info __initconst *bcm963xx_boards[] = {
-@@ -4206,6 +4275,9 @@ static const struct board_info __initcon
- &board_96368mvwg,
- &board_96368mvngr,
- #endif
-+#ifdef CONFIG_BCM63XX_CPU_63268
-+ &board_963269bhr,
-+#endif
- };
-
- /*
diff --git a/target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch b/target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch
deleted file mode 100644
index 1d485b6..0000000
--- a/target/linux/brcm63xx/patches-3.14/558-board_AR1004G.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From: "mexit@o2.pl" <mexit@o2.pl>
-Date: Sun, 24 Nov 2013 21:33:38 +0000
-Subject: [PATCH 4/5] brcm63xx: add support for Asmax AR 1004g router
-
-Support for Asmax AR 1004g router
-
-Signed-off-by: Adrian Feliks <mexit@o2.pl>
----
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1435,6 +1435,52 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_96348gw_10_AR1004G = {
-+ .name = "AR1004G",
-+ .of_board_id = "asmax,ar1004g",
-+ .expected_cpu_id = 0x6348,
-+
-+ .has_uart0 = 1,
-+ .has_enet1 = 1,
-+ .has_pci = 1,
-+
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "AR1004G:green:inet",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AR1004G:green:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "AR1004G:red:power",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
-
- /* BT Voyager 2110 */
- static struct board_info __initdata board_V2110 = {
-@@ -4246,6 +4292,7 @@ static const struct board_info __initcon
- &board_96348A_122,
- &board_CPVA502plus,
- &board_96348W3,
-+ &board_96348gw_10_AR1004G,
- #endif
-
- #ifdef CONFIG_BCM63XX_CPU_6358
diff --git a/target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch b/target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch
deleted file mode 100644
index f92ce6f..0000000
--- a/target/linux/brcm63xx/patches-3.14/559-board_vw6339gu.patch
+++ /dev/null
@@ -1,119 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4238,6 +4238,108 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct board_info __initdata board_vw6339gu = {
-+ .name = "VW6339GU",
-+ .expected_cpu_id = 0x63268,
-+
-+ .has_uart0 = 1,
-+
-+ .has_ehci0 = 1,
-+ .has_ohci0 = 1,
-+ .num_usbh_ports = 1,
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "LAN2",
-+ },
-+
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "LAN3",
-+ },
-+
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "LAN4",
-+ },
-+
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "LAN1",
-+ },
-+
-+ [4] = {
-+ .used = 1,
-+ .phy_id = 7,
-+ .name = "WAN",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "VW6339GU:green:power",
-+ .gpio = 1,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VW6339GU:red:power",
-+ .gpio = 0,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VW6339GU:green:internet",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VW6339GU:red:internet",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VW6339GU:green:dsl",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VW6339GU:green:wps",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VW6339GU:green:usb",
-+ .gpio = 15,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 32,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 34,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_63268 */
-
- /*
-@@ -4324,6 +4426,7 @@ static const struct board_info __initcon
- #endif
- #ifdef CONFIG_BCM63XX_CPU_63268
- &board_963269bhr,
-+ &board_vw6339gu,
- #endif
- };
-
diff --git a/target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch b/target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch
deleted file mode 100644
index d9a704f..0000000
--- a/target/linux/brcm63xx/patches-3.14/560-board_963268gu_p300.patch
+++ /dev/null
@@ -1,142 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4175,6 +4175,131 @@ static struct board_info __initdata boar
- * known 63268/63269 boards
- */
- #ifdef CONFIG_BCM63XX_CPU_63268
-+static struct board_info __initdata board_963268bu_p300 = {
-+ .name = "963268BU_P300",
-+ .expected_cpu_id = 0x63268,
-+
-+ .has_uart0 = 1,
-+
-+ .has_ehci0 = 1,
-+ .has_ohci0 = 1,
-+ .num_usbh_ports = 1,
-+
-+ .has_usbd = 1,
-+
-+ .usbd = {
-+ .use_fullspeed = 0,
-+ .port_no = 0,
-+ },
-+
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 17,
-+ .name = "FE1",
-+ },
-+
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "GbE2",
-+ },
-+
-+ [4] = {
-+ .used = 1,
-+ .phy_id = 0,
-+ .name = "GbE3",
-+ },
-+
-+ [5] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "GbE1",
-+ },
-+
-+ [6] = {
-+ .used = 1,
-+ .phy_id = 24,
-+ .name = "GbE4",
-+ },
-+
-+ [7] = {
-+ .used = 1,
-+ .phy_id = 25,
-+ .name = "GbE5",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "963268BU_P300:green:power",
-+ .gpio = 20,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:red:power",
-+ .gpio = 21,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:green:internet",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:red:internet",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:green:adsl",
-+ .gpio = 3,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:green:wps",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:green:voip1",
-+ .gpio = 4,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:green:voip2",
-+ .gpio = 5,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "963268BU_P300:green:pots",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 32,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 33,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+};
-+
- static struct board_info __initdata board_963269bhr = {
- .name = "963269BHR",
- .expected_cpu_id = 0x63268,
-@@ -4425,6 +4550,7 @@ static const struct board_info __initcon
- &board_96368mvngr,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_63268
-+ &board_963268bu_p300,
- &board_963269bhr,
- &board_vw6339gu,
- #endif
diff --git a/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch b/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch
deleted file mode 100644
index f48eaeb..0000000
--- a/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch
+++ /dev/null
@@ -1,137 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -13,6 +13,7 @@
- #include <linux/gpio_keys.h>
- #include <linux/input.h>
- #include <linux/pci_ids.h>
-+#include <linux/platform_data/b53.h>
- #include <linux/platform_device.h>
- #include <linux/spi/spi.h>
- #include <linux/spi/spi_gpio.h>
-@@ -4169,6 +4170,118 @@ static struct board_info __initdata boar
- .has_ohci0 = 1,
- .has_ehci0 = 1,
- };
-+
-+static struct b53_platform_data WAP5813n_b53_pdata = {
-+ .alias = "eth0",
-+};
-+
-+static struct spi_board_info WAP5813n_spi_devices[] = {
-+ {
-+ .modalias = "b53-switch",
-+ .max_speed_hz = 781000,
-+ .bus_num = 0,
-+ .chip_select = 0,
-+ .platform_data = &WAP5813n_b53_pdata,
-+ }
-+};
-+
-+static struct sprom_fixup __initdata wap5813n_fixups[] = {
-+ { .offset = 97, .value = 0xfeed },
-+ { .offset = 98, .value = 0x15d1 },
-+ { .offset = 99, .value = 0xfb0d },
-+ { .offset = 113, .value = 0xfef7 },
-+ { .offset = 114, .value = 0x15f7 },
-+ { .offset = 115, .value = 0xfb1a },
-+};
-+
-+static struct board_info __initdata board_WAP5813n = {
-+ .name = "96369R-1231N",
-+ .of_board_id = "comtrend,wap-5813n",
-+ .expected_cpu_id = 0x6368,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+
-+ .has_enetsw = 1,
-+ .enetsw = {
-+ .used_ports = {
-+ [4] = {
-+ .used = 1,
-+ .phy_id = 0xff,
-+ .bypass_link = 1,
-+ .force_speed = 1000,
-+ .force_duplex_full = 1,
-+ .name = "RGMII",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "WAP-5813n:green:power",
-+ .gpio = 22,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "WAP-5813n:red:power",
-+ .gpio = 24,
-+ },
-+ {
-+ .name = "WAP-5813n:green:inet",
-+ .gpio = 5,
-+ },
-+ {
-+ .name = "WAP-5813n:red:inet",
-+ .gpio = 31,
-+ },
-+ {
-+ .name = "WAP-5813n:green:wps",
-+ .gpio = 23,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "wlan",
-+ .gpio = 32,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 35,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43222,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ .board_fixups = wap5813n_fixups,
-+ .num_board_fixups = ARRAY_SIZE(wap5813n_fixups),
-+ },
-+
-+ .spis = WAP5813n_spi_devices,
-+ .num_spis = ARRAY_SIZE(WAP5813n_spi_devices),
-+};
- #endif /* CONFIG_BCM63XX_CPU_6368 */
-
- /*
-@@ -4548,6 +4661,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6368
- &board_96368mvwg,
- &board_96368mvngr,
-+ &board_WAP5813n,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_63268
- &board_963268bu_p300,
diff --git a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch b/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch
deleted file mode 100644
index 61afff6..0000000
--- a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch
+++ /dev/null
@@ -1,128 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4171,6 +4171,117 @@ static struct board_info __initdata boar
- .has_ehci0 = 1,
- };
-
-+static struct sprom_fixup __initdata vr3025u_fixups[] = {
-+ { .offset = 97, .value = 0xfeb3 },
-+ { .offset = 98, .value = 0x1618 },
-+ { .offset = 99, .value = 0xfab0 },
-+ { .offset = 113, .value = 0xfed1 },
-+ { .offset = 114, .value = 0x1609 },
-+ { .offset = 115, .value = 0xfad9 },
-+};
-+
-+static struct board_info __initdata board_VR3025u = {
-+ .name = "96368M-1541N",
-+ .of_board_id = "comtrend,vr-3025u",
-+ .expected_cpu_id = 0x6368,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+
-+ .has_enetsw = 1,
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "port1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "port2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "port3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "port4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "VR-3025u:green:dsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025u:green:inet",
-+ .gpio = 5,
-+ },
-+ {
-+ .name = "VR-3025u:green:lan1",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025u:green:lan2",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025u:green:lan3",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025u:green:lan4",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025u:green:power",
-+ .gpio = 22,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "VR-3025u:red:power",
-+ .gpio = 24,
-+ },
-+ {
-+ .name = "VR-3025u:red:inet",
-+ .gpio = 31,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43222,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ .board_fixups = vr3025u_fixups,
-+ .num_board_fixups = ARRAY_SIZE(vr3025u_fixups),
-+ },
-+};
-+
- static struct b53_platform_data WAP5813n_b53_pdata = {
- .alias = "eth0",
- };
-@@ -4661,6 +4772,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6368
- &board_96368mvwg,
- &board_96368mvngr,
-+ &board_VR3025u,
- &board_WAP5813n,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_63268
diff --git a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch b/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch
deleted file mode 100644
index 7ef72ec..0000000
--- a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch
+++ /dev/null
@@ -1,128 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4282,6 +4282,117 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct sprom_fixup __initdata vr3025un_fixups[] = {
-+ { .offset = 97, .value = 0xfeb3 },
-+ { .offset = 98, .value = 0x1618 },
-+ { .offset = 99, .value = 0xfab0 },
-+ { .offset = 113, .value = 0xfed1 },
-+ { .offset = 114, .value = 0x1609 },
-+ { .offset = 115, .value = 0xfad9 },
-+};
-+
-+static struct board_info __initdata board_VR3025un = {
-+ .name = "96368M-1341N",
-+ .of_board_id = "comtrend,vr-3025un",
-+ .expected_cpu_id = 0x6368,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+
-+ .has_enetsw = 1,
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "port1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "port2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "port3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "port4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "VR-3025un:green:dsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025un:green:inet",
-+ .gpio = 5,
-+ },
-+ {
-+ .name = "VR-3025un:green:lan1",
-+ .gpio = 6,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025un:green:lan2",
-+ .gpio = 7,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025un:green:lan3",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025un:green:iptv",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "VR-3025un:green:power",
-+ .gpio = 22,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "VR-3025un:red:power",
-+ .gpio = 24,
-+ },
-+ {
-+ .name = "VR-3025un:red:inet",
-+ .gpio = 31,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43222,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ .board_fixups = vr3025un_fixups,
-+ .num_board_fixups = ARRAY_SIZE(vr3025un_fixups),
-+ },
-+};
-+
- static struct b53_platform_data WAP5813n_b53_pdata = {
- .alias = "eth0",
- };
-@@ -4773,6 +4884,7 @@ static const struct board_info __initcon
- &board_96368mvwg,
- &board_96368mvngr,
- &board_VR3025u,
-+ &board_VR3025un,
- &board_WAP5813n,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_63268
diff --git a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch
deleted file mode 100644
index 9ba2226..0000000
--- a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch
+++ /dev/null
@@ -1,108 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -4180,6 +4180,97 @@ static struct sprom_fixup __initdata vr3
- { .offset = 115, .value = 0xfad9 },
- };
-
-+static struct board_info __initdata board_P870HW51A_V2 = {
-+ .name = "P870HW-51a_v2",
-+ .of_board_id = "zyxel,p870hw-51a-v2",
-+ .expected_cpu_id = 0x6368,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+
-+ .has_enetsw = 1,
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "port1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "port2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "port3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "port4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "P870HW-51a:green:power",
-+ .gpio = 0,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "P870HW-51a:green:dsl",
-+ .gpio = 2,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "P870HW-51a:green:inet",
-+ .gpio = 22,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "P870HW-51a:orange:wps",
-+ .gpio = 24,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "P870HW-51a:red:inet",
-+ .gpio = 33,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 35,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM4318,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ },
-+};
-+
- static struct board_info __initdata board_VR3025u = {
- .name = "96368M-1541N",
- .of_board_id = "comtrend,vr-3025u",
-@@ -4883,6 +4974,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6368
- &board_96368mvwg,
- &board_96368mvngr,
-+ &board_P870HW51A_V2,
- &board_VR3025u,
- &board_VR3025un,
- &board_WAP5813n,
diff --git a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch b/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch
deleted file mode 100644
index 9828799..0000000
--- a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -3226,6 +3226,57 @@ static struct board_info __initdata boar
- .num_spis = ARRAY_SIZE(ct6373_spi_devices),
- };
-
-+static struct board_info __initdata board_HW520 = {
-+ .name = "HW6358GW_B",
-+ .of_board_id = "huawei,hg520v",
-+ .expected_cpu_id = 0x6358,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+
-+ .has_enet0 = 1,
-+ .enet0 = {
-+ .has_phy = 1,
-+ .use_internal_phy = 1,
-+ },
-+
-+ .has_enet1 = 1,
-+ .enet1 = {
-+ .has_phy = 1,
-+ .phy_id = 0,
-+ .force_speed_100 = 1,
-+ .force_duplex_full = 1,
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "HW520:green:net",
-+ .gpio = 32,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 37,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM4318,
-+ .pci_bus = 0,
-+ .pci_dev = 1,
-+ },
-+};
-+
- static struct board_info __initdata board_HW553 = {
- .name = "HW553",
- .of_board_id = "huawei,hg553",
-@@ -4958,6 +5009,7 @@ static const struct board_info __initcon
- &board_nb4_ser_r0,
- &board_nb4_fxc_r1,
- &board_ct6373_1,
-+ &board_HW520,
- &board_HW553,
- &board_HW556_A,
- &board_HW556_B,
diff --git a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch b/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch
deleted file mode 100644
index 2b90ee1..0000000
--- a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch
+++ /dev/null
@@ -1,107 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -609,6 +609,96 @@ static struct board_info __initdata boar
- },
- };
-
-+static struct board_info __initdata board_A4001N = {
-+ .name = "96328dg2x2",
-+ .of_board_id = "adb,a4001n",
-+ .expected_cpu_id = 0x6328,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 1,
-+ .has_enetsw = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "A4001N:green:power",
-+ .gpio = 8,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "A4001N:red:power",
-+ .gpio = 4,
-+ },
-+ {
-+ .name = "A4001N:red:inet",
-+ .gpio = 1,
-+ },
-+ {
-+ .name = "A4001N:green:usb",
-+ .gpio = 10,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "A4001N:green:dsl",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "reset",
-+ .gpio = 23,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 24,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43225,
-+ .pci_bus = 1,
-+ .pci_dev = 0,
-+ },
-+};
-+
- static struct board_info __initdata board_A4001N1 = {
- .name = "963281T_TEF",
- .of_board_id = "adb,a4001n1",
-@@ -4960,6 +5050,7 @@ static const struct board_info __initcon
- &board_AR5381u,
- &board_AR5387un,
- &board_963281TAN,
-+ &board_A4001N,
- &board_A4001N1,
- &board_dsl_274xb_f1,
- &board_FAST2704V2,
diff --git a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch b/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch
deleted file mode 100644
index 877d626..0000000
--- a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch
+++ /dev/null
@@ -1,152 +0,0 @@
---- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
-+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -260,6 +260,141 @@ static struct board_info __initdata boar
- },
- },
- };
-+
-+static struct sprom_fixup __initdata dsl2751b_e1_fixups[] = {
-+ { .offset = 96, .value = 0x2046 },
-+ { .offset = 97, .value = 0xfe9d },
-+ { .offset = 98, .value = 0x1854 },
-+ { .offset = 99, .value = 0xfa59 },
-+ { .offset = 112, .value = 0x2046 },
-+ { .offset = 113, .value = 0xfe79 },
-+ { .offset = 114, .value = 0x17f5 },
-+ { .offset = 115, .value = 0xfa47 },
-+ { .offset = 161, .value = 0x2222 },
-+ { .offset = 162, .value = 0x2222 },
-+ { .offset = 169, .value = 0x2222 },
-+ { .offset = 170, .value = 0x2222 },
-+ { .offset = 171, .value = 0x5555 },
-+ { .offset = 172, .value = 0x5555 },
-+ { .offset = 173, .value = 0x4444 },
-+ { .offset = 174, .value = 0x4444 },
-+ { .offset = 175, .value = 0x5555 },
-+ { .offset = 176, .value = 0x5555 },
-+};
-+
-+static struct board_info __initdata board_dsl_2751b_d1 = {
-+ .name = "AW5200B",
-+ .expected_cpu_id = 0x6318,
-+
-+ .has_uart0 = 1,
-+ .has_pci = 1,
-+ .use_fallback_sprom = 1,
-+
-+ .has_enetsw = 1,
-+
-+ .has_ohci0 = 1,
-+ .has_ehci0 = 1,
-+ .num_usbh_ports = 1,
-+
-+ .enetsw = {
-+ .used_ports = {
-+ [0] = {
-+ .used = 1,
-+ .phy_id = 1,
-+ .name = "Port 1",
-+ },
-+ [1] = {
-+ .used = 1,
-+ .phy_id = 2,
-+ .name = "Port 2",
-+ },
-+ [2] = {
-+ .used = 1,
-+ .phy_id = 3,
-+ .name = "Port 3",
-+ },
-+ [3] = {
-+ .used = 1,
-+ .phy_id = 4,
-+ .name = "Port 4",
-+ },
-+ },
-+ },
-+
-+ .leds = {
-+ {
-+ .name = "dsl-275xb:green:power",
-+ .gpio = 3,
-+ .active_low = 1,
-+ .default_trigger = "default-on",
-+ },
-+ {
-+ .name = "dsl-275xb:green:inet",
-+ .gpio = 8,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-275xb:red:inet-fail",
-+ .gpio = 9,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-275xb:red:post-failed",
-+ .gpio = 11,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-275xb:wps:blue",
-+ .gpio = 16,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-275xb:green:dsl",
-+ .gpio = 17,
-+ .active_low = 1,
-+ },
-+ {
-+ .name = "dsl-275xb:green:usb",
-+ .gpio = 49, /* FIXME: does not work! */
-+ .active_low = 1,
-+ },
-+ },
-+
-+ .buttons = {
-+ {
-+ .desc = "wlan",
-+ .gpio = 2,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WLAN,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "wps",
-+ .gpio = 33,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_WPS_BUTTON,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ {
-+ .desc = "reset",
-+ .gpio = 34,
-+ .active_low = 1,
-+ .type = EV_KEY,
-+ .code = KEY_RESTART,
-+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+ },
-+ },
-+
-+ .fallback_sprom = {
-+ .type = SPROM_BCM43217,
-+ .pci_bus = 1,
-+ .pci_dev = 0,
-+ .board_fixups = dsl2751b_e1_fixups,
-+ .num_board_fixups = ARRAY_SIZE(dsl2751b_e1_fixups),
-+ },
-+};
- #endif /* CONFIG_BCM63XX_CPU_6318 */
-
- /*
-@@ -5044,6 +5179,7 @@ static const struct board_info __initcon
- #ifdef CONFIG_BCM63XX_CPU_6318
- &board_96318ref,
- &board_96318ref_p300,
-+ &board_dsl_2751b_d1,
- #endif
- #ifdef CONFIG_BCM63XX_CPU_6328
- &board_96328avng,
diff --git a/target/linux/brcm63xx/patches-3.14/800-wl_exports.patch b/target/linux/brcm63xx/patches-3.14/800-wl_exports.patch
deleted file mode 100644
index 98bcee8..0000000
--- a/target/linux/brcm63xx/patches-3.14/800-wl_exports.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/arch/mips/bcm63xx/nvram.c
-+++ b/arch/mips/bcm63xx/nvram.c
-@@ -40,6 +40,12 @@ struct bcm963xx_nvram {
- static struct bcm963xx_nvram nvram;
- static int mac_addr_used;
-
-+/*
-+ * Required export for WL
-+ */
-+u32 nvram_buf[5] = { 0, cpu_to_le32(20), 0, 0, 0 };
-+EXPORT_SYMBOL(nvram_buf);
-+
- void __init bcm63xx_nvram_init(void *addr)
- {
- unsigned int check_len;
---- a/arch/mips/mm/cache.c
-+++ b/arch/mips/mm/cache.c
-@@ -58,6 +58,7 @@ void (*_dma_cache_wback)(unsigned long s
- void (*_dma_cache_inv)(unsigned long start, unsigned long size);
-
- EXPORT_SYMBOL(_dma_cache_wback_inv);
-+EXPORT_SYMBOL(_dma_cache_inv);
-
- #endif /* CONFIG_DMA_NONCOHERENT */
-
diff --git a/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch b/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch
deleted file mode 100644
index 11a8353..0000000
--- a/target/linux/brcm63xx/patches-3.14/801-ssb_export_fallback_sprom.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/arch/mips/bcm63xx/sprom.c
-+++ b/arch/mips/bcm63xx/sprom.c
-@@ -8,6 +8,7 @@
- */
-
- #include <linux/init.h>
-+#include <linux/export.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
- #include <linux/platform_device.h>
-@@ -387,7 +388,19 @@ struct fallback_sprom_match {
- struct ssb_sprom sprom;
- };
-
--static struct fallback_sprom_match fallback_sprom;
-+struct fallback_sprom_match fallback_sprom;
-+
-+int bcm63xx_get_fallback_sprom(uint pci_bus, uint pci_slot, struct ssb_sprom *out)
-+{
-+ if (pci_bus != fallback_sprom.pci_bus ||
-+ pci_slot != fallback_sprom.pci_dev)
-+ pr_warn("fallback_sprom: pci bus/device num mismatch: expected %i/%i, but got %i/%i\n",
-+ fallback_sprom.pci_bus, fallback_sprom.pci_dev,
-+ pci_bus, pci_slot);
-+ memcpy(out, &fallback_sprom.sprom, sizeof(struct ssb_sprom));
-+ return 0;
-+}
-+EXPORT_SYMBOL(bcm63xx_get_fallback_sprom);
-
- #if defined(CONFIG_SSB_PCIHOST)
- int bcm63xx_get_fallback_ssb_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
diff --git a/target/linux/brcm63xx/patches-3.14/802-rtl8367r_fix_RGMII_support.patch b/target/linux/brcm63xx/patches-3.14/802-rtl8367r_fix_RGMII_support.patch
deleted file mode 100644
index 9037d89..0000000
--- a/target/linux/brcm63xx/patches-3.14/802-rtl8367r_fix_RGMII_support.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From e3208e6087642b95a5bab3101fc9c6e34892c861 Mon Sep 17 00:00:00 2001
-From: Miguel GAIO <miguel.gaio@efixo.com>
-Date: Fri, 6 Jul 2012 14:12:33 +0200
-Subject: [PATCH 6/8] * [rtl8367r] Fix RGMII support
-
----
- drivers/net/phy/rtl8367.c | 5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
---- a/drivers/net/phy/rtl8367.c
-+++ b/drivers/net/phy/rtl8367.c
-@@ -146,6 +146,10 @@
- #define RTL8367_EXT_RGMXF_TXDELAY_MASK 1
- #define RTL8367_EXT_RGMXF_RXDELAY_MASK 0x7
-
-+#define RTL8367_PHY_AD_REG 0x130f
-+#define RTL8370_PHY_AD_DUMMY_1_OFFSET 5
-+#define RTL8370_PHY_AD_DUMMY_1_MASK 0xe0
-+
- #define RTL8367_DI_FORCE_REG(_x) (0x1310 + (_x))
- #define RTL8367_DI_FORCE_MODE BIT(12)
- #define RTL8367_DI_FORCE_NWAY BIT(7)
-@@ -894,6 +898,7 @@ static int rtl8367_extif_set_mode(struct
- case RTL8367_EXTIF_MODE_RGMII_33V:
- REG_WR(smi, RTL8367_CHIP_DEBUG0_REG, 0x0367);
- REG_WR(smi, RTL8367_CHIP_DEBUG1_REG, 0x7777);
-+ REG_RMW(smi, RTL8367_PHY_AD_REG, BIT(5), 0);
- break;
-
- case RTL8367_EXTIF_MODE_TMII_MAC:
diff --git a/target/linux/brcm63xx/patches-3.14/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch b/target/linux/brcm63xx/patches-3.14/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
deleted file mode 100644
index 8b603e8..0000000
--- a/target/linux/brcm63xx/patches-3.14/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ff3409ab17d56450943364ba49a16960e3cdda9b Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo@openwrt.org>
-Date: Sun, 6 Apr 2014 22:33:16 +0200
-Subject: [RFC] jffs2: work around unaligned accesses failing on bcm63xx/smp
-
-Unligned memcpy_fromio randomly fails with an unaligned dst. Work around
-it by ensuring we are always doing aligned copies.
-
-Should fix filename corruption in jffs2 with SMP.
-
-Signed-off-by: Jonas Gorski <jogo@openwrt.org>
----
- fs/jffs2/nodelist.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/fs/jffs2/nodelist.h
-+++ b/fs/jffs2/nodelist.h
-@@ -255,7 +255,7 @@ struct jffs2_full_dirent
- uint32_t ino; /* == zero for unlink */
- unsigned int nhash;
- unsigned char type;
-- unsigned char name[0];
-+ unsigned char name[0] __attribute__((aligned((sizeof(long)))));
- };
-
- /*
diff --git a/target/linux/brcm63xx/profiles/00-default.mk b/target/linux/brcm63xx/profiles/00-default.mk
deleted file mode 100644
index a25be92..0000000
--- a/target/linux/brcm63xx/profiles/00-default.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Default
- NAME:=Default Profile
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/Default/description
- Package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
diff --git a/target/linux/brcm63xx/profiles/01-generic.mk b/target/linux/brcm63xx/profiles/01-generic.mk
deleted file mode 100644
index b88e0fc..0000000
--- a/target/linux/brcm63xx/profiles/01-generic.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/96328avng
- NAME:=Generic 96328avng
- PACKAGES:=
-endef
-define Profile/96328avng/Description
- Package set optimized for 96328avng.
-endef
-$(eval $(call Profile,96328avng))
diff --git a/target/linux/brcm63xx/profiles/adb.mk b/target/linux/brcm63xx/profiles/adb.mk
deleted file mode 100644
index 13c7524..0000000
--- a/target/linux/brcm63xx/profiles/adb.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/A4001N
- NAME:=ADB P.DG A4001N
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/A4001N/Description
- Package set optimized for A4001N.
-endef
-$(eval $(call Profile,A4001N))
-
-define Profile/A4001N1
- NAME:=ADB P.DG A4001N1
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/A4001N1/Description
- Package set optimized for A4001N1.
-endef
-$(eval $(call Profile,A4001N1))
diff --git a/target/linux/brcm63xx/profiles/asmax.mk b/target/linux/brcm63xx/profiles/asmax.mk
deleted file mode 100644
index c8f0072..0000000
--- a/target/linux/brcm63xx/profiles/asmax.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/AR1004G
- NAME:=Asmax AR 1004G
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/AR1004G/Description
- Package set optimized for AR 1004G.
-endef
-$(eval $(call Profile,AR1004G))
diff --git a/target/linux/brcm63xx/profiles/comtrend.mk b/target/linux/brcm63xx/profiles/comtrend.mk
deleted file mode 100644
index 8c1b862..0000000
--- a/target/linux/brcm63xx/profiles/comtrend.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/AR5381u
- NAME:=Comtrend AR-5381u
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/AR5381u/Description
- Package set optimized for AR-5381u.
-endef
-$(eval $(call Profile,AR5381u))
-
-define Profile/AR5387un
- NAME:=Comtrend AR-5387un
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/AR5387un/Description
- Package set optimized for AR-5387un.
-endef
-$(eval $(call Profile,AR5387un))
-
-define Profile/CT536_CT5621
- NAME:=Comtrend CT-536+/CT-5621
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/CT536_CT5621/Description
- Package set optimized for CT-536+/CT-5621.
-endef
-$(eval $(call Profile,CT536_CT5621))
-
-define Profile/CT5365
- NAME:=Comtrend CT-5365
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/CT5365/Description
- Package set optimized for CT-5365.
-endef
-$(eval $(call Profile,CT5365))
-
-define Profile/CT6373
- NAME:=Comtrend CT-6373
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/CT6373/Description
- Package set optimized for CT-6373.
-endef
-$(eval $(call Profile,CT6373))
-
-define Profile/VR3025u
- NAME:=Comtrend VR-3025u
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/VR3025u/Description
- Package set optimized for VR-3025u.
-endef
-$(eval $(call Profile,VR3025u))
-
-define Profile/VR3025un
- NAME:=Comtrend VR-3025un
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/VR3025un/Description
- Package set optimized for VR-3025un.
-endef
-$(eval $(call Profile,VR3025un))
-
-define Profile/WAP5813n
- NAME:=Comtrend WAP-5813n
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/WAP5813n/Description
- Package set optimized for WAP-5813n.
-endef
-$(eval $(call Profile,WAP5813n))
diff --git a/target/linux/brcm63xx/profiles/d-link.mk b/target/linux/brcm63xx/profiles/d-link.mk
deleted file mode 100644
index f2eedd6..0000000
--- a/target/linux/brcm63xx/profiles/d-link.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/DSL274XB_C
- NAME:=D-Link DSL-2740B/DSL-2741B rev C2/C3
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/DSL274XB_C/Description
- Package set optimized for DSL-2740B/DSL-2741B rev C2/C3.
-endef
-$(eval $(call Profile,DSL274XB_C))
-
-define Profile/DVAG3810BN
- NAME:=D-Link DVA-G3810BN/TL
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/DVAG3810BN/Description
- Package set optimized for DVA-G3810BN/TL.
-endef
-$(eval $(call Profile,DVAG3810BN))
diff --git a/target/linux/brcm63xx/profiles/huawei.mk b/target/linux/brcm63xx/profiles/huawei.mk
deleted file mode 100644
index 594389e..0000000
--- a/target/linux/brcm63xx/profiles/huawei.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/HG520v
- NAME:=Huawei EchoLife HG520v
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/HG520v/Description
- Package set optimized for Huawei HG520v.
-endef
-$(eval $(call Profile,HG520v))
-
-define Profile/HG553
- NAME:=Huawei EchoLife HG553
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
-endef
-define Profile/HG553/Description
- Package set optimized for Huawei HG553.
-endef
-$(eval $(call Profile,HG553))
-
-define Profile/HG556a_AB
- NAME:=Huawei EchoLife HG556a (version A/B - Atheros)
- PACKAGES:=kmod-ath9k wpad-mini \
- kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
-endef
-define Profile/HG556a_AB/Description
- Package set optimized for Huawei HG556a version A/B (Atheros).
-endef
-$(eval $(call Profile,HG556a_AB))
-
-define Profile/HG556a_C
- NAME:=Huawei EchoLife HG556a (version C - Ralink)
- PACKAGES:=kmod-rt2800-pci wpad-mini \
- kmod-usb2 kmod-usb-ohci kmod-ledtrig-usbdev
-endef
-define Profile/HG556a_C/Description
- Package set optimized for Huawei HG556a version C (Ralink).
-endef
-$(eval $(call Profile,HG556a_C))
diff --git a/target/linux/brcm63xx/profiles/sfr.mk b/target/linux/brcm63xx/profiles/sfr.mk
deleted file mode 100644
index 8b0dd44..0000000
--- a/target/linux/brcm63xx/profiles/sfr.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/Neufbox4
- NAME:=SFR Neufbox4
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/Neufbox4/Description
- Package set optimized for Neufbox4.
-endef
-$(eval $(call Profile,Neufbox4))
-
-define Profile/Neufbox6
- NAME:=SFR Neufbox6
- PACKAGES:=kmod-b43 wpad-mini \
- kmod-usb2 kmod-usb-ohci
-endef
-define Profile/Neufbox6/Description
- Package set optimized for Neufbox6.
-endef
-$(eval $(call Profile,Neufbox6))
diff --git a/target/linux/brcm63xx/profiles/t-com.mk b/target/linux/brcm63xx/profiles/t-com.mk
deleted file mode 100644
index fe78c06..0000000
--- a/target/linux/brcm63xx/profiles/t-com.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/SPW500V
- NAME:=T-Com Speedport W 500V
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/SPW500V/Description
- Package set optimized for SPW500V.
-endef
-$(eval $(call Profile,SPW500V))
diff --git a/target/linux/brcm63xx/profiles/tecom.mk b/target/linux/brcm63xx/profiles/tecom.mk
deleted file mode 100644
index 038ef5e..0000000
--- a/target/linux/brcm63xx/profiles/tecom.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/GW6000
- NAME:=Tecom GW6000
- PACKAGES:=kmod-brcm-wl kmod-usb-ohci kmod-usb-storage \
- kmod-fs-ext4 kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs \
- kmod-ipt-nathelper-extra wlc
-endef
-define Profile/GW6000/Description
- Package set optimized for GW6000.
-endef
-$(eval $(call Profile,GW6000))
-
-define Profile/GW6200
- NAME:=Tecom GW6200
- PACKAGES:=kmod-brcm-wl kmod-usb-ohci kmod-usb-storage \
- kmod-fs-ext4 kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs \
- kmod-ipt-nathelper-extra wlc
-endef
-define Profile/GW6200/Description
- Package set optimized for GW6200.
-endef
-$(eval $(call Profile,GW6200))
diff --git a/target/linux/brcm63xx/profiles/zyxel.mk b/target/linux/brcm63xx/profiles/zyxel.mk
deleted file mode 100644
index 3aca094..0000000
--- a/target/linux/brcm63xx/profiles/zyxel.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# Copyright (C) 2014 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/P870HW_51a_v2
- NAME:=ZyXEL P870HW-51a v2
- PACKAGES:=kmod-b43 wpad-mini
-endef
-define Profile/P870HW_51a_v2/Description
- Package set optimized for P870HW-51a v2.
-endef
-$(eval $(call Profile,P870HW_51a_v2))
diff --git a/target/linux/brcm63xx/smp/config-default b/target/linux/brcm63xx/smp/config-default
deleted file mode 100644
index 8afdf5e..0000000
--- a/target/linux/brcm63xx/smp/config-default
+++ /dev/null
@@ -1,13 +0,0 @@
-CONFIG_CPU_RMAP=y
-# CONFIG_KEXEC is not set
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_NR_CPUS=2
-CONFIG_RCU_STALL_COMMON=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_SMP=y
-CONFIG_SMP_UP=y
-CONFIG_STOP_MACHINE=y
-CONFIG_TREE_RCU=y
-CONFIG_USE_GENERIC_SMP_HELPERS=y
-CONFIG_XPS=y
diff --git a/target/linux/brcm63xx/smp/target.mk b/target/linux/brcm63xx/smp/target.mk
deleted file mode 100644
index b0ccf97..0000000
--- a/target/linux/brcm63xx/smp/target.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-BOARDNAME:=smp
-
-define Target/Description
- Build firmware images for BCM63XX boards with SMP support.
- Currently only BCM6362 and BCM6368 supported.
-endef
-
-