bump kernel to 3.2.12
authorJohn Crispin <john@openwrt.org>
Sun, 25 Mar 2012 08:50:09 +0000 (08:50 +0000)
committerJohn Crispin <john@openwrt.org>
Sun, 25 Mar 2012 08:50:09 +0000 (08:50 +0000)
SVN-Revision: 31060

188 files changed:
target/linux/lantiq/Makefile
target/linux/lantiq/ar9/config-default
target/linux/lantiq/ar9/profiles/001-lantiq.mk
target/linux/lantiq/ar9/profiles/002-netgear.mk
target/linux/lantiq/ar9/profiles/004-avm.mk [new file with mode: 0644]
target/linux/lantiq/ase/config-default
target/linux/lantiq/config-3.2 [new file with mode: 0644]
target/linux/lantiq/config-default [deleted file]
target/linux/lantiq/danube/config-default
target/linux/lantiq/danube/profiles/004-bt.mk [new file with mode: 0644]
target/linux/lantiq/falcon/config-default
target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h [deleted file]
target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-buttons.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-leds.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/addon-easy98000.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-95C3AM1.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-easy98020.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.h [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.h [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.h [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50601.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50712.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-fritz.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.h [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-netgear.c [deleted file]
target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-wbmr.c [deleted file]
target/linux/lantiq/files-3.2/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/dev-gpio-buttons.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/dev-gpio-leds.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/addon-easy98000.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/mach-95C3AM1.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/mach-easy98020.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-dwc_otg.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-dwc_otg.h [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.h [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-rt2x00.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-rt2x00.h [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-arv.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-bthomehubv2b.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-easy50601.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-easy50712.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-fritz_ar9.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-fritz_vr9.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-gigasx76x.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-gigasx76x.h [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-p2601hnf1.c [new file with mode: 0644]
target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-wbmr.c [new file with mode: 0644]
target/linux/lantiq/image/Makefile
target/linux/lantiq/image/eva.dummy.squashfs [new file with mode: 0644]
target/linux/lantiq/modules.mk
target/linux/lantiq/patches-3.2/0001-GPIO-add-bindings-for-managed-devices.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0002-MIPS-remove-unused-prototype-kgdb_config.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0003-MTD-MIPS-lantiq-reintroduce-support-for-cmdline-part.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0004-MTD-add-m25p80-id-for-mx25l2005a.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0005-MIPS-lantiq-reorganize-xway-code.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0006-MIPS-lantiq-change-ltq_request_gpio-call-signature.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0007-MIPS-lantiq-make-irq.c-support-the-FALC-ON.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0008-MIPS-lantiq-add-basic-support-for-FALC-ON.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0009-MIPS-lantiq-add-support-for-FALC-ON-GPIOs.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0010-MIPS-lantiq-add-support-for-the-EASY98000-evaluation.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0011-MIPS-lantiq-fix-early-printk.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0012-MIPS-lantiq-fix-cmdline-parsing.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0013-MIPS-lantiq-fix-STP-gpio-groups.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0014-MIPS-lantiq-fix-pull-gpio-up-resistors-usage.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0015-MIPS-lantiq-add-default-configs.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0016-MAINTAINERS-add-entry-for-Lantiq-related-files.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0017-MIPS-make-oprofile-use-cp0_perfcount_irq-if-it-is-se.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0018-MIPS-lantiq-enable-oprofile-support-on-lantiq-target.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0019-NET-MIPS-lantiq-make-etop-ethernet-work-on-ase-ar9.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0020-NET-MIPS-lantiq-non-existing-phy-was-not-handled-gra.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0021-NET-MIPS-lantiq-return-value-of-request_irq-was-not-.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0022-MIPS-lantiq-use-devres-managed-gpios.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0023-MIPS-add-clkdev.h.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0024-MIPS-lantiq-helper-functions-for-SoC-detection.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0025-MIPS-lantiq-convert-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0026-MIPS-lantiq-convert-xway-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0027-MIPS-lantiq-convert-falcon-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0028-MIPS-lantiq-convert-dma-driver-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0029-MIPS-lantiq-convert-gpio_stp-driver-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0030-MIPS-lantiq-convert-falcon-gpio-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0031-SERIAL-MIPS-lantiq-convert-serial-driver-to-clkdev-a.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0032-MIPS-lantiq-convert-falcon-debug-uart-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0033-NET-MIPS-lantiq-convert-etop-driver-to-clkdev-api.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0034-WDT-MIPS-lantiq-convert-watchdog-driver-to-clkdev-ap.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0035-MIPS-lantiq-unify-xway-prom-code.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0036-MIPS-lantiq-add-vr9-support.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0037-MIPS-lantiq-add-ipi-handlers-to-make-vsmp-work.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0038-MIPS-lantiq-add-additional-soc-ids.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0039-SPI-MIPS-lantiq-add-FALC-ON-spi-driver.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0040-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0041-MIPS-lantiq-add-xway-nand-driver.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0042-SPI-MIPS-lantiq-adds-spi-xway.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0043-NET-adds-driver-for-lantiq-vr9-ethernet.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0044-MIPS-NET-several-fixes-to-etop-driver.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0045-MTD-MIPS-lantiq-use-module_platform_driver-inside-la.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0046-WDT-MIPS-lantiq-use-module_platform_driver-inside-la.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0047-MIPS-lantiq-adds-GPTU-driver.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0048-MIPS-lantiq-adds-dwc_otg.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0049-dwc_otg-remove-bogus-halt_channel.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0050-MIPS-adds-ifxhcd.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0051-MIPS-adds-gptu-driver.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0052-MIPS-lantiq-pci-rename-variable-inside.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0053-MIPS-lantiq-pci-give-xway-pci-support-its-own-kbuild.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0054-MIPS-lantiq-pci-move-pcibios-code-into-fixup-lantiq..patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0055-MIPS-lantiq-pcie-add-pcie-driver.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0056-MIPS-lantiq-make-GPIO3-work-on-AR9.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0057-MIPS-lantiq-VPE-extensions.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0058-MIPS-lantiq-falcon-VPE-softdog.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0059-MIPS-lantiq-udp-in-kernel-redirect.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0060-MIPS-lantiq-cache-split.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0061-MIPS-clean-up-clock-code.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0062-MIPS-cleanup-reset-code.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0063-MIPS-lantiq-fixes-ar9-vr9-clock.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0064-MIPS-lantiq-fixes-danube-clock.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0065-MIPS-adds-dsl-clocks.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0066-MIPS-lantiq-dont-always-register-asc0.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0067-MIPS-lantiq-irqs-were-not-cleared-properly-on-boot.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0068-MIPS-lantiq-adds-bootsel-helper.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/0069-MIPS-lantiq-adds-USB_ARCH_HAS_HCD-to-CONFIG_LANTIQ.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/100-falcon_bsp_header.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/101-sdk-compat.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/200-owrt-netif_receive_skb.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/201-owrt-mtd_split.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/202-owrt-atm.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/203-owrt-cmdline.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/204-owrt-dm9000-polling.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/205-owrt-gpio-export.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/206-machtypes.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/207-devices.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/208-fix-mach-easy98000.patch [new file with mode: 0644]
target/linux/lantiq/patches-3.2/209-fritz_ram.patch [new file with mode: 0644]
target/linux/lantiq/patches/0001-MIPS-lantiq-fix-early-printk.patch [deleted file]
target/linux/lantiq/patches/0002-MIPS-lantiq-fix-cmdline-parsing.patch [deleted file]
target/linux/lantiq/patches/0004-MIPS-lantiq-reorganize-xway-code.patch [deleted file]
target/linux/lantiq/patches/0005-MIPS-lantiq-make-irq.c-support-the-FALC-ON.patch [deleted file]
target/linux/lantiq/patches/0006-MIPS-lantiq-add-basic-support-for-FALC-ON.patch [deleted file]
target/linux/lantiq/patches/0007-MIPS-lantiq-add-support-for-FALC-ON-GPIOs.patch [deleted file]
target/linux/lantiq/patches/0008-MIPS-lantiq-add-support-for-the-EASY98000-evaluation.patch [deleted file]
target/linux/lantiq/patches/0010-MIPS-enable-oprofile-support-on-lantiq-targets.patch [deleted file]
target/linux/lantiq/patches/0011-MIPS-lantiq-adds-falcon-I2C.patch [deleted file]
target/linux/lantiq/patches/0013-MIPS-lantiq-adds-FALC-ON-spi-driver.patch [deleted file]
target/linux/lantiq/patches/0014-MIPS-lantiq-adds-xway-spi.patch [deleted file]
target/linux/lantiq/patches/0015-MIPS-lantiq-adds-etop-support-for-ase-ar9.patch [deleted file]
target/linux/lantiq/patches/0016-MIPS-lantiq-adds-xway-nand-driver.patch [deleted file]
target/linux/lantiq/patches/0017-MIPS-lantiq-adds-GPTU-driver.patch [deleted file]
target/linux/lantiq/patches/0018-MIPS-lantiq-adds-dwc_otg.patch [deleted file]
target/linux/lantiq/patches/0019-MIPS-lantiq-adds-VPE-extensions.patch [deleted file]
target/linux/lantiq/patches/0020-MIPS-lantiq-adds-falcon-VPE-softdog.patch [deleted file]
target/linux/lantiq/patches/0021-MIPS-lantiq-adds-cache-split.patch [deleted file]
target/linux/lantiq/patches/0022-MIPS-lantiq-adds-udp-in-kernel-redirect.patch [deleted file]
target/linux/lantiq/patches/0023-MIPS-lantiq-adds-basic-vr9-support.patch [deleted file]
target/linux/lantiq/patches/0024-MIPS-lantiq-fixes-STP-based-gpios.patch [deleted file]
target/linux/lantiq/patches/0025-MIPS-lantiq-activate-pull-up-resistors-when-gpio-is-.patch [deleted file]
target/linux/lantiq/patches/0026-MIPS-lantiq-adds-GPIO3-support-on-AR9.patch [deleted file]
target/linux/lantiq/patches/100-falcon_bsp_header.patch [deleted file]
target/linux/lantiq/patches/110-sdk-compat.patch [deleted file]
target/linux/lantiq/patches/200-owrt-netif_receive_skb.patch [deleted file]
target/linux/lantiq/patches/201-owrt-mtd_uimage_split.patch [deleted file]
target/linux/lantiq/patches/202-owrt-atm.patch [deleted file]
target/linux/lantiq/patches/203-owrt-cmdline.patch [deleted file]
target/linux/lantiq/patches/204-owrt-dm9000-polling.patch [deleted file]
target/linux/lantiq/patches/205-owrt-gpio-export.patch [deleted file]
target/linux/lantiq/patches/206-owrt-brnboot.patch [deleted file]
target/linux/lantiq/patches/210-machtypes.patch [deleted file]
target/linux/lantiq/patches/211-devices.patch [deleted file]
target/linux/lantiq/patches/800-fix-etop.patch [deleted file]
target/linux/lantiq/patches/810-fix-mach-easy98000.patch [deleted file]
target/linux/lantiq/patches/820-fix-falcon-ltq_gpio_request.patch [deleted file]
target/linux/lantiq/patches/830-fix-falcon-i2c-resources.patch [deleted file]
target/linux/lantiq/patches/840-fix-falcon-sysctrl.patch [deleted file]
target/linux/lantiq/patches/850-etop_irq.patch [deleted file]
target/linux/lantiq/patches/860-falcon-fix-version.patch [deleted file]
target/linux/lantiq/patches/999-mtd.patch [deleted file]
target/linux/lantiq/vr9/config-default
target/linux/lantiq/vr9/profiles/001-avm.mk [new file with mode: 0644]

index b0bed09..10d6665 100644 (file)
@@ -12,7 +12,7 @@ BOARDNAME:=Lantiq GPON/XWAY
 FEATURES:=squashfs jffs2
 DEFAULT_SUBTARGET:=danube
 
-LINUX_VERSION:=3.1.10
+LINUX_VERSION:=3.2.12
 
 CFLAGS=-Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves
 
index 34192d0..ce21adf 100644 (file)
@@ -1,54 +1,38 @@
 CONFIG_ADM6996_PHY=y
 CONFIG_AR8216_PHY=y
-# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
-# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-# CONFIG_ATH79 is not set
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_C_RECORDMCOUNT=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_HARDIRQS=y
-CONFIG_HAVE_IRQ_WORK=y
-CONFIG_HAVE_PERF_EVENTS=y
+# CONFIG_ATMEL_PWM is not set
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_FSNOTIFY=y
+CONFIG_HAVE_MACH_CLKDEV=y
 CONFIG_HW_HAS_PCI=y
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_GPIO_BUTTONS is not set
 CONFIG_INPUT_POLLDEV=y
+CONFIG_IRQ_FORCED_THREADING=y
 # CONFIG_ISDN is not set
 CONFIG_LANTIQ_ETOP=y
-# CONFIG_LANTIQ_MACH_ARV45XX is not set
+# CONFIG_LANTIQ_MACH_ARV is not set
 # CONFIG_LANTIQ_MACH_EASY50712 is not set
+CONFIG_LANTIQ_MACH_FRITZ_AR9=y
+# CONFIG_LANTIQ_MACH_FRITZ_VR9 is not set
+# CONFIG_LANTIQ_MACH_GIGASX76X is not set
 CONFIG_LANTIQ_MACH_NETGEAR=y
 CONFIG_LANTIQ_MACH_WBMR=y
-# CONFIG_LANTIQ_MACH_GIGASX76X is not set
-CONFIG_MACH_NO_WESTBRIDGE=y
-# CONFIG_MINIX_FS_NATIVE_ENDIAN is not set
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
+# CONFIG_LANTIQ_VRX200 is not set
+CONFIG_MDIO_BOARDINFO=y
+# CONFIG_MLX4_CORE is not set
+CONFIG_MTD_BLOCK2MTD=y
 CONFIG_PCI=y
+# CONFIG_PCIEPORTBUS is not set
+# CONFIG_PCIE_LANTIQ is not set
 CONFIG_PCI_DOMAINS=y
-CONFIG_PERF_USE_VMALLOC=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_QUOTACTL is not set
+CONFIG_PCI_LANTIQ=y
+# CONFIG_PCI_LANTIQ_NONE is not set
 CONFIG_RTL8306_PHY=y
 # CONFIG_SOC_AMAZON_SE is not set
-# CONFIG_SOC_VR9 is not set
 # CONFIG_SOC_FALCON is not set
 CONFIG_SOC_TYPE_XWAY=y
 CONFIG_SOC_XWAY=y
-CONFIG_SPI=y
-CONFIG_SPI_BITBANG=y
-# CONFIG_SPI_GPIO is not set
-CONFIG_SPI_LANTIQ=y
-CONFIG_SPI_MASTER=y
+CONFIG_USB_ARCH_HAS_XHCI=y
 CONFIG_USB_SUPPORT=y
-CONFIG_XZ_DEC=y
-CONFIG_SPI_XWAY=y
index 2039738..a1fc2d2 100644 (file)
@@ -1,5 +1,5 @@
 define Profile/EASY50812
-  NAME:=EASY50812
+  NAME:=EASY50812 - Eval Board
   PACKAGES:= kmod-usb-core kmod-usb-dwc-otg
 endef
 
index 1a77786..a3c83bb 100644 (file)
@@ -1,5 +1,5 @@
 define Profile/DGN3500B
-  NAME:=DGN3500B
+  NAME:=DGN3500B Netgear
   PACKAGES:= kmod-usb-core kmod-usb-dwc-otg
 endef
 
diff --git a/target/linux/lantiq/ar9/profiles/004-avm.mk b/target/linux/lantiq/ar9/profiles/004-avm.mk
new file mode 100644 (file)
index 0000000..e424d6a
--- /dev/null
@@ -0,0 +1,7 @@
+define Profile/FRITZ7320
+  NAME:=FRITZ7320 Fritzbox
+  PACKAGES:= kmod-usb-core kmod-usb-ifxhcd kmod-ledtrig-usbdev \
+        kmod-ltq-dsl-firmware-b-ar9 kmod-ath9k wpad-mini
+endef
+
+$(eval $(call Profile,FRITZ7320))
index a6c8a3d..8d2597d 100644 (file)
@@ -1,39 +1,22 @@
-# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
-# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-# CONFIG_ATH79 is not set
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_C_RECORDMCOUNT=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_HARDIRQS=y
-CONFIG_HAVE_IRQ_WORK=y
-CONFIG_HAVE_PERF_EVENTS=y
+# CONFIG_ATMEL_PWM is not set
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_FSNOTIFY=y
+CONFIG_HAVE_MACH_CLKDEV=y
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_GPIO_BUTTONS is not set
 CONFIG_INPUT_POLLDEV=y
+CONFIG_IRQ_FORCED_THREADING=y
 # CONFIG_ISDN is not set
 CONFIG_LANTIQ_ETOP=y
 CONFIG_LANTIQ_MACH_EASY50601=y
-CONFIG_MACH_NO_WESTBRIDGE=y
-# CONFIG_MINIX_FS_NATIVE_ENDIAN is not set
-# CONFIG_MTD_LATCH_ADDR is not set
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_PERF_USE_VMALLOC=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_QUOTACTL is not set
+# CONFIG_LANTIQ_VRX200 is not set
+CONFIG_MDIO_BOARDINFO=y
 CONFIG_SOC_AMAZON_SE=y
-# CONFIG_SOC_VR9 is not set
 # CONFIG_SOC_FALCON is not set
 CONFIG_SOC_TYPE_XWAY=y
 # CONFIG_SOC_XWAY is not set
-CONFIG_XZ_DEC=y
-CONFIG_SPI_XWAY=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_XHCI is not set
+CONFIG_USB_SUPPORT=y
diff --git a/target/linux/lantiq/config-3.2 b/target/linux/lantiq/config-3.2
new file mode 100644 (file)
index 0000000..d4e90c9
--- /dev/null
@@ -0,0 +1,110 @@
+# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_ARCH_REQUIRE_GPIOLIB=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+# CONFIG_ATH79 is not set
+CONFIG_BCMA_POSSIBLE=y
+# CONFIG_BRCMUTIL is not set
+CONFIG_CEVT_R4K=y
+CONFIG_CEVT_R4K_LIB=y
+CONFIG_CPU_BIG_ENDIAN=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CSRC_R4K=y
+CONFIG_CSRC_R4K_LIB=y
+CONFIG_DECOMPRESS_LZMA=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_EARLY_PRINTK=y
+# CONFIG_FSNOTIFY is not set
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_C_RECORDMCOUNT=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_GENERIC_HARDIRQS=y
+CONFIG_HAVE_IDE=y
+CONFIG_HAVE_IRQ_WORK=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HW_RANDOM=y
+CONFIG_HZ=250
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+CONFIG_IFX_UDP_REDIRECT=y
+CONFIG_IMAGE_CMDLINE_HACK=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQ_CPU=y
+CONFIG_LANTIQ=y
+CONFIG_LANTIQ_MACH_95C3AM1=y
+CONFIG_LANTIQ_MACH_EASY98000=y
+CONFIG_LANTIQ_MACH_EASY98020=y
+CONFIG_LANTIQ_WDT=y
+CONFIG_LEDS_GPIO=y
+CONFIG_MACH_NO_WESTBRIDGE=y
+# CONFIG_MINIX_FS_NATIVE_ENDIAN is not set
+CONFIG_MIPS=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_MACHINE=y
+CONFIG_MIPS_MT_DISABLED=y
+# CONFIG_MIPS_MT_SMP is not set
+# CONFIG_MIPS_MT_SMTC is not set
+# CONFIG_MIPS_VPE_LOADER is not set
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_LANTIQ=y
+CONFIG_MTD_UIMAGE_SPLIT=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PHYLIB=y
+# CONFIG_PREEMPT_RCU is not set
+# CONFIG_QUOTACTL is not set
+CONFIG_RTL8366RB_PHY=y
+CONFIG_RTL8366_SMI=y
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_LANTIQ=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_SWCONFIG=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=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_MULTITHREADING=y
+CONFIG_XZ_DEC=y
+CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/lantiq/config-default b/target/linux/lantiq/config-default
deleted file mode 100644 (file)
index d4e90c9..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-# CONFIG_ARCH_SUPPORTS_MSI is not set
-CONFIG_ARCH_SUPPORTS_OPROFILE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-# CONFIG_ATH79 is not set
-CONFIG_BCMA_POSSIBLE=y
-# CONFIG_BRCMUTIL is not set
-CONFIG_CEVT_R4K=y
-CONFIG_CEVT_R4K_LIB=y
-CONFIG_CPU_BIG_ENDIAN=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
-CONFIG_CPU_MIPS32_R2=y
-CONFIG_CPU_MIPSR2=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CSRC_R4K=y
-CONFIG_CSRC_R4K_LIB=y
-CONFIG_DECOMPRESS_LZMA=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_EARLY_PRINTK=y
-# CONFIG_FSNOTIFY is not set
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_GPIO=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GPIOLIB=y
-CONFIG_GPIO_SYSFS=y
-CONFIG_HARDWARE_WATCHPOINTS=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_CLK=y
-CONFIG_HAVE_C_RECORDMCOUNT=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_GENERIC_HARDIRQS=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_IRQ_WORK=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HW_RANDOM=y
-CONFIG_HZ=250
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-CONFIG_IFX_UDP_REDIRECT=y
-CONFIG_IMAGE_CMDLINE_HACK=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IRQ_CPU=y
-CONFIG_LANTIQ=y
-CONFIG_LANTIQ_MACH_95C3AM1=y
-CONFIG_LANTIQ_MACH_EASY98000=y
-CONFIG_LANTIQ_MACH_EASY98020=y
-CONFIG_LANTIQ_WDT=y
-CONFIG_LEDS_GPIO=y
-CONFIG_MACH_NO_WESTBRIDGE=y
-# CONFIG_MINIX_FS_NATIVE_ENDIAN is not set
-CONFIG_MIPS=y
-CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_MIPS_MACHINE=y
-CONFIG_MIPS_MT_DISABLED=y
-# CONFIG_MIPS_MT_SMP is not set
-# CONFIG_MIPS_MT_SMTC is not set
-# CONFIG_MIPS_VPE_LOADER is not set
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_GEOMETRY=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_LANTIQ=y
-CONFIG_MTD_UIMAGE_SPLIT=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PHYLIB=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_QUOTACTL is not set
-CONFIG_RTL8366RB_PHY=y
-CONFIG_RTL8366_SMI=y
-# CONFIG_SCSI_DMA is not set
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_LANTIQ=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SWCONFIG=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_HAS_CPU_MIPS32_R2=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_MULTITHREADING=y
-CONFIG_XZ_DEC=y
-CONFIG_ZONE_DMA_FLAG=0
index 508706d..ff04f3c 100644 (file)
@@ -1,54 +1,37 @@
 CONFIG_ADM6996_PHY=y
 CONFIG_AR8216_PHY=y
-# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
-# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
-# CONFIG_ATH79 is not set
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_C_RECORDMCOUNT=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_HARDIRQS=y
-CONFIG_HAVE_IRQ_WORK=y
-CONFIG_HAVE_PERF_EVENTS=y
+# CONFIG_ATMEL_PWM is not set
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_FSNOTIFY=y
+CONFIG_HAVE_MACH_CLKDEV=y
 CONFIG_HW_HAS_PCI=y
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_GPIO_BUTTONS is not set
 CONFIG_INPUT_POLLDEV=y
+CONFIG_IRQ_FORCED_THREADING=y
 # CONFIG_ISDN is not set
 CONFIG_LANTIQ_ETOP=y
-CONFIG_LANTIQ_MACH_ARV45XX=y
+CONFIG_LANTIQ_MACH_ARV=y
 CONFIG_LANTIQ_MACH_EASY50712=y
+# CONFIG_LANTIQ_MACH_FRITZ_AR9 is not set
+# CONFIG_LANTIQ_MACH_FRITZ_VR9 is not set
+CONFIG_LANTIQ_MACH_GIGASX76X=y
 # CONFIG_LANTIQ_MACH_NETGEAR is not set
 # CONFIG_LANTIQ_MACH_WBMR is not set
-CONFIG_LANTIQ_MACH_GIGASX76X=y
-CONFIG_MACH_NO_WESTBRIDGE=y
-# CONFIG_MINIX_FS_NATIVE_ENDIAN is not set
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
+# CONFIG_LANTIQ_VRX200 is not set
+CONFIG_MDIO_BOARDINFO=y
+# CONFIG_MLX4_CORE is not set
 CONFIG_PCI=y
+# CONFIG_PCIEPORTBUS is not set
+# CONFIG_PCIE_LANTIQ is not set
 CONFIG_PCI_DOMAINS=y
-CONFIG_PERF_USE_VMALLOC=y
-# CONFIG_PREEMPT_RCU is not set
-# CONFIG_QUOTACTL is not set
+CONFIG_PCI_LANTIQ=y
+# CONFIG_PCI_LANTIQ_NONE is not set
 CONFIG_RTL8306_PHY=y
 # CONFIG_SOC_AMAZON_SE is not set
 # CONFIG_SOC_FALCON is not set
-# CONFIG_SOC_VR9 is not set
 CONFIG_SOC_TYPE_XWAY=y
 CONFIG_SOC_XWAY=y
-CONFIG_SPI=y
-CONFIG_SPI_BITBANG=y
-# CONFIG_SPI_GPIO is not set
-CONFIG_SPI_LANTIQ=y
-CONFIG_SPI_MASTER=y
+CONFIG_USB_ARCH_HAS_XHCI=y
 CONFIG_USB_SUPPORT=y
-CONFIG_XZ_DEC=y
-CONFIG_SPI_XWAY=y
diff --git a/target/linux/lantiq/danube/profiles/004-bt.mk b/target/linux/lantiq/danube/profiles/004-bt.mk
new file mode 100644 (file)
index 0000000..26dd93c
--- /dev/null
@@ -0,0 +1,23 @@
+define Profile/BTHOMEHUBV2B
+  NAME:=BTHOMEHUBV2B - BT Homehub V2.0 Type B
+  PACKAGES:= kmod-usb-core kmod-usb-dwc-otg kmod-ledtrig-usbdev \
+       kmod-ath9k wpad-mini kmod-ltq-dsl-firmware-a-danube
+endef
+
+define Profile/BTHOMEHUBV2B/Description
+       Package set optimized for the BT Homehub V2.0 Type B using whole nand for OpenWRT
+endef
+
+$(eval $(call Profile,BTHOMEHUBV2B))
+
+define Profile/BTHOMEHUBV2BOPENRG
+  NAME:=BTHOMEHUBV2B - BT Homehub V2.0 Type B (OpenRG)
+  PACKAGES:= kmod-usb-core kmod-usb-dwc-otg kmod-ledtrig-usbdev \
+       kmod-ath9k wpad-mini kmod-ltq-dsl-firmware-a-danube
+endef
+
+define Profile/BTHOMEHUBV2BOPENRG/Description
+       Package set optimized for the BT Homehub V2.0 Type B but retaining OpenRG image
+endef
+
+$(eval $(call Profile,BTHOMEHUBV2BOPENRG))
index f1d6e48..e1210e1 100644 (file)
@@ -1,28 +1,20 @@
-CONFIG_CPU_MIPSR2_IRQ_EI=y
-CONFIG_CPU_MIPSR2_IRQ_VI=y
-CONFIG_IFX_VPE_CACHE_SPLIT=y
-CONFIG_IFX_VPE_EXT=y
+# CONFIG_ATMEL_PWM is not set
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_FSNOTIFY=y
+CONFIG_HAVE_MACH_CLKDEV=y
+CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_M25PXX_USE_FAST_READ=y
-CONFIG_MIPS_MT=y
-# CONFIG_MIPS_VPE_APSP_API is not set
-CONFIG_MIPS_VPE_LOADER=y
-CONFIG_MIPS_VPE_LOADER_TOM=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_PLATFORM=y
 # CONFIG_MTD_SM_COMMON is not set
-CONFIG_MTSCHED=y
-# CONFIG_PERFCTRS is not set
 # CONFIG_SOC_AMAZON_SE is not set
 CONFIG_SOC_FALCON=y
 # CONFIG_SOC_TYPE_XWAY is not set
 # CONFIG_SOC_XWAY is not set
-# CONFIG_SOC_VR9 is not set
 CONFIG_SPI=y
 # CONFIG_SPI_BITBANG is not set
 CONFIG_SPI_FALCON=y
 # CONFIG_SPI_GPIO is not set
 CONFIG_SPI_MASTER=y
-# CONFIG_I2C_DESIGNWARE is not set
-
diff --git a/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h b/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h
deleted file mode 100644 (file)
index adb531c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  Lantiq GPIO button support
- *
- *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
- *  Copyright (C) 2008 Imre Kaloz <kaloz@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 _LANTIQ_DEV_GPIO_BUTTONS_H
-#define _LANTIQ_DEV_GPIO_BUTTONS_H
-
-#include <linux/input.h>
-#include <linux/gpio_keys.h>
-
-#define LTQ_KEYS_POLL_INTERVAL         20 /* msecs */
-#define LTQ_KEYS_DEBOUNCE_INTERVAL     (3 * LTQ_KEYS_POLL_INTERVAL)
-
-void ltq_register_gpio_keys_polled(int id,
-                                     unsigned poll_interval,
-                                     unsigned nbuttons,
-                                     struct gpio_keys_button *buttons);
-
-#endif /* _LANTIQ_DEV_GPIO_BUTTONS_H */
diff --git a/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h b/target/linux/lantiq/files-3.1/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h
deleted file mode 100644 (file)
index d51e496..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *  Lantiq GPIO LED device support
- *
- *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
- *  Copyright (C) 2008 Imre Kaloz <kaloz@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 _LANTIQ_DEV_LEDS_GPIO_H
-#define _LANTIQ_DEV_LEDS_GPIO_H
-
-#include <linux/leds.h>
-
-void ltq_add_device_gpio_leds(int id,
-       unsigned num_leds,
-       struct gpio_led *leds) __init;
-
-#endif /* _LANTIQ_DEV_LEDS_GPIO_H */
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-buttons.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-buttons.c
deleted file mode 100644 (file)
index ad25cac..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *  Lantiq GPIO button support
- *
- *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
- *  Copyright (C) 2008 Imre Kaloz <kaloz@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/init.h>
-#include <linux/slab.h>
-#include <linux/platform_device.h>
-
-#include <dev-gpio-buttons.h>
-
-void __init ltq_register_gpio_keys_polled(int id,
-                                            unsigned poll_interval,
-                                            unsigned nbuttons,
-                                            struct gpio_keys_button *buttons)
-{
-       struct platform_device *pdev;
-       struct gpio_keys_platform_data pdata;
-       struct gpio_keys_button *p;
-       int err;
-
-       p = kmalloc(nbuttons * sizeof(*p), GFP_KERNEL);
-       if (!p)
-               return;
-
-       memcpy(p, buttons, nbuttons * sizeof(*p));
-
-       pdev = platform_device_alloc("gpio-keys-polled", id);
-       if (!pdev)
-               goto err_free_buttons;
-
-       memset(&pdata, 0, sizeof(pdata));
-       pdata.poll_interval = poll_interval;
-       pdata.nbuttons = nbuttons;
-       pdata.buttons = p;
-
-       err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
-       if (err)
-               goto err_put_pdev;
-
-       err = platform_device_add(pdev);
-       if (err)
-               goto err_put_pdev;
-
-       return;
-
-err_put_pdev:
-       platform_device_put(pdev);
-
-err_free_buttons:
-       kfree(p);
-}
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-leds.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-gpio-leds.c
deleted file mode 100644 (file)
index 89dc79d..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  Lantiq GPIO LED device support
- *
- *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
- *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
- *
- *  Parts of this file are based on Atheros' 2.6.15 BSP
- *
- *  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/init.h>
-#include <linux/slab.h>
-#include <linux/platform_device.h>
-
-#include <dev-gpio-leds.h>
-
-void __init ltq_add_device_gpio_leds(int id, unsigned num_leds,
-                                       struct gpio_led *leds)
-{
-       struct platform_device *pdev;
-       struct gpio_led_platform_data pdata;
-       struct gpio_led *p;
-       int err;
-
-       p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL);
-       if (!p)
-               return;
-
-       memcpy(p, leds, num_leds * sizeof(*p));
-
-       pdev = platform_device_alloc("leds-gpio", id);
-       if (!pdev)
-               goto err_free_leds;
-
-       memset(&pdata, 0, sizeof(pdata));
-       pdata.num_leds = num_leds;
-       pdata.leds = p;
-
-       err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
-       if (err)
-               goto err_put_pdev;
-
-       err = platform_device_add(pdev);
-       if (err)
-               goto err_put_pdev;
-
-       return;
-
-err_put_pdev:
-       platform_device_put(pdev);
-
-err_free_leds:
-       kfree(p);
-}
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/addon-easy98000.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/addon-easy98000.c
deleted file mode 100644 (file)
index 2085a1c..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- *  EASY98000 CPLD Addon driver
- *
- *  Copyright (C) 2011 Thomas Langer <thomas.langer@lantiq.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/kernel.h>
-#include <linux/version.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-
-struct easy98000_reg_cpld {
-       u16 cmdreg1;            /* 0x1 */
-       u16 cmdreg0;            /* 0x0 */
-       u16 idreg0;             /* 0x3 */
-       u16 resreg;             /* 0x2 */
-       u16 intreg;             /* 0x5 */
-       u16 idreg1;             /* 0x4 */
-       u16 ledreg;             /* 0x7 */
-       u16 pcmconconfig;       /* 0x6 */
-       u16 res0;               /* 0x9 */
-       u16 ethledreg;          /* 0x8 */
-       u16 res1[4];            /* 0xa-0xd */
-       u16 cpld1v;             /* 0xf */
-       u16 cpld2v;             /* 0xe */
-};
-static struct easy98000_reg_cpld * const cpld =
-       (struct easy98000_reg_cpld *)(KSEG1 | 0x17c00000);
-#define cpld_r8(reg) (__raw_readw(&cpld->reg) & 0xFF)
-#define cpld_w8(val, reg) __raw_writew((val) & 0xFF, &cpld->reg)
-
-int easy98000_addon_has_dm9000(void)
-{
-       if ((cpld_r8(idreg0) & 0xF) == 1)
-               return 1;
-       return 0;
-}
-
-#if defined(CONFIG_PROC_FS)
-typedef void (*cpld_dump) (struct seq_file *s);
-struct proc_entry {
-       char *name;
-       void *callback;
-};
-
-static int cpld_proc_show ( struct seq_file *s, void *p )
-{
-       cpld_dump dump = s->private;
-
-       if ( dump != NULL )
-               dump(s);
-
-       return 0;
-}
-
-static int cpld_proc_open ( struct inode *inode, struct file *file )
-{
-       return single_open ( file, cpld_proc_show, PDE(inode)->data );
-}
-
-static void cpld_versions_get ( struct seq_file *s )
-{
-       seq_printf(s, "CPLD1: V%d\n", cpld_r8(cpld1v));
-       seq_printf(s, "CPLD2: V%d\n", cpld_r8(cpld2v));
-}
-
-static void cpld_ebu_module_get ( struct seq_file *s )
-{
-       u8 addon_id;
-
-       addon_id = cpld_r8(idreg0) & 0xF;
-       switch (addon_id) {
-       case 0xF: /* nothing connected */
-               break;
-       case 1:
-               seq_printf(s, "Ethernet Controller module (dm9000)\n");
-               break;
-       default:
-               seq_printf(s, "Unknown EBU module (EBU_ID=0x%02X)\n", addon_id);
-               break;
-       }
-}
-
-static void cpld_xmii_module_get ( struct seq_file *s )
-{
-       u8 addon_id;
-       char *mod = NULL;
-
-       addon_id = cpld_r8(idreg1) & 0xF;
-       switch (addon_id) {
-       case 0xF:
-               mod = "no module";
-               break;
-       case 0x1:
-               mod = "RGMII module";
-               break;
-       case 0x4:
-               mod = "GMII MAC Mode (XWAY TANTOS-3G)";
-               break;
-       case 0x6:
-               mod = "TMII MAC Mode (XWAY TANTOS-3G)";
-               break;
-       case 0x8:
-               mod = "GMII PHY module";
-               break;
-       case 0x9:
-               mod = "MII PHY module";
-               break;
-       case 0xA:
-               mod = "RMII PHY module";
-               break;
-       default:
-               break;
-       }
-       if (mod)
-               seq_printf(s, "%s\n", mod);
-       else
-               seq_printf(s, "unknown xMII module (xMII_ID=0x%02X)\n", addon_id);
-}
-
-static struct proc_entry proc_entries[] = {
-       {"versions",    cpld_versions_get},
-       {"ebu",         cpld_ebu_module_get},
-       {"xmii",        cpld_xmii_module_get},
-};
-
-static struct file_operations ops = {
-       .owner   = THIS_MODULE,
-       .open    = cpld_proc_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = single_release,
-};
-
-static void cpld_proc_entry_create(struct proc_dir_entry *parent_node,
-                                  struct proc_entry *proc_entry)
-{
-       proc_create_data ( proc_entry->name, (S_IFREG | S_IRUGO), parent_node,
-                          &ops, proc_entry->callback);
-}
-
-static int cpld_proc_install(void)
-{
-       struct proc_dir_entry *driver_proc_node;
-
-       driver_proc_node = proc_mkdir("cpld", NULL);
-       if (driver_proc_node != NULL) {
-               int i;
-               for (i = 0; i < ARRAY_SIZE(proc_entries); i++)
-                       cpld_proc_entry_create(driver_proc_node,
-                                             &proc_entries[i]);
-       } else {
-               printk("cannot create proc entry");
-               return -1;
-       }
-       return 0;
-}
-#else
-static inline int cpld_proc_install(void) {}
-#endif
-
-static int easy98000_addon_probe(struct platform_device *pdev)
-{
-       return cpld_proc_install();
-}
-
-static int easy98000_addon_remove(struct platform_device *pdev)
-{
-#if defined(CONFIG_PROC_FS)
-       char buf[64];
-       int i;
-
-       for (i = 0; i < sizeof(proc_entries) / sizeof(proc_entries[0]); i++) {
-               sprintf(buf, "cpld/%s", proc_entries[i].name);
-               remove_proc_entry(buf, 0);
-       }
-       remove_proc_entry("cpld", 0);
-#endif
-       return 0;
-}
-
-static struct platform_driver easy98000_addon_driver = {
-       .probe = easy98000_addon_probe,
-       .remove = __devexit_p(easy98000_addon_remove),
-       .driver = {
-               .name = "easy98000_addon",
-               .owner = THIS_MODULE,
-       },
-};
-
-int __init easy98000_addon_init(void)
-{
-       return platform_driver_register(&easy98000_addon_driver);
-}
-
-void __exit easy98000_addon_exit(void)
-{
-       platform_driver_unregister(&easy98000_addon_driver);
-}
-
-module_init(easy98000_addon_init);
-module_exit(easy98000_addon_exit);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c
deleted file mode 100644 (file)
index d02d261..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *  EASY98000 CPLD LED driver
- *
- *  Copyright (C) 2010 Ralph Hempel <ralph.hempel@lantiq.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/kernel.h>
-#include <linux/version.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/errno.h>
-#include <linux/leds.h>
-#include <linux/slab.h>
-
-#include "dev-leds-easy98000-cpld.h"
-
-const char *led_name[8] = {
-       "ge0_act",
-       "ge0_link",
-       "ge1_act",
-       "ge1_link",
-       "fe2_act",
-       "fe2_link",
-       "fe3_act",
-       "fe3_link"
-};
-
-#define cpld_base7                     ((u16 *)(KSEG1 | 0x17c0000c))
-#define cpld_base8                     ((u16 *)(KSEG1 | 0x17c00012))
-
-#define ltq_r16(reg)                   __raw_readw(reg)
-#define ltq_w16(val, reg)              __raw_writew(val, reg)
-
-struct cpld_led_dev {
-       struct led_classdev     cdev;
-       u8                      mask;
-       u16                     *base;
-};
-
-struct cpld_led_drvdata {
-       struct cpld_led_dev     *led_devs;
-       int                     num_leds;
-};
-
-void led_set(u8 mask, u16 *base)
-{
-       ltq_w16(ltq_r16(base) | mask, base);
-}
-
-void led_clear(u8 mask, u16 *base)
-{
-       ltq_w16(ltq_r16(base) & (~mask), base);
-}
-
-void led_blink_clear(u8 mask, u16 *base)
-{
-       led_clear(mask, base);
-}
-
-static void led_brightness(struct led_classdev *led_cdev,
-                              enum led_brightness value)
-{
-       struct cpld_led_dev *led_dev =
-           container_of(led_cdev, struct cpld_led_dev, cdev);
-
-       if (value)
-               led_set(led_dev->mask, led_dev->base);
-       else
-               led_clear(led_dev->mask, led_dev->base);
-}
-
-static int led_probe(struct platform_device *pdev)
-{
-       int i;
-       char name[32];
-       struct cpld_led_drvdata *drvdata;
-       int ret = 0;
-
-       drvdata = kzalloc(sizeof(struct cpld_led_drvdata) +
-                         sizeof(struct cpld_led_dev) * MAX_LED,
-                         GFP_KERNEL);
-       if (!drvdata)
-               return -ENOMEM;
-
-       drvdata->led_devs = (struct cpld_led_dev *) &drvdata[1];
-
-       for (i = 0; i < MAX_LED; i++) {
-               struct cpld_led_dev *led_dev = &drvdata->led_devs[i];
-               led_dev->cdev.brightness_set = led_brightness;
-               led_dev->cdev.default_trigger = NULL;
-               led_dev->mask = 1 << (i % 8);
-               if(i < 8) {
-                       sprintf(name, "easy98000-cpld:%s", led_name[i]);
-                       led_dev->base = cpld_base8;
-               } else {
-                       sprintf(name, "easy98000-cpld:red:%d", i-8);
-                       led_dev->base = cpld_base7;
-               }
-               led_dev->cdev.name = name;
-               ret = led_classdev_register(&pdev->dev, &led_dev->cdev);
-               if (ret)
-                       goto err;
-       }
-       platform_set_drvdata(pdev, drvdata);
-       return 0;
-
-err:
-       printk("led_probe: 3\n");
-       for (i = i - 1; i >= 0; i--)
-               led_classdev_unregister(&drvdata->led_devs[i].cdev);
-
-       kfree(drvdata);
-       return ret;
-}
-
-static int led_remove(struct platform_device *pdev)
-{
-       int i;
-       struct cpld_led_drvdata *drvdata = platform_get_drvdata(pdev);
-       for (i = 0; i < MAX_LED; i++)
-               led_classdev_unregister(&drvdata->led_devs[i].cdev);
-       kfree(drvdata);
-       return 0;
-}
-
-static struct platform_driver led_driver = {
-       .probe = led_probe,
-       .remove = __devexit_p(led_remove),
-       .driver = {
-                  .name = LED_NAME,
-                  .owner = THIS_MODULE,
-                  },
-};
-
-int __init easy98000_cpld_led_init(void)
-{
-       pr_info(LED_DESC ", Version " LED_VERSION
-               " (c) Copyright 2011, Lantiq Deutschland GmbH\n");
-       return platform_driver_register(&led_driver);
-}
-
-void __exit easy98000_cpld_led_exit(void)
-{
-       platform_driver_unregister(&led_driver);
-}
-
-module_init(easy98000_cpld_led_init);
-module_exit(easy98000_cpld_led_exit);
-
-MODULE_DESCRIPTION(LED_NAME);
-MODULE_DESCRIPTION(LED_DESC);
-MODULE_AUTHOR("Ralph Hempel <ralph.hempel@lantiq.com>");
-MODULE_LICENSE("GPL v2");
-
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h
deleted file mode 100644 (file)
index 3160189..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  EASY98000 CPLD LED driver
- *
- *  Copyright (C) 2010 Ralph Hempel <ralph.hempel@lantiq.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.
- *
- */
-#ifndef _INCLUDE_EASY98000_CPLD_LED_H_
-#define _INCLUDE_EASY98000_CPLD_LED_H_
-
-#define LED_NAME       "easy98000_cpld_led"
-#define LED_DESC       "EASY98000 LED driver"
-#define LED_VERSION    "1.0.0"
-
-#define MAX_LED                16
-
-#endif /* _INCLUDE_EASY98000_CPLD_LED_H_ */
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-95C3AM1.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-95C3AM1.c
deleted file mode 100644 (file)
index 42a3344..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/i2c-gpio.h>
-
-#include <dev-gpio-leds.h>
-
-#include "../machtypes.h"
-#include "devices.h"
-
-#define BOARD_95C3AM1_GPIO_LED_0 10
-#define BOARD_95C3AM1_GPIO_LED_1 11
-#define BOARD_95C3AM1_GPIO_LED_2 12
-#define BOARD_95C3AM1_GPIO_LED_3 13
-
-static struct mtd_partition board_95C3AM1_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x40000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x40000,
-               .size   = 0x40000,      /* 2 sectors for redundant env. */
-       },
-       {
-               .name   = "linux",
-               .offset = 0x80000,
-               .size   = 0xF80000,     /* map only 16 MiB */
-       },
-};
-
-static struct flash_platform_data board_95C3AM1_flash_platform_data = {
-       .name = "sflash",
-       .parts = board_95C3AM1_partitions,
-       .nr_parts = ARRAY_SIZE(board_95C3AM1_partitions)
-};
-
-static struct spi_board_info board_95C3AM1_flash_data __initdata = {
-       .modalias               = "m25p80",
-       .bus_num                = 0,
-       .chip_select            = 0,
-       .max_speed_hz           = 10 * 1000 * 1000,
-       .mode                   = SPI_MODE_3,
-       .platform_data          = &board_95C3AM1_flash_platform_data
-};
-
-static struct gpio_led board_95C3AM1_gpio_leds[] __initdata = {
-       {
-               .name           = "power",
-               .gpio           = BOARD_95C3AM1_GPIO_LED_0,
-               .active_low     = 0,
-       }, {
-               .name           = "optical",
-               .gpio           = BOARD_95C3AM1_GPIO_LED_1,
-               .active_low     = 0,
-       }, {
-               .name           = "lan",
-               .gpio           = BOARD_95C3AM1_GPIO_LED_2,
-               .active_low     = 0,
-       }, {
-               .name           = "update",
-               .gpio           = BOARD_95C3AM1_GPIO_LED_3,
-               .active_low     = 0,
-       }
-};
-
-static struct i2c_gpio_platform_data board_95C3AM1_i2c_gpio_data = {
-       .sda_pin        = 107,
-       .scl_pin        = 108,
-};
-
-static struct platform_device board_95C3AM1_i2c_gpio_device = {
-       .name           = "i2c-gpio",
-       .id             = 0,
-       .dev = {
-               .platform_data  = &board_95C3AM1_i2c_gpio_data,
-       }
-};
-
-static void __init board_95C3AM1_init(void)
-{
-       falcon_register_i2c();
-       falcon_register_spi_flash(&board_95C3AM1_flash_data);
-       platform_device_register(&board_95C3AM1_i2c_gpio_device);
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(board_95C3AM1_gpio_leds),
-                                               board_95C3AM1_gpio_leds);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_95C3AM1,
-                       "95C3AM1",
-                       "95C3AM1 Board",
-                       board_95C3AM1_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-easy98020.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/falcon/mach-easy98020.c
deleted file mode 100644 (file)
index 4cdfc19..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <linux/gpio.h>
-#include <linux/gpio_buttons.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/input.h>
-#include <linux/interrupt.h>
-#include <linux/spi/spi.h>
-#include <linux/spi/flash.h>
-
-#include <dev-gpio-leds.h>
-
-#include "../machtypes.h"
-#include "devices.h"
-
-#define EASY98020_GPIO_LED_0 9
-#define EASY98020_GPIO_LED_1 10
-#define EASY98020_GPIO_LED_2 11
-#define EASY98020_GPIO_LED_3 12
-#define EASY98020_GPIO_LED_GE0_ACT 110
-#define EASY98020_GPIO_LED_GE0_LINK 109
-#define EASY98020_GPIO_LED_GE1_ACT 106
-#define EASY98020_GPIO_LED_GE1_LINK 105
-
-static struct mtd_partition easy98020_spi_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x40000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x40000,
-               .size   = 0x40000,      /* 2 sectors for redundant env. */
-       },
-       {
-               .name   = "linux",
-               .offset = 0x80000,
-               .size   = 0xF80000,     /* map only 16 MiB */
-       },
-};
-
-static struct flash_platform_data easy98020_spi_flash_platform_data = {
-       .name = "sflash",
-       .parts = easy98020_spi_partitions,
-       .nr_parts = ARRAY_SIZE(easy98020_spi_partitions)
-};
-
-static struct spi_board_info easy98020_spi_flash_data __initdata = {
-       .modalias               = "m25p80",
-       .bus_num                = 0,
-       .chip_select            = 0,
-       .max_speed_hz           = 10 * 1000 * 1000,
-       .mode                   = SPI_MODE_3,
-       .platform_data          = &easy98020_spi_flash_platform_data
-};
-
-static struct gpio_led easy98020_gpio_leds[] __initdata = {
-       {
-               .name           = "easy98020:green:0",
-               .gpio           = EASY98020_GPIO_LED_0,
-               .active_low     = 0,
-       }, {
-               .name           = "easy98020:green:1",
-               .gpio           = EASY98020_GPIO_LED_1,
-               .active_low     = 0,
-       }, {
-               .name           = "easy98020:green:2",
-               .gpio           = EASY98020_GPIO_LED_2,
-               .active_low     = 0,
-       }, {
-               .name           = "easy98020:green:3",
-               .gpio           = EASY98020_GPIO_LED_3,
-               .active_low     = 0,
-       }, {
-               .name           = "easy98020:ge0_act",
-               .gpio           = EASY98020_GPIO_LED_GE0_ACT,
-               .active_low     = 0,
-       }, {
-               .name           = "easy98020:ge0_link",
-               .gpio           = EASY98020_GPIO_LED_GE0_LINK,
-               .active_low     = 0,
-       }, {
-               .name           = "easy98020:ge1_act",
-               .gpio           = EASY98020_GPIO_LED_GE1_ACT,
-               .active_low     = 0,
-       }, {
-               .name           = "easy98020:ge1_link",
-               .gpio           = EASY98020_GPIO_LED_GE1_LINK,
-               .active_low     = 0,
-       }
-};
-
-static void __init easy98020_init(void)
-{
-       falcon_register_i2c();
-       falcon_register_spi_flash(&easy98020_spi_flash_data);
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(easy98020_gpio_leds),
-                                       easy98020_gpio_leds);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_EASY98020,
-                       "EASY98020",
-                       "EASY98020 Eval Board",
-                       easy98020_init);
-
-MIPS_MACHINE(LANTIQ_MACH_EASY98020_1LAN,
-                       "EASY98020_1LAN",
-                       "EASY98020 Eval Board (1 LAN port)",
-                       easy98020_init);
-
-MIPS_MACHINE(LANTIQ_MACH_EASY98020_2LAN,
-                       "EASY98020_2LAN",
-                       "EASY98020 Eval Board (2 LAN ports)",
-                       easy98020_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.c
deleted file mode 100644 (file)
index 90b63fc..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.
- *
- * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/string.h>
-#include <linux/mtd/physmap.h>
-#include <linux/kernel.h>
-#include <linux/reboot.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <linux/etherdevice.h>
-#include <linux/reboot.h>
-#include <linux/time.h>
-#include <linux/io.h>
-#include <linux/gpio.h>
-#include <linux/leds.h>
-
-#include <asm/bootinfo.h>
-#include <asm/irq.h>
-
-#include <lantiq_soc.h>
-#include <lantiq_irq.h>
-#include <lantiq_platform.h>
-
-#define LTQ_USB_IOMEM_BASE 0x1e101000
-#define LTQ_USB_IOMEM_SIZE 0x00001000
-
-static struct resource resources[] =
-{
-       [0] = {
-               .name    = "dwc_otg_membase",
-               .start   = LTQ_USB_IOMEM_BASE,
-               .end     = LTQ_USB_IOMEM_BASE + LTQ_USB_IOMEM_SIZE - 1,
-               .flags   = IORESOURCE_MEM,
-       },
-       [1] = {
-               .name    = "dwc_otg_irq",
-               .start   = LTQ_USB_INT,
-               .flags   = IORESOURCE_IRQ,
-       },
-};
-
-static u64 dwc_dmamask = (u32)0x1fffffff;
-
-static struct platform_device platform_dev = {
-       .name = "dwc_otg",
-       .dev = {
-               .dma_mask      = &dwc_dmamask,
-       },
-       .resource               = resources,
-       .num_resources          = ARRAY_SIZE(resources),
-};
-
-int __init
-xway_register_dwc(int pin)
-{
-       struct irq_data d;
-       d.irq = resources[1].start;
-       ltq_enable_irq(&d);
-       platform_dev.dev.platform_data = (void*) pin;
-       return platform_device_register(&platform_dev);
-}
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-dwc_otg.h
deleted file mode 100644 (file)
index 521fad0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * 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.
- *
- * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#ifndef _LTQ_DEV_DWC_H__
-#define _LTQ_DEV_DWC_H__
-
-#include <lantiq_platform.h>
-
-extern void __init xway_register_dwc(int pin);
-
-#endif
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.c
deleted file mode 100644 (file)
index 14fd511..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
- *  Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@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/init.h>
-#include <linux/platform_device.h>
-#include <linux/ath5k_platform.h>
-#include <linux/pci.h>
-
-#include "dev-wifi-ath5k.h"
-
-extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev);
-struct ath5k_platform_data ath5k_pdata;
-
-static int 
-ath5k_pci_plat_dev_init(struct pci_dev *dev)
-{
-       dev->dev.platform_data = &ath5k_pdata;
-       return 0;
-}
-
-void __init
-ltq_register_ath5k(u16 *eeprom_data, u8 *macaddr)
-{
-       ath5k_pdata.eeprom_data = eeprom_data;
-       ath5k_pdata.macaddr = macaddr;
-       ltqpci_plat_dev_init = ath5k_pci_plat_dev_init;
-}
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-ath5k.h
deleted file mode 100644 (file)
index 37f6e41..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
- *  Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@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.
- */
-
-#ifndef _DEV_WIFI_ATH5K_H__
-#define _DEV_WIFI_ATH5K_H__
-
-extern void ltq_register_ath5k(u16 *eeprom_data, u8 *macaddr);
-
-#endif
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.c
deleted file mode 100644 (file)
index 94932df..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *  Copyright (C) 2011 John Crispin <blogic@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/init.h>
-#include <linux/platform_device.h>
-#include <linux/rt2x00_platform.h>
-#include <linux/pci.h>
-
-#include "dev-wifi-rt2x00.h"
-
-extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev);
-struct rt2x00_platform_data rt2x00_pdata;
-
-static int
-rt2x00_pci_plat_dev_init(struct pci_dev *dev)
-{
-       dev->dev.platform_data = &rt2x00_pdata;
-       return 0;
-}
-
-void __init
-ltq_register_rt2x00(const char *firmware)
-{
-       rt2x00_pdata.eeprom_file_name =  kstrdup(firmware, GFP_KERNEL);
-       ltqpci_plat_dev_init = rt2x00_pci_plat_dev_init;
-}
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.h
deleted file mode 100644 (file)
index 060ca50..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- *  Copyright (C) 2011 John Crispin <blogic@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 _DEV_WIFI_RT2X00_H__
-#define _DEV_WIFI_RT2X00_H__
-
-extern void ltq_register_rt2x00(const char *firmware);
-
-#endif
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c
deleted file mode 100644 (file)
index 9be1a5f..0000000
+++ /dev/null
@@ -1,665 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <linux/gpio.h>
-#include <linux/gpio_buttons.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/input.h>
-#include <linux/etherdevice.h>
-#include <linux/ath5k_platform.h>
-#include <linux/pci.h>
-
-#include <lantiq_soc.h>
-#include <lantiq_platform.h>
-#include <dev-gpio-leds.h>
-#include <dev-gpio-buttons.h>
-
-#include "../machtypes.h"
-#include "dev-wifi-rt2x00.h"
-#include "dev-wifi-ath5k.h"
-#include "devices.h"
-#include "dev-dwc_otg.h"
-
-static struct mtd_partition arv4510_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x20000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x20000,
-               .size   = 0x120000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x40000,
-               .size   = 0xfa0000,
-       },
-       {
-               .name   = "board_config",
-               .offset = 0xfe0000,
-               .size   = 0x20000,
-       },
-};
-
-static struct mtd_partition arv45xx_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x20000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x20000,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x30000,
-               .size   = 0x3c0000,
-       },
-       {
-               .name   = "board_config",
-               .offset = 0x3f0000,
-               .size   = 0x10000,
-       },
-};
-
-static struct mtd_partition arv45xx_brnboot_partitions[] =
-{
-       {
-               .name   = "brn-boot",
-               .offset = 0x0,
-               .size   = 0x20000,
-       },
-       {
-               .name   = "config",
-               .offset = 0x20000,
-               .size   = 0x30000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x50000,
-               .size   = 0x390000,
-       },
-       {
-               .name   = "reserved", /* 12-byte signature at 0x3efff4 :/ */
-               .offset = 0x3e0000,
-               .size   = 0x010000,
-       },
-       {
-               .name   = "eeprom",
-               .offset = 0x3f0000,
-               .size   = 0x10000,
-       },
-};
-
-static struct mtd_partition arv7525_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x10000,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x20000,
-               .size   = 0x3d0000,
-       },
-       {
-               .name   = "board_config",
-               .offset = 0x3f0000,
-               .size   = 0x10000,
-       },
-};
-
-static struct mtd_partition arv75xx_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x10000,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x20000,
-               .size   = 0x7d0000,
-       },
-       {
-               .name   = "board_config",
-               .offset = 0x7f0000,
-               .size   = 0x10000,
-       },
-};
-
-static struct physmap_flash_data arv4510_flash_data = {
-       .nr_parts       = ARRAY_SIZE(arv4510_partitions),
-       .parts          = arv4510_partitions,
-};
-
-static struct physmap_flash_data arv45xx_flash_data = {
-       .nr_parts       = ARRAY_SIZE(arv45xx_partitions),
-       .parts          = arv45xx_partitions,
-};
-
-static struct physmap_flash_data arv45xx_brnboot_flash_data = {
-       .nr_parts       = ARRAY_SIZE(arv45xx_brnboot_partitions),
-       .parts          = arv45xx_brnboot_partitions,
-};
-
-static struct physmap_flash_data arv7525_flash_data = {
-       .nr_parts       = ARRAY_SIZE(arv7525_partitions),
-       .parts          = arv7525_partitions,
-};
-
-static struct physmap_flash_data arv75xx_flash_data = {
-       .nr_parts       = ARRAY_SIZE(arv75xx_partitions),
-       .parts          = arv75xx_partitions,
-};
-
-static struct ltq_pci_data ltq_pci_data = {
-       .clock  = PCI_CLOCK_EXT,
-       .gpio   = PCI_GNT1 | PCI_REQ1,
-       .irq    = {
-               [14] = INT_NUM_IM0_IRL0 + 22,
-       },
-};
-
-static struct ltq_eth_data ltq_eth_data = {
-       .mii_mode       = PHY_INTERFACE_MODE_RMII,
-};
-
-static struct gpio_led
-arv4510pw_gpio_leds[] __initdata = {
-       { .name = "soc:green:foo", .gpio = 4, .active_low = 1, },
-};
-
-static struct gpio_led
-arv4518pw_gpio_leds[] __initdata = {
-       { .name = "soc:green:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:fail", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:usb", .gpio = 19, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:voip", .gpio = 100, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:fxs1", .gpio = 101, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:fxs2", .gpio = 102, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
-};
-
-static struct gpio_keys_button
-arv4518pw_gpio_keys[] __initdata = {
-       {
-               .desc           = "wifi",
-               .type           = EV_KEY,
-               .code           = BTN_0,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 28,
-               .active_low     = 1,
-       },
-       {
-               .desc           = "reset",
-               .type           = EV_KEY,
-               .code           = BTN_1,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 30,
-               .active_low     = 1,
-       },
-       {
-               .desc           = "wps",
-               .type           = EV_KEY,
-               .code           = BTN_2,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 29,
-               .active_low     = 1,
-       },
-};
-
-static struct gpio_led
-arv4520pw_gpio_leds[] __initdata = {
-       { .name = "soc:blue:power", .gpio = 3, .active_low = 1, },
-       { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, },
-       { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, },
-       { .name = "soc:red:power", .gpio = 6, .active_low = 1, },
-       { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, },
-       { .name = "soc:red:wps", .gpio = 9, .active_low = 1, },
-       { .name = "soc:blue:voip", .gpio = 100, .active_low = 1, },
-       { .name = "soc:blue:fxs1", .gpio = 101, .active_low = 1, },
-       { .name = "soc:blue:fxs2", .gpio = 102, .active_low = 1, },
-       { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, },
-       { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, },
-       { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, },
-       { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, },
-};
-
-static struct gpio_led
-arv452cpw_gpio_leds[] __initdata = {
-       { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:isdn", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:wps", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:fxs1", .gpio = 100, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:fxs2", .gpio = 101, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:wps", .gpio = 102, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:internet", .gpio = 108, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:internet", .gpio = 109, .active_low = 1, .default_trigger = "default-on" },
-};
-
-static struct gpio_led
-arv4525pw_gpio_leds[] __initdata = {
-       { .name = "soc:green:dsl", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:wifi", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:online", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:fxs-internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:fxs-festnetz", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
-};
-
-#define ARV4525PW_PHYRESET 13
-#define ARV4525PW_RELAY    31
-
-static struct gpio arv4525pw_gpios[] __initdata = {
-       { ARV4525PW_PHYRESET, GPIOF_OUT_INIT_HIGH, "phyreset" },
-       { ARV4525PW_RELAY,    GPIOF_OUT_INIT_HIGH, "relay"    },
-};
-
-
-static struct gpio_led
-arv752dpw22_gpio_leds[] __initdata = {
-       { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:wps", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:red:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:wifi1", .gpio = 107, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:wifi", .gpio = 108, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:blue:wifi1", .gpio = 109, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:eth1", .gpio = 111, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:eth2", .gpio = 112, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:eth3", .gpio = 113, .active_low = 1, .default_trigger = "default-on" },
-       { .name = "soc:green:eth4", .gpio = 114, .active_low = 1, .default_trigger = "default-on", },
-};
-
-static struct gpio_keys_button
-arv752dpw22_gpio_keys[] __initdata = {
-       {
-               .desc           = "btn0",
-               .type           = EV_KEY,
-               .code           = BTN_0,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 12,
-               .active_low     = 1,
-       },
-       {
-               .desc           = "btn1",
-               .type           = EV_KEY,
-               .code           = BTN_1,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 13,
-               .active_low     = 1,
-       },
-       {
-               .desc           = "btn2",
-               .type           = EV_KEY,
-               .code           = BTN_2,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 28,
-               .active_low     = 1,
-       },
-};
-
-static struct gpio_led
-arv7518pw_gpio_leds[] __initdata = {
-       { .name = "soc:green:power", .gpio = 2, .active_low = 1, },
-       { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, },
-       { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
-       { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, },
-       { .name = "soc:red:internet", .gpio = 8, .active_low = 1, },
-       { .name = "soc:green:usb", .gpio = 19, .active_low = 1, },
-};
-
-static struct gpio_keys_button
-arv7518pw_gpio_keys[] __initdata = {
-       {
-               .desc           = "reset",
-               .type           = EV_KEY,
-               .code           = BTN_0,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 23,
-               .active_low     = 1,
-       },
-       {
-               .desc           = "wifi",
-               .type           = EV_KEY,
-               .code           = BTN_1,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 25,
-               .active_low     = 1,
-       },
-};
-
-static struct gpio_keys_button
-arv7525pw_gpio_keys[] __initdata = {
-       {
-               .desc           = "restart",
-               .type           = EV_KEY,
-               .code           = BTN_0,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 29,
-               .active_low     = 1,
-       },
-};
-
-static void
-arv45xx_register_ethernet(void)
-{
-#define ARV45XX_BRN_MAC                        0x3f0016
-       memcpy_fromio(&ltq_eth_data.mac.sa_data,
-               (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
-       ltq_register_etop(&ltq_eth_data);
-}
-
-static void
-arv75xx_register_ethernet(void)
-{
-#define ARV75XX_BRN_MAC                        0x7f0016
-       memcpy_fromio(&ltq_eth_data.mac.sa_data,
-               (void *)KSEG1ADDR(LTQ_FLASH_START + ARV75XX_BRN_MAC), 6);
-       ltq_register_etop(&ltq_eth_data);
-}
-
-static void
-bewan_register_ethernet(void)
-{
-#define BEWAN_BRN_MAC                  0x3f0014
-       memcpy_fromio(&ltq_eth_data.mac.sa_data,
-               (void *)KSEG1ADDR(LTQ_FLASH_START + BEWAN_BRN_MAC), 6);
-       ltq_register_etop(&ltq_eth_data);
-}
-
-static u16 arv45xx_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
-static u8 arv45xx_ath5k_eeprom_mac[6];
-
-void __init
-arv45xx_register_ath5k(void)
-{
-#define ARV45XX_BRN_ATH                0x3f0478
-       int i;
-       static u16 eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
-       u32 *p = (u32*)arv45xx_ath5k_eeprom_data;
-
-       memcpy_fromio(arv45xx_ath5k_eeprom_mac,
-               (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_MAC), 6);
-       arv45xx_ath5k_eeprom_mac[5]++;
-       memcpy_fromio(arv45xx_ath5k_eeprom_data,
-               (void *)KSEG1ADDR(LTQ_FLASH_START + ARV45XX_BRN_ATH), ATH5K_PLAT_EEP_MAX_WORDS);
-       // swap eeprom bytes
-       for (i = 0; i < ATH5K_PLAT_EEP_MAX_WORDS>>1; i++){
-               //arv4518_ath5k_eeprom_data[i] = ((eeprom_data[i]&0xff)<<8)|((eeprom_data[i]&0xff00)>>8);
-               p[i] = ((eeprom_data[(i<<1)+1]&0xff)<<24)|((eeprom_data[(i<<1)+1]&0xff00)<<8)|((eeprom_data[i<<1]&0xff)<<8)|((eeprom_data[i<<1]&0xff00)>>8);
-               if (i == 0xbf>>1){
-                       // printk ("regdomain: 0x%x --> 0x%x\n", p[i], (p[i] & 0xffff0000)|0x67);
-                       /* regdomain is invalid?? how did original fw convert 
-                       * value to 0x82d4 ??
-                       * for now, force to 0x67 */
-                       p[i] &= 0xffff0000;
-                       p[i] |= 0x67;
-               }
-       }
-}
-
-static void __init
-arv3527p_init(void)
-{
-       ltq_register_gpio_stp();
-       //ltq_add_device_gpio_leds(arv3527p_gpio_leds, ARRAY_SIZE(arv3527p_gpio_leds));
-       ltq_register_nor(&arv45xx_flash_data);
-       arv45xx_register_ethernet();
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV3527P,
-                       "ARV3527P",
-                       "ARV3527P - Arcor Easybox 401",
-                       arv3527p_init);
-
-static void __init
-arv4510pw_init(void)
-{
-       ltq_register_gpio_stp();
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4510pw_gpio_leds), arv4510pw_gpio_leds);
-       ltq_register_nor(&arv4510_flash_data);
-       ltq_pci_data.irq[12] = (INT_NUM_IM2_IRL0 + 31);
-       ltq_pci_data.irq[15] = (INT_NUM_IM0_IRL0 + 26);
-       ltq_pci_data.gpio |= PCI_EXIN2 | PCI_REQ2;
-       ltq_register_pci(&ltq_pci_data);
-       bewan_register_ethernet();
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV4510PW,
-                       "ARV4510PW",
-                       "ARV4510PW - Wippies Homebox",
-                       arv4510pw_init);
-
-static void __init
-arv4518pw_init(void)
-{
-#define ARV4518PW_EBU                  0
-#define ARV4518PW_USB                  14
-#define ARV4518PW_SWITCH_RESET         13
-#define ARV4518PW_MADWIFI_ADDR         0xb07f0400
-
-       ltq_register_gpio_ebu(ARV4518PW_EBU);
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4518pw_gpio_leds), arv4518pw_gpio_leds);
-       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
-                               ARRAY_SIZE(arv4518pw_gpio_keys), arv4518pw_gpio_keys);
-       ltq_register_nor(&arv45xx_flash_data);
-       ltq_pci_data.gpio = PCI_GNT2 | PCI_REQ2;
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_madwifi_eep(ARV4518PW_MADWIFI_ADDR);
-       ltq_register_ath5k(arv45xx_ath5k_eeprom_data, arv45xx_ath5k_eeprom_mac);
-       xway_register_dwc(ARV4518PW_USB);
-       arv45xx_register_ethernet();
-
-       gpio_request(ARV4518PW_SWITCH_RESET, "switch");
-       gpio_direction_output(ARV4518PW_SWITCH_RESET, 1);
-       gpio_export(ARV4518PW_SWITCH_RESET, 0);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV4518PW,
-                       "ARV4518PW",
-                       "ARV4518PW - SMC7908A-ISP, Airties WAV-221",
-                       arv4518pw_init);
-
-static void __init
-arv4520pw_init(void)
-{
-#define ARV4520PW_EBU                  0x400
-#define ARV4520PW_USB                  28
-#define ARV4520PW_SWITCH_RESET         110
-
-       ltq_register_gpio_ebu(ARV4520PW_EBU);
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4520pw_gpio_leds), arv4520pw_gpio_leds);
-       ltq_register_nor(&arv45xx_flash_data);
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_tapi();
-       arv45xx_register_ethernet();
-       xway_register_dwc(ARV4520PW_USB);
-
-       gpio_request(ARV4520PW_SWITCH_RESET, "switch");
-       gpio_set_value(ARV4520PW_SWITCH_RESET, 1);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV4520PW,
-                       "ARV4520PW",
-                       "ARV4520PW - Airties WAV-281, Arcor A800",
-                       arv4520pw_init);
-
-static void __init
-arv452Cpw_init(void)
-{
-#define ARV452CPW_EBU                  0x77f
-#define ARV452CPW_USB                  28
-#define ARV452CPW_RELAY1               31
-#define ARV452CPW_RELAY2               107
-#define ARV452CPW_SWITCH_RESET         110
-#define ARV452CPW_MADWIFI_ADDR         0xb07f0400
-
-       ltq_register_gpio_ebu(ARV452CPW_EBU);
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv452cpw_gpio_leds), arv452cpw_gpio_leds);
-       ltq_register_nor(&arv45xx_flash_data);
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_madwifi_eep(ARV452CPW_MADWIFI_ADDR);
-       xway_register_dwc(ARV452CPW_USB);
-       arv45xx_register_ethernet();
-       arv45xx_register_ath5k();
-
-       gpio_request(ARV452CPW_SWITCH_RESET, "switch");
-       gpio_set_value(ARV452CPW_SWITCH_RESET, 1);
-       gpio_export(ARV452CPW_SWITCH_RESET, 0);
-
-       gpio_request(ARV452CPW_RELAY1, "relay1");
-       gpio_direction_output(ARV452CPW_RELAY1, 1);
-       gpio_export(ARV452CPW_RELAY1, 0);
-
-       gpio_request(ARV452CPW_RELAY2, "relay2");
-       gpio_set_value(ARV452CPW_RELAY2, 1);
-       gpio_export(ARV452CPW_RELAY2, 0);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV452CPW,
-                       "ARV452CPW",
-                       "ARV452CPW - Arcor A801",
-                       arv452Cpw_init);
-
-static void __init
-arv4525pw_init(void)
-{
-#define ARV4525PW_MADWIFI_ADDR         0xb03f0400
-       if (ltq_brn_boot)
-               ltq_register_nor(&arv45xx_brnboot_flash_data);
-       else
-               ltq_register_nor(&arv45xx_flash_data);
-
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds);
-       gpio_request_array(arv4525pw_gpios, ARRAY_SIZE(arv4525pw_gpios));
-       gpio_export(ARV4525PW_RELAY, false);
-       gpio_export(ARV4525PW_PHYRESET, false);
-       ltq_pci_data.clock = PCI_CLOCK_INT;
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_madwifi_eep(ARV4525PW_MADWIFI_ADDR);
-       arv45xx_register_ath5k();
-       ltq_register_ath5k(arv45xx_ath5k_eeprom_data, arv45xx_ath5k_eeprom_mac);
-       ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
-       arv45xx_register_ethernet();
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV4525PW,
-                       "ARV4525PW",
-                       "ARV4525PW - Speedport W502V",
-                       arv4525pw_init);
-
-static void __init
-arv7525pw_init(void)
-{
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds);
-       ltq_register_nor(&arv7525_flash_data);
-       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
-                               ARRAY_SIZE(arv7525pw_gpio_keys), arv7525pw_gpio_keys);
-       ltq_pci_data.clock = PCI_CLOCK_INT;
-       ltq_pci_data.gpio = PCI_GNT1 | PCI_EXIN1;
-       ltq_pci_data.irq[14] = (INT_NUM_IM3_IRL0 + 31);
-       ltq_register_pci(&ltq_pci_data);
-       ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
-       ltq_register_rt2x00("RT2860.eeprom");
-       ltq_register_tapi();
-       arv45xx_register_ethernet();
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV7525PW,
-                       "ARV7525PW",
-                       "ARV7525PW - Speedport W303V",
-                       arv7525pw_init);
-
-static void __init
-arv7518pw_init(void)
-{
-#define ARV7518PW_EBU                  0x2
-#define ARV7518PW_USB                  14
-
-       ltq_register_gpio_ebu(ARV7518PW_EBU);
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv7518pw_gpio_leds), arv7518pw_gpio_leds);
-       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
-                               ARRAY_SIZE(arv7518pw_gpio_keys), arv7518pw_gpio_keys);
-       ltq_register_nor(&arv75xx_flash_data);
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_tapi();
-       xway_register_dwc(ARV7518PW_USB);
-       arv75xx_register_ethernet();
-       //arv7518_register_ath9k(mac);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV7518PW,
-                       "ARV7518PW",
-                       "ARV7518PW - ASTORIA",
-                       arv7518pw_init);
-
-static void __init
-arv752dpw22_init(void)
-{
-#define ARV752DPW22_EBU                        0x2
-#define ARV752DPW22_USB                        100
-#define ARV752DPW22_RELAY              101
-
-       ltq_register_gpio_ebu(ARV752DPW22_EBU);
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv752dpw22_gpio_leds), arv752dpw22_gpio_leds);
-       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
-                               ARRAY_SIZE(arv752dpw22_gpio_keys), arv752dpw22_gpio_keys);
-       ltq_register_nor(&arv75xx_flash_data);
-       ltq_pci_data.irq[15] = (INT_NUM_IM3_IRL0 + 31);
-       ltq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2;
-       ltq_register_pci(&ltq_pci_data);
-       xway_register_dwc(ARV752DPW22_USB);
-       arv75xx_register_ethernet();
-
-       gpio_request(ARV752DPW22_RELAY, "relay");
-       gpio_set_value(ARV752DPW22_RELAY, 1);
-       gpio_export(ARV752DPW22_RELAY, 0);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22,
-                       "ARV752DPW22",
-                       "ARV752DPW22 - Arcor A803",
-                       arv752dpw22_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50601.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50601.c
deleted file mode 100644 (file)
index a5a0105..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/input.h>
-
-#include <lantiq.h>
-
-#include "../machtypes.h"
-#include "devices.h"
-
-static struct mtd_partition easy50601_partitions[] = {
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x10000,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x20000,
-               .size   = 0x3d0000,
-       },
-};
-
-static struct physmap_flash_data easy50601_flash_data = {
-       .nr_parts       = ARRAY_SIZE(easy50601_partitions),
-       .parts          = easy50601_partitions,
-};
-
-static struct ltq_eth_data ltq_eth_data = {
-       .mii_mode = -1, /* use EPHY */
-};
-
-static void __init easy50601_init(void)
-{
-       ltq_register_nor(&easy50601_flash_data);
-       ltq_register_etop(&ltq_eth_data);
-}
-
-MIPS_MACHINE(LTQ_MACH_EASY50601,
-                       "EASY50601",
-                       "EASY50601 Eval Board",
-                       easy50601_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50712.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-easy50712.c
deleted file mode 100644 (file)
index 2fddfca..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/input.h>
-#include <linux/phy.h>
-
-#include <lantiq_soc.h>
-#include <irq.h>
-
-#include "../machtypes.h"
-#include "devices.h"
-
-static struct mtd_partition easy50712_partitions[] = {
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x10000,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x20000,
-               .size   = 0x3d0000,
-       },
-};
-
-static struct physmap_flash_data easy50712_flash_data = {
-       .nr_parts       = ARRAY_SIZE(easy50712_partitions),
-       .parts          = easy50712_partitions,
-};
-
-static struct ltq_pci_data ltq_pci_data = {
-       .clock  = PCI_CLOCK_INT,
-       .gpio   = PCI_GNT1 | PCI_REQ1,
-       .irq    = {
-               [14] = INT_NUM_IM0_IRL0 + 22,
-       },
-};
-
-static struct ltq_eth_data ltq_eth_data = {
-       .mii_mode = PHY_INTERFACE_MODE_MII,
-};
-
-static void __init easy50712_init(void)
-{
-       ltq_register_gpio_stp();
-       ltq_register_nor(&easy50712_flash_data);
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_etop(&ltq_eth_data);
-       ltq_register_tapi();
-}
-
-MIPS_MACHINE(LTQ_MACH_EASY50712,
-            "EASY50712",
-            "EASY50712 Eval Board",
-             easy50712_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-fritz.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-fritz.c
deleted file mode 100644 (file)
index 9b54242..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/input.h>
-#include <linux/phy.h>
-
-#include <lantiq_soc.h>
-#include <irq.h>
-
-#include "../machtypes.h"
-#include "devices.h"
-
-/*static struct mtd_partition fritz3370_partitions[] = {
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = 0x10000,
-               .size   = 0x10000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x20000,
-               .size   = 0xe0000,
-       },
-       {
-               .name   = "rootfs",
-               .offset = 0x100000,
-               .size   = 0x300000,
-       },
-};
-
-static struct physmap_flash_data fritz3370_flash_data = {
-       .nr_parts       = ARRAY_SIZE(fritz3370_partitions),
-       .parts          = fritz3370_partitions,
-};
-
-static struct ltq_pci_data ltq_pci_data = {
-       .clock  = PCI_CLOCK_INT,
-       .gpio   = PCI_GNT1 | PCI_REQ1,
-       .irq    = {
-               [14] = INT_NUM_IM0_IRL0 + 22,
-       },
-};
-*/
-static struct ltq_eth_data ltq_eth_data = {
-       .mii_mode = PHY_INTERFACE_MODE_MII,
-};
-
-extern void xway_register_nand(void);
-
-static void __init fritz3370_init(void)
-{
-//     ltq_register_gpio_stp();
-//     ltq_register_nor(&fritz3370_flash_data);
-//     ltq_register_pci(&ltq_pci_data);
-       ltq_register_etop(&ltq_eth_data);
-       xway_register_nand();
-}
-
-MIPS_MACHINE(LANTIQ_MACH_FRITZ3370,
-            "FRITZ3370",
-            "FRITZ!BOX 3370",
-             fritz3370_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.c
deleted file mode 100644 (file)
index 3dbfcb9..0000000
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2011 Andrej Vlašić
- *  Copyright (C) 2011 Luka Perkov
- *
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <linux/gpio.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/input.h>
-#include <linux/ath5k_platform.h>
-#include <linux/pci.h>
-#include <linux/phy.h>
-#include <linux/io.h>
-#include <linux/string.h>
-
-#include <irq.h>
-#include <lantiq_soc.h>
-#include <lantiq_platform.h>
-#include <dev-gpio-leds.h>
-#include <dev-gpio-buttons.h>
-
-#include "../machtypes.h"
-#include "dev-wifi-ath5k.h"
-#include "devices.h"
-#include "dev-dwc_otg.h"
-
-#include "mach-gigasx76x.h"
-
-#define UBOOT_ENV_OFFSET       0x010000
-#define UBOOT_ENV_SIZE         0x010000
-
-static struct mtd_partition gigasx76x_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x000000,
-               .size   = 0x010000,
-       },
-       {
-               .name   = "uboot_env",
-               .offset = UBOOT_ENV_OFFSET,
-               .size   = UBOOT_ENV_SIZE,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x020000,
-               .size   = 0x7e0000,
-       },
-};
-
-static struct gpio_led
-gigasx76x_gpio_leds[] __initdata = {
-       { .name = "soc:green:voip", .gpio = 216, },
-       { .name = "soc:green:adsl", .gpio = 217, },
-       { .name = "soc:green:usb", .gpio = 218, },
-       { .name = "soc:green:wifi", .gpio = 219, },
-       { .name = "soc:green:phone2", .gpio = 220, },
-       { .name = "soc:green:phone1", .gpio = 221, },
-       { .name = "soc:green:line", .gpio = 222, },
-       { .name = "soc:green:online", .gpio = 223, },
-};
-
-static struct gpio_keys_button
-gigasx76x_gpio_keys[] __initdata = {
-       {
-               .desc           = "wps",
-               .type           = EV_KEY,
-               .code           = KEY_WPS_BUTTON,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 22,
-               .active_low     = 1,
-       },
-       {
-               .desc           = "reset",
-               .type           = EV_KEY,
-               .code           = BTN_0,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio           = 14,
-               .active_low     = 0,
-       },
-};
-
-static struct physmap_flash_data gigasx76x_flash_data = {
-       .nr_parts       = ARRAY_SIZE(gigasx76x_partitions),
-       .parts          = gigasx76x_partitions,
-};
-
-static struct ltq_pci_data ltq_pci_data = {
-       .clock  = PCI_CLOCK_INT,
-       .gpio   = PCI_GNT1 | PCI_REQ1,
-       .irq    = { [14] = INT_NUM_IM0_IRL0 + 22, },
-};
-
-static struct ltq_eth_data ltq_eth_data = {
-       .mii_mode       = PHY_INTERFACE_MODE_MII,
-};
-
-static char __init *get_uboot_env_var(char *haystack, int haystack_len, char *needle, int needle_len) {
-       int i;
-       for (i = 0; i <= haystack_len - needle_len; i++) {
-               if (memcmp(haystack + i, needle, needle_len) == 0) {
-                       return haystack + i + needle_len;
-               }
-       }
-       return NULL;
-}
-
-/*
- * gigasx76x_parse_hex_* are not uniq. in arm/orion there are also duplicates:
- * dns323_parse_hex_*
- * TODO: one day write a patch for this :)
- */
-static int __init gigasx76x_parse_hex_nibble(char n) {
-       if (n >= '0' && n <= '9')
-               return n - '0';
-
-       if (n >= 'A' && n <= 'F')
-               return n - 'A' + 10;
-
-       if (n >= 'a' && n <= 'f')
-               return n - 'a' + 10;
-
-       return -1;
-}
-
-static int __init gigasx76x_parse_hex_byte(const char *b) {
-       int hi;
-       int lo;
-
-       hi = gigasx76x_parse_hex_nibble(b[0]);
-       lo = gigasx76x_parse_hex_nibble(b[1]);
-
-       if (hi < 0 || lo < 0)
-               return -1;
-
-       return (hi << 4) | lo;
-}
-
-static u16 gigasx76x_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
-static u8 gigasx76x_ath5k_eeprom_mac[6];
-
-static int __init gigasx76x_register_ethernet(void) {
-       u_int8_t addr[6];
-       int i;
-       char *uboot_env_page;
-       char *mac;
-       char *boardid;
-
-       uboot_env_page = ioremap(LTQ_FLASH_START + UBOOT_ENV_OFFSET, UBOOT_ENV_SIZE);
-       if (!uboot_env_page)
-               return -ENOMEM;
-
-       mac = get_uboot_env_var(uboot_env_page, UBOOT_ENV_SIZE, "\0ethaddr=", 9);
-       boardid = get_uboot_env_var(uboot_env_page, UBOOT_ENV_SIZE, "\0boardid=", 9);
-
-       if (!mac) {
-       goto error_fail;
-       }
-
-       if (!boardid) {
-       goto error_fail;
-       }
-
-       /* Sanity check the string we're looking at */
-       for (i = 0; i < 5; i++) {
-       if (*(mac + (i * 3) + 2) != ':') {
-               goto error_fail;
-               }
-       }
-
-       for (i = 0; i < 6; i++) {
-               int byte;
-               byte = gigasx76x_parse_hex_byte(mac + (i * 3));
-               if (byte < 0) {
-                       goto error_fail;
-               }
-               addr[i] = byte;
-       }
-
-       iounmap(uboot_env_page);
-       printk("GIGASX76X: Found ethernet MAC address: ");
-       for (i = 0; i < 6; i++)
-               printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
-
-       memcpy(&ltq_eth_data.mac.sa_data, addr, 6);
-       ltq_register_etop(&ltq_eth_data);
-
-       memcpy(&gigasx76x_ath5k_eeprom_mac, addr, 6);
-       gigasx76x_ath5k_eeprom_mac[5]++;
-
-       if (strncmp(boardid, "sx763", 5) == 0) {
-               printk("GIGASX76X: Board id is sx763.");
-               memcpy(&gigasx76x_ath5k_eeprom_data, sx763_eeprom_data, ATH5K_PLAT_EEP_MAX_WORDS);
-       } else if (strncmp(boardid, "sx762", 5) == 0) {
-                       printk("GIGASX76X: Board id is sx762.");
-                       memcpy(&gigasx76x_ath5k_eeprom_data, sx762_eeprom_data, ATH5K_PLAT_EEP_MAX_WORDS);
-       } else {
-               printk("GIGASX76X: Board id is unknown, fix uboot_env data.");
-       }
-
-       return 0;
-
-       error_fail:
-               iounmap(uboot_env_page);
-               return -EINVAL;
-}
-
-static void __init gigasx76x_init(void) {
-#define GIGASX76X_USB          29
-#define GIGASX76X_MADWIFI_ADDR 0xb07f0000
-
-       ltq_register_gpio_stp();
-       ltq_register_nor(&gigasx76x_flash_data);
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_tapi();
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(gigasx76x_gpio_leds), gigasx76x_gpio_leds);
-       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(gigasx76x_gpio_keys), gigasx76x_gpio_keys);
-       ltq_register_ath5k(gigasx76x_ath5k_eeprom_data, gigasx76x_ath5k_eeprom_mac);
-       xway_register_dwc(GIGASX76X_USB);
-       gigasx76x_register_ethernet();
-}
-
-MIPS_MACHINE(LANTIQ_MACH_GIGASX76X, "GIGASX76X", "GIGASX76X - Gigaset SX761,SX762,SX763", gigasx76x_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-gigasx76x.h
deleted file mode 100644 (file)
index 186a146..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2011 Andrej Vlašić
- *  Copyright (C) 2011 Luka Perkov
- *
- */
-
-static u16 sx763_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]=
-{
-0x5aa5,0x168c,0x0200,0x0001,0x0000,0x5001,0x0000,0x2051,0x2051,0x1c0a,0x0100,
-0x0000,0x01c2,0x0002,0xc606,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xf165,0x7fbe,0x0003,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,0x5aa5,0x0000,0x0000,0x0313,0x4943,
-0x2053,0x7104,0x1202,0x0400,0x0306,0x0001,0x0000,0x0500,0x410e,0x39b1,0x1eb5,
-0x4e2d,0x3056,0xffff,0xe902,0x0700,0x0106,0x0000,0x0100,0x1500,0x0752,0x4101,
-0x6874,0x7265,0x736f,0x4320,0x6d6f,0x756d,0x696e,0x6163,0x6974,0x6e6f,0x2c73,
-0x4920,0x636e,0x002e,0x5241,0x3035,0x3130,0x302d,0x3030,0x2d30,0x3030,0x3030,
-0x5700,0x7269,0x6c65,0x7365,0x2073,0x414c,0x204e,0x6552,0x6566,0x6572,0x636e,
-0x2065,0x6143,0x6472,0x3000,0x0030,0x00ff,0x2100,0x0602,0x2201,0x0205,0x8d80,
-0x005b,0x0522,0x4002,0x8954,0x2200,0x0205,0x1b00,0x00b7,0x0522,0x8002,0x12a8,
-0x2201,0x0205,0x3600,0x016e,0x0522,0x0002,0x2551,0x2202,0x0205,0x6c00,0x02dc,
-0x0522,0x8002,0x37f9,0x2203,0x0205,0xa200,0x044a,0x0222,0x0803,0x0822,0x0604,
-0x0300,0xbe7f,0x65f1,0x0222,0x0105,0x00ff,0x0000,0x0000,0x0000,0x0000,0x0000,
-0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,
-0xffff,0xffff,0xffff,0xffff,0x0037,0x971f,0x5003,0x9a66,0x0001,0x81c4,0x016a,
-0x02ff,0x84ff,0x15a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x2d2c,0x0000,0x0000,0x0000,0x0000,0xe028,0xa492,0x1c00,
-0x000e,0xb8ca,0x0013,0x0000,0x0000,0x6b4b,0xc059,0x1571,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x2370,0x00a5,0x9618,0x419a,0x68a2,0xda35,0x001c,0x0007,0xb0ff,0x01b5,0x0000,
-0x0000,0xff70,0x19ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x3170,0x00a5,0x9618,0x419a,0x68a2,0xda35,
-0x001c,0x000e,0xb0ff,0x21b5,0x0000,0x2fd8,0xff70,0x1226,0x19ff,0x07be,0x6201,
-0x032e,0x0587,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1112,
-0x1441,0x4231,0x3234,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4d31,0x7f54,0x3c93,0x1205,0x1931,
-0x492d,0x7f50,0x3c93,0x0e01,0x192d,0x0070,0x0000,0x8140,0x724b,0x2ba9,0x3a09,
-0x99d9,0x1949,0x0070,0x0000,0x80e0,0x624a,0x2af8,0x35c7,0x9d47,0x1938,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x7082,0x0820,0xb882,0x0820,0x7092,0x28a0,0x8992,
-0x28a0,0xa292,0x28a0,0x70a2,0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,
-0x70a2,0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,0x8989,0x0000,0x0000,
-0x0000,0x2424,0x0000,0x0000,0x0000,0x7075,0xa2ac,0xb800,0x0000,0x2464,0x2424,
-0x2400,0x0000,0x7075,0xa2ac,0x0000,0x0000,0x2464,0x2424,0x0000,0x0000,0x7075,
-0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,0x7075,0xa7ac,0x0000,0x0000,
-0x2464,0x6424,0x0000,0x0000,0x8989,0x0000,0x0000,0x0000,0x2424,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,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,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,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,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,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,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,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,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,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,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,
-0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,
-0xffff,0xffff};
-
-static u16 sx762_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]=
-{
-0x5aa5,0x168c,0x0200,0x0001,0x0000,0x5001,0x0000,0x2051,0x2051,0x1c0a,0x0100,
-0x0000,0x01c2,0x0002,0xc606,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xf165,0x7fbe,0x0003,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,0x5aa5,0x0000,0x0000,0x0313,0x4943,
-0x2053,0x7104,0x1202,0x0400,0x0306,0x0001,0x0000,0x0500,0x410e,0x39b1,0x1eb5,
-0x4e2d,0x3056,0xffff,0xe902,0x0700,0x0106,0x0000,0x0100,0x1500,0x0752,0x4101,
-0x6874,0x7265,0x736f,0x4320,0x6d6f,0x756d,0x696e,0x6163,0x6974,0x6e6f,0x2c73,
-0x4920,0x636e,0x002e,0x5241,0x3035,0x3130,0x302d,0x3030,0x2d30,0x3030,0x3030,
-0x5700,0x7269,0x6c65,0x7365,0x2073,0x414c,0x204e,0x6552,0x6566,0x6572,0x636e,
-0x2065,0x6143,0x6472,0x3000,0x0030,0x00ff,0x2100,0x0602,0x2201,0x0205,0x8d80,
-0x005b,0x0522,0x4002,0x8954,0x2200,0x0205,0x1b00,0x00b7,0x0522,0x8002,0x12a8,
-0x2201,0x0205,0x3600,0x016e,0x0522,0x0002,0x2551,0x2202,0x0205,0x6c00,0x02dc,
-0x0522,0x8002,0x37f9,0x2203,0x0205,0xa200,0x044a,0x0222,0x0803,0x0822,0x0604,
-0x0300,0xbe7f,0x65f1,0x0222,0x0105,0x00ff,0x0000,0x0000,0x0000,0x0000,0x0000,
-0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,
-0xffff,0xffff,0xffff,0xffff,0x0037,0x6aaa,0x5003,0x9a66,0x0001,0x81c4,0x016a,
-0x02ff,0x84ff,0x15a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x2d2c,0x0000,0x0000,0x0000,0x0000,0xe028,0xa492,0x1c00,
-0x000e,0xb8ca,0x0013,0x0000,0x0000,0x6b4b,0xc059,0x1571,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x2370,0x00a5,0x9618,0x419a,0x68a2,0xda35,0x001c,0x0007,0xb0ff,0x01b5,0x0000,
-0x0000,0xff70,0x19ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x3170,0x00a5,0x9618,0x419a,0x68a2,0xda35,
-0x001c,0x000e,0xb0ff,0x21b5,0x0000,0x2fd8,0xff70,0x1226,0x19ff,0x07fa,0x6201,
-0x032e,0x0587,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1112,
-0x1441,0x4231,0x3234,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4d31,0x7f54,0x3c93,0x1205,0x1931,
-0x492d,0x7f50,0x3c93,0x0e01,0x192d,0x0070,0x0000,0x8180,0x724d,0xab59,0x3a08,
-0xdd79,0x2559,0x0070,0x0000,0x81a0,0x6e4d,0x2b99,0x3a09,0x9989,0x2157,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x7092,0x4924,0xb892,0x4924,0x7092,0x289e,0x8992,
-0x289e,0xa292,0x289e,0x70a2,0xa7ac,0x0000,0x0000,0x2462,0x5e13,0x0000,0x0000,
-0x70a2,0xa7ac,0x0000,0x0000,0x1e5c,0x5713,0x0000,0x0000,0x8989,0x0000,0x0000,
-0x0000,0x2424,0x0000,0x0000,0x0000,0x7075,0xa2ac,0xb800,0x0000,0x2868,0x2828,
-0x2800,0x0000,0x7075,0xa2ac,0x0000,0x0000,0x2868,0x2828,0x0000,0x0000,0x7075,
-0xac00,0x0000,0x0000,0x2161,0x2100,0x0000,0x0000,0x7075,0xac00,0x0000,0x0000,
-0x1b5b,0x1b00,0x0000,0x0000,0x8989,0x0000,0x0000,0x0000,0x2121,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,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,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,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,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,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,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,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,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,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,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};
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-netgear.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-netgear.c
deleted file mode 100644 (file)
index 826bfe2..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/input.h>
-#include <linux/phy.h>
-#include <linux/spi/spi.h>
-
-#include <lantiq_soc.h>
-#include <irq.h>
-
-#include "../machtypes.h"
-#include "devices.h"
-
-static struct ltq_pci_data ltq_pci_data = {
-       .clock  = PCI_CLOCK_INT,
-       .gpio   = PCI_GNT1 | PCI_REQ1,
-       .irq    = {
-               [14] = INT_NUM_IM0_IRL0 + 22,
-       },
-};
-
-static struct ltq_eth_data ltq_eth_data = {
-       .mii_mode = PHY_INTERFACE_MODE_MII,
-};
-
-struct spi_board_info spi_info = {
-       .bus_num        = 0,
-       .chip_select    = 3,
-       .max_speed_hz   = 25000000,
-       .modalias       = "mx25l12805d",
-};
-
-struct ltq_spi_platform_data ltq_spi_data = {
-       .num_chipselect = 4,
-};
-
-static void __init dgn3500_init(void)
-{
-       ltq_register_pci(&ltq_pci_data);
-       ltq_register_etop(&ltq_eth_data);
-       ltq_register_spi(&ltq_spi_data, &spi_info, 1);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
-            "DGN3500B",
-            "Netgear DGN3500B",
-             dgn3500_init);
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-wbmr.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-wbmr.c
deleted file mode 100644 (file)
index b11c263..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *  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.
- *
- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/leds.h>
-#include <linux/gpio.h>
-#include <linux/gpio_buttons.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
-#include <linux/input.h>
-
-#include <lantiq_soc.h>
-#include <irq.h>
-#include <dev-gpio-leds.h>
-#include <dev-gpio-buttons.h>
-
-#include "../machtypes.h"
-#include "devices.h"
-#include "dev-dwc_otg.h"
-
-static struct mtd_partition wbmr_partitions[] =
-{
-       {
-               .name   = "uboot",
-               .offset = 0x0,
-               .size   = 0x40000,
-       },
-       {
-               .name   = "uboot-env",
-               .offset = 0x40000,
-               .size   = 0x20000,
-       },
-       {
-               .name   = "linux",
-               .offset = 0x60000,
-               .size   = 0x1f20000,
-       },
-       {
-               .name   = "calibration",
-               .offset = 0x1fe0000,
-               .size   = 0x20000,
-       },
-};
-
-static struct physmap_flash_data wbmr_flash_data = {
-       .nr_parts       = ARRAY_SIZE(wbmr_partitions),
-       .parts          = wbmr_partitions,
-};
-
-static struct gpio_led
-wbmr_gpio_leds[] __initdata = {
-       { .name = "soc:blue:movie", .gpio = 20, .active_low = 1, },
-       { .name = "soc:red:internet", .gpio = 18, .active_low = 1, },
-       { .name = "soc:green:internet", .gpio = 17, .active_low = 1, },
-       { .name = "soc:green:adsl", .gpio = 16, .active_low = 1, },
-       { .name = "soc:green:wlan", .gpio = 15, .active_low = 1, },
-       { .name = "soc:red:security", .gpio = 14, .active_low = 1, },
-       { .name = "soc:green:power", .gpio = 1, .active_low = 1, },
-       { .name = "soc:red:power", .gpio = 5, .active_low = 1, },
-       { .name = "soc:green:usb", .gpio = 28, .active_low = 1, },
-};
-
-static struct gpio_keys_button
-wbmr_gpio_keys[] __initdata = {
-       {
-               .desc = "aoss",
-               .type = EV_KEY,
-               .code = BTN_0,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio = 0,
-               .active_low = 1,
-       },
-       {
-               .desc = "reset",
-               .type = EV_KEY,
-               .code = BTN_1,
-               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
-               .gpio = 37,
-               .active_low = 1,
-       },
-};
-
-static struct ltq_pci_data ltq_pci_data = {
-       .clock      = PCI_CLOCK_INT,
-       .gpio   = PCI_GNT1 | PCI_REQ1,
-       .irq    = {
-               [14] = INT_NUM_IM0_IRL0 + 22,
-       },
-};
-
-static struct ltq_eth_data ltq_eth_data = {
-       .mii_mode = PHY_INTERFACE_MODE_RGMII,
-};
-
-static void __init
-wbmr_init(void)
-{
-#define WMBR_BRN_MAC                   0x1fd0024
-
-       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(wbmr_gpio_leds), wbmr_gpio_leds);
-       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(wbmr_gpio_keys), wbmr_gpio_keys);
-       ltq_register_nor(&wbmr_flash_data);
-       ltq_register_pci(&ltq_pci_data);
-       memcpy_fromio(&ltq_eth_data.mac.sa_data,
-               (void *)KSEG1ADDR(LTQ_FLASH_START + WMBR_BRN_MAC), 6);
-       ltq_register_etop(&ltq_eth_data);
-       xway_register_dwc(36);
-}
-
-MIPS_MACHINE(LANTIQ_MACH_WBMR,
-                       "WBMR",
-                       "WBMR",
-                       wbmr_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h b/target/linux/lantiq/files-3.2/arch/mips/include/asm/mach-lantiq/dev-gpio-buttons.h
new file mode 100644 (file)
index 0000000..adb531c
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ *  Lantiq GPIO button support
+ *
+ *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2008 Imre Kaloz <kaloz@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 _LANTIQ_DEV_GPIO_BUTTONS_H
+#define _LANTIQ_DEV_GPIO_BUTTONS_H
+
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+
+#define LTQ_KEYS_POLL_INTERVAL         20 /* msecs */
+#define LTQ_KEYS_DEBOUNCE_INTERVAL     (3 * LTQ_KEYS_POLL_INTERVAL)
+
+void ltq_register_gpio_keys_polled(int id,
+                                     unsigned poll_interval,
+                                     unsigned nbuttons,
+                                     struct gpio_keys_button *buttons);
+
+#endif /* _LANTIQ_DEV_GPIO_BUTTONS_H */
diff --git a/target/linux/lantiq/files-3.2/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h b/target/linux/lantiq/files-3.2/arch/mips/include/asm/mach-lantiq/dev-gpio-leds.h
new file mode 100644 (file)
index 0000000..d51e496
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ *  Lantiq GPIO LED device support
+ *
+ *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2008 Imre Kaloz <kaloz@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 _LANTIQ_DEV_LEDS_GPIO_H
+#define _LANTIQ_DEV_LEDS_GPIO_H
+
+#include <linux/leds.h>
+
+void ltq_add_device_gpio_leds(int id,
+       unsigned num_leds,
+       struct gpio_led *leds) __init;
+
+#endif /* _LANTIQ_DEV_LEDS_GPIO_H */
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/dev-gpio-buttons.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/dev-gpio-buttons.c
new file mode 100644 (file)
index 0000000..ad25cac
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ *  Lantiq GPIO button support
+ *
+ *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2008 Imre Kaloz <kaloz@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/init.h>
+#include <linux/slab.h>
+#include <linux/platform_device.h>
+
+#include <dev-gpio-buttons.h>
+
+void __init ltq_register_gpio_keys_polled(int id,
+                                            unsigned poll_interval,
+                                            unsigned nbuttons,
+                                            struct gpio_keys_button *buttons)
+{
+       struct platform_device *pdev;
+       struct gpio_keys_platform_data pdata;
+       struct gpio_keys_button *p;
+       int err;
+
+       p = kmalloc(nbuttons * sizeof(*p), GFP_KERNEL);
+       if (!p)
+               return;
+
+       memcpy(p, buttons, nbuttons * sizeof(*p));
+
+       pdev = platform_device_alloc("gpio-keys-polled", id);
+       if (!pdev)
+               goto err_free_buttons;
+
+       memset(&pdata, 0, sizeof(pdata));
+       pdata.poll_interval = poll_interval;
+       pdata.nbuttons = nbuttons;
+       pdata.buttons = p;
+
+       err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
+       if (err)
+               goto err_put_pdev;
+
+       err = platform_device_add(pdev);
+       if (err)
+               goto err_put_pdev;
+
+       return;
+
+err_put_pdev:
+       platform_device_put(pdev);
+
+err_free_buttons:
+       kfree(p);
+}
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/dev-gpio-leds.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/dev-gpio-leds.c
new file mode 100644 (file)
index 0000000..89dc79d
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ *  Lantiq GPIO LED device support
+ *
+ *  Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ *  Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
+ *
+ *  Parts of this file are based on Atheros' 2.6.15 BSP
+ *
+ *  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/init.h>
+#include <linux/slab.h>
+#include <linux/platform_device.h>
+
+#include <dev-gpio-leds.h>
+
+void __init ltq_add_device_gpio_leds(int id, unsigned num_leds,
+                                       struct gpio_led *leds)
+{
+       struct platform_device *pdev;
+       struct gpio_led_platform_data pdata;
+       struct gpio_led *p;
+       int err;
+
+       p = kmalloc(num_leds * sizeof(*p), GFP_KERNEL);
+       if (!p)
+               return;
+
+       memcpy(p, leds, num_leds * sizeof(*p));
+
+       pdev = platform_device_alloc("leds-gpio", id);
+       if (!pdev)
+               goto err_free_leds;
+
+       memset(&pdata, 0, sizeof(pdata));
+       pdata.num_leds = num_leds;
+       pdata.leds = p;
+
+       err = platform_device_add_data(pdev, &pdata, sizeof(pdata));
+       if (err)
+               goto err_put_pdev;
+
+       err = platform_device_add(pdev);
+       if (err)
+               goto err_put_pdev;
+
+       return;
+
+err_put_pdev:
+       platform_device_put(pdev);
+
+err_free_leds:
+       kfree(p);
+}
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/addon-easy98000.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/addon-easy98000.c
new file mode 100644 (file)
index 0000000..317ee40
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ *  EASY98000 CPLD Addon driver
+ *
+ *  Copyright (C) 2011 Thomas Langer <thomas.langer@lantiq.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/kernel.h>
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
+#include <linux/seq_file.h>
+
+struct easy98000_reg_cpld {
+       u16 cmdreg1;            /* 0x1 */
+       u16 cmdreg0;            /* 0x0 */
+       u16 idreg0;             /* 0x3 */
+       u16 resreg;             /* 0x2 */
+       u16 intreg;             /* 0x5 */
+       u16 idreg1;             /* 0x4 */
+       u16 ledreg;             /* 0x7 */
+       u16 pcmconconfig;       /* 0x6 */
+       u16 res0;               /* 0x9 */
+       u16 ethledreg;          /* 0x8 */
+       u16 res1[4];            /* 0xa-0xd */
+       u16 cpld1v;             /* 0xf */
+       u16 cpld2v;             /* 0xe */
+};
+static struct easy98000_reg_cpld * const cpld =
+       (struct easy98000_reg_cpld *)(KSEG1 | 0x17c00000);
+#define cpld_r8(reg) (__raw_readw(&cpld->reg) & 0xFF)
+#define cpld_w8(val, reg) __raw_writew((val) & 0xFF, &cpld->reg)
+
+int easy98000_addon_has_dm9000(void)
+{
+       if ((cpld_r8(idreg0) & 0xF) == 1)
+               return 1;
+       return 0;
+}
+
+#if defined(CONFIG_PROC_FS)
+typedef void (*cpld_dump) (struct seq_file *s);
+struct proc_entry {
+       char *name;
+       void *callback;
+};
+
+static int cpld_proc_show ( struct seq_file *s, void *p )
+{
+       cpld_dump dump = s->private;
+
+       if ( dump != NULL )
+               dump(s);
+
+       return 0;
+}
+
+static int cpld_proc_open ( struct inode *inode, struct file *file )
+{
+       return single_open ( file, cpld_proc_show, PDE(inode)->data );
+}
+
+static void cpld_versions_get ( struct seq_file *s )
+{
+       seq_printf(s, "CPLD1: V%d\n", cpld_r8(cpld1v));
+       seq_printf(s, "CPLD2: V%d\n", cpld_r8(cpld2v));
+}
+
+static void cpld_ebu_module_get ( struct seq_file *s )
+{
+       u8 addon_id;
+
+       addon_id = cpld_r8(idreg0) & 0xF;
+       switch (addon_id) {
+       case 0xF: /* nothing connected */
+               break;
+       case 1:
+               seq_printf(s, "Ethernet Controller module (dm9000)\n");
+               break;
+       default:
+               seq_printf(s, "Unknown EBU module (EBU_ID=0x%02X)\n", addon_id);
+               break;
+       }
+}
+
+static void cpld_xmii_module_get ( struct seq_file *s )
+{
+       u8 addon_id;
+       char *mod = NULL;
+
+       addon_id = cpld_r8(idreg1) & 0xF;
+       switch (addon_id) {
+       case 0xF:
+               mod = "no module";
+               break;
+       case 0x1:
+               mod = "RGMII module";
+               break;
+       case 0x4:
+               mod = "GMII MAC Mode (XWAY TANTOS-3G)";
+               break;
+       case 0x6:
+               mod = "TMII MAC Mode (XWAY TANTOS-3G)";
+               break;
+       case 0x8:
+               mod = "GMII PHY module";
+               break;
+       case 0x9:
+               mod = "MII PHY module";
+               break;
+       case 0xA:
+               mod = "RMII PHY module";
+               break;
+       default:
+               break;
+       }
+       if (mod)
+               seq_printf(s, "%s\n", mod);
+       else
+               seq_printf(s, "unknown xMII module (xMII_ID=0x%02X)\n", addon_id);
+}
+
+static struct proc_entry proc_entries[] = {
+       {"versions",    cpld_versions_get},
+       {"ebu",         cpld_ebu_module_get},
+       {"xmii",        cpld_xmii_module_get},
+};
+
+static struct file_operations ops = {
+       .owner   = THIS_MODULE,
+       .open    = cpld_proc_open,
+       .read    = seq_read,
+       .llseek  = seq_lseek,
+       .release = single_release,
+};
+
+static void cpld_proc_entry_create(struct proc_dir_entry *parent_node,
+                                  struct proc_entry *proc_entry)
+{
+       proc_create_data ( proc_entry->name, (S_IFREG | S_IRUGO), parent_node,
+                          &ops, proc_entry->callback);
+}
+
+static int cpld_proc_install(void)
+{
+       struct proc_dir_entry *driver_proc_node;
+
+       driver_proc_node = proc_mkdir("cpld", NULL);
+       if (driver_proc_node != NULL) {
+               int i;
+               for (i = 0; i < ARRAY_SIZE(proc_entries); i++)
+                       cpld_proc_entry_create(driver_proc_node,
+                                             &proc_entries[i]);
+       } else {
+               printk("cannot create proc entry");
+               return -1;
+       }
+       return 0;
+}
+#else
+static inline int cpld_proc_install(void) {}
+#endif
+
+static int easy98000_addon_probe(struct platform_device *pdev)
+{
+       return cpld_proc_install();
+}
+
+static int easy98000_addon_remove(struct platform_device *pdev)
+{
+#if defined(CONFIG_PROC_FS)
+       char buf[64];
+       int i;
+
+       for (i = 0; i < sizeof(proc_entries) / sizeof(proc_entries[0]); i++) {
+               sprintf(buf, "cpld/%s", proc_entries[i].name);
+               remove_proc_entry(buf, 0);
+       }
+       remove_proc_entry("cpld", 0);
+#endif
+       return 0;
+}
+
+static struct platform_driver easy98000_addon_driver = {
+       .probe = easy98000_addon_probe,
+       .remove = __devexit_p(easy98000_addon_remove),
+       .driver = {
+               .name = "easy98000_addon",
+               .owner = THIS_MODULE,
+       },
+};
+
+int __init easy98000_addon_init(void)
+{
+       return platform_driver_register(&easy98000_addon_driver);
+}
+
+void __exit easy98000_addon_exit(void)
+{
+       platform_driver_unregister(&easy98000_addon_driver);
+}
+
+module_init(easy98000_addon_init);
+module_exit(easy98000_addon_exit);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.c
new file mode 100644 (file)
index 0000000..94622cf
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ *  EASY98000 CPLD LED driver
+ *
+ *  Copyright (C) 2010 Ralph Hempel <ralph.hempel@lantiq.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/kernel.h>
+#include <linux/version.h>
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/leds.h>
+#include <linux/slab.h>
+
+#include "dev-leds-easy98000-cpld.h"
+
+const char *led_name[8] = {
+       "ge0_act",
+       "ge0_link",
+       "ge1_act",
+       "ge1_link",
+       "fe2_act",
+       "fe2_link",
+       "fe3_act",
+       "fe3_link"
+};
+
+#define cpld_base7                     ((u16 *)(KSEG1 | 0x17c0000c))
+#define cpld_base8                     ((u16 *)(KSEG1 | 0x17c00012))
+
+#define ltq_r16(reg)                   __raw_readw(reg)
+#define ltq_w16(val, reg)              __raw_writew(val, reg)
+
+struct cpld_led_dev {
+       struct led_classdev     cdev;
+       u8                      mask;
+       u16                     *base;
+};
+
+struct cpld_led_drvdata {
+       struct cpld_led_dev     *led_devs;
+       int                     num_leds;
+};
+
+void led_set(u8 mask, u16 *base)
+{
+       ltq_w16(ltq_r16(base) | mask, base);
+}
+
+void led_clear(u8 mask, u16 *base)
+{
+       ltq_w16(ltq_r16(base) & (~mask), base);
+}
+
+void led_blink_clear(u8 mask, u16 *base)
+{
+       led_clear(mask, base);
+}
+
+static void led_brightness(struct led_classdev *led_cdev,
+                              enum led_brightness value)
+{
+       struct cpld_led_dev *led_dev =
+           container_of(led_cdev, struct cpld_led_dev, cdev);
+
+       if (value)
+               led_set(led_dev->mask, led_dev->base);
+       else
+               led_clear(led_dev->mask, led_dev->base);
+}
+
+static int led_probe(struct platform_device *pdev)
+{
+       int i;
+       char name[32];
+       struct cpld_led_drvdata *drvdata;
+       int ret = 0;
+
+       drvdata = kzalloc(sizeof(struct cpld_led_drvdata) +
+                         sizeof(struct cpld_led_dev) * MAX_LED,
+                         GFP_KERNEL);
+       if (!drvdata)
+               return -ENOMEM;
+
+       drvdata->led_devs = (struct cpld_led_dev *) &drvdata[1];
+
+       for (i = 0; i < MAX_LED; i++) {
+               struct cpld_led_dev *led_dev = &drvdata->led_devs[i];
+               led_dev->cdev.brightness_set = led_brightness;
+               led_dev->cdev.default_trigger = NULL;
+               led_dev->mask = 1 << (i % 8);
+               if(i < 8) {
+                       sprintf(name, "easy98000-cpld:%s", led_name[i]);
+                       led_dev->base = cpld_base8;
+               } else {
+                       sprintf(name, "easy98000-cpld:red:%d", i-8);
+                       led_dev->base = cpld_base7;
+               }
+               led_dev->cdev.name = name;
+               ret = led_classdev_register(&pdev->dev, &led_dev->cdev);
+               if (ret)
+                       goto err;
+       }
+       platform_set_drvdata(pdev, drvdata);
+       return 0;
+
+err:
+       printk("led_probe: 3\n");
+       for (i = i - 1; i >= 0; i--)
+               led_classdev_unregister(&drvdata->led_devs[i].cdev);
+
+       kfree(drvdata);
+       return ret;
+}
+
+static int led_remove(struct platform_device *pdev)
+{
+       int i;
+       struct cpld_led_drvdata *drvdata = platform_get_drvdata(pdev);
+       for (i = 0; i < MAX_LED; i++)
+               led_classdev_unregister(&drvdata->led_devs[i].cdev);
+       kfree(drvdata);
+       return 0;
+}
+
+static struct platform_driver led_driver = {
+       .probe = led_probe,
+       .remove = __devexit_p(led_remove),
+       .driver = {
+                  .name = LED_NAME,
+                  .owner = THIS_MODULE,
+                  },
+};
+
+int __init easy98000_cpld_led_init(void)
+{
+       pr_info(LED_DESC ", Version " LED_VERSION
+               " (c) Copyright 2011, Lantiq Deutschland GmbH\n");
+       return platform_driver_register(&led_driver);
+}
+
+void __exit easy98000_cpld_led_exit(void)
+{
+       platform_driver_unregister(&led_driver);
+}
+
+module_init(easy98000_cpld_led_init);
+module_exit(easy98000_cpld_led_exit);
+
+MODULE_DESCRIPTION(LED_NAME);
+MODULE_DESCRIPTION(LED_DESC);
+MODULE_AUTHOR("Ralph Hempel <ralph.hempel@lantiq.com>");
+MODULE_LICENSE("GPL v2");
+
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h b/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/dev-leds-easy98000-cpld.h
new file mode 100644 (file)
index 0000000..3160189
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ *  EASY98000 CPLD LED driver
+ *
+ *  Copyright (C) 2010 Ralph Hempel <ralph.hempel@lantiq.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.
+ *
+ */
+#ifndef _INCLUDE_EASY98000_CPLD_LED_H_
+#define _INCLUDE_EASY98000_CPLD_LED_H_
+
+#define LED_NAME       "easy98000_cpld_led"
+#define LED_DESC       "EASY98000 LED driver"
+#define LED_VERSION    "1.0.0"
+
+#define MAX_LED                16
+
+#endif /* _INCLUDE_EASY98000_CPLD_LED_H_ */
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/mach-95C3AM1.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/mach-95C3AM1.c
new file mode 100644 (file)
index 0000000..42a3344
--- /dev/null
@@ -0,0 +1,94 @@
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/i2c-gpio.h>
+
+#include <dev-gpio-leds.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+
+#define BOARD_95C3AM1_GPIO_LED_0 10
+#define BOARD_95C3AM1_GPIO_LED_1 11
+#define BOARD_95C3AM1_GPIO_LED_2 12
+#define BOARD_95C3AM1_GPIO_LED_3 13
+
+static struct mtd_partition board_95C3AM1_partitions[] =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x40000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = 0x40000,
+               .size   = 0x40000,      /* 2 sectors for redundant env. */
+       },
+       {
+               .name   = "linux",
+               .offset = 0x80000,
+               .size   = 0xF80000,     /* map only 16 MiB */
+       },
+};
+
+static struct flash_platform_data board_95C3AM1_flash_platform_data = {
+       .name = "sflash",
+       .parts = board_95C3AM1_partitions,
+       .nr_parts = ARRAY_SIZE(board_95C3AM1_partitions)
+};
+
+static struct spi_board_info board_95C3AM1_flash_data __initdata = {
+       .modalias               = "m25p80",
+       .bus_num                = 0,
+       .chip_select            = 0,
+       .max_speed_hz           = 10 * 1000 * 1000,
+       .mode                   = SPI_MODE_3,
+       .platform_data          = &board_95C3AM1_flash_platform_data
+};
+
+static struct gpio_led board_95C3AM1_gpio_leds[] __initdata = {
+       {
+               .name           = "power",
+               .gpio           = BOARD_95C3AM1_GPIO_LED_0,
+               .active_low     = 0,
+       }, {
+               .name           = "optical",
+               .gpio           = BOARD_95C3AM1_GPIO_LED_1,
+               .active_low     = 0,
+       }, {
+               .name           = "lan",
+               .gpio           = BOARD_95C3AM1_GPIO_LED_2,
+               .active_low     = 0,
+       }, {
+               .name           = "update",
+               .gpio           = BOARD_95C3AM1_GPIO_LED_3,
+               .active_low     = 0,
+       }
+};
+
+static struct i2c_gpio_platform_data board_95C3AM1_i2c_gpio_data = {
+       .sda_pin        = 107,
+       .scl_pin        = 108,
+};
+
+static struct platform_device board_95C3AM1_i2c_gpio_device = {
+       .name           = "i2c-gpio",
+       .id             = 0,
+       .dev = {
+               .platform_data  = &board_95C3AM1_i2c_gpio_data,
+       }
+};
+
+static void __init board_95C3AM1_init(void)
+{
+       falcon_register_i2c();
+       falcon_register_spi_flash(&board_95C3AM1_flash_data);
+       platform_device_register(&board_95C3AM1_i2c_gpio_device);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(board_95C3AM1_gpio_leds),
+                                               board_95C3AM1_gpio_leds);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_95C3AM1,
+                       "95C3AM1",
+                       "95C3AM1 Board",
+                       board_95C3AM1_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/mach-easy98020.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/falcon/mach-easy98020.c
new file mode 100644 (file)
index 0000000..4cdfc19
--- /dev/null
@@ -0,0 +1,118 @@
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/gpio_buttons.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/input.h>
+#include <linux/interrupt.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
+
+#include <dev-gpio-leds.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+
+#define EASY98020_GPIO_LED_0 9
+#define EASY98020_GPIO_LED_1 10
+#define EASY98020_GPIO_LED_2 11
+#define EASY98020_GPIO_LED_3 12
+#define EASY98020_GPIO_LED_GE0_ACT 110
+#define EASY98020_GPIO_LED_GE0_LINK 109
+#define EASY98020_GPIO_LED_GE1_ACT 106
+#define EASY98020_GPIO_LED_GE1_LINK 105
+
+static struct mtd_partition easy98020_spi_partitions[] =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x40000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = 0x40000,
+               .size   = 0x40000,      /* 2 sectors for redundant env. */
+       },
+       {
+               .name   = "linux",
+               .offset = 0x80000,
+               .size   = 0xF80000,     /* map only 16 MiB */
+       },
+};
+
+static struct flash_platform_data easy98020_spi_flash_platform_data = {
+       .name = "sflash",
+       .parts = easy98020_spi_partitions,
+       .nr_parts = ARRAY_SIZE(easy98020_spi_partitions)
+};
+
+static struct spi_board_info easy98020_spi_flash_data __initdata = {
+       .modalias               = "m25p80",
+       .bus_num                = 0,
+       .chip_select            = 0,
+       .max_speed_hz           = 10 * 1000 * 1000,
+       .mode                   = SPI_MODE_3,
+       .platform_data          = &easy98020_spi_flash_platform_data
+};
+
+static struct gpio_led easy98020_gpio_leds[] __initdata = {
+       {
+               .name           = "easy98020:green:0",
+               .gpio           = EASY98020_GPIO_LED_0,
+               .active_low     = 0,
+       }, {
+               .name           = "easy98020:green:1",
+               .gpio           = EASY98020_GPIO_LED_1,
+               .active_low     = 0,
+       }, {
+               .name           = "easy98020:green:2",
+               .gpio           = EASY98020_GPIO_LED_2,
+               .active_low     = 0,
+       }, {
+               .name           = "easy98020:green:3",
+               .gpio           = EASY98020_GPIO_LED_3,
+               .active_low     = 0,
+       }, {
+               .name           = "easy98020:ge0_act",
+               .gpio           = EASY98020_GPIO_LED_GE0_ACT,
+               .active_low     = 0,
+       }, {
+               .name           = "easy98020:ge0_link",
+               .gpio           = EASY98020_GPIO_LED_GE0_LINK,
+               .active_low     = 0,
+       }, {
+               .name           = "easy98020:ge1_act",
+               .gpio           = EASY98020_GPIO_LED_GE1_ACT,
+               .active_low     = 0,
+       }, {
+               .name           = "easy98020:ge1_link",
+               .gpio           = EASY98020_GPIO_LED_GE1_LINK,
+               .active_low     = 0,
+       }
+};
+
+static void __init easy98020_init(void)
+{
+       falcon_register_i2c();
+       falcon_register_spi_flash(&easy98020_spi_flash_data);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(easy98020_gpio_leds),
+                                       easy98020_gpio_leds);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_EASY98020,
+                       "EASY98020",
+                       "EASY98020 Eval Board",
+                       easy98020_init);
+
+MIPS_MACHINE(LANTIQ_MACH_EASY98020_1LAN,
+                       "EASY98020_1LAN",
+                       "EASY98020 Eval Board (1 LAN port)",
+                       easy98020_init);
+
+MIPS_MACHINE(LANTIQ_MACH_EASY98020_2LAN,
+                       "EASY98020_2LAN",
+                       "EASY98020 Eval Board (2 LAN ports)",
+                       easy98020_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-dwc_otg.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-dwc_otg.c
new file mode 100644 (file)
index 0000000..90b63fc
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/mtd/physmap.h>
+#include <linux/kernel.h>
+#include <linux/reboot.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/etherdevice.h>
+#include <linux/reboot.h>
+#include <linux/time.h>
+#include <linux/io.h>
+#include <linux/gpio.h>
+#include <linux/leds.h>
+
+#include <asm/bootinfo.h>
+#include <asm/irq.h>
+
+#include <lantiq_soc.h>
+#include <lantiq_irq.h>
+#include <lantiq_platform.h>
+
+#define LTQ_USB_IOMEM_BASE 0x1e101000
+#define LTQ_USB_IOMEM_SIZE 0x00001000
+
+static struct resource resources[] =
+{
+       [0] = {
+               .name    = "dwc_otg_membase",
+               .start   = LTQ_USB_IOMEM_BASE,
+               .end     = LTQ_USB_IOMEM_BASE + LTQ_USB_IOMEM_SIZE - 1,
+               .flags   = IORESOURCE_MEM,
+       },
+       [1] = {
+               .name    = "dwc_otg_irq",
+               .start   = LTQ_USB_INT,
+               .flags   = IORESOURCE_IRQ,
+       },
+};
+
+static u64 dwc_dmamask = (u32)0x1fffffff;
+
+static struct platform_device platform_dev = {
+       .name = "dwc_otg",
+       .dev = {
+               .dma_mask      = &dwc_dmamask,
+       },
+       .resource               = resources,
+       .num_resources          = ARRAY_SIZE(resources),
+};
+
+int __init
+xway_register_dwc(int pin)
+{
+       struct irq_data d;
+       d.irq = resources[1].start;
+       ltq_enable_irq(&d);
+       platform_dev.dev.platform_data = (void*) pin;
+       return platform_device_register(&platform_dev);
+}
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-dwc_otg.h b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-dwc_otg.h
new file mode 100644 (file)
index 0000000..521fad0
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#ifndef _LTQ_DEV_DWC_H__
+#define _LTQ_DEV_DWC_H__
+
+#include <lantiq_platform.h>
+
+extern void __init xway_register_dwc(int pin);
+
+#endif
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.c
new file mode 100644 (file)
index 0000000..14fd511
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+ *  Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@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/init.h>
+#include <linux/platform_device.h>
+#include <linux/ath5k_platform.h>
+#include <linux/pci.h>
+
+#include "dev-wifi-ath5k.h"
+
+extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev);
+struct ath5k_platform_data ath5k_pdata;
+
+static int 
+ath5k_pci_plat_dev_init(struct pci_dev *dev)
+{
+       dev->dev.platform_data = &ath5k_pdata;
+       return 0;
+}
+
+void __init
+ltq_register_ath5k(u16 *eeprom_data, u8 *macaddr)
+{
+       ath5k_pdata.eeprom_data = eeprom_data;
+       ath5k_pdata.macaddr = macaddr;
+       ltqpci_plat_dev_init = ath5k_pci_plat_dev_init;
+}
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.h b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-ath5k.h
new file mode 100644 (file)
index 0000000..37f6e41
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+ *  Copyright (C) 2011 Andrej Vlašić <andrej.vlasic0@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.
+ */
+
+#ifndef _DEV_WIFI_ATH5K_H__
+#define _DEV_WIFI_ATH5K_H__
+
+extern void ltq_register_ath5k(u16 *eeprom_data, u8 *macaddr);
+
+#endif
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-rt2x00.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-rt2x00.c
new file mode 100644 (file)
index 0000000..94932df
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ *  Copyright (C) 2011 John Crispin <blogic@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/init.h>
+#include <linux/platform_device.h>
+#include <linux/rt2x00_platform.h>
+#include <linux/pci.h>
+
+#include "dev-wifi-rt2x00.h"
+
+extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev);
+struct rt2x00_platform_data rt2x00_pdata;
+
+static int
+rt2x00_pci_plat_dev_init(struct pci_dev *dev)
+{
+       dev->dev.platform_data = &rt2x00_pdata;
+       return 0;
+}
+
+void __init
+ltq_register_rt2x00(const char *firmware)
+{
+       rt2x00_pdata.eeprom_file_name =  kstrdup(firmware, GFP_KERNEL);
+       ltqpci_plat_dev_init = rt2x00_pci_plat_dev_init;
+}
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-rt2x00.h b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/dev-wifi-rt2x00.h
new file mode 100644 (file)
index 0000000..060ca50
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ *  Copyright (C) 2011 John Crispin <blogic@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 _DEV_WIFI_RT2X00_H__
+#define _DEV_WIFI_RT2X00_H__
+
+extern void ltq_register_rt2x00(const char *firmware);
+
+#endif
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-arv.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-arv.c
new file mode 100644 (file)
index 0000000..9cc90fe
--- /dev/null
@@ -0,0 +1,756 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/gpio_buttons.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/etherdevice.h>
+#include <linux/ath5k_platform.h>
+#include <linux/ath9k_platform.h>
+#include <linux/pci.h>
+
+#include <lantiq_soc.h>
+#include <lantiq_platform.h>
+#include <dev-gpio-leds.h>
+#include <dev-gpio-buttons.h>
+
+#include "../machtypes.h"
+#include "dev-wifi-rt2x00.h"
+#include "dev-wifi-athxk.h"
+#include "devices.h"
+#include "dev-dwc_otg.h"
+#include "pci-ath-fixup.h"
+
+static struct mtd_partition arv45xx_brnboot_partitions[] =
+{
+       {
+               .name   = "brn-boot",
+               .offset = 0x0,
+               .size   = 0x20000,
+       },
+       {
+               .name   = "config",
+               .offset = 0x20000,
+               .size   = 0x30000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x50000,
+               .size   = 0x390000,
+       },
+       {
+               .name   = "reserved", /* 12-byte signature at 0x3efff4 :/ */
+               .offset = 0x3e0000,
+               .size   = 0x010000,
+       },
+       {
+               .name   = "eeprom",
+               .offset = 0x3f0000,
+               .size   = 0x10000,
+       },
+};
+
+static struct mtd_partition arv75xx_brnboot_partitions[] =
+{
+       {
+               .name   = "brn-boot",
+               .offset = 0x0,
+               .size   = 0x20000,
+       },
+       {
+               .name   = "config",
+               .offset = 0x20000,
+               .size   = 0x40000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x440000,
+               .size   = 0x3a0000,
+       },
+       {
+               .name   = "reserved", /* 12-byte signature at 0x7efff4 :/ */
+               .offset = 0x7e0000,
+               .size   = 0x010000,
+       },
+       {
+               .name   = "board_config",
+               .offset = 0x7f0000,
+               .size   = 0x10000,
+       },
+};
+
+/*
+ * this is generic configuration for all arv based boards, note that it can be
+ * rewriten in arv_load_nor()
+ */
+static struct mtd_partition arv_partitions[] =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x20000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = 0x20000,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x30000,
+               .size   = 0x3c0000,
+       },
+       {
+               .name   = "board_config",
+               .offset = 0x3f0000,
+               .size   = 0x10000,
+       },
+};
+
+static struct physmap_flash_data arv45xx_brnboot_flash_data = {
+       .nr_parts       = ARRAY_SIZE(arv45xx_brnboot_partitions),
+       .parts          = arv45xx_brnboot_partitions,
+};
+
+static struct physmap_flash_data arv75xx_brnboot_flash_data = {
+       .nr_parts       = ARRAY_SIZE(arv75xx_brnboot_partitions),
+       .parts          = arv75xx_brnboot_partitions,
+};
+
+static struct physmap_flash_data arv_flash_data = {
+       .nr_parts       = ARRAY_SIZE(arv_partitions),
+       .parts          = arv_partitions,
+};
+
+static void arv_load_nor(unsigned int max)
+{
+#define UBOOT_MAGIC    0x27051956
+
+       int i;
+       int sector = -1;
+
+       if (ltq_brn_boot) {
+               if (max == 0x800000)
+                       ltq_register_nor(&arv75xx_brnboot_flash_data);
+               else
+                       ltq_register_nor(&arv45xx_brnboot_flash_data);
+               return;
+       }
+
+       for (i = 1; i < 4 && sector < 0; i++) {
+               unsigned int uboot_magic;
+               memcpy_fromio(&uboot_magic, (void *)KSEG1ADDR(LTQ_FLASH_START) + (i * 0x10000), 4);
+               if (uboot_magic == UBOOT_MAGIC)
+                       sector = i;
+       }
+
+       if (sector < 0)
+               return;
+
+       arv_partitions[0].size = arv_partitions[1].offset = (sector - 1) * 0x10000;
+       arv_partitions[2].offset = arv_partitions[0].size + 0x10000;
+       arv_partitions[2].size = max - arv_partitions[2].offset - 0x10000;
+       arv_partitions[3].offset = max - 0x10000;
+       ltq_register_nor(&arv_flash_data);
+}
+
+static struct ltq_pci_data ltq_pci_data = {
+       .clock  = PCI_CLOCK_EXT,
+       .gpio   = PCI_GNT1 | PCI_REQ1,
+       .irq    = {
+               [14] = INT_NUM_IM0_IRL0 + 22,
+       },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode       = PHY_INTERFACE_MODE_RMII,
+};
+
+static struct gpio_led
+arv4510pw_gpio_leds[] __initdata = {
+       { .name = "soc:green:foo", .gpio = 4, .active_low = 1, },
+};
+
+static struct gpio_led
+arv4518pw_gpio_leds[] __initdata = {
+       { .name = "soc:green:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:fail", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:usb", .gpio = 19, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:voip", .gpio = 100, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:fxs1", .gpio = 101, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:fxs2", .gpio = 102, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
+};
+
+static struct gpio_keys_button
+arv4518pw_gpio_keys[] __initdata = {
+       {
+               .desc           = "wifi",
+               .type           = EV_KEY,
+               .code           = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 28,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = BTN_1,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 30,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "wps",
+               .type           = EV_KEY,
+               .code           = BTN_2,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 29,
+               .active_low     = 1,
+       },
+};
+
+static struct gpio_led
+arv4519pw_gpio_leds[] __initdata = {
+       { .name = "soc:red:power", .gpio = 7, .active_low = 1, },
+       { .name = "soc:green:power", .gpio = 2, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, },
+       { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, },
+       { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
+       { .name = "soc:red:internet", .gpio = 8, .active_low = 1, },
+       { .name = "soc:green:voip", .gpio = 100, .active_low = 1, },
+       { .name = "soc:green:phone1", .gpio = 101, .active_low = 1, },
+       { .name = "soc:green:phone2", .gpio = 102, .active_low = 1, },
+       { .name = "soc:green:fxo", .gpio = 103, .active_low = 1, },
+       { .name = "soc:green:usb", .gpio = 19, .active_low = 1, },
+       { .name = "soc:orange:wps", .gpio = 104, .active_low = 1, },
+       { .name = "soc:green:wps", .gpio = 105, .active_low = 1, },
+       { .name = "soc:red:wps", .gpio = 106, .active_low = 1, },
+
+};
+
+static struct gpio_keys_button
+arv4519pw_gpio_keys[] __initdata = {
+       {
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = BTN_1,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 30,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "wlan",
+               .type           = EV_KEY,
+               .code           = BTN_2,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 28,
+               .active_low     = 1,
+       },
+};
+
+static struct gpio_led
+arv4520pw_gpio_leds[] __initdata = {
+       { .name = "soc:blue:power", .gpio = 3, .active_low = 1, },
+       { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, },
+       { .name = "soc:blue:internet", .gpio = 5, .active_low = 1, },
+       { .name = "soc:red:power", .gpio = 6, .active_low = 1, },
+       { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, },
+       { .name = "soc:red:wps", .gpio = 9, .active_low = 1, },
+       { .name = "soc:blue:voip", .gpio = 100, .active_low = 1, },
+       { .name = "soc:blue:fxs1", .gpio = 101, .active_low = 1, },
+       { .name = "soc:blue:fxs2", .gpio = 102, .active_low = 1, },
+       { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, },
+       { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, },
+       { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, },
+       { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, },
+};
+
+static struct gpio_led
+arv452cpw_gpio_leds[] __initdata = {
+       { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:adsl", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:isdn", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:yellow:wps", .gpio = 7, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:wps", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:fxs1", .gpio = 100, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:fxs2", .gpio = 101, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:wps", .gpio = 102, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:internet", .gpio = 108, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:internet", .gpio = 109, .active_low = 1, .default_trigger = "default-on" },
+};
+
+static struct gpio_led
+arv4525pw_gpio_leds[] __initdata = {
+       { .name = "soc:green:dsl", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:wifi", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:online", .gpio = 9, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:fxs-internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:fxs-festnetz", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
+};
+
+#define ARV4525PW_PHYRESET     13
+#define ARV4525PW_RELAY                31
+
+static struct gpio arv4525pw_gpios[] __initdata = {
+       { ARV4525PW_PHYRESET, GPIOF_OUT_INIT_HIGH, "phyreset" },
+       { ARV4525PW_RELAY,    GPIOF_OUT_INIT_HIGH, "relay"    },
+};
+
+
+static struct gpio_led
+arv752dpw22_gpio_leds[] __initdata = {
+       { .name = "soc:blue:power", .gpio = 3, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:power", .gpio = 6, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:wps", .gpio = 8, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:fxo", .gpio = 103, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:voice", .gpio = 104, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:usb", .gpio = 105, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:wifi", .gpio = 106, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:wifi1", .gpio = 107, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:wifi", .gpio = 108, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:blue:wifi1", .gpio = 109, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:eth1", .gpio = 111, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:eth2", .gpio = 112, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:eth3", .gpio = 113, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:eth4", .gpio = 114, .active_low = 1, .default_trigger = "default-on", },
+};
+
+static struct gpio_keys_button
+arv752dpw22_gpio_keys[] __initdata = {
+       {
+               .desc           = "btn0",
+               .type           = EV_KEY,
+               .code           = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 12,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "btn1",
+               .type           = EV_KEY,
+               .code           = BTN_1,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 13,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "btn2",
+               .type           = EV_KEY,
+               .code           = BTN_2,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 28,
+               .active_low     = 1,
+       },
+};
+
+static struct gpio_led
+arv7518pw_gpio_leds[] __initdata = {
+       { .name = "soc:red:power", .gpio = 7, .active_low = 1, },
+       { .name = "soc:green:power", .gpio = 2, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:wifi", .gpio = 6, .active_low = 1, },
+       { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, },
+       { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
+       { .name = "soc:red:internet", .gpio = 8, .active_low = 1, },
+       { .name = "soc:green:voip", .gpio = 100, .active_low = 1, },
+       { .name = "soc:green:phone1", .gpio = 101, .active_low = 1, },
+       { .name = "soc:green:phone2", .gpio = 102, .active_low = 1, },
+       { .name = "soc:orange:fail", .gpio = 103, .active_low = 1, },
+       { .name = "soc:green:usb", .gpio = 19, .active_low = 1, },
+       { .name = "soc:orange:wps", .gpio = 104, .active_low = 1, },
+       { .name = "soc:green:wps", .gpio = 105, .active_low = 1, },
+       { .name = "soc:red:wps", .gpio = 106, .active_low = 1, },
+
+};
+
+static struct gpio_keys_button
+arv7518pw_gpio_keys[] __initdata = {
+       /*{
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = BTN_1,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 23,
+               .active_low     = 1,
+       },*/
+       {
+               .desc           = "wifi",
+               .type           = EV_KEY,
+               .code           = BTN_2,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 25,
+               .active_low     = 1,
+       },
+};
+
+static struct gpio_keys_button
+arv7525pw_gpio_keys[] __initdata = {
+       {
+               .desc           = "restart",
+               .type           = EV_KEY,
+               .code           = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 29,
+               .active_low     = 1,
+       },
+};
+
+static void
+arv_register_ethernet(unsigned int mac_addr)
+{
+       memcpy_fromio(&ltq_eth_data.mac.sa_data,
+               (void *)KSEG1ADDR(LTQ_FLASH_START + mac_addr), 6);
+       ltq_register_etop(&ltq_eth_data);
+}
+
+static u16 arv_ath5k_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS];
+static u16 arv_ath9k_eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
+static u8 arv_athxk_eeprom_mac[6];
+
+void __init
+arv_register_ath5k(unsigned int ath_addr, unsigned int mac_addr)
+{
+       int i;
+
+       memcpy_fromio(arv_athxk_eeprom_mac,
+               (void *)KSEG1ADDR(LTQ_FLASH_START + mac_addr), 6);
+       arv_athxk_eeprom_mac[5]++;
+       memcpy_fromio(arv_ath5k_eeprom_data,
+               (void *)KSEG1ADDR(LTQ_FLASH_START + ath_addr), ATH5K_PLAT_EEP_MAX_WORDS);
+       // swap eeprom bytes
+       for (i = 0; i < ATH5K_PLAT_EEP_MAX_WORDS>>1; i++) {
+               arv_ath5k_eeprom_data[i] = swab16(arv_ath5k_eeprom_data[i]);
+               if (i == 0x17e>>1) {
+                       /*
+                        * regdomain is invalid. it's unknown how did original
+                        * fw convered value to 0x82d4 so for now force to 0x67
+                        */
+                       arv_ath5k_eeprom_data[i] &= 0x0000;
+                       arv_ath5k_eeprom_data[i] |= 0x67;
+               }
+       }
+}
+
+void __init
+arv_register_ath9k(unsigned int ath_addr, unsigned int mac_addr)
+{
+       int i;
+       u16 *eepdata, sum, el;
+
+       memcpy_fromio(arv_athxk_eeprom_mac,
+               (void *)KSEG1ADDR(LTQ_FLASH_START + mac_addr), 6);
+       arv_athxk_eeprom_mac[5]++;
+       memcpy_fromio(arv_ath9k_eeprom_data,
+               (void *)KSEG1ADDR(LTQ_FLASH_START + ath_addr), ATH9K_PLAT_EEP_MAX_WORDS);
+
+       // force regdomain to 0x67
+       arv_ath9k_eeprom_data[0x208>>1] = 0x67;
+
+       // calculate new checksum
+       sum = arv_ath9k_eeprom_data[0x200>>1];
+       el = sum / sizeof(u16) - 2;  /* skip length and (old) checksum */
+       eepdata = (u16 *) (&arv_ath9k_eeprom_data[0x204>>1]); /* after checksum */
+       for (i = 0; i < el; i++)
+               sum ^= *eepdata++;
+       sum ^= 0xffff;
+       arv_ath9k_eeprom_data[0x202>>1] = sum;
+}
+
+static void __init
+arv3527p_init(void)
+{
+#define ARV3527P_MAC_ADDR              0x3f0016
+
+       ltq_register_gpio_stp();
+       //ltq_add_device_gpio_leds(arv3527p_gpio_leds, ARRAY_SIZE(arv3527p_gpio_leds));
+       arv_load_nor(0x400000);
+       arv_register_ethernet(ARV3527P_MAC_ADDR);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV3527P,
+                       "ARV3527P",
+                       "ARV3527P - Arcor Easybox 401",
+                       arv3527p_init);
+
+static void __init
+arv4510pw_init(void)
+{
+#define ARV4510PW_MAC_ADDR             0x3f0014
+
+       ltq_register_gpio_stp();
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4510pw_gpio_leds), arv4510pw_gpio_leds);
+       arv_load_nor(0x400000);
+       ltq_pci_data.irq[12] = (INT_NUM_IM2_IRL0 + 31);
+       ltq_pci_data.irq[15] = (INT_NUM_IM0_IRL0 + 26);
+       ltq_pci_data.gpio |= PCI_EXIN2 | PCI_REQ2;
+       ltq_register_pci(&ltq_pci_data);
+       arv_register_ethernet(ARV4510PW_MAC_ADDR);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV4510PW,
+                       "ARV4510PW",
+                       "ARV4510PW - Wippies Homebox",
+                       arv4510pw_init);
+
+static void __init
+arv4518pw_init(void)
+{
+#define ARV4518PW_EBU                  0
+#define ARV4518PW_USB                  14
+#define ARV4518PW_SWITCH_RESET         13
+#define ARV4518PW_ATH_ADDR             0x3f0400
+#define ARV4518PW_MADWIFI_ADDR         0xb03f0400
+#define ARV4518PW_MAC_ADDR             0x3f0016
+
+       ltq_register_gpio_ebu(ARV4518PW_EBU);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4518pw_gpio_leds), arv4518pw_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
+                               ARRAY_SIZE(arv4518pw_gpio_keys), arv4518pw_gpio_keys);
+       arv_load_nor(0x400000);
+       ltq_pci_data.gpio = PCI_GNT2 | PCI_REQ2;
+       ltq_register_pci(&ltq_pci_data);
+       xway_register_dwc(ARV4518PW_USB);
+       arv_register_ethernet(ARV4518PW_MAC_ADDR);
+       arv_register_ath5k(ARV4518PW_ATH_ADDR, ARV4518PW_MAC_ADDR);
+       ltq_register_ath5k(arv_ath5k_eeprom_data, arv_athxk_eeprom_mac);
+
+       gpio_request(ARV4518PW_SWITCH_RESET, "switch");
+       gpio_direction_output(ARV4518PW_SWITCH_RESET, 1);
+       gpio_export(ARV4518PW_SWITCH_RESET, 0);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV4518PW,
+                       "ARV4518PW",
+                       "ARV4518PW - SMC7908A-ISP, Airties WAV-221",
+                       arv4518pw_init);
+
+static void __init
+arv4519pw_init(void)
+{
+#define ARV4519PW_EBU                  0
+#define ARV4519PW_USB                  14
+#define ARV4519PW_RELAY                        31
+#define ARV4519PW_SWITCH_RESET         13
+#define ARV4519PW_ATH_ADDR             0x3f0400
+#define ARV4519PW_MAC_ADDR             0x3f0016
+
+       arv_load_nor(0x400000);
+       ltq_register_gpio_ebu(ARV4519PW_EBU);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4519pw_gpio_leds), arv4519pw_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
+                               ARRAY_SIZE(arv4519pw_gpio_keys), arv4519pw_gpio_keys);
+       ltq_pci_data.gpio = PCI_GNT2 | PCI_REQ1;
+       ltq_register_pci(&ltq_pci_data);
+       xway_register_dwc(ARV4519PW_USB);
+       arv_register_ethernet(ARV4519PW_MAC_ADDR);
+       arv_register_ath5k(ARV4519PW_ATH_ADDR, ARV4519PW_MAC_ADDR);
+       ltq_register_ath5k(arv_ath5k_eeprom_data, arv_athxk_eeprom_mac);
+
+       gpio_request(ARV4519PW_RELAY, "relay");
+       gpio_direction_output(ARV4519PW_RELAY, 1);
+       gpio_export(ARV4519PW_RELAY, 0);
+
+       gpio_request(ARV4519PW_SWITCH_RESET, "switch");
+       gpio_set_value(ARV4519PW_SWITCH_RESET, 1);
+       gpio_export(ARV4519PW_SWITCH_RESET, 0);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV4519PW,
+                       "ARV4519PW",
+                       "ARV4519PW - Vodafone, Pirelli",
+                       arv4519pw_init);
+
+static void __init
+arv4520pw_init(void)
+{
+#define ARV4520PW_EBU                  0x400
+#define ARV4520PW_USB                  28
+#define ARV4520PW_SWITCH_RESET         110
+#define ARV4520PW_MAC_ADDR             0x3f0016
+
+       ltq_register_gpio_ebu(ARV4520PW_EBU);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4520pw_gpio_leds), arv4520pw_gpio_leds);
+       arv_load_nor(0x400000);
+       ltq_register_pci(&ltq_pci_data);
+       ltq_register_tapi();
+       arv_register_ethernet(ARV4520PW_MAC_ADDR);
+       xway_register_dwc(ARV4520PW_USB);
+
+       gpio_request(ARV4520PW_SWITCH_RESET, "switch");
+       gpio_set_value(ARV4520PW_SWITCH_RESET, 1);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV4520PW,
+                       "ARV4520PW",
+                       "ARV4520PW - Airties WAV-281, Arcor A800",
+                       arv4520pw_init);
+
+static void __init
+arv452Cpw_init(void)
+{
+#define ARV452CPW_EBU                  0x77f
+#define ARV452CPW_USB                  28
+#define ARV452CPW_RELAY1               31
+#define ARV452CPW_RELAY2               107
+#define ARV452CPW_SWITCH_RESET         110
+#define ARV452CPW_ATH_ADDR             0x3f0400
+#define ARV452CPW_MADWIFI_ADDR         0xb03f0400
+#define ARV452CPW_MAC_ADDR             0x3f0016
+
+       ltq_register_gpio_ebu(ARV452CPW_EBU);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv452cpw_gpio_leds), arv452cpw_gpio_leds);
+       arv_load_nor(0x400000);
+       ltq_register_pci(&ltq_pci_data);
+       xway_register_dwc(ARV452CPW_USB);
+       arv_register_ethernet(ARV452CPW_MAC_ADDR);
+       arv_register_ath5k(ARV452CPW_ATH_ADDR, ARV452CPW_MAC_ADDR);
+        ltq_register_ath5k(arv_ath5k_eeprom_data, arv_athxk_eeprom_mac);
+
+       gpio_request(ARV452CPW_SWITCH_RESET, "switch");
+       gpio_set_value(ARV452CPW_SWITCH_RESET, 1);
+       gpio_export(ARV452CPW_SWITCH_RESET, 0);
+
+       gpio_request(ARV452CPW_RELAY1, "relay1");
+       gpio_direction_output(ARV452CPW_RELAY1, 1);
+       gpio_export(ARV452CPW_RELAY1, 0);
+
+       gpio_request(ARV452CPW_RELAY2, "relay2");
+       gpio_set_value(ARV452CPW_RELAY2, 1);
+       gpio_export(ARV452CPW_RELAY2, 0);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV452CPW,
+                       "ARV452CPW",
+                       "ARV452CPW - Arcor A801",
+                       arv452Cpw_init);
+
+static void __init
+arv4525pw_init(void)
+{
+#define ARV4525PW_ATH_ADDR             0x3f0400
+#define ARV4525PW_MADWIFI_ADDR         0xb03f0400
+#define ARV4525PW_MAC_ADDR             0x3f0016
+
+       arv_load_nor(0x400000);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds);
+       gpio_request_array(arv4525pw_gpios, ARRAY_SIZE(arv4525pw_gpios));
+       gpio_export(ARV4525PW_RELAY, false);
+       gpio_export(ARV4525PW_PHYRESET, false);
+       ltq_pci_data.clock = PCI_CLOCK_INT;
+       ltq_register_pci(&ltq_pci_data);
+       arv_register_ath5k(ARV4525PW_ATH_ADDR, ARV4525PW_MADWIFI_ADDR);
+       ltq_register_ath5k(arv_ath5k_eeprom_data, arv_athxk_eeprom_mac);
+       ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
+       arv_register_ethernet(ARV4525PW_MAC_ADDR);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV4525PW,
+                       "ARV4525PW",
+                       "ARV4525PW - Speedport W502V",
+                       arv4525pw_init);
+
+static void __init
+arv7525pw_init(void)
+{
+#define ARV7525P_MAC_ADDR      0x3f0016
+
+       arv_load_nor(0x400000);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
+                               ARRAY_SIZE(arv7525pw_gpio_keys), arv7525pw_gpio_keys);
+       ltq_pci_data.clock = PCI_CLOCK_INT;
+       ltq_pci_data.gpio = PCI_GNT1 | PCI_EXIN1;
+       ltq_pci_data.irq[14] = (INT_NUM_IM3_IRL0 + 31);
+       ltq_register_pci(&ltq_pci_data);
+       ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
+       ltq_register_rt2x00("RT2860.eeprom");
+       ltq_register_tapi();
+       arv_register_ethernet(ARV7525P_MAC_ADDR);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV7525PW,
+                       "ARV7525PW",
+                       "ARV7525PW - Speedport W303V",
+                       arv7525pw_init);
+
+static void __init
+arv7518pw_init(void)
+{
+#define ARV7518PW_EBU                  0x2
+#define ARV7518PW_USB                  14
+#define ARV7518PW_SWITCH_RESET         13
+#define ARV7518PW_ATH_ADDR             0x7f0400
+#define ARV7518PW_MAC_ADDR             0x7f0016
+
+       arv_load_nor(0x800000);
+       ltq_register_gpio_ebu(ARV7518PW_EBU);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv7518pw_gpio_leds), arv7518pw_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
+                               ARRAY_SIZE(arv7518pw_gpio_keys), arv7518pw_gpio_keys);
+       ltq_register_pci(&ltq_pci_data);
+       ltq_register_tapi();
+       xway_register_dwc(ARV7518PW_USB);
+       arv_register_ethernet(ARV7518PW_MAC_ADDR);
+       arv_register_ath9k(ARV7518PW_ATH_ADDR, ARV7518PW_MAC_ADDR);
+       ltq_register_ath9k(arv_ath9k_eeprom_data, arv_athxk_eeprom_mac);
+       ltq_pci_ath_fixup(14, arv_ath9k_eeprom_data);
+
+       gpio_request(ARV7518PW_SWITCH_RESET, "switch");
+       gpio_direction_output(ARV7518PW_SWITCH_RESET, 1);
+       gpio_export(ARV7518PW_SWITCH_RESET, 0);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV7518PW,
+                       "ARV7518PW",
+                       "ARV7518PW - ASTORIA",
+                       arv7518pw_init);
+
+static void __init
+arv752dpw22_init(void)
+{
+#define ARV752DPW22_EBU                        0x2
+#define ARV752DPW22_USB                        100
+#define ARV752DPW22_RELAY              101
+#define ARV752DPW22_MAC_ADDR           0x7f0016
+
+       arv_load_nor(0x800000);
+       ltq_register_gpio_ebu(ARV752DPW22_EBU);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv752dpw22_gpio_leds), arv752dpw22_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
+                               ARRAY_SIZE(arv752dpw22_gpio_keys), arv752dpw22_gpio_keys);
+       ltq_pci_data.irq[15] = (INT_NUM_IM3_IRL0 + 31);
+       ltq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2;
+       ltq_register_pci(&ltq_pci_data);
+       xway_register_dwc(ARV752DPW22_USB);
+       arv_register_ethernet(ARV752DPW22_MAC_ADDR);
+
+       gpio_request(ARV752DPW22_RELAY, "relay");
+       gpio_set_value(ARV752DPW22_RELAY, 1);
+       gpio_export(ARV752DPW22_RELAY, 0);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22,
+                       "ARV752DPW22",
+                       "ARV752DPW22 - Arcor A803",
+                       arv752dpw22_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-bthomehubv2b.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-bthomehubv2b.c
new file mode 100644 (file)
index 0000000..44fe2f4
--- /dev/null
@@ -0,0 +1,542 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2011 Andrej Vlašić
+ *  Copyright (C) 2011 Luka Perkov
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/ath5k_platform.h>
+#include <linux/ath9k_platform.h>
+#include <linux/pci.h>
+#include <linux/phy.h>
+#include <linux/io.h>
+#include <linux/string.h>
+#include <linux/delay.h>
+#include <linux/module.h>
+
+#include <irq.h>
+#include <lantiq_soc.h>
+#include <lantiq_platform.h>
+#include <dev-gpio-leds.h>
+#include <dev-gpio-buttons.h>
+
+#include "../machtypes.h"
+//#include "dev-wifi-ath9k.h"
+#include "devices.h"
+#include "dev-dwc_otg.h"
+
+#undef USE_BTHH_GPIO_INIT
+
+// this reads certain data from u-boot if it's there
+#define USE_UBOOT_ENV_DATA
+
+#define UBOOT_ENV_OFFSET       0x040000
+#define UBOOT_ENV_SIZE         0x010000
+
+#ifdef NAND_ORGLAYOUT
+// this is only here for reference
+// definition of NAND flash area
+static struct mtd_partition bthomehubv2b_nand_partitions[] =
+{
+       {
+               .name   = "ART",
+               .offset = 0x0000000,
+               .size   = 0x0004000,
+       },
+       {
+               .name   = "image1",
+               .offset = 0x0004000,
+               .size   = 0x0E00000,
+       },
+       {
+               .name   = "unknown1",
+               .offset = 0x0E04000,
+               .size   = 0x00FC000,
+       },
+       {
+               .name   = "image2",
+               .offset = 0x0F00000,
+               .size   = 0x0E00000,
+       },
+       {
+               .name   = "unknown2",
+               .offset = 0x1D00000,
+               .size   = 0x0300000,
+       },
+
+};
+#endif
+
+#ifdef NAND_KEEPOPENRG
+// this allows both firmwares to co-exist
+
+static struct mtd_partition bthomehubv2b_nand_partitions[] =
+{
+       {
+               .name   = "art",
+               .offset = 0x0000000,
+               .size   = 0x0004000,
+       },
+       {
+               .name   = "Image1",
+               .offset = 0x0004000,
+               .size   = 0x0E00000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x0E04000,
+               .size   = 0x11fC000,
+       },
+       {
+               .name   = "wholeflash",
+               .offset = 0x0000000,
+               .size   = 0x2000000,
+       },
+
+};
+#endif
+
+// this gives more jffs2 by overwriting openrg
+
+static struct mtd_partition bthomehubv2b_nand_partitions[] =
+{
+       {
+               .name   = "art",
+               .offset = 0x0000000,
+               .size   = 0x0004000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x0004000,
+               .size   = 0x1ffC000,
+       },
+       {
+               .name   = "wholeflash",
+               .offset = 0x0000000,
+               .size   = 0x2000000,
+       },
+
+};
+
+extern void __init xway_register_nand(struct mtd_partition *parts, int count);
+
+// end BTHH_USE_NAND
+
+static struct gpio_led
+bthomehubv2b_gpio_leds[] __initdata = {
+
+       { .name = "soc:orange:upgrading",       .gpio = 213, },
+       { .name = "soc:orange:phone",           .gpio = 214, },
+       { .name = "soc:blue:phone",             .gpio = 215, },
+       { .name = "soc:orange:wireless",        .gpio = 216, },
+       { .name = "soc:blue:wireless",          .gpio = 217, },
+       { .name = "soc:red:broadband",          .gpio = 218, },
+       { .name = "soc:orange:broadband",       .gpio = 219, },
+       { .name = "soc:blue:broadband",         .gpio = 220, },
+       { .name = "soc:red:power",              .gpio = 221, },
+       { .name = "soc:orange:power",           .gpio = 222, },
+       { .name = "soc:blue:power",             .gpio = 223, },
+};
+
+static struct gpio_keys_button
+bthomehubv2b_gpio_keys[] __initdata = {
+       {
+               .desc           = "restart",
+               .type           = EV_KEY,
+               .code           = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 2,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "findhandset",
+               .type           = EV_KEY,
+               .code           = BTN_1,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 15,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "wps",
+               .type           = EV_KEY,
+               .code           = BTN_2,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 22,
+               .active_low     = 1,
+       },
+};
+
+// definition of NOR flash area - as per original.
+static struct mtd_partition bthomehubv2b_partitions[] =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x000000,
+               .size   = 0x040000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = UBOOT_ENV_OFFSET,
+               .size   = UBOOT_ENV_SIZE,
+       },
+       {
+               .name   = "rg_conf_1",
+               .offset = 0x050000,
+               .size   = 0x010000,
+       },
+       {
+               .name   = "rg_conf_2",
+               .offset = 0x060000,
+               .size   = 0x010000,
+       },
+       {
+               .name   = "rg_conf_factory",
+               .offset = 0x070000,
+               .size   = 0x010000,
+       },
+};
+
+
+/* nor flash */
+/* bt homehubv2b has a very small nor flash */
+/* so make it look for a small one, else we get a lot of alias chips identified - */
+/* not a bug problem, but fills the logs. */
+static struct resource bthhv2b_nor_resource =
+       MEM_RES("nor", LTQ_FLASH_START, 0x80000);
+
+static struct platform_device ltq_nor = {
+       .name           = "ltq_nor",
+       .resource       = &bthhv2b_nor_resource,
+       .num_resources  = 1,
+};
+
+static void __init bthhv2b_register_nor(struct physmap_flash_data *data)
+{
+       ltq_nor.dev.platform_data = data;
+       platform_device_register(&ltq_nor);
+}
+
+static struct physmap_flash_data bthomehubv2b_flash_data = {
+       .nr_parts       = ARRAY_SIZE(bthomehubv2b_partitions),
+       .parts          = bthomehubv2b_partitions,
+};
+
+
+
+
+static struct ltq_pci_data ltq_pci_data = {
+       .clock  = PCI_CLOCK_INT,
+       .gpio   = PCI_GNT1 | PCI_REQ1,
+       .irq    = { [14] = INT_NUM_IM0_IRL0 + 22, },
+};
+
+
+
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode       = PHY_INTERFACE_MODE_MII,
+};
+
+
+
+
+static char __init *get_uboot_env_var(char *haystack, int haystack_len, char *needle, int needle_len) {
+       int i;
+       for (i = 0; i <= haystack_len - needle_len; i++) {
+               if (memcmp(haystack + i, needle, needle_len) == 0) {
+                       return haystack + i + needle_len;
+               }
+       }
+       return NULL;
+}
+
+/*
+ * bthomehubv2b_parse_hex_* are not uniq. in arm/orion there are also duplicates:
+ * dns323_parse_hex_*
+ * TODO: one day write a patch for this :)
+ */
+static int __init bthomehubv2b_parse_hex_nibble(char n) {
+       if (n >= '0' && n <= '9')
+               return n - '0';
+
+       if (n >= 'A' && n <= 'F')
+               return n - 'A' + 10;
+
+       if (n >= 'a' && n <= 'f')
+               return n - 'a' + 10;
+
+       return -1;
+}
+
+static int __init bthomehubv2b_parse_hex_byte(const char *b) {
+       int hi;
+       int lo;
+
+       hi = bthomehubv2b_parse_hex_nibble(b[0]);
+       lo = bthomehubv2b_parse_hex_nibble(b[1]);
+
+       if (hi < 0 || lo < 0)
+               return -1;
+
+       return (hi << 4) | lo;
+}
+
+static int __init bthomehubv2b_register_ethernet(void) {
+       u_int8_t addr[6];
+       int i;
+       char *mac = "01:02:03:04:05:06";
+       int gotmac = 0;
+       char *boardid = "BTHHV2B";
+       int gotboardid = 0;
+
+       char *uboot_env_page;
+       uboot_env_page = ioremap(LTQ_FLASH_START + UBOOT_ENV_OFFSET, UBOOT_ENV_SIZE);
+       if (uboot_env_page)
+       {
+               char *Data = NULL;
+               Data = get_uboot_env_var(uboot_env_page, UBOOT_ENV_SIZE, "\0ethaddr=", 9);
+               if (Data)
+               {
+                       mac = Data;
+               }
+
+               Data = get_uboot_env_var(uboot_env_page, UBOOT_ENV_SIZE, "\0boardid=", 9);
+
+               if (Data)
+                       boardid = Data;
+       }
+       else
+       {
+               printk("bthomehubv2b: Failed to get uboot_env_page");
+       }
+
+       if (!mac) {
+       goto error_fail;
+       }
+
+       if (!boardid) {
+       goto error_fail;
+       }
+
+       /* Sanity check the string we're looking at */
+       for (i = 0; i < 5; i++) {
+       if (*(mac + (i * 3) + 2) != ':') {
+               goto error_fail;
+               }
+       }
+
+       for (i = 0; i < 6; i++) {
+               int byte;
+               byte = bthomehubv2b_parse_hex_byte(mac + (i * 3));
+               if (byte < 0) {
+                       goto error_fail;
+               }
+               addr[i] = byte;
+       }
+
+       if (gotmac)
+               printk("bthomehubv2b: Found ethernet MAC address: ");
+       else
+               printk("bthomehubv2b: using default MAC (pls set ethaddr in u-boot): ");
+
+       for (i = 0; i < 6; i++)
+               printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n");
+
+       memcpy(&ltq_eth_data.mac.sa_data, addr, 6);
+       ltq_register_etop(&ltq_eth_data);
+
+       //memcpy(&bthomehubv2b_ath5k_eeprom_mac, addr, 6);
+       //bthomehubv2b_ath5k_eeprom_mac[5]++;
+
+       if (gotboardid)
+               printk("bthomehubv2b: Board id is %s.", boardid);
+       else
+               printk("bthomehubv2b: Default Board id is %s.", boardid);
+
+       if (strncmp(boardid, "BTHHV2B", 7) == 0) {
+               // read in dev-wifi-ath9k
+               //memcpy(&bthomehubv2b_ath5k_eeprom_data, sx763_eeprom_data, ATH5K_PLAT_EEP_MAX_WORDS);
+       }
+       else {
+               printk("bthomehubv2b: Board id is unknown, fix uboot_env data.");
+       }
+
+
+       // should not unmap while we are using the ram?
+       if (uboot_env_page)
+               iounmap(uboot_env_page);
+
+       return 0;
+
+error_fail:
+       if (uboot_env_page)
+               iounmap(uboot_env_page);
+       return -EINVAL;
+}
+
+
+#define PORTA2_HW_PASS1 0
+#define PORTA2_HW_PASS1_SC14480 1
+#define PORTA2_HW_PASS2 2
+
+int porta2_hw_revision = -1;
+EXPORT_SYMBOL(porta2_hw_revision);
+
+#define LTQ_GPIO_OUT           0x00
+#define LTQ_GPIO_IN            0x04
+#define LTQ_GPIO_DIR           0x08
+#define LTQ_GPIO_ALTSEL0       0x0C
+#define LTQ_GPIO_ALTSEL1       0x10
+#define LTQ_GPIO_OD            0x14
+#define LTQ_GPIO_PUDSEL                0x1C
+#define LTQ_GPIO_PUDEN         0x20
+
+#ifdef USE_BTHH_GPIO_INIT
+static void bthomehubv2b_board_prom_init(void)
+{
+       int revision = 0;
+       unsigned int gpio = 0;
+       void __iomem *mem = ioremap(LTQ_GPIO0_BASE_ADDR, LTQ_GPIO_SIZE*2);
+
+#define DANUBE_GPIO_P0_OUT (unsigned short *)(mem + LTQ_GPIO_OUT)
+#define DANUBE_GPIO_P0_IN (unsigned short *)(mem + LTQ_GPIO_IN)
+#define DANUBE_GPIO_P0_DIR (unsigned short *)(mem + LTQ_GPIO_DIR)
+#define DANUBE_GPIO_P0_ALTSEL0 (unsigned short *)(mem + LTQ_GPIO_ALTSEL0)
+#define DANUBE_GPIO_P0_ALTSEL1 (unsigned short *)(mem + LTQ_GPIO_ALTSEL1)
+
+#define DANUBE_GPIO_P1_OUT (unsigned short *)(mem + LTQ_GPIO_SIZE + LTQ_GPIO_OUT)
+#define DANUBE_GPIO_P1_IN (unsigned short *)(mem + LTQ_GPIO_SIZE + LTQ_GPIO_IN)
+#define DANUBE_GPIO_P1_DIR (unsigned short *)(mem + LTQ_GPIO_SIZE + LTQ_GPIO_DIR)
+#define DANUBE_GPIO_P1_ALTSEL0 (unsigned short *)(mem + LTQ_GPIO_SIZE + LTQ_GPIO_ALTSEL0)
+#define DANUBE_GPIO_P1_ALTSEL1 (unsigned short *)(mem + LTQ_GPIO_SIZE + LTQ_GPIO_ALTSEL1)
+#define DANUBE_GPIO_P1_OD (unsigned short *)(mem + LTQ_GPIO_SIZE + LTQ_GPIO_OD)
+
+       printk("About to sense board using GPIOs at %8.8X\n", (unsigned int)mem);
+
+
+       /* First detect HW revision of the board. For that we need to set the GPIO
+        * lines according to table 7.2.1/7.2.2 in HSI */
+       *DANUBE_GPIO_P0_OUT = 0x0200;
+       *DANUBE_GPIO_P0_DIR = 0x2610;
+       *DANUBE_GPIO_P0_ALTSEL0 = 0x7812;
+       *DANUBE_GPIO_P0_ALTSEL1 = 0x0000;
+
+       *DANUBE_GPIO_P1_OUT = 0x7008;
+       *DANUBE_GPIO_P1_DIR = 0xF3AE;
+       *DANUBE_GPIO_P1_ALTSEL0 = 0x83A7;
+       *DANUBE_GPIO_P1_ALTSEL1 = 0x0400;
+
+       gpio = (*DANUBE_GPIO_P0_IN & 0xFFFF) | 
+               ((*DANUBE_GPIO_P1_IN & 0xFFFF) << 16);
+
+       revision |= (gpio & (1 << 27)) ? (1 << 0) : 0;
+       revision |= (gpio & (1 << 20)) ? (1 << 1) : 0;
+       revision |= (gpio & (1 << 8)) ? (1 << 2) : 0;
+       revision |= (gpio & (1 << 6)) ? (1 << 3) : 0;
+       revision |= (gpio & (1 << 5)) ? (1 << 4) : 0;
+       revision |= (gpio & (1 << 0)) ? (1 << 5) : 0;
+
+       porta2_hw_revision = revision;
+       printk("PORTA2: detected HW revision %d\n", revision);
+
+       /* Set GPIO lines according to HW revision. */
+       /* !!! Note that we are setting SPI_CS5 (GPIO 9) to be GPIO out with value
+        * of HIGH since the FXO does not use the SPI CS mechanism, it does it
+        * manually by controlling the GPIO line. We need the CS line to be disabled
+        * (HIGH) until needed since it will intefere with other devices on the SPI
+        * bus. */
+       *DANUBE_GPIO_P0_OUT = 0x0200;
+       /*
+        * During the manufacturing process a different machine takes over uart0
+        * so set it as input (so it wouldn't drive the line)
+        */
+#define cCONFIG_SHC_BT_MFG_TEST 0
+       *DANUBE_GPIO_P0_DIR = 0x2671 | (cCONFIG_SHC_BT_MFG_TEST ? 0 : (1 << 12));
+
+       if (revision == PORTA2_HW_PASS1_SC14480 || revision == PORTA2_HW_PASS2)
+               *DANUBE_GPIO_P0_ALTSEL0 = 0x7873;
+       else
+               *DANUBE_GPIO_P0_ALTSEL0 = 0x3873;
+
+       *DANUBE_GPIO_P0_ALTSEL1 = 0x0001;
+
+
+       //###################################################################################    
+       // Register values before patch
+       // P1_ALTSEL0 = 0x83A7
+       // P1_ALTSEL1 = 0x0400
+       // P1_OU        T     = 0x7008
+       // P1_DIR     = 0xF3AE
+       // P1_OD      = 0xE3Fc
+       printk("\nApplying Patch for CPU1 IRQ Issue\n");
+       *DANUBE_GPIO_P1_ALTSEL0 &= ~(1<<12);  // switch P1.12 (GPIO28) to GPIO functionality
+       *DANUBE_GPIO_P1_ALTSEL1 &= ~(1<<12);  // switch P1.12 (GPIO28) to GPIO functionality
+       *DANUBE_GPIO_P1_OUT     &= ~(1<<12);  // set P1.12 (GPIO28) to 0
+       *DANUBE_GPIO_P1_DIR     |= (1<<12);   // configure P1.12 (GPIO28) as output 
+       *DANUBE_GPIO_P1_OD      |= (1<<12);   // activate Push/Pull mode 
+       udelay(100);                          // wait a little bit (100us)
+       *DANUBE_GPIO_P1_OD      &= ~(1<<12);  // switch back from Push/Pull to Open Drain
+       // important: before! setting output to 1 (3,3V) the mode must be switched 
+       // back to Open Drain because the reset pin of the SC14488 is internally 
+       // pulled to 1,8V
+       *DANUBE_GPIO_P1_OUT     |= (1<<12);   // set output P1.12 (GPIO28) to 1
+       // Register values after patch, should be the same as before
+       // P1_ALTSEL0 = 0x83A7
+       // P1_ALTSEL1 = 0x0400
+       // P1_OUT     = 0x7008
+       // P1_DIR     = 0xF3AE
+       // P1_OD      = 0xE3Fc
+       //###################################################################################
+
+
+       *DANUBE_GPIO_P1_OUT = 0x7008;
+       *DANUBE_GPIO_P1_DIR = 0xEBAE | (revision == PORTA2_HW_PASS2 ? 0x1000 : 0);
+       *DANUBE_GPIO_P1_ALTSEL0 = 0x8BA7;
+       *DANUBE_GPIO_P1_ALTSEL1 = 0x0400;
+
+       iounmap(mem);
+}
+#endif
+static void __init bthomehubv2b_init(void) {
+#define bthomehubv2b_USB               13
+
+       // read the board version
+#ifdef USE_BTHH_GPIO_INIT
+       bthomehubv2b_board_prom_init();
+#endif
+
+       // register extra GPPOs used by LEDs as GPO 0x200+
+       ltq_register_gpio_stp();
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(bthomehubv2b_gpio_leds), bthomehubv2b_gpio_leds);
+       bthhv2b_register_nor(&bthomehubv2b_flash_data);
+       xway_register_nand(bthomehubv2b_nand_partitions, ARRAY_SIZE(bthomehubv2b_nand_partitions));
+       ltq_register_pci(&ltq_pci_data);
+       ltq_register_tapi();
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(bthomehubv2b_gpio_keys), bthomehubv2b_gpio_keys);
+//     ltq_register_ath9k();
+       xway_register_dwc(bthomehubv2b_USB);
+       bthomehubv2b_register_ethernet();
+
+}
+
+MIPS_MACHINE(LANTIQ_MACH_BTHOMEHUBV2BOPENRG,
+       "BTHOMEHUBV2BOPENRG",
+       "BTHOMEHUBV2B - BT Homehub V2.0 Type B with OpenRG image retained",
+       bthomehubv2b_init);
+
+MIPS_MACHINE(LANTIQ_MACH_BTHOMEHUBV2B,
+       "BTHOMEHUBV2B",
+       "BTHOMEHUBV2B - BT Homehub V2.0 Type B",
+       bthomehubv2b_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-easy50601.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-easy50601.c
new file mode 100644 (file)
index 0000000..a5a0105
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+
+#include <lantiq.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+
+static struct mtd_partition easy50601_partitions[] = {
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = 0x10000,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x20000,
+               .size   = 0x3d0000,
+       },
+};
+
+static struct physmap_flash_data easy50601_flash_data = {
+       .nr_parts       = ARRAY_SIZE(easy50601_partitions),
+       .parts          = easy50601_partitions,
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode = -1, /* use EPHY */
+};
+
+static void __init easy50601_init(void)
+{
+       ltq_register_nor(&easy50601_flash_data);
+       ltq_register_etop(&ltq_eth_data);
+}
+
+MIPS_MACHINE(LTQ_MACH_EASY50601,
+                       "EASY50601",
+                       "EASY50601 Eval Board",
+                       easy50601_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-easy50712.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-easy50712.c
new file mode 100644 (file)
index 0000000..2fddfca
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/phy.h>
+
+#include <lantiq_soc.h>
+#include <irq.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+
+static struct mtd_partition easy50712_partitions[] = {
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = 0x10000,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x20000,
+               .size   = 0x3d0000,
+       },
+};
+
+static struct physmap_flash_data easy50712_flash_data = {
+       .nr_parts       = ARRAY_SIZE(easy50712_partitions),
+       .parts          = easy50712_partitions,
+};
+
+static struct ltq_pci_data ltq_pci_data = {
+       .clock  = PCI_CLOCK_INT,
+       .gpio   = PCI_GNT1 | PCI_REQ1,
+       .irq    = {
+               [14] = INT_NUM_IM0_IRL0 + 22,
+       },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode = PHY_INTERFACE_MODE_MII,
+};
+
+static void __init easy50712_init(void)
+{
+       ltq_register_gpio_stp();
+       ltq_register_nor(&easy50712_flash_data);
+       ltq_register_pci(&ltq_pci_data);
+       ltq_register_etop(&ltq_eth_data);
+       ltq_register_tapi();
+}
+
+MIPS_MACHINE(LTQ_MACH_EASY50712,
+            "EASY50712",
+            "EASY50712 Eval Board",
+             easy50712_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-fritz_ar9.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-fritz_ar9.c
new file mode 100644 (file)
index 0000000..503e4be
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/phy.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/spi/flash.h>
+
+#include <lantiq_soc.h>
+#include <irq.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+#include "dev-ifxhcd.h"
+#include "dev-gpio-leds.h"
+#include "dev-gpio-buttons.h"
+
+static struct mtd_partition fritz7320_partitions[] = {
+       {
+               .name   = "urlader",
+               .offset = 0x0,
+               .size   = 0x20000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x20000,
+               .size   = 0xf60000,
+       },
+       {
+               .name   = "tffs (1)",
+               .offset = 0xf80000,
+               .size   = 0x40000,
+       },
+       {
+               .name   = "tffs (2)",
+               .offset = 0xfc0000,
+               .size   = 0x40000,
+       },
+};
+
+static struct physmap_flash_data fritz7320_flash_data = {
+       .nr_parts       = ARRAY_SIZE(fritz7320_partitions),
+       .parts          = fritz7320_partitions,
+};
+
+static struct gpio_led
+fritz7320_gpio_leds[] __initdata = {
+       { .name = "soc:green:power", .gpio = 44, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:internet", .gpio = 47, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:dect", .gpio = 38, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:wlan", .gpio = 37, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:dual1", .gpio = 35, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:dual2", .gpio = 45, .active_low = 1, .default_trigger = "default-on" },
+};
+
+static struct gpio_keys_button
+fritz7320_gpio_keys[] __initdata = {
+       {
+               .desc = "wifi",
+               .type = EV_KEY,
+               .code = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio = 1,
+               .active_low = 1,
+       },
+       {
+               .desc = "dect",
+               .type = EV_KEY,
+               .code = BTN_1,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio = 2,
+               .active_low = 1,
+       },
+};
+
+static struct ltq_pci_data ltq_pci_data = {
+       .clock  = PCI_CLOCK_INT,
+       .gpio   = PCI_GNT1 | PCI_REQ1,
+       .irq    = {
+               [14] = INT_NUM_IM0_IRL0 + 22,
+       },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode       = PHY_INTERFACE_MODE_RMII,
+};
+
+static int usb_pins[2] = { 50, 51 };
+
+static void __init fritz7320_init(void)
+{
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
+               ARRAY_SIZE(fritz7320_gpio_keys), fritz7320_gpio_keys);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(fritz7320_gpio_leds), fritz7320_gpio_leds);
+       ltq_register_pci(&ltq_pci_data);
+       ltq_register_etop(&ltq_eth_data);
+       ltq_register_nor(&fritz7320_flash_data);
+       xway_register_hcd(usb_pins);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_FRITZ7320,
+            "FRITZ7320",
+            "FRITZ!BOX 7320",
+             fritz7320_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-fritz_vr9.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-fritz_vr9.c
new file mode 100644 (file)
index 0000000..4a38988
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/phy.h>
+#include <linux/spi/spi_gpio.h>
+#include <linux/spi/flash.h>
+
+#include <lantiq_soc.h>
+#include <irq.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+#include "dev-ifxhcd.h"
+#include "dev-gpio-leds.h"
+#include "dev-gpio-buttons.h"
+
+static struct mtd_partition fritz3370_partitions[] = {
+       {
+               .name   = "linux",
+               .offset = 0x0,
+               .size   = 0x400000,
+       },
+       {
+               .name   = "filesystem",
+               .offset = 0x400000,
+               .size   = 0x3000000,
+       },
+       {
+               .name   = "reserved-kernel",
+               .offset = 0x3400000,
+               .size   = 0x400000,
+       },
+       {
+               .name   = "reserved",
+               .offset = 0x3800000,
+               .size   = 0x3000000,
+       },
+       {
+               .name   = "config",
+               .offset = 0x6800000,
+               .size   = 0x200000,
+       },
+       {
+               .name   = "nand-filesystem",
+               .offset = 0x6a00000,
+               .size   = 0x1600000,
+       },
+};
+
+static struct mtd_partition spi_flash_partitions[] = {
+       {
+               .name   = "urlader",
+               .offset = 0x0,
+               .size   = 0x20000,
+       },
+       {
+               .name   = "tffs",
+               .offset = 0x20000,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "tffs",
+               .offset = 0x30000,
+               .size   = 0x10000,
+       },
+};
+
+static struct gpio_led
+fritz3370_gpio_leds[] __initdata = {
+       { .name = "soc:green:1", .gpio = 32, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:2", .gpio = 33, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:3", .gpio = 34, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:4", .gpio = 35, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:5", .gpio = 36, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:green:6", .gpio = 47, .active_low = 1, .default_trigger = "default-on" },
+};
+
+static struct gpio_keys_button
+fritz3370_gpio_keys[] __initdata = {
+       {
+               .desc = "wifi",
+               .type = EV_KEY,
+               .code = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio = 29,
+               .active_low = 1,
+       },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode       = PHY_INTERFACE_MODE_RMII,
+};
+
+static int usb_pins[2] = { 5, 14 };
+
+#define SPI_GPIO_MRST  16
+#define SPI_GPIO_MTSR  17
+#define SPI_GPIO_CLK   18
+#define SPI_GPIO_CS0   10
+
+static struct spi_gpio_platform_data spi_gpio_data = {
+       .sck            = SPI_GPIO_CLK,
+       .mosi           = SPI_GPIO_MTSR,
+       .miso           = SPI_GPIO_MRST,
+       .num_chipselect = 2,
+};
+
+static struct platform_device spi_gpio_device = {
+       .name                   = "spi_gpio",
+       .dev.platform_data      = &spi_gpio_data,
+};
+
+static struct flash_platform_data spi_flash_data = {
+       .name           = "SPL",
+       .parts          = spi_flash_partitions,
+       .nr_parts       = ARRAY_SIZE(spi_flash_partitions),
+};
+
+static struct spi_board_info spi_flash __initdata = {
+       .modalias               = "m25p80",
+       .bus_num                = 0,
+       .chip_select            = 0,
+       .max_speed_hz           = 10 * 1000 * 1000,
+       .mode                   = SPI_MODE_3,
+       .chip_select            = 0,
+       .controller_data        = (void *) SPI_GPIO_CS0,
+       .platform_data          = &spi_flash_data
+};
+
+static void __init
+spi_gpio_init(void)
+{
+       spi_register_board_info(&spi_flash, 1);
+       platform_device_register(&spi_gpio_device);
+}
+
+static void __init fritz3370_init(void)
+{
+       spi_gpio_init();
+       platform_device_register_simple("pcie-xway", 0, NULL, 0);
+       xway_register_nand(fritz3370_partitions, ARRAY_SIZE(fritz3370_partitions));
+       xway_register_hcd(usb_pins);
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(fritz3370_gpio_leds), fritz3370_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL,
+               ARRAY_SIZE(fritz3370_gpio_keys), fritz3370_gpio_keys);
+       ltq_register_vrx200(&ltq_eth_data);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_FRITZ3370,
+            "FRITZ3370",
+            "FRITZ!BOX 3370",
+             fritz3370_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-gigasx76x.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-gigasx76x.c
new file mode 100644 (file)
index 0000000..c7a2de5
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2011 Andrej Vlašić
+ *  Copyright (C) 2011 Luka Perkov
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/ath5k_platform.h>
+#include <linux/pci.h>
+#include <linux/phy.h>
+#include <linux/io.h>
+#include <linux/if_ether.h>
+#include <linux/etherdevice.h>
+#include <linux/string.h>
+
+#include <irq.h>
+#include <lantiq_soc.h>
+#include <lantiq_platform.h>
+#include <dev-gpio-leds.h>
+#include <dev-gpio-buttons.h>
+
+#include "../machtypes.h"
+#include "dev-wifi-athxk.h"
+#include "devices.h"
+#include "dev-dwc_otg.h"
+
+#include "mach-gigasx76x.h"
+
+static u8 ltq_ethaddr[6] = { 0 };
+
+static int __init setup_ethaddr(char *str)
+{
+       if (!mac_pton(str, ltq_ethaddr))
+               memset(ltq_ethaddr, 0, 6);
+       return 0;
+}
+__setup("ethaddr=", setup_ethaddr);
+
+
+enum {
+       UNKNOWN = 0,
+       SX761,
+       SX762,
+       SX763,
+};
+static u8 board = SX763;
+
+static int __init setup_board(char *str)
+{
+       if (!strcmp(str, "sx761"))
+               board = SX761;
+       else if (!strcmp(str, "sx762"))
+               board = SX762;
+       else if (!strcmp(str, "sx763"))
+               board = SX763;
+       else
+               board = UNKNOWN;
+       return 0;
+}
+__setup("board=", setup_board);
+
+static struct mtd_partition gigasx76x_partitions[] =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = 0x10000,
+               .size   = 0x10000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x20000,
+               .size   = 0x7e0000,
+       },
+};
+
+static struct gpio_led
+gigasx76x_gpio_leds[] __initdata = {
+       { .name = "soc:green:voip", .gpio = 216, },
+       { .name = "soc:green:adsl", .gpio = 217, },
+       { .name = "soc:green:usb", .gpio = 218, },
+       { .name = "soc:green:wifi", .gpio = 219, },
+       { .name = "soc:green:phone2", .gpio = 220, },
+       { .name = "soc:green:phone1", .gpio = 221, },
+       { .name = "soc:green:line", .gpio = 222, },
+       { .name = "soc:green:online", .gpio = 223, },
+};
+
+static struct gpio_keys_button
+gigasx76x_gpio_keys[] __initdata = {
+       {
+               .desc           = "wps",
+               .type           = EV_KEY,
+               .code           = KEY_WPS_BUTTON,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 22,
+               .active_low     = 1,
+       },
+       {
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio           = 14,
+               .active_low     = 0,
+       },
+};
+
+static struct physmap_flash_data gigasx76x_flash_data = {
+       .nr_parts       = ARRAY_SIZE(gigasx76x_partitions),
+       .parts          = gigasx76x_partitions,
+};
+
+static struct ltq_pci_data ltq_pci_data = {
+       .clock  = PCI_CLOCK_INT,
+       .gpio   = PCI_GNT1 | PCI_REQ1,
+       .irq    = { [14] = INT_NUM_IM0_IRL0 + 22, },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode       = PHY_INTERFACE_MODE_MII,
+};
+
+static void __init gigasx76x_init(void)
+{
+#define GIGASX76X_USB          29
+
+       ltq_register_gpio_stp();
+       ltq_register_nor(&gigasx76x_flash_data);
+       ltq_register_pci(&ltq_pci_data);
+       ltq_register_tapi();
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(gigasx76x_gpio_leds), gigasx76x_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(gigasx76x_gpio_keys), gigasx76x_gpio_keys);
+       xway_register_dwc(GIGASX76X_USB);
+
+       if (!is_valid_ether_addr(ltq_ethaddr))
+               random_ether_addr(ltq_ethaddr);
+
+       memcpy(&ltq_eth_data.mac.sa_data, ltq_ethaddr, 6);
+       ltq_register_etop(&ltq_eth_data);
+       if (board == SX762) 
+               ltq_register_ath5k(sx762_eeprom_data, ltq_ethaddr);
+       else
+               ltq_register_ath5k(sx763_eeprom_data, ltq_ethaddr);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_GIGASX76X,
+                       "GIGASX76X",
+                       "GIGASX76X - Gigaset SX761,SX762,SX763",
+                       gigasx76x_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-gigasx76x.h b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-gigasx76x.h
new file mode 100644 (file)
index 0000000..c25a679
--- /dev/null
@@ -0,0 +1,208 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2011 Andrej Vlašić
+ *  Copyright (C) 2011 Luka Perkov
+ *
+ */
+
+#ifndef _MACH_GIGASX76X_H__
+#define _MACH_GIGASX76X_H__
+
+static u16 sx763_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]=
+{
+0x0013,0x168c,0x0200,0x0001,0x0000,0x5001,0x0000,0x2051,0x2051,0x1c0a,0x0100,
+0x0000,0x01c2,0x0002,0xc606,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xf165,0x7fbe,0x0003,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,0x5aa5,0x0000,0x0000,0x0313,0x4943,
+0x2053,0x7104,0x1202,0x0400,0x0306,0x0001,0x0000,0x0500,0x410e,0x39b1,0x1eb5,
+0x4e2d,0x3056,0xffff,0xe902,0x0700,0x0106,0x0000,0x0100,0x1500,0x0752,0x4101,
+0x6874,0x7265,0x736f,0x4320,0x6d6f,0x756d,0x696e,0x6163,0x6974,0x6e6f,0x2c73,
+0x4920,0x636e,0x002e,0x5241,0x3035,0x3130,0x302d,0x3030,0x2d30,0x3030,0x3030,
+0x5700,0x7269,0x6c65,0x7365,0x2073,0x414c,0x204e,0x6552,0x6566,0x6572,0x636e,
+0x2065,0x6143,0x6472,0x3000,0x0030,0x00ff,0x2100,0x0602,0x2201,0x0205,0x8d80,
+0x005b,0x0522,0x4002,0x8954,0x2200,0x0205,0x1b00,0x00b7,0x0522,0x8002,0x12a8,
+0x2201,0x0205,0x3600,0x016e,0x0522,0x0002,0x2551,0x2202,0x0205,0x6c00,0x02dc,
+0x0522,0x8002,0x37f9,0x2203,0x0205,0xa200,0x044a,0x0222,0x0803,0x0822,0x0604,
+0x0300,0xbe7f,0x65f1,0x0222,0x0105,0x00ff,0x0000,0x0000,0x0000,0x0000,0x0000,
+0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,
+0xffff,0xffff,0xffff,0xffff,0x0037,0x971f,0x5003,0x9a66,0x0001,0x81c4,0x016a,
+0x02ff,0x84ff,0x15a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x2d2c,0x0000,0x0000,0x0000,0x0000,0xe028,0xa492,0x1c00,
+0x000e,0xb8ca,0x0013,0x0000,0x0000,0x6b4b,0xc059,0x1571,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x2370,0x00a5,0x9618,0x419a,0x68a2,0xda35,0x001c,0x0007,0xb0ff,0x01b5,0x0000,
+0x0000,0xff70,0x19ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x3170,0x00a5,0x9618,0x419a,0x68a2,0xda35,
+0x001c,0x000e,0xb0ff,0x21b5,0x0000,0x2fd8,0xff70,0x1226,0x19ff,0x07be,0x6201,
+0x032e,0x0587,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1112,
+0x1441,0x4231,0x3234,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4d31,0x7f54,0x3c93,0x1205,0x1931,
+0x492d,0x7f50,0x3c93,0x0e01,0x192d,0x0070,0x0000,0x8140,0x724b,0x2ba9,0x3a09,
+0x99d9,0x1949,0x0070,0x0000,0x80e0,0x624a,0x2af8,0x35c7,0x9d47,0x1938,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x7082,0x0820,0xb882,0x0820,0x7092,0x28a0,0x8992,
+0x28a0,0xa292,0x28a0,0x70a2,0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,
+0x70a2,0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,0x8989,0x0000,0x0000,
+0x0000,0x2424,0x0000,0x0000,0x0000,0x7075,0xa2ac,0xb800,0x0000,0x2464,0x2424,
+0x2400,0x0000,0x7075,0xa2ac,0x0000,0x0000,0x2464,0x2424,0x0000,0x0000,0x7075,
+0xa7ac,0x0000,0x0000,0x2464,0x6424,0x0000,0x0000,0x7075,0xa7ac,0x0000,0x0000,
+0x2464,0x6424,0x0000,0x0000,0x8989,0x0000,0x0000,0x0000,0x2424,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,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,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,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,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,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,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,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,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,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,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,
+0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,
+0xffff,0xffff};
+
+static u16 sx762_eeprom_data[ATH5K_PLAT_EEP_MAX_WORDS]=
+{
+0x001a,0x168c,0x0200,0x0001,0x0000,0x5001,0x0000,0x2051,0x2051,0x1c0a,0x0100,
+0x0000,0x01c2,0x0002,0xc606,0x0001,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0xf165,0x7fbe,0x0003,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,0x5aa5,0x0000,0x0000,0x0313,0x4943,
+0x2053,0x7104,0x1202,0x0400,0x0306,0x0001,0x0000,0x0500,0x410e,0x39b1,0x1eb5,
+0x4e2d,0x3056,0xffff,0xe902,0x0700,0x0106,0x0000,0x0100,0x1500,0x0752,0x4101,
+0x6874,0x7265,0x736f,0x4320,0x6d6f,0x756d,0x696e,0x6163,0x6974,0x6e6f,0x2c73,
+0x4920,0x636e,0x002e,0x5241,0x3035,0x3130,0x302d,0x3030,0x2d30,0x3030,0x3030,
+0x5700,0x7269,0x6c65,0x7365,0x2073,0x414c,0x204e,0x6552,0x6566,0x6572,0x636e,
+0x2065,0x6143,0x6472,0x3000,0x0030,0x00ff,0x2100,0x0602,0x2201,0x0205,0x8d80,
+0x005b,0x0522,0x4002,0x8954,0x2200,0x0205,0x1b00,0x00b7,0x0522,0x8002,0x12a8,
+0x2201,0x0205,0x3600,0x016e,0x0522,0x0002,0x2551,0x2202,0x0205,0x6c00,0x02dc,
+0x0522,0x8002,0x37f9,0x2203,0x0205,0xa200,0x044a,0x0222,0x0803,0x0822,0x0604,
+0x0300,0xbe7f,0x65f1,0x0222,0x0105,0x00ff,0x0000,0x0000,0x0000,0x0000,0x0000,
+0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,
+0xffff,0xffff,0xffff,0xffff,0x0037,0x6aaa,0x5003,0x9a66,0x0001,0x81c4,0x016a,
+0x02ff,0x84ff,0x15a3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x2d2c,0x0000,0x0000,0x0000,0x0000,0xe028,0xa492,0x1c00,
+0x000e,0xb8ca,0x0013,0x0000,0x0000,0x6b4b,0xc059,0x1571,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x2370,0x00a5,0x9618,0x419a,0x68a2,0xda35,0x001c,0x0007,0xb0ff,0x01b5,0x0000,
+0x0000,0xff70,0x19ff,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x3170,0x00a5,0x9618,0x419a,0x68a2,0xda35,
+0x001c,0x000e,0xb0ff,0x21b5,0x0000,0x2fd8,0xff70,0x1226,0x19ff,0x07fa,0x6201,
+0x032e,0x0587,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x1112,
+0x1441,0x4231,0x3234,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,0x0000,0x0000,0x0000,0x8000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x4d31,0x7f54,0x3c93,0x1205,0x1931,
+0x492d,0x7f50,0x3c93,0x0e01,0x192d,0x0070,0x0000,0x8180,0x724d,0xab59,0x3a08,
+0xdd79,0x2559,0x0070,0x0000,0x81a0,0x6e4d,0x2b99,0x3a09,0x9989,0x2157,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
+0x0000,0x0000,0x0000,0x0000,0x7092,0x4924,0xb892,0x4924,0x7092,0x289e,0x8992,
+0x289e,0xa292,0x289e,0x70a2,0xa7ac,0x0000,0x0000,0x2462,0x5e13,0x0000,0x0000,
+0x70a2,0xa7ac,0x0000,0x0000,0x1e5c,0x5713,0x0000,0x0000,0x8989,0x0000,0x0000,
+0x0000,0x2424,0x0000,0x0000,0x0000,0x7075,0xa2ac,0xb800,0x0000,0x2868,0x2828,
+0x2800,0x0000,0x7075,0xa2ac,0x0000,0x0000,0x2868,0x2828,0x0000,0x0000,0x7075,
+0xac00,0x0000,0x0000,0x2161,0x2100,0x0000,0x0000,0x7075,0xac00,0x0000,0x0000,
+0x1b5b,0x1b00,0x0000,0x0000,0x8989,0x0000,0x0000,0x0000,0x2121,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,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,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,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,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,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,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,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,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,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,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};
+
+#endif
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-netgear.c
new file mode 100644 (file)
index 0000000..ed9098e
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/phy.h>
+#include <linux/spi/spi.h>
+#include <linux/spi/flash.h>
+
+#include <lantiq_soc.h>
+#include <irq.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+
+static struct ltq_pci_data ltq_pci_data = {
+       .clock  = PCI_CLOCK_INT,
+       .gpio   = PCI_GNT1 | PCI_REQ1,
+       .irq    = {
+               [14] = INT_NUM_IM0_IRL0 + 22,
+       },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode = PHY_INTERFACE_MODE_MII,
+};
+
+static struct mtd_partition easy98000_nor_partitions[] =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x40000,
+       },
+       {
+               .name   = "uboot_env",
+               .offset = 0x40000,
+               .size   = 0x40000,      /* 2 sectors for redundant env. */
+       },
+       {
+               .name   = "linux",
+               .offset = 0x80000,
+               .size   = 0xF80000,     /* map only 16 MiB */
+       },
+};
+
+static struct flash_platform_data easy98000_spi_flash_platform_data = {
+       .name = "sflash",
+       .parts = easy98000_nor_partitions,
+       .nr_parts = ARRAY_SIZE(easy98000_nor_partitions)
+};
+
+static struct spi_board_info spi_info __initdata = {
+       .modalias               = "m25p80",
+       .bus_num                = 0,
+       .chip_select            = 3,
+       .max_speed_hz           = 10 * 1000 * 1000,
+       .mode                   = SPI_MODE_3,
+       .platform_data          = &easy98000_spi_flash_platform_data
+};
+
+struct ltq_spi_platform_data ltq_spi_data = {
+       .num_chipselect = 4,
+};
+
+static void __init dgn3500_init(void)
+{
+       ltq_register_pci(&ltq_pci_data);
+       ltq_register_etop(&ltq_eth_data);
+       ltq_register_spi(&ltq_spi_data, &spi_info, 1);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
+            "DGN3500B",
+            "Netgear DGN3500B",
+             dgn3500_init);
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-p2601hnf1.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-p2601hnf1.c
new file mode 100644 (file)
index 0000000..98c1181
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/gpio_buttons.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+#include <linux/etherdevice.h>
+#include <linux/mdio-gpio.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+
+#include <lantiq_soc.h>
+#include <lantiq_platform.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+#include "../dev-gpio-leds.h"
+#include "dev-dwc_otg.h"
+
+
+static struct mtd_partition p2601hnf1_partitions[] __initdata =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x20000,
+       },
+/*     {
+               .name   = "uboot_env",
+               .offset = 0x20000,
+               .size   = 0x20000,
+       },
+*/     {
+               .name   = "linux",
+               .offset = 0x020000,
+               .size   = 0xfc0000,
+       },
+       {
+               .name   = "board_config",
+               .offset = 0xfe0000,
+               .size   = 0x20000,
+       },
+};
+
+static struct physmap_flash_data p2601hnf1_flash_data __initdata = {
+       .nr_parts       = ARRAY_SIZE(p2601hnf1_partitions),
+       .parts          = p2601hnf1_partitions,
+};
+
+static struct gpio_led p2601hnf1_leds_gpio[] __initdata = {
+       { .name = "soc:red:power", .gpio = 29, .active_low = 1, .default_trigger = "default-off" },
+       { .name = "soc:yellow:phone", .gpio = 64, .active_low = 1, .default_trigger = "default-off" },
+       { .name = "soc:green:phone", .gpio = 65, .active_low = 1, .default_trigger = "default-off" },
+       { .name = "soc:yellow:wlan", .gpio = 66, .active_low = 1, .default_trigger = "default-off" },
+       { .name = "soc:green:power", .gpio = 67, .active_low = 1, .default_trigger = "default-on" },
+       { .name = "soc:red:internet", .gpio = 68, .active_low = 1, .default_trigger = "default-off" },
+       { .name = "soc:green:internet", .gpio = 69, .active_low = 1, .default_trigger = "default-off" },
+       { .name = "soc:green:dsl", .gpio = 70, .active_low = 1, .default_trigger = "default-off" },
+       { .name = "soc:green:wlan", .gpio = 71, .active_low = 1, .default_trigger = "default-off" },
+};
+
+static struct gpio_button
+p2601hnf1_gpio_buttons[] /*__initdata*/ = {
+       { .desc = "reset", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 53, .active_low = 1, },
+       { .desc = "wlan", .type = EV_KEY, .code = BTN_1, .threshold = 1, .gpio = 54, .active_low = 1, },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode       = PHY_INTERFACE_MODE_RMII,
+};
+
+static void __init
+p2601hnf1_init(void)
+{
+
+#define P2601HNF1_USB                  9
+
+       ltq_register_gpio_stp();
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(p2601hnf1_leds_gpio), p2601hnf1_leds_gpio);
+       ltq_register_gpio_buttons(p2601hnf1_gpio_buttons, ARRAY_SIZE(p2601hnf1_gpio_buttons));
+       ltq_register_nor(&p2601hnf1_flash_data);
+       ltq_register_etop(&ltq_eth_data);
+       xway_register_dwc(P2601HNF1_USB);
+
+       // enable the ethernet ports on the SoC
+//     ltq_w32((ltq_r32(LTQ_GPORT_P0_CTL) & ~(1 << 17)) | (1 << 18), LTQ_GPORT_P0_CTL);
+//     ltq_w32((ltq_r32(LTQ_GPORT_P1_CTL) & ~(1 << 17)) | (1 << 18), LTQ_GPORT_P1_CTL);
+//     ltq_w32((ltq_r32(LTQ_GPORT_P2_CTL) & ~(1 << 17)) | (1 << 18), LTQ_GPORT_P2_CTL);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_P2601HNF1,
+                       "P2601HNF1",
+                       "ZyXEL P-2601HN-F1",
+                       p2601hnf1_init);
+
diff --git a/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-wbmr.c b/target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-wbmr.c
new file mode 100644 (file)
index 0000000..b11c263
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ *  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.
+ *
+ *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/leds.h>
+#include <linux/gpio.h>
+#include <linux/gpio_buttons.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#include <linux/input.h>
+
+#include <lantiq_soc.h>
+#include <irq.h>
+#include <dev-gpio-leds.h>
+#include <dev-gpio-buttons.h>
+
+#include "../machtypes.h"
+#include "devices.h"
+#include "dev-dwc_otg.h"
+
+static struct mtd_partition wbmr_partitions[] =
+{
+       {
+               .name   = "uboot",
+               .offset = 0x0,
+               .size   = 0x40000,
+       },
+       {
+               .name   = "uboot-env",
+               .offset = 0x40000,
+               .size   = 0x20000,
+       },
+       {
+               .name   = "linux",
+               .offset = 0x60000,
+               .size   = 0x1f20000,
+       },
+       {
+               .name   = "calibration",
+               .offset = 0x1fe0000,
+               .size   = 0x20000,
+       },
+};
+
+static struct physmap_flash_data wbmr_flash_data = {
+       .nr_parts       = ARRAY_SIZE(wbmr_partitions),
+       .parts          = wbmr_partitions,
+};
+
+static struct gpio_led
+wbmr_gpio_leds[] __initdata = {
+       { .name = "soc:blue:movie", .gpio = 20, .active_low = 1, },
+       { .name = "soc:red:internet", .gpio = 18, .active_low = 1, },
+       { .name = "soc:green:internet", .gpio = 17, .active_low = 1, },
+       { .name = "soc:green:adsl", .gpio = 16, .active_low = 1, },
+       { .name = "soc:green:wlan", .gpio = 15, .active_low = 1, },
+       { .name = "soc:red:security", .gpio = 14, .active_low = 1, },
+       { .name = "soc:green:power", .gpio = 1, .active_low = 1, },
+       { .name = "soc:red:power", .gpio = 5, .active_low = 1, },
+       { .name = "soc:green:usb", .gpio = 28, .active_low = 1, },
+};
+
+static struct gpio_keys_button
+wbmr_gpio_keys[] __initdata = {
+       {
+               .desc = "aoss",
+               .type = EV_KEY,
+               .code = BTN_0,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio = 0,
+               .active_low = 1,
+       },
+       {
+               .desc = "reset",
+               .type = EV_KEY,
+               .code = BTN_1,
+               .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
+               .gpio = 37,
+               .active_low = 1,
+       },
+};
+
+static struct ltq_pci_data ltq_pci_data = {
+       .clock      = PCI_CLOCK_INT,
+       .gpio   = PCI_GNT1 | PCI_REQ1,
+       .irq    = {
+               [14] = INT_NUM_IM0_IRL0 + 22,
+       },
+};
+
+static struct ltq_eth_data ltq_eth_data = {
+       .mii_mode = PHY_INTERFACE_MODE_RGMII,
+};
+
+static void __init
+wbmr_init(void)
+{
+#define WMBR_BRN_MAC                   0x1fd0024
+
+       ltq_add_device_gpio_leds(-1, ARRAY_SIZE(wbmr_gpio_leds), wbmr_gpio_leds);
+       ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(wbmr_gpio_keys), wbmr_gpio_keys);
+       ltq_register_nor(&wbmr_flash_data);
+       ltq_register_pci(&ltq_pci_data);
+       memcpy_fromio(&ltq_eth_data.mac.sa_data,
+               (void *)KSEG1ADDR(LTQ_FLASH_START + WMBR_BRN_MAC), 6);
+       ltq_register_etop(&ltq_eth_data);
+       xway_register_dwc(36);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_WBMR,
+                       "WBMR",
+                       "WBMR",
+                       wbmr_init);
index 9ccf45d..5f19d2b 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2010 OpenWrt.org
+# Copyright (C) 2010-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -12,6 +12,7 @@ JFFS2_BLOCKSIZE = 64k 128k 256k
 ase_cmdline=-console=ttyLTQ0,115200 rootfstype=squashfs,jffs2
 xway_cmdline=-console=ttyLTQ1,115200 rootfstype=squashfs,jffs2
 falcon_cmdline=-console=ttyLTQ0,115200 rootfstype=squashfs,jffs2
+sx76x_cmdline=console=ttyLTQ1,115200 rootfstype=squashfs,jffs2
 
 define CompressLzma
   $(STAGING_DIR_HOST)/bin/lzma e $(1) $(2)
@@ -35,12 +36,23 @@ define MkImageLzma
                -d $(KDIR)/vmlinux-$(1).lzma $(KDIR)/uImage-$(1)
 endef
 
+define MkImageEVA
+       lzma2eva 0x80002000 0x80002000 $(KDIR)/vmlinux-$(1).lzma $(KDIR)/$(1).eva.prealign
+       dd if=$(KDIR)/$(1).eva.prealign of=$(KDIR)/$(1).eva bs=64k conv=sync
+       cat ./eva.dummy.squashfs >> $(KDIR)/$(1).eva
+endef
+
 define Image/Build/squashfs
        cat $(KDIR)/uImage-$(2) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
        $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image)
        $(if $(3),$(call MkBrnImage,$(3),$(4),$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(3)-brnImage,$(2),$(1),$(5)))
 endef
 
+define Image/BuildEVA/squashfs
+       cat $(KDIR)/$(2).eva $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva
+       $(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image.eva)
+endef
+
 define Image/Build/jffs2-64k
        dd if=$(KDIR)/uImage-$(2) of=$(KDIR)/uImage-$(2)-$(1) bs=64k conv=sync
        cat $(KDIR)/uImage-$(2)-$(1) $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(1).image
@@ -62,6 +74,12 @@ define Image/BuildKernel/Template
        $(CP) $(KDIR)/uImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-uImage
 endef
 
+define Image/BuildKernelEVA/Template
+       $(call PatchKernelLzma,$(1),$(if $(2),$(2) machtype=$(1),))
+       $(call MkImageEVA,$(1))
+       $(CP) $(KDIR)/$(1).eva $(BIN_DIR)/$(IMG_PREFIX)-$(1).eva
+endef
+
 ifeq ($(CONFIG_TARGET_lantiq_danube),y)
 define Image/BuildKernel/Profile/EASY50712
        $(call Image/BuildKernel/Template,EASY50712,$(xway_cmdline))
@@ -103,6 +121,14 @@ define Image/Build/Profile/ARV4518PW
        $(call Image/Build/$(1),$(1),ARV4518PW)
 endef
 
+define Image/BuildKernel/Profile/ARV4519PW
+       $(call Image/BuildKernel/Template,ARV4519PW,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/ARV4519PW
+       $(call Image/Build/$(1),$(1),ARV4519PW,BRNDA4519,0x12345678,memsize=32)
+endef
+
 define Image/BuildKernel/Profile/ARV4520PW
        $(call Image/BuildKernel/Template,ARV4520PW,$(xway_cmdline))
 endef
@@ -140,7 +166,7 @@ define Image/BuildKernel/Profile/ARV7518PW
 endef
 
 define Image/Build/Profile/ARV7518PW
-       $(call Image/Build/$(1),$(1),ARV7518PW)
+       $(call Image/Build/$(1),$(1),ARV7518PW,BRNDA7519,0x12345678,memsize=64)
 endef
 
 define Image/BuildKernel/Profile/ARV752DPW
@@ -160,13 +186,29 @@ define Image/Build/Profile/ARV752DPW22
 endef
 
 define Image/BuildKernel/Profile/GIGASX76X
-       $(call Image/BuildKernel/Template,GIGASX76X,$(xway_cmdline))
+       $(call Image/BuildKernel/Template,GIGASX76X,$(sx76x_cmdline))
 endef
 
 define Image/Build/Profile/GIGASX76X
        $(call Image/Build/$(1),$(1),GIGASX76X)
 endef
 
+define Image/BuildKernel/Profile/BTHOMEHUBV2B
+       $(call Image/BuildKernel/Template,BTHOMEHUBV2B,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/BTHOMEHUBV2B
+       $(call Image/Build/$(1),$(1),BTHOMEHUBV2B)
+endef
+
+define Image/BuildKernel/Profile/BTHOMEHUBV2BOPENRG
+       $(call Image/BuildKernel/Template,BTHOMEHUBV2BOPENRG,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/BTHOMEHUBV2BOPENRG
+       $(call Image/Build/$(1),$(1),BTHOMEHUBV2BOPENRG)
+endef
+
 define Image/BuildKernel/Profile/Generic
        $(call Image/BuildKernel/Template,EASY4010,$(xway_cmdline))
        $(call Image/BuildKernel/Template,EASY50712,$(xway_cmdline))
@@ -174,6 +216,7 @@ define Image/BuildKernel/Profile/Generic
        $(call Image/BuildKernel/Template,ARV3527P,$(xway_cmdline))
        $(call Image/BuildKernel/Template,ARV4510PW,$(xway_cmdline))
        $(call Image/BuildKernel/Template,ARV4518PW,$(xway_cmdline))
+       $(call Image/BuildKernel/Template,ARV4519PW,$(xway_cmdline))
        $(call Image/BuildKernel/Template,ARV4520PW,$(xway_cmdline))
        $(call Image/BuildKernel/Template,ARV452CPW,$(xway_cmdline))
        $(call Image/BuildKernel/Template,ARV4525PW,$(xway_cmdline))
@@ -182,6 +225,8 @@ define Image/BuildKernel/Profile/Generic
        $(call Image/BuildKernel/Template,ARV752DPW,$(xway_cmdline))
        $(call Image/BuildKernel/Template,ARV752DPW22,$(xway_cmdline))
        $(call Image/BuildKernel/Template,GIGASX76X,$(xway_cmdline))
+       $(call Image/BuildKernel/Template,BTHOMEHUBV2B,$(xway_cmdline))
+       $(call Image/BuildKernel/Template,BTHOMEHUBV2BOPENRG,$(xway_cmdline))
        $(call Image/BuildKernel/Template,NONE)
 endef
 
@@ -192,14 +237,17 @@ define Image/Build/Profile/Generic
        $(call Image/Build/$(1),$(1),ARV3527P)
        $(call Image/Build/$(1),$(1),ARV4510PW)
        $(call Image/Build/$(1),$(1),ARV4518PW)
+       $(call Image/Build/$(1),$(1),ARV4519PW,BRNDA4519,0x12345678,memsize=32)
        $(call Image/Build/$(1),$(1),ARV4520PW)
        $(call Image/Build/$(1),$(1),ARV452CPW)
-       $(call Image/Build/$(1),$(1),ARV4525PW)
+       $(call Image/Build/$(1),$(1),ARV4525PW,BRNDTW502,0x12345678,memsize=32)
        $(call Image/Build/$(1),$(1),ARV7525PW)
-       $(call Image/Build/$(1),$(1),ARV7518PW)
+       $(call Image/Build/$(1),$(1),ARV7518PW,BRNDA7519,0x12345678,memsize=32)
        $(call Image/Build/$(1),$(1),ARV752DPW)
        $(call Image/Build/$(1),$(1),ARV752DPW22)
        $(call Image/Build/$(1),$(1),GIGASX76X)
+       $(call Image/Build/$(1),$(1),BTHOMEHUBV2B)
+       $(call Image/Build/$(1),$(1),BTHOMEHUBV2BOPENRG)
        $(call Image/Build/$(1),$(1),NONE)
        $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
 endef
@@ -222,15 +270,25 @@ define Image/Build/Profile/DGN3500B
        $(call Image/Build/$(1),$(1),DGN3500B)
 endef
 
+define Image/BuildKernel/Profile/FRITZ7320
+       $(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/FRITZ7320
+       $(call Image/BuildEVA/$(1),$(1),FRITZ7320)
+endef
+
 define Image/BuildKernel/Profile/Generic
        $(call Image/BuildKernel/Template,WBMR,$(xway_cmdline))
        $(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline))
+       $(call Image/BuildKernelEVA/Template,FRITZ7320,$(xway_cmdline))
        $(call Image/BuildKernel/Template,NONE)
 endef
 
 define Image/Build/Profile/Generic
        $(call Image/Build/$(1),$(1),WBMR)
        $(call Image/Build/$(1),$(1),DGN3500B)
+       $(call Image/BuildEVA/$(1),$(1),FRITZ7320)
        $(call Image/Build/$(1),$(1),NONE)
        $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
 endef
@@ -288,6 +346,28 @@ define Image/Build/Profile/Generic
 endef
 endif
 
+ifeq ($(CONFIG_TARGET_lantiq_vr9),y)
+define Image/BuildKernel/Profile/FRITZ3370
+       $(call Image/BuildKernel/Template,FRITZ3370,$(xway_cmdline))
+       $(call Image/BuildKernelEVA/Template,FRITZ3370,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/FRITZ3370
+       $(call Image/Build/$(1),$(1),FRITZ3370)
+endef
+
+define Image/BuildKernel/Profile/Generic
+       $(call Image/BuildKernel/Template,FRITZ3370,$(xway_cmdline))
+       $(call Image/BuildKernel/Template,NONE)
+endef
+
+define Image/Build/Profile/Generic
+       $(call Image/Build/$(1),$(1),FRITZ3370)
+       $(call Image/Build/$(1),$(1),NONE)
+       $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
+endef
+endif
+
 define Image/BuildKernel
        $(call Image/BuildKernel/Profile/$(PROFILE))
 endef
diff --git a/target/linux/lantiq/image/eva.dummy.squashfs b/target/linux/lantiq/image/eva.dummy.squashfs
new file mode 100644 (file)
index 0000000..71c688c
Binary files /dev/null and b/target/linux/lantiq/image/eva.dummy.squashfs differ
index 0eccec5..0868e6a 100644 (file)
@@ -29,7 +29,7 @@ USB_MENU:=USB Support
 define KernelPackage/usb-dwc-otg
   TITLE:=Synopsis DWC_OTG support
   SUBMENU:=$(USB_MENU)
-  DEPENDS+=@(TARGET_lantiq_danube||TARGET_lantiq_ar9||TARGET_lantiq_vr9) +kmod-usb-core
+  DEPENDS+=@(TARGET_lantiq_danube||TARGET_lantiq_ar9) +kmod-usb-core
   KCONFIG:=CONFIG_DWC_OTG \
        CONFIG_DWC_OTG_DEBUG=n \
        CONFIG_DWC_OTG_LANTIQ=y \
@@ -45,6 +45,39 @@ endef
 
 $(eval $(call KernelPackage,usb-dwc-otg))
 
+define KernelPackage/usb-ifxhcd
+  TITLE:=IFXHCD usb driver
+  SUBMENU:=$(USB_MENU)
+  DEPENDS+=@(TARGET_lantiq_vr9||TARGET_lantiq_ar9) +kmod-usb-core
+ifeq ($(CONFIG_TARGET_lantiq_ar9),)
+  KCONFIG:=CONFIG_USB_HOST_IFX \
+       CONFIG_USB_HOST_IFX_B=y \
+       CONFIG_IFX_VR9=y \
+       CONFIG_IFX_AR9=n \
+       CONFIG_USB_HOST_IFX_FORCE_USB11=n \
+       CONFIG_USB_HOST_IFX_WITH_HS_ELECT_TST=n \
+       CONFIG_USB_HOST_IFX_WITH_ISO=n \
+       CONFIG_USB_HOST_IFX_UNALIGNED_ADJ=y
+else
+  KCONFIG:=CONFIG_USB_HOST_IFX \
+       CONFIG_USB_HOST_IFX_B=y \
+       CONFIG_IFX_AR9=y \
+       CONFIG_IFX_VR9=n \
+       CONFIG_USB_HOST_IFX_FORCE_USB11=n \
+       CONFIG_USB_HOST_IFX_WITH_HS_ELECT_TST=n \
+       CONFIG_USB_HOST_IFX_WITH_ISO=n \
+       CONFIG_USB_HOST_IFX_UNALIGNED_ADJ=y
+endif
+  FILES:=$(LINUX_DIR)/drivers/usb/ifxhcd/ifxusb_host.ko
+  AUTOLOAD:=$(call AutoLoad,50,ifxusb_host)
+endef
+
+define KernelPackage/usb-ifxhcd/description
+  Kernel support for Synopsis USB on XWAY
+endef
+
+$(eval $(call KernelPackage,usb-ifxhcd))
+
 I2C_FALCON_MODULES:= \
   CONFIG_I2C_FALCON:drivers/i2c/busses/i2c-falcon
 
diff --git a/target/linux/lantiq/patches-3.2/0001-GPIO-add-bindings-for-managed-devices.patch b/target/linux/lantiq/patches-3.2/0001-GPIO-add-bindings-for-managed-devices.patch
new file mode 100644 (file)
index 0000000..316d040
--- /dev/null
@@ -0,0 +1,144 @@
+From 282f1ca84b35f3be68abc4fd8b52e229f3cb6bb7 Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Thu, 8 Mar 2012 13:23:53 +0100
+Subject: [PATCH 01/70] GPIO: add bindings for managed devices
+
+This patch adds 2 functions that allow managed devices to request GPIOs.
+These GPIOs will then be managed by drivers/base/devres.c.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
+---
+ drivers/gpio/Makefile      |    2 +-
+ drivers/gpio/devres.c      |   90 ++++++++++++++++++++++++++++++++++++++++++++
+ include/asm-generic/gpio.h |    4 ++
+ 3 files changed, 95 insertions(+), 1 deletions(-)
+ create mode 100644 drivers/gpio/devres.c
+
+diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
+index 4e018d6..76dbd3f 100644
+--- a/drivers/gpio/Makefile
++++ b/drivers/gpio/Makefile
+@@ -2,7 +2,7 @@
+ ccflags-$(CONFIG_DEBUG_GPIO)  += -DDEBUG
+-obj-$(CONFIG_GPIOLIB)         += gpiolib.o
++obj-$(CONFIG_GPIOLIB)         += gpiolib.o devres.o
+ # Device drivers. Generally keep list sorted alphabetically
+ obj-$(CONFIG_GPIO_GENERIC)    += gpio-generic.o
+diff --git a/drivers/gpio/devres.c b/drivers/gpio/devres.c
+new file mode 100644
+index 0000000..3dd2939
+--- /dev/null
++++ b/drivers/gpio/devres.c
+@@ -0,0 +1,90 @@
++/*
++ * drivers/gpio/devres.c - managed gpio resources
++ *
++ * 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.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ *
++ * This file is based on kernel/irq/devres.c
++ *
++ * Copyright (c) 2011 John Crispin <blogic@openwrt.org>
++ */
++
++#include <linux/module.h>
++#include <linux/gpio.h>
++#include <linux/device.h>
++#include <linux/gfp.h>
++
++static void devm_gpio_release(struct device *dev, void *res)
++{
++      unsigned *gpio = res;
++
++      gpio_free(*gpio);
++}
++
++static int devm_gpio_match(struct device *dev, void *res, void *data)
++{
++      unsigned *this = res, *gpio = data;
++
++      return *this == *gpio;
++}
++
++/**
++ *      devm_gpio_request - request a gpio for a managed device
++ *      @dev: device to request the gpio for
++ *      @gpio: gpio to allocate
++ *      @label: the name of the requested gpio
++ *
++ *      Except for the extra @dev argument, this function takes the
++ *      same arguments and performs the same function as
++ *      gpio_request().  GPIOs requested with this function will be
++ *      automatically freed on driver detach.
++ *
++ *      If an GPIO allocated with this function needs to be freed
++ *      separately, devm_gpio_free() must be used.
++ */
++
++int devm_gpio_request(struct device *dev, unsigned gpio, const char *label)
++{
++      unsigned *dr;
++      int rc;
++
++      dr = devres_alloc(devm_gpio_release, sizeof(unsigned), GFP_KERNEL);
++      if (!dr)
++              return -ENOMEM;
++
++      rc = gpio_request(gpio, label);
++      if (rc) {
++              devres_free(dr);
++              return rc;
++      }
++
++      *dr = gpio;
++      devres_add(dev, dr);
++
++      return 0;
++}
++EXPORT_SYMBOL(devm_gpio_request);
++
++/**
++ *      devm_gpio_free - free an interrupt
++ *      @dev: device to free gpio for
++ *      @gpio: gpio to free
++ *
++ *      Except for the extra @dev argument, this function takes the
++ *      same arguments and performs the same function as gpio_free().
++ *      This function instead of gpio_free() should be used to manually
++ *      free GPIOs allocated with devm_gpio_request().
++ */
++void devm_gpio_free(struct device *dev, unsigned int gpio)
++{
++
++      WARN_ON(devres_destroy(dev, devm_gpio_release, devm_gpio_match,
++              &gpio));
++      gpio_free(gpio);
++}
++EXPORT_SYMBOL(devm_gpio_free);
+diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
+index 8c86210..8601a02 100644
+--- a/include/asm-generic/gpio.h
++++ b/include/asm-generic/gpio.h
+@@ -175,6 +175,10 @@ extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *labe
+ extern int gpio_request_array(const struct gpio *array, size_t num);
+ extern void gpio_free_array(const struct gpio *array, size_t num);
++/* bindings for managed devices that want to request gpios */
++int devm_gpio_request(struct device *dev, unsigned gpio, const char *label);
++void devm_gpio_free(struct device *dev, unsigned int gpio);
++
+ #ifdef CONFIG_GPIO_SYSFS
+ /*
+-- 
+1.7.7.1
+
diff --git a/target/linux/lantiq/patches-3.2/0002-MIPS-remove-unused-prototype-kgdb_config.patch b/target/linux/lantiq/patches-3.2/0002-MIPS-remove-unused-prototype-kgdb_config.patch
new file mode 100644 (file)
index 0000000..d3b3c0d
--- /dev/null
@@ -0,0 +1,25 @@
+From b859096bdc4b029357217af98874d6feec3ff4bd Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Fri, 16 Mar 2012 16:27:35 +0100
+Subject: [PATCH 02/70] MIPS: remove unused prototype kgdb_config
+
+---
+ arch/mips/include/asm/mips-boards/generic.h |    4 ----
+ 1 files changed, 0 insertions(+), 4 deletions(-)
+
+diff --git a/arch/mips/include/asm/mips-boards/generic.h b/arch/mips/include/asm/mips-boards/generic.h
+index 46c0856..6e23ceb 100644
+--- a/arch/mips/include/asm/mips-boards/generic.h
++++ b/arch/mips/include/asm/mips-boards/generic.h
+@@ -93,8 +93,4 @@ extern void mips_pcibios_init(void);
+ #define mips_pcibios_init() do { } while (0)
+ #endif
+-#ifdef CONFIG_KGDB
+-extern void kgdb_config(void);
+-#endif
+-
+ #endif  /* __ASM_MIPS_BOARDS_GENERIC_H */
+-- 
+1.7.7.1
+
diff --git a/target/linux/lantiq/patches-3.2/0003-MTD-MIPS-lantiq-reintroduce-support-for-cmdline-part.patch b/target/linux/lantiq/patches-3.2/0003-MTD-MIPS-lantiq-reintroduce-support-for-cmdline-part.patch
new file mode 100644 (file)
index 0000000..64b2101
--- /dev/null
@@ -0,0 +1,39 @@
+From 63e9d017ce90dc1cd0822bace72e4e391feafdab Mon Sep 17 00:00:00 2001
+From: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
+Date: Fri, 17 Feb 2012 22:32:18 +0100
+Subject: [PATCH 03/70] MTD: MIPS: lantiq: reintroduce support for cmdline
+ partitions
+
+Since commit ca97dec2ab5c87e9fbdf7e882e1820004a3966fa the
+command line parsing of MTD partitions does not work anymore.
+
+Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ drivers/mtd/maps/lantiq-flash.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c
+index 4f10e27..764d468 100644
+--- a/drivers/mtd/maps/lantiq-flash.c
++++ b/drivers/mtd/maps/lantiq-flash.c
+@@ -45,6 +45,7 @@ struct ltq_mtd {
+ };
+ static char ltq_map_name[] = "ltq_nor";
++static const char *ltq_probe_types[] __devinitconst = { "cmdlinepart", NULL };
+ static map_word
+ ltq_read16(struct map_info *map, unsigned long adr)
+@@ -168,7 +169,7 @@ ltq_mtd_probe(struct platform_device *pdev)
+       cfi->addr_unlock1 ^= 1;
+       cfi->addr_unlock2 ^= 1;
+-      err = mtd_device_parse_register(ltq_mtd->mtd, NULL, 0,
++      err = mtd_device_parse_register(ltq_mtd->mtd, ltq_probe_types, 0,
+                       ltq_mtd_data->parts, ltq_mtd_data->nr_parts);
+       if (err) {
+               dev_err(&pdev->dev, "failed to add partitions\n");
+-- 
+1.7.7.1
+
diff --git a/target/linux/lantiq/patches-3.2/0004-MTD-add-m25p80-id-for-mx25l2005a.patch b/target/linux/lantiq/patches-3.2/0004-MTD-add-m25p80-id-for-mx25l2005a.patch
new file mode 100644 (file)
index 0000000..75adef3
--- /dev/null
@@ -0,0 +1,24 @@
+From e4e27fbcaf2caa2a3e3ef45c736b4bb14f91ecfe Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Tue, 13 Mar 2012 18:03:33 +0100
+Subject: [PATCH 04/70] MTD: add m25p80 id for mx25l2005a
+
+---
+ drivers/mtd/devices/m25p80.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
+index 884904d..3f37f5f 100644
+--- a/drivers/mtd/devices/m25p80.c
++++ b/drivers/mtd/devices/m25p80.c
+@@ -676,6 +676,7 @@ static const struct spi_device_id m25p_ids[] = {
+       { "640s33b",  INFO(0x898913, 0, 64 * 1024, 128, 0) },
+       /* Macronix */
++      { "mx25l2005a",  INFO(0xc22012, 0, 64 * 1024,   8, SECT_4K) },
+       { "mx25l4005a",  INFO(0xc22013, 0, 64 * 1024,   8, SECT_4K) },
+       { "mx25l8005",   INFO(0xc22014, 0, 64 * 1024,  16, 0) },
+       { "mx25l1606e",  INFO(0xc22015, 0, 64 * 1024,  32, SECT_4K) },
+-- 
+1.7.7.1
+
diff --git a/target/linux/lantiq/patches-3.2/0005-MIPS-lantiq-reorganize-xway-code.patch b/target/linux/lantiq/patches-3.2/0005-MIPS-lantiq-reorganize-xway-code.patch
new file mode 100644 (file)
index 0000000..2ab9522
--- /dev/null
@@ -0,0 +1,881 @@
+From cf7086d4c2f7caeccd019c0a57bf1566c72c13ee Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Wed, 10 Aug 2011 14:57:04 +0200
+Subject: [PATCH 05/70] MIPS: lantiq: reorganize xway code
+
+Inside the folder arch/mips/lantiq/xway, there were alot of small files with
+lots of duplicated code. This patch adds a wrapper function for inserting and
+requesting resources and unifies the small files into one bigger file.
+
+This patch makes the xway code consistent with the falcon support added later
+in this series.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ arch/mips/include/asm/mach-lantiq/lantiq.h         |   14 +---
+ .../mips/include/asm/mach-lantiq/xway/lantiq_soc.h |   14 ++++
+ arch/mips/lantiq/clk.c                             |   25 +------
+ arch/mips/lantiq/devices.c                         |   30 ++------
+ arch/mips/lantiq/devices.h                         |    4 +
+ arch/mips/lantiq/prom.c                            |   51 +++++++++++--
+ arch/mips/lantiq/prom.h                            |    4 +
+ arch/mips/lantiq/xway/Makefile                     |    6 +-
+ arch/mips/lantiq/xway/devices.c                    |   42 ++---------
+ arch/mips/lantiq/xway/dma.c                        |   21 +----
+ arch/mips/lantiq/xway/ebu.c                        |   52 -------------
+ arch/mips/lantiq/xway/pmu.c                        |   69 -----------------
+ arch/mips/lantiq/xway/prom-ase.c                   |    9 ++
+ arch/mips/lantiq/xway/prom-xway.c                  |   10 +++
+ arch/mips/lantiq/xway/reset.c                      |   21 +----
+ arch/mips/lantiq/xway/setup-ase.c                  |   19 -----
+ arch/mips/lantiq/xway/setup-xway.c                 |   20 -----
+ arch/mips/lantiq/xway/sysctrl.c                    |   78 ++++++++++++++++++++
+ drivers/watchdog/lantiq_wdt.c                      |    2 +-
+ 19 files changed, 199 insertions(+), 292 deletions(-)
+ delete mode 100644 arch/mips/lantiq/xway/ebu.c
+ delete mode 100644 arch/mips/lantiq/xway/pmu.c
+ delete mode 100644 arch/mips/lantiq/xway/setup-ase.c
+ delete mode 100644 arch/mips/lantiq/xway/setup-xway.c
+ create mode 100644 arch/mips/lantiq/xway/sysctrl.c
+
+diff --git a/arch/mips/include/asm/mach-lantiq/lantiq.h b/arch/mips/include/asm/mach-lantiq/lantiq.h
+index ce2f029..66d7300 100644
+--- a/arch/mips/include/asm/mach-lantiq/lantiq.h
++++ b/arch/mips/include/asm/mach-lantiq/lantiq.h
+@@ -9,6 +9,7 @@
+ #define _LANTIQ_H__
+ #include <linux/irq.h>
++#include <linux/ioport.h>
+ /* generic reg access functions */
+ #define ltq_r32(reg)          __raw_readl(reg)
+@@ -18,15 +19,6 @@
+ #define ltq_r8(reg)           __raw_readb(reg)
+ #define ltq_w8(val, reg)      __raw_writeb(val, reg)
+-/* register access macros for EBU and CGU */
+-#define ltq_ebu_w32(x, y)     ltq_w32((x), ltq_ebu_membase + (y))
+-#define ltq_ebu_r32(x)                ltq_r32(ltq_ebu_membase + (x))
+-#define ltq_cgu_w32(x, y)     ltq_w32((x), ltq_cgu_membase + (y))
+-#define ltq_cgu_r32(x)                ltq_r32(ltq_cgu_membase + (x))
+-
+-extern __iomem void *ltq_ebu_membase;
+-extern __iomem void *ltq_cgu_membase;
+-
+ extern unsigned int ltq_get_cpu_ver(void);
+ extern unsigned int ltq_get_soc_type(void);
+@@ -51,7 +43,9 @@ extern void ltq_enable_irq(struct irq_data *data);
+ /* find out what caused the last cpu reset */
+ extern int ltq_reset_cause(void);
+-#define LTQ_RST_CAUSE_WDTRST  0x20
++
++/* helper for requesting and remapping resources */
++extern void __iomem *ltq_remap_resource(struct resource *res);
+ #define IOPORT_RESOURCE_START 0x10000000
+ #define IOPORT_RESOURCE_END   0xffffffff
+diff --git a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+index 8a3c6be..9b7ee366 100644
+--- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
++++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+@@ -61,6 +61,8 @@
+ #define LTQ_CGU_BASE_ADDR     0x1F103000
+ #define LTQ_CGU_SIZE          0x1000
++#define CGU_EPHY              0x10
++
+ /* ICU - interrupt control unit */
+ #define LTQ_ICU_BASE_ADDR     0x1F880200
+ #define LTQ_ICU_SIZE          0x100
+@@ -97,6 +99,8 @@
+ #define LTQ_WDT_BASE_ADDR     0x1F8803F0
+ #define LTQ_WDT_SIZE          0x10
++#define LTQ_RST_CAUSE_WDTRST  0x20
++
+ /* STP - serial to parallel conversion unit */
+ #define LTQ_STP_BASE_ADDR     0x1E100BB0
+ #define LTQ_STP_SIZE          0x40
+@@ -121,11 +125,21 @@
+ #define LTQ_MPS_BASE_ADDR     (KSEG1 + 0x1F107000)
+ #define LTQ_MPS_CHIPID                ((u32 *)(LTQ_MPS_BASE_ADDR + 0x0344))
++/* register access macros for EBU and CGU */
++#define ltq_ebu_w32(x, y)     ltq_w32((x), ltq_ebu_membase + (y))
++#define ltq_ebu_r32(x)                ltq_r32(ltq_ebu_membase + (x))
++#define ltq_cgu_w32(x, y)     ltq_w32((x), ltq_cgu_membase + (y))
++#define ltq_cgu_r32(x)                ltq_r32(ltq_cgu_membase + (x))
++
++extern __iomem void *ltq_ebu_membase;
++extern __iomem void *ltq_cgu_membase;
++
+ /* request a non-gpio and set the PIO config */
+ extern int  ltq_gpio_request(unsigned int pin, unsigned int alt0,
+       unsigned int alt1, unsigned int dir, const char *name);
+ extern void ltq_pmu_enable(unsigned int module);
+ extern void ltq_pmu_disable(unsigned int module);
++extern void ltq_cgu_enable(unsigned int clk);
+ static inline int ltq_is_ar9(void)
+ {
+diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c
+index 77ed70f..39eef7f 100644
+--- a/arch/mips/lantiq/clk.c
++++ b/arch/mips/lantiq/clk.c
+@@ -22,6 +22,7 @@
+ #include <lantiq_soc.h>
+ #include "clk.h"
++#include "prom.h"
+ struct clk {
+       const char *name;
+@@ -46,16 +47,6 @@ static struct clk cpu_clk_generic[] = {
+       },
+ };
+-static struct resource ltq_cgu_resource = {
+-      .name   = "cgu",
+-      .start  = LTQ_CGU_BASE_ADDR,
+-      .end    = LTQ_CGU_BASE_ADDR + LTQ_CGU_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
+-
+-/* remapped clock register range */
+-void __iomem *ltq_cgu_membase;
+-
+ void clk_init(void)
+ {
+       cpu_clk = cpu_clk_generic;
+@@ -133,21 +124,11 @@ void __init plat_time_init(void)
+ {
+       struct clk *clk;
+-      if (insert_resource(&iomem_resource, &ltq_cgu_resource) < 0)
+-              panic("Failed to insert cgu memory\n");
+-
+-      if (request_mem_region(ltq_cgu_resource.start,
+-                      resource_size(&ltq_cgu_resource), "cgu") < 0)
+-              panic("Failed to request cgu memory\n");
++      ltq_soc_init();
+-      ltq_cgu_membase = ioremap_nocache(ltq_cgu_resource.start,
+-                              resource_size(&ltq_cgu_resource));
+-      if (!ltq_cgu_membase) {
+-              pr_err("Failed to remap cgu memory\n");
+-              unreachable();
+-      }
+       clk = clk_get(0, "cpu");
+       mips_hpt_frequency = clk_get_rate(clk) / ltq_get_counter_resolution();
+       write_c0_compare(read_c0_count());
++      pr_info("CPU Clock: %ldMHz\n", clk_get_rate(clk) / 1000000);
+       clk_put(clk);
+ }
+diff --git a/arch/mips/lantiq/devices.c b/arch/mips/lantiq/devices.c
+index de1cb2b..7193d78 100644
+--- a/arch/mips/lantiq/devices.c
++++ b/arch/mips/lantiq/devices.c
+@@ -27,12 +27,8 @@
+ #include "devices.h"
+ /* nor flash */
+-static struct resource ltq_nor_resource = {
+-      .name   = "nor",
+-      .start  = LTQ_FLASH_START,
+-      .end    = LTQ_FLASH_START + LTQ_FLASH_MAX - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
++static struct resource ltq_nor_resource =
++      MEM_RES("nor", LTQ_FLASH_START, LTQ_FLASH_MAX);
+ static struct platform_device ltq_nor = {
+       .name           = "ltq_nor",
+@@ -47,12 +43,8 @@ void __init ltq_register_nor(struct physmap_flash_data *data)
+ }
+ /* watchdog */
+-static struct resource ltq_wdt_resource = {
+-      .name   = "watchdog",
+-      .start  = LTQ_WDT_BASE_ADDR,
+-      .end    = LTQ_WDT_BASE_ADDR + LTQ_WDT_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
++static struct resource ltq_wdt_resource =
++      MEM_RES("watchdog", LTQ_WDT_BASE_ADDR, LTQ_WDT_SIZE);
+ void __init ltq_register_wdt(void)
+ {
+@@ -61,24 +53,14 @@ void __init ltq_register_wdt(void)
+ /* asc ports */
+ static struct resource ltq_asc0_resources[] = {
+-      {
+-              .name   = "asc0",
+-              .start  = LTQ_ASC0_BASE_ADDR,
+-              .end    = LTQ_ASC0_BASE_ADDR + LTQ_ASC_SIZE - 1,
+-              .flags  = IORESOURCE_MEM,
+-      },
++      MEM_RES("asc0", LTQ_ASC0_BASE_ADDR, LTQ_ASC_SIZE),
+       IRQ_RES(tx, LTQ_ASC_TIR(0)),
+       IRQ_RES(rx, LTQ_ASC_RIR(0)),
+       IRQ_RES(err, LTQ_ASC_EIR(0)),
+ };
+ static struct resource ltq_asc1_resources[] = {
+-      {
+-              .name   = "asc1",
+-              .start  = LTQ_ASC1_BASE_ADDR,
+-              .end    = LTQ_ASC1_BASE_ADDR + LTQ_ASC_SIZE - 1,
+-              .flags  = IORESOURCE_MEM,
+-      },
++      MEM_RES("asc1", LTQ_ASC1_BASE_ADDR, LTQ_ASC_SIZE),
+       IRQ_RES(tx, LTQ_ASC_TIR(1)),
+       IRQ_RES(rx, LTQ_ASC_RIR(1)),
+       IRQ_RES(err, LTQ_ASC_EIR(1)),
+diff --git a/arch/mips/lantiq/devices.h b/arch/mips/lantiq/devices.h
+index 2947bb1..a03c23f 100644
+--- a/arch/mips/lantiq/devices.h
++++ b/arch/mips/lantiq/devices.h
+@@ -14,6 +14,10 @@
+ #define IRQ_RES(resname, irq) \
+       {.name = #resname, .start = (irq), .flags = IORESOURCE_IRQ}
++#define MEM_RES(resname, adr_start, adr_size) \
++      { .name = resname, .flags = IORESOURCE_MEM, \
++        .start = ((adr_start) & ~KSEG1), \
++        .end = ((adr_start + adr_size - 1) & ~KSEG1) }
+ extern void ltq_register_nor(struct physmap_flash_data *data);
+ extern void ltq_register_wdt(void);
+diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c
+index e34fcfd..e3b1e25 100644
+--- a/arch/mips/lantiq/prom.c
++++ b/arch/mips/lantiq/prom.c
+@@ -16,6 +16,10 @@
+ #include "prom.h"
+ #include "clk.h"
++/* access to the ebu needs to be locked between different drivers */
++DEFINE_SPINLOCK(ebu_lock);
++EXPORT_SYMBOL_GPL(ebu_lock);
++
+ static struct ltq_soc_info soc_info;
+ unsigned int ltq_get_cpu_ver(void)
+@@ -55,16 +59,51 @@ static void __init prom_init_cmdline(void)
+       }
+ }
+-void __init prom_init(void)
++void __iomem *ltq_remap_resource(struct resource *res)
+ {
+-      struct clk *clk;
++      __iomem void *ret = NULL;
++      struct resource *lookup = lookup_resource(&iomem_resource, res->start);
++
++      if (lookup && strcmp(lookup->name, res->name)) {
++              pr_err("conflicting memory range %s\n", res->name);
++              return NULL;
++      }
++      if (!lookup) {
++              if (insert_resource(&iomem_resource, res) < 0) {
++                      pr_err("Failed to insert %s memory\n", res->name);
++                      return NULL;
++              }
++      }
++      if (request_mem_region(res->start,
++                      resource_size(res), res->name) < 0) {
++              pr_err("Failed to request %s memory\n", res->name);
++              goto err_res;
++      }
++      ret = ioremap_nocache(res->start, resource_size(res));
++      if (!ret)
++              goto err_mem;
++
++      pr_debug("remap: 0x%08X-0x%08X : \"%s\"\n",
++              res->start, res->end, res->name);
++      return ret;
++
++err_mem:
++      panic("Failed to remap %s memory\n", res->name);
++      release_mem_region(res->start, resource_size(res));
++
++err_res:
++      release_resource(res);
++      return NULL;
++}
++EXPORT_SYMBOL(ltq_remap_resource);
++
++void __init prom_init(void)
++{
+       ltq_soc_detect(&soc_info);
+       clk_init();
+-      clk = clk_get(0, "cpu");
+-      snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN - 1, "%s rev1.%d",
+-              soc_info.name, soc_info.rev);
+-      clk_put(clk);
++      snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN - 1, "%s rev %s",
++              soc_info.name, soc_info.rev_type);
+       soc_info.sys_type[LTQ_SYS_TYPE_LEN - 1] = '\0';
+       pr_info("SoC: %s\n", soc_info.sys_type);
+       prom_init_cmdline();
+diff --git a/arch/mips/lantiq/prom.h b/arch/mips/lantiq/prom.h
+index b4229d9..51dba1b 100644
+--- a/arch/mips/lantiq/prom.h
++++ b/arch/mips/lantiq/prom.h
+@@ -9,17 +9,21 @@
+ #ifndef _LTQ_PROM_H__
+ #define _LTQ_PROM_H__
++#define LTQ_SYS_REV_LEN               0x10
+ #define LTQ_SYS_TYPE_LEN      0x100
+ struct ltq_soc_info {
+       unsigned char *name;
+       unsigned int rev;
++      unsigned char rev_type[LTQ_SYS_REV_LEN];
++      unsigned int srev;
+       unsigned int partnum;
+       unsigned int type;
+       unsigned char sys_type[LTQ_SYS_TYPE_LEN];
+ };
+ extern void ltq_soc_detect(struct ltq_soc_info *i);
++extern void ltq_soc_init(void);
+ extern void ltq_soc_setup(void);
+ #endif
+diff --git a/arch/mips/lantiq/xway/Makefile b/arch/mips/lantiq/xway/Makefile
+index c517f2e..6678402 100644
+--- a/arch/mips/lantiq/xway/Makefile
++++ b/arch/mips/lantiq/xway/Makefile
+@@ -1,7 +1,7 @@
+-obj-y := pmu.o ebu.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o
++obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o
+-obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o setup-xway.o
+-obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o setup-ase.o
++obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o
++obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o
+ obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
+ obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
+diff --git a/arch/mips/lantiq/xway/devices.c b/arch/mips/lantiq/xway/devices.c
+index d614aa7..f97e565 100644
+--- a/arch/mips/lantiq/xway/devices.c
++++ b/arch/mips/lantiq/xway/devices.c
+@@ -31,22 +31,9 @@
+ /* gpio */
+ static struct resource ltq_gpio_resource[] = {
+-      {
+-              .name   = "gpio0",
+-              .start  = LTQ_GPIO0_BASE_ADDR,
+-              .end    = LTQ_GPIO0_BASE_ADDR + LTQ_GPIO_SIZE - 1,
+-              .flags  = IORESOURCE_MEM,
+-      }, {
+-              .name   = "gpio1",
+-              .start  = LTQ_GPIO1_BASE_ADDR,
+-              .end    = LTQ_GPIO1_BASE_ADDR + LTQ_GPIO_SIZE - 1,
+-              .flags  = IORESOURCE_MEM,
+-      }, {
+-              .name   = "gpio2",
+-              .start  = LTQ_GPIO2_BASE_ADDR,
+-              .end    = LTQ_GPIO2_BASE_ADDR + LTQ_GPIO_SIZE - 1,
+-              .flags  = IORESOURCE_MEM,
+-      }
++      MEM_RES("gpio0", LTQ_GPIO0_BASE_ADDR, LTQ_GPIO_SIZE),
++      MEM_RES("gpio1", LTQ_GPIO1_BASE_ADDR, LTQ_GPIO_SIZE),
++      MEM_RES("gpio2", LTQ_GPIO2_BASE_ADDR, LTQ_GPIO_SIZE),
+ };
+ void __init ltq_register_gpio(void)
+@@ -64,12 +51,8 @@ void __init ltq_register_gpio(void)
+ }
+ /* serial to parallel conversion */
+-static struct resource ltq_stp_resource = {
+-      .name   = "stp",
+-      .start  = LTQ_STP_BASE_ADDR,
+-      .end    = LTQ_STP_BASE_ADDR + LTQ_STP_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
++static struct resource ltq_stp_resource =
++      MEM_RES("stp", LTQ_STP_BASE_ADDR, LTQ_STP_SIZE);
+ void __init ltq_register_gpio_stp(void)
+ {
+@@ -78,12 +61,7 @@ void __init ltq_register_gpio_stp(void)
+ /* asc ports - amazon se has its own serial mapping */
+ static struct resource ltq_ase_asc_resources[] = {
+-      {
+-              .name   = "asc0",
+-              .start  = LTQ_ASC1_BASE_ADDR,
+-              .end    = LTQ_ASC1_BASE_ADDR + LTQ_ASC_SIZE - 1,
+-              .flags  = IORESOURCE_MEM,
+-      },
++      MEM_RES("asc0", LTQ_ASC1_BASE_ADDR, LTQ_ASC_SIZE),
+       IRQ_RES(tx, LTQ_ASC_ASE_TIR),
+       IRQ_RES(rx, LTQ_ASC_ASE_RIR),
+       IRQ_RES(err, LTQ_ASC_ASE_EIR),
+@@ -96,12 +74,8 @@ void __init ltq_register_ase_asc(void)
+ }
+ /* ethernet */
+-static struct resource ltq_etop_resources = {
+-      .name   = "etop",
+-      .start  = LTQ_ETOP_BASE_ADDR,
+-      .end    = LTQ_ETOP_BASE_ADDR + LTQ_ETOP_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
++static struct resource ltq_etop_resources =
++      MEM_RES("etop", LTQ_ETOP_BASE_ADDR, LTQ_ETOP_SIZE);
+ static struct platform_device ltq_etop = {
+       .name           = "ltq_etop",
+diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
+index cbb6ae5..60cd11f 100644
+--- a/arch/mips/lantiq/xway/dma.c
++++ b/arch/mips/lantiq/xway/dma.c
+@@ -24,6 +24,8 @@
+ #include <lantiq_soc.h>
+ #include <xway_dma.h>
++#include "../devices.h"
++
+ #define LTQ_DMA_CTRL          0x10
+ #define LTQ_DMA_CPOLL         0x14
+ #define LTQ_DMA_CS            0x18
+@@ -55,12 +57,8 @@
+ #define ltq_dma_w32_mask(x, y, z)     ltq_w32_mask(x, y, \
+                                               ltq_dma_membase + (z))
+-static struct resource ltq_dma_resource = {
+-      .name   = "dma",
+-      .start  = LTQ_DMA_BASE_ADDR,
+-      .end    = LTQ_DMA_BASE_ADDR + LTQ_DMA_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
++static struct resource ltq_dma_resource =
++      MEM_RES("dma", LTQ_DMA_BASE_ADDR, LTQ_DMA_SIZE);
+ static void __iomem *ltq_dma_membase;
+@@ -220,17 +218,8 @@ ltq_dma_init(void)
+ {
+       int i;
+-      /* insert and request the memory region */
+-      if (insert_resource(&iomem_resource, &ltq_dma_resource) < 0)
+-              panic("Failed to insert dma memory\n");
+-
+-      if (request_mem_region(ltq_dma_resource.start,
+-                      resource_size(&ltq_dma_resource), "dma") < 0)
+-              panic("Failed to request dma memory\n");
+-
+       /* remap dma register range */
+-      ltq_dma_membase = ioremap_nocache(ltq_dma_resource.start,
+-                              resource_size(&ltq_dma_resource));
++      ltq_dma_membase = ltq_remap_resource(&ltq_dma_resource);
+       if (!ltq_dma_membase)
+               panic("Failed to remap dma memory\n");
+diff --git a/arch/mips/lantiq/xway/ebu.c b/arch/mips/lantiq/xway/ebu.c
+deleted file mode 100644
+index 033b318..0000000
+--- a/arch/mips/lantiq/xway/ebu.c
++++ /dev/null
+@@ -1,52 +0,0 @@
+-/*
+- *  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.
+- *
+- *  EBU - the external bus unit attaches PCI, NOR and NAND
+- *
+- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+- */
+-
+-#include <linux/kernel.h>
+-#include <linux/module.h>
+-#include <linux/ioport.h>
+-
+-#include <lantiq_soc.h>
+-
+-/* all access to the ebu must be locked */
+-DEFINE_SPINLOCK(ebu_lock);
+-EXPORT_SYMBOL_GPL(ebu_lock);
+-
+-static struct resource ltq_ebu_resource = {
+-      .name   = "ebu",
+-      .start  = LTQ_EBU_BASE_ADDR,
+-      .end    = LTQ_EBU_BASE_ADDR + LTQ_EBU_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
+-
+-/* remapped base addr of the clock unit and external bus unit */
+-void __iomem *ltq_ebu_membase;
+-
+-static int __init lantiq_ebu_init(void)
+-{
+-      /* insert and request the memory region */
+-      if (insert_resource(&iomem_resource, &ltq_ebu_resource) < 0)
+-              panic("Failed to insert ebu memory\n");
+-
+-      if (request_mem_region(ltq_ebu_resource.start,
+-                      resource_size(&ltq_ebu_resource), "ebu") < 0)
+-              panic("Failed to request ebu memory\n");
+-
+-      /* remap ebu register range */
+-      ltq_ebu_membase = ioremap_nocache(ltq_ebu_resource.start,
+-                              resource_size(&ltq_ebu_resource));
+-      if (!ltq_ebu_membase)
+-              panic("Failed to remap ebu memory\n");
+-
+-      /* make sure to unprotect the memory region where flash is located */
+-      ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_BUSCON0) & ~EBU_WRDIS, LTQ_EBU_BUSCON0);
+-      return 0;
+-}
+-
+-postcore_initcall(lantiq_ebu_init);
+diff --git a/arch/mips/lantiq/xway/pmu.c b/arch/mips/lantiq/xway/pmu.c
+deleted file mode 100644
+index 39f0d26..0000000
+--- a/arch/mips/lantiq/xway/pmu.c
++++ /dev/null
+@@ -1,69 +0,0 @@
+-/*
+- *  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.
+- *
+- *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+- */
+-
+-#include <linux/kernel.h>
+-#include <linux/module.h>
+-#include <linux/ioport.h>
+-
+-#include <lantiq_soc.h>
+-
+-/* PMU - the power management unit allows us to turn part of the core
+- * on and off
+- */
+-
+-/* the enable / disable registers */
+-#define LTQ_PMU_PWDCR 0x1C
+-#define LTQ_PMU_PWDSR 0x20
+-
+-#define ltq_pmu_w32(x, y)     ltq_w32((x), ltq_pmu_membase + (y))
+-#define ltq_pmu_r32(x)                ltq_r32(ltq_pmu_membase + (x))
+-
+-static struct resource ltq_pmu_resource = {
+-      .name   = "pmu",
+-      .start  = LTQ_PMU_BASE_ADDR,
+-      .end    = LTQ_PMU_BASE_ADDR + LTQ_PMU_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
+-
+-static void __iomem *ltq_pmu_membase;
+-
+-void ltq_pmu_enable(unsigned int module)
+-{
+-      int err = 1000000;
+-
+-      ltq_pmu_w32(ltq_pmu_r32(LTQ_PMU_PWDCR) & ~module, LTQ_PMU_PWDCR);
+-      do {} while (--err && (ltq_pmu_r32(LTQ_PMU_PWDSR) & module));
+-
+-      if (!err)
+-              panic("activating PMU module failed!\n");
+-}
+-EXPORT_SYMBOL(ltq_pmu_enable);
+-
+-void ltq_pmu_disable(unsigned int module)
+-{
+-      ltq_pmu_w32(ltq_pmu_r32(LTQ_PMU_PWDCR) | module, LTQ_PMU_PWDCR);
+-}
+-EXPORT_SYMBOL(ltq_pmu_disable);
+-
+-int __init ltq_pmu_init(void)
+-{
+-      if (insert_resource(&iomem_resource, &ltq_pmu_resource) < 0)
+-              panic("Failed to insert pmu memory\n");
+-
+-      if (request_mem_region(ltq_pmu_resource.start,
+-                      resource_size(&ltq_pmu_resource), "pmu") < 0)
+-              panic("Failed to request pmu memory\n");
+-
+-      ltq_pmu_membase = ioremap_nocache(ltq_pmu_resource.start,
+-                              resource_size(&ltq_pmu_resource));
+-      if (!ltq_pmu_membase)
+-              panic("Failed to remap pmu memory\n");
+-      return 0;
+-}
+-
+-core_initcall(ltq_pmu_init);
+diff --git a/arch/mips/lantiq/xway/prom-ase.c b/arch/mips/lantiq/xway/prom-ase.c
+index ae4959a..3f86a3b 100644
+--- a/arch/mips/lantiq/xway/prom-ase.c
++++ b/arch/mips/lantiq/xway/prom-ase.c
+@@ -13,6 +13,7 @@
+ #include <lantiq_soc.h>
++#include "devices.h"
+ #include "../prom.h"
+ #define SOC_AMAZON_SE "Amazon_SE"
+@@ -26,6 +27,7 @@ void __init ltq_soc_detect(struct ltq_soc_info *i)
+ {
+       i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT;
+       i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT;
++      sprintf(i->rev_type, "1.%d", i->rev);
+       switch (i->partnum) {
+       case SOC_ID_AMAZON_SE:
+               i->name = SOC_AMAZON_SE;
+@@ -37,3 +39,10 @@ void __init ltq_soc_detect(struct ltq_soc_info *i)
+               break;
+       }
+ }
++
++void __init ltq_soc_setup(void)
++{
++      ltq_register_ase_asc();
++      ltq_register_gpio();
++      ltq_register_wdt();
++}
+diff --git a/arch/mips/lantiq/xway/prom-xway.c b/arch/mips/lantiq/xway/prom-xway.c
+index 2228133..d823a92 100644
+--- a/arch/mips/lantiq/xway/prom-xway.c
++++ b/arch/mips/lantiq/xway/prom-xway.c
+@@ -13,6 +13,7 @@
+ #include <lantiq_soc.h>
++#include "devices.h"
+ #include "../prom.h"
+ #define SOC_DANUBE    "Danube"
+@@ -28,6 +29,7 @@ void __init ltq_soc_detect(struct ltq_soc_info *i)
+ {
+       i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT;
+       i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT;
++      sprintf(i->rev_type, "1.%d", i->rev);
+       switch (i->partnum) {
+       case SOC_ID_DANUBE1:
+       case SOC_ID_DANUBE2:
+@@ -52,3 +54,11 @@ void __init ltq_soc_detect(struct ltq_soc_info *i)
+               break;
+       }
+ }
++
++void __init ltq_soc_setup(void)
++{
++      ltq_register_asc(0);
++      ltq_register_asc(1);
++      ltq_register_gpio();
++      ltq_register_wdt();
++}
+diff --git a/arch/mips/lantiq/xway/reset.c b/arch/mips/lantiq/xway/reset.c
+index 3d41f0b..ca2212a 100644
+--- a/arch/mips/lantiq/xway/reset.c
++++ b/arch/mips/lantiq/xway/reset.c
+@@ -15,6 +15,8 @@
+ #include <lantiq_soc.h>
++#include "../devices.h"
++
+ #define ltq_rcu_w32(x, y)     ltq_w32((x), ltq_rcu_membase + (y))
+ #define ltq_rcu_r32(x)                ltq_r32(ltq_rcu_membase + (x))
+@@ -25,12 +27,8 @@
+ #define LTQ_RCU_RST_STAT      0x0014
+ #define LTQ_RCU_STAT_SHIFT    26
+-static struct resource ltq_rcu_resource = {
+-      .name   = "rcu",
+-      .start  = LTQ_RCU_BASE_ADDR,
+-      .end    = LTQ_RCU_BASE_ADDR + LTQ_RCU_SIZE - 1,
+-      .flags  = IORESOURCE_MEM,
+-};
++static struct resource ltq_rcu_resource =
++      MEM_RES("rcu", LTQ_RCU_BASE_ADDR, LTQ_RCU_SIZE);
+ /* remapped base addr of the reset control unit */
+ static void __iomem *ltq_rcu_membase;
+@@ -67,17 +65,8 @@ static void ltq_machine_power_off(void)
+ static int __init mips_reboot_setup(void)
+ {
+-      /* insert and request the memory region */
+-      if (insert_resource(&iomem_resource, &ltq_rcu_resource) < 0)
+-              panic("Failed to insert rcu memory\n");
+-
+-      if (request_mem_region(ltq_rcu_resource.start,
+-                      resource_size(&ltq_rcu_resource), "rcu") < 0)
+-              panic("Failed to request rcu memory\n");
+-
+       /* remap rcu register range */
+-      ltq_rcu_membase = ioremap_nocache(ltq_rcu_resource.start,
+-                              resource_size(&ltq_rcu_resource));
++      ltq_rcu_membase = ltq_remap_resource(&ltq_rcu_resource);
+       if (!ltq_rcu_membase)
+               panic("Failed to remap rcu memory\n");
+diff --git a/arch/mips/lantiq/xway/setup-ase.c b/arch/mips/lantiq/xway/setup-ase.c
+deleted file mode 100644
+index f6f3267..0000000
+--- a/arch/mips/lantiq/xway/setup-ase.c
++++ /dev/null
+@@ -1,19 +0,0 @@
+-/*
+- *  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.
+- *
+- *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+- */
+-
+-#include <lantiq_soc.h>
+-
+-#include "../prom.h"
+-#include "devices.h"
+-
+-void __init ltq_soc_setup(void)
+-{
+-      ltq_register_ase_asc();
+-      ltq_register_gpio();
+-      ltq_register_wdt();
+-}
+diff --git a/arch/mips/lantiq/xway/setup-xway.c b/arch/mips/lantiq/xway/setup-xway.c
+deleted file mode 100644
+index c292f64..0000000
+--- a/arch/mips/lantiq/xway/setup-xway.c
++++ /dev/null
+@@ -1,20 +0,0 @@
+-/*
+- *  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.
+- *
+- *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+- */
+-
+-#include <lantiq_soc.h>
+-
+-#include "../prom.h"
+-#include "devices.h"
+-
+-void __init ltq_soc_setup(void)
+-{
+-      ltq_register_asc(0);
+-      ltq_register_asc(1);
+-      ltq_register_gpio();
+-      ltq_register_wdt();
+-}
+diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c
+new file mode 100644
+index 0000000..8fd13a1
+--- /dev/null
++++ b/arch/mips/lantiq/xway/sysctrl.c
+@@ -0,0 +1,78 @@
++/*
++ *  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.
++ *
++ *  Copyright (C) 2011 John Crispin <blogic@openwrt.org>
++ */
++
++#include <linux/ioport.h>
++#include <linux/export.h>
++
++#include <lantiq_soc.h>
++
++#include "../devices.h"
++
++/* clock control register */
++#define LTQ_CGU_IFCCR 0x0018
++
++/* the enable / disable registers */
++#define LTQ_PMU_PWDCR 0x1C
++#define LTQ_PMU_PWDSR 0x20
++
++#define ltq_pmu_w32(x, y)     ltq_w32((x), ltq_pmu_membase + (y))
++#define ltq_pmu_r32(x)                ltq_r32(ltq_pmu_membase + (x))
++
++static struct resource ltq_cgu_resource =
++      MEM_RES("cgu", LTQ_CGU_BASE_ADDR, LTQ_CGU_SIZE);
++
++static struct resource ltq_pmu_resource =
++      MEM_RES("pmu", LTQ_PMU_BASE_ADDR, LTQ_PMU_SIZE);
++
++static struct resource ltq_ebu_resource =
++      MEM_RES("ebu", LTQ_EBU_BASE_ADDR, LTQ_EBU_SIZE);
++
++void __iomem *ltq_cgu_membase;
++void __iomem *ltq_ebu_membase;
++static void __iomem *ltq_pmu_membase;
++
++void ltq_cgu_enable(unsigned int clk)
++{
++      ltq_cgu_w32(ltq_cgu_r32(LTQ_CGU_IFCCR) | clk, LTQ_CGU_IFCCR);
++}
++
++void ltq_pmu_enable(unsigned int module)
++{
++      int err = 1000000;
++
++      ltq_pmu_w32(ltq_pmu_r32(LTQ_PMU_PWDCR) & ~module, LTQ_PMU_PWDCR);
++      do {} while (--err && (ltq_pmu_r32(LTQ_PMU_PWDSR) & module));
++
++      if (!err)
++              panic("activating PMU module failed!\n");
++}
++EXPORT_SYMBOL(ltq_pmu_enable);
++
++void ltq_pmu_disable(unsigned int module)
++{
++      ltq_pmu_w32(ltq_pmu_r32(LTQ_PMU_PWDCR) | module, LTQ_PMU_PWDCR);
++}
++EXPORT_SYMBOL(ltq_pmu_disable);
++
++void __init ltq_soc_init(void)
++{
++      ltq_pmu_membase = ltq_remap_resource(&ltq_pmu_resource);
++      if (!ltq_pmu_membase)
++              panic("Failed to remap pmu memory\n");
++
++      ltq_cgu_membase = ltq_remap_resource(&ltq_cgu_resource);
++      if (!ltq_cgu_membase)
++              panic("Failed to remap cgu memory\n");
++
++      ltq_ebu_membase = ltq_remap_resource(&ltq_ebu_resource);
++      if (!ltq_ebu_membase)
++              panic("Failed to remap ebu memory\n");
++
++      /* make sure to unprotect the memory region where flash is located */
++      ltq_ebu_w32(ltq_ebu_r32(LTQ_EBU_BUSCON0) & ~EBU_WRDIS, LTQ_EBU_BUSCON0);
++}
+diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c
+index 102aed0..179bf98 100644
+--- a/drivers/watchdog/lantiq_wdt.c
++++ b/drivers/watchdog/lantiq_wdt.c
+@@ -16,7 +16,7 @@
+ #include <linux/clk.h>
+ #include <linux/io.h>
+-#include <lantiq.h>
++#include <lantiq_soc.h>
+ /* Section 3.4 of the datasheet
+  * The password sequence protects the WDT control register from unintended
+-- 
+1.7.7.1
+
diff --git a/target/linux/lantiq/patches-3.2/0006-MIPS-lantiq-change-ltq_request_gpio-call-signature.patch b/target/linux/lantiq/patches-3.2/0006-MIPS-lantiq-change-ltq_request_gpio-call-signature.patch
new file mode 100644 (file)
index 0000000..4700bc9
--- /dev/null
@@ -0,0 +1,149 @@
+From 35f0a707698fc8f20e4164a704d7ac6af3342fb8 Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Fri, 11 Nov 2011 12:45:24 +0100
+Subject: [PATCH 06/70] MIPS: lantiq: change ltq_request_gpio() call signature
+
+ltq_request_gpio() was using alt0/1 to multiplex the function of GPIO pins.
+This was XWAY specific. In order to also accomodate SoCs that require more bits
+we use a 32bit mask instead. This way the call signature is consistent between
+XWAY and FALC-ON.
+
+Signed-off-by: John Crispin <blogic@openwrt.org>
+Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
+---
+ .../mips/include/asm/mach-lantiq/xway/lantiq_soc.h |    4 +-
+ arch/mips/lantiq/xway/gpio.c                       |    8 ++--
+ arch/mips/lantiq/xway/gpio_stp.c                   |    6 ++--
+ arch/mips/pci/pci-lantiq.c                         |   36 +++++++++----------
+ 4 files changed, 26 insertions(+), 28 deletions(-)
+
+diff --git a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+index 9b7ee366..87f6d24 100644
+--- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
++++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+@@ -135,8 +135,8 @@ extern __iomem void *ltq_ebu_membase;
+ extern __iomem void *ltq_cgu_membase;
+ /* request a non-gpio and set the PIO config */
+-extern int  ltq_gpio_request(unsigned int pin, unsigned int alt0,
+-      unsigned int alt1, unsigned int dir, const char *name);
++extern int  ltq_gpio_request(unsigned int pin, unsigned int mux,
++                              unsigned int dir, const char *name);
+ extern void ltq_pmu_enable(unsigned int module);
+ extern void ltq_pmu_disable(unsigned int module);
+ extern void ltq_cgu_enable(unsigned int clk);
+diff --git a/arch/mips/lantiq/xway/gpio.c b/arch/mips/lantiq/xway/gpio.c
+index d2fa98f..f204f6c 100644
+--- a/arch/mips/lantiq/xway/gpio.c
++++ b/arch/mips/lantiq/xway/gpio.c
+@@ -48,8 +48,8 @@ int irq_to_gpio(unsigned int gpio)
+ }
+ EXPORT_SYMBOL(irq_to_gpio);
+-int ltq_gpio_request(unsigned int pin, unsigned int alt0,
+-      unsigned int alt1, unsigned int dir, const char *name)
++int ltq_gpio_request(unsigned int pin, unsigned int mux,
++                      unsigned int dir, const char *name)
+ {
+       int id = 0;
+@@ -67,13 +67,13 @@ int ltq_gpio_request(unsigned int pin, unsigned int alt0,
+               pin -= PINS_PER_PORT;
+               id++;
+       }
+-      if (alt0)
++      if (mux & 0x2)
+               ltq_gpio_setbit(ltq_gpio_port[id].membase,
+                       LTQ_GPIO_ALTSEL0, pin);
+       else
+               ltq_gpio_clearbit(ltq_gpio_port[id].membase,
+                       LTQ_GPIO_ALTSEL0, pin);
+-      if (alt1)
++      if (mux & 0x1)
+               ltq_gpio_setbit(ltq_gpio_port[id].membase,
+                       LTQ_GPIO_ALTSEL1, pin);
+       else
+diff --git a/arch/mips/lantiq/xway/gpio_stp.c b/arch/mips/lantiq/xway/gpio_stp.c
+index ff9991c..2c78660 100644
+--- a/arch/mips/lantiq/xway/gpio_stp.c
++++ b/arch/mips/lantiq/xway/gpio_stp.c
+@@ -79,9 +79,9 @@ static struct gpio_chip ltq_stp_chip = {
+ static int ltq_stp_hw_init(void)
+ {
+       /* the 3 pins used to control the external stp */
+-      ltq_gpio_request(4, 1, 0, 1, "stp-st");
+-      ltq_gpio_request(5, 1, 0, 1, "stp-d");
+-      ltq_gpio_request(6, 1, 0, 1, "stp-sh");
++      ltq_gpio_request(4, 2, 1, "stp-st");
++      ltq_gpio_request(5, 2, 1, "stp-d");
++      ltq_gpio_request(6, 2, 1, "stp-sh");
+       /* sane defaults */
+       ltq_stp_w32(0, LTQ_STP_AR);
+diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
+index be1e1af..c001c5a 100644
+--- a/arch/mips/pci/pci-lantiq.c
++++ b/arch/mips/pci/pci-lantiq.c
+@@ -70,28 +70,27 @@
+ struct ltq_pci_gpio_map {
+       int pin;
+-      int alt0;
+-      int alt1;
++      int mux;
+       int dir;
+       char *name;
+ };
+ /* the pci core can make use of the following gpios */
+ static struct ltq_pci_gpio_map ltq_pci_gpio_map[] = {
+-      { 0, 1, 0, 0, "pci-exin0" },
+-      { 1, 1, 0, 0, "pci-exin1" },
+-      { 2, 1, 0, 0, "pci-exin2" },
+-      { 39, 1, 0, 0, "pci-exin3" },
+-      { 10, 1, 0, 0, "pci-exin4" },
+-      { 9, 1, 0, 0, "pci-exin5" },
+-      { 30, 1, 0, 1, "pci-gnt1" },
+-      { 23, 1, 0, 1, "pci-gnt2" },
+-      { 19, 1, 0, 1, "pci-gnt3" },
+-      { 38, 1, 0, 1, "pci-gnt4" },
+-      { 29, 1, 0, 0, "pci-req1" },
+-      { 31, 1, 0, 0, "pci-req2" },
+-      { 3, 1, 0, 0, "pci-req3" },
+-      { 37, 1, 0, 0, "pci-req4" },
++      { 0, 2, 0, "pci-exin0" },
++      { 1, 2, 0, "pci-exin1" },
++      { 2, 2, 0, "pci-exin2" },
++      { 39, 2, 0, "pci-exin3" },
++      { 10, 2, 0, "pci-exin4" },
++      { 9, 2, 0, "pci-exin5" },
++      { 30, 2, 1, "pci-gnt1" },
++      { 23, 2, 1, "pci-gnt2" },
++      { 19, 2, 1, "pci-gnt3" },
++      { 38, 2, 1, "pci-gnt4" },
++      { 29, 2, 0, "pci-req1" },
++      { 31, 2, 0, "pci-req2" },
++      { 3, 2, 0, "pci-req3" },
++      { 37, 2, 0, "pci-req4" },
+ };
+ __iomem void *ltq_pci_mapped_cfg;
+@@ -157,13 +156,12 @@ static void ltq_pci_setup_gpio(int gpio)
+       for (i = 0; i < ARRAY_SIZE(ltq_pci_gpio_map); i++) {
+               if (gpio & (1 << i)) {
+                       ltq_gpio_request(ltq_pci_gpio_map[i].pin,
+-                              ltq_pci_gpio_map[i].alt0,
+-                              ltq_pci_gpio_map[i].alt1,
++                              ltq_pci_gpio_map[i].mux,
+                               ltq_pci_gpio_map[i].dir,
+                               ltq_pci_gpio_map[i].name);
+               }
+       }
+-      ltq_gpio_request(21, 0, 0, 1, "pci-reset");
++      ltq_gpio_request(21, 0, 1, "pci-reset");
+       ltq_pci_req_mask = (gpio >> PCI_REQ_SHIFT) & PCI_REQ_MASK;
+ }
+-- 
+1.7.7.1
+
diff --git a/target/linux/lantiq/patches-3.2/0007-MIPS-lantiq-make-irq.c-support-the-FALC-ON.patch b/target/linux/lantiq/patches-3.2/0007-MIPS-lantiq-make-irq.c-support-the-FALC-ON.patch
new file mode 100644 (file)
index 0000000..fd45e61
--- /dev/null
@@ -0,0 +1,73 @@
+From 03f55cae0f5d9a4c30f935abf8d621ced64ae425 Mon Sep 17 00:00:00 2001
+From: John Crispin <blogic@openwrt.org>
+Date: Thu, 11 Aug 2011 12:25:55 +0200
+Subject: [PATCH 07/70] MIPS: lantiq: make irq.c support the FALC-ON
+
+There are minor differences in how irqs work on xway and falcon socs.
+Xway needs 2 quirks that we need to disable for falcon to also work with
+this code.
+
+* EBU irq does not need to send a special ack to the EBU
+* The EIU does not exist
+
+Signed-off-by: Thomas Langer <thomas.langer@lantiq.com>
+Signed-off-by: John Crispin <blogic@openwrt.org>
+---
+ arch/mips/lantiq/irq.c |   24 +++++++++++++-----------
+ 1 files changed, 13 insertions(+), 11 deletions(-)
+
+diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
+index f9737bb..17c057f 100644
+--- a/arch/mips/lantiq/irq.c
++++ b/arch/mips/lantiq/irq.c
+@@ -195,7 +195,7 @@ static void ltq_hw_irqdispatch(int module)
+       do_IRQ((int)irq + INT_NUM_IM0_IRL0 + (INT_NUM_IM_OFFSET * module));
+       /* if this is a EBU irq, we need to ack it or get a deadlock */
+-      if ((irq == LTQ_ICU_EBU_IRQ) && (module