summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2011-02-01 14:37:35 +0000
committerJohn Crispin <john@openwrt.org>2011-02-01 14:37:35 +0000
commit1e89df511a1506c0d476466f7cb60950522e51e3 (patch)
tree9030ad26ad3d83cda1743b31ce16add02d240f47
parente919bd002a7f08d1c893dc3272f1f6332442fc35 (diff)
downloadmtk-20170518-1e89df511a1506c0d476466f7cb60950522e51e3.zip
mtk-20170518-1e89df511a1506c0d476466f7cb60950522e51e3.tar.gz
mtk-20170518-1e89df511a1506c0d476466f7cb60950522e51e3.tar.bz2
* adds profiles to the kernel * fixes 2 compile errors in the usb driver * ioports were not allocated properly
SVN-Revision: 25278
-rwxr-xr-xtarget/linux/lantiq/extract.py9
-rwxr-xr-xtarget/linux/lantiq/extract.sh44
-rw-r--r--target/linux/lantiq/image/Makefile46
-rw-r--r--target/linux/lantiq/patches/110-machine.patch20
-rw-r--r--target/linux/lantiq/patches/270-crypto.patch2
-rw-r--r--target/linux/lantiq/patches/400-mach-arv45xx.patch141
-rw-r--r--target/linux/lantiq/patches/700-dwc_otg.patch11
-rw-r--r--target/linux/lantiq/xway/config-default4
-rw-r--r--target/linux/lantiq/xway/profiles/000-generic.mk6
-rw-r--r--target/linux/lantiq/xway/profiles/001-lantiq.mk22
-rw-r--r--target/linux/lantiq/xway/profiles/002-arcadyan.mk13
-rw-r--r--target/linux/lantiq/xway/target.mk5
12 files changed, 276 insertions, 47 deletions
diff --git a/target/linux/lantiq/extract.py b/target/linux/lantiq/extract.py
new file mode 100755
index 0000000..91b4a57
--- /dev/null
+++ b/target/linux/lantiq/extract.py
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+from sys import stdin, stdout
+while True:
+ c = stdin.read(2)
+ if len(c) < 2:
+ break
+ n1, n2 = ord(c[0]), ord(c[1])
+ stdout.write(chr(((n2 & 15) << 4) + ((n2 & 240) >> 4)))
+ stdout.write(chr(((n1 & 15) << 4) + ((n1 & 240) >> 4)))
diff --git a/target/linux/lantiq/extract.sh b/target/linux/lantiq/extract.sh
new file mode 100755
index 0000000..98e413e
--- /dev/null
+++ b/target/linux/lantiq/extract.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+DIR="$1/"
+FILE="$1/$2"
+
+echo "This tool downloads the arcor a800 firmware release and extracts the voip firmware for the danube."
+echo "Please only do so if it is legal in your country"
+
+[ ! -f ${FILE} ] && {
+ echo ${FILE} is missing
+ exit 1
+}
+
+[ -f ${DIR}/ifxmips_fw_decodev2.tar.bz2 -a ! -f ${DIR}voip_coef.bin ] && {
+ [ ! -f ${DIR}decode_ifx_fw && -f ${DIR}ifxmips_fw_decodev2.tar.bz2 ] && {
+ tar xjf ${DIR}ifxmips_fw_decodev2.tar.bz2 ifxmips_fw_decode/decode.c -O > ${DIR}decode.c
+ gcc -o ${DIR}decode_ifx_fw ${DIR}decode.c
+ }
+ [ ! -f ${DIR}decode_ifx_fw ] && {
+ [ ! -f ${DIR}voip_coef.lzma ] && {
+ ${DIR}decode_ifx_fw $FILE ${DIR}voip_coef.lzma
+ }
+ lzma d ${DIR}voip_coef.lzma ${DIR}voip_coef.bin
+ }
+}
+[ ! -f ${DIR}dsl_a.bin ] && {
+ dd if=${FILE} of=${DIR}dsl1.lzma bs=1 skip=2168832 count=150724
+ lzma d ${DIR}dsl2.lzma ${DIR}dsl_a.bin
+}
+
+[ ! -f ${DIR}dsl_b.bin ] && {
+ dd if=${FILE} of=${DIR}dsl2.lzma bs=1 skip=2320384 count=148343
+ lzma d ${DIR}dsl1.lzma ${DIR}dsl_b.bin
+}
+
+[ ! -f ${DIR}voip.bin ] && {
+ dd if=${FILE} of=${DIR}voip.lzma bs=1 skip=2468864 count=452105
+ lzma d ${DIR}voip.lzma ${DIR}voip.bin
+}
+exit 0
+
+# get lzma offsets
+# hexdump -C arcor_A800_452CPW_FW_1.02.206\(20081201\).bin | grep "5d 00 00 80"
+# hexdump -C arcor_A800_452CPW_FW_1.02.206\(20081201\).bin | grep "00 d5 08 00"
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index 2d6acc8..b580c99 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -55,31 +55,59 @@ define Image/BuildKernel/Template
endef
ifeq ($(CONFIG_SOC_LANTIQ_XWAY),y)
-define Image/BuildKernel
+define Image/BuildKernel/Profile/EASY50712
+ $(call Image/BuildKernel/Template,EASY50712,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/EASY50712
+ $(call Image/Build/$(1),$(1),EASY50712)
+endef
+
+define Image/BuildKernel/Profile/EASY50812
+ $(call Image/BuildKernel/Template,EASY50812,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/EASY50812
+ $(call Image/Build/$(1),$(1),EASY50812)
+endef
+
+define Image/BuildKernel/Profile/ARV752DPW22
+ $(call Image/BuildKernel/Template,ARV752DPW22,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/ARV752DPW22
+ $(call Image/Build/$(1),$(1),ARV752DPW22)
+endef
+
+define Image/BuildKernel/Profile/Generic
$(call Image/BuildKernel/Template,EASY4010,$(xway_cmdline))
$(call Image/BuildKernel/Template,EASY50712,$(xway_cmdline))
$(call Image/BuildKernel/Template,EASY50812,$(xway_cmdline))
$(call Image/BuildKernel/Template,ARV4510PW,$(xway_cmdline))
$(call Image/BuildKernel/Template,ARV4518PW,$(xway_cmdline))
$(call Image/BuildKernel/Template,ARV4520PW,$(xway_cmdline))
+ $(call Image/BuildKernel/Template,ARV452CPW,$(xway_cmdline))
$(call Image/BuildKernel/Template,ARV4525PW,$(xway_cmdline))
- $(call Image/BuildKernel/Template,ARV752DPW,$(xway_cmdline))
$(call Image/BuildKernel/Template,ARV7518PW,$(xway_cmdline))
+ $(call Image/BuildKernel/Template,ARV752DPW,$(xway_cmdline))
+ $(call Image/BuildKernel/Template,ARV752DPW22,$(xway_cmdline))
$(call Image/BuildKernel/Template,NONE)
endef
-define Image/Build
+define Image/Build/Profile/Generic
$(call Image/Build/$(1),$(1),EASY4010)
$(call Image/Build/$(1),$(1),EASY50712)
$(call Image/Build/$(1),$(1),EASY50812)
$(call Image/Build/$(1),$(1),ARV4510PW)
$(call Image/Build/$(1),$(1),ARV4518PW)
$(call Image/Build/$(1),$(1),ARV4520PW)
+ $(call Image/Build/$(1),$(1),ARV452CPW)
$(call Image/Build/$(1),$(1),ARV4525PW)
- $(call Image/Build/$(1),$(1),ARV752DPW)
$(call Image/Build/$(1),$(1),ARV7518PW)
+ $(call Image/Build/$(1),$(1),ARV752DPW)
+ $(call Image/Build/$(1),$(1),ARV752DPW22)
$(call Image/Build/$(1),$(1),NONE)
- $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
+ $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
endef
endif
@@ -96,4 +124,12 @@ define Image/Build
endef
endif
+define Image/BuildKernel
+ $(call Image/BuildKernel/Profile/$(PROFILE))
+endef
+
+define Image/Build
+ $(call Image/Build/Profile/$(PROFILE),$(1))
+endef
+
$(eval $(call BuildImage))
diff --git a/target/linux/lantiq/patches/110-machine.patch b/target/linux/lantiq/patches/110-machine.patch
index cf4652e..4066ac5 100644
--- a/target/linux/lantiq/patches/110-machine.patch
+++ b/target/linux/lantiq/patches/110-machine.patch
@@ -1,16 +1,18 @@
--- a/arch/mips/lantiq/setup.c
+++ b/arch/mips/lantiq/setup.c
-@@ -12,7 +12,8 @@
+@@ -12,7 +12,10 @@
#include <linux/ioport.h>
#include <lantiq.h>
-#include <lantiq_regs.h>
+
+#include <machine.h>
++
++static unsigned int *cp1_base;
void __init
plat_mem_setup(void)
-@@ -31,6 +32,7 @@
+@@ -31,6 +34,7 @@
ioport_resource.end = IOPORT_RESOURCE_END;
iomem_resource.start = IOMEM_RESOURCE_START;
iomem_resource.end = IOMEM_RESOURCE_END;
@@ -18,11 +20,23 @@
while (*envp)
{
-@@ -45,3 +47,25 @@
+@@ -42,6 +46,37 @@
+ }
+ envp++;
+ }
++// memsize -= 2;
memsize *= 1024 * 1024;
++// cp1_base = (unsigned int*)(KSEG1 | memsize);
add_memory_region(0x00000000, memsize, BOOT_MEM_RAM);
}
+
++unsigned int*
++lq_get_cp1_base(void)
++{
++ return cp1_base;
++}
++EXPORT_SYMBOL(lq_get_cp1_base);
++
+static int __init
+lq_machine_setup(void)
+{
diff --git a/target/linux/lantiq/patches/270-crypto.patch b/target/linux/lantiq/patches/270-crypto.patch
index 6851580..38061a9 100644
--- a/target/linux/lantiq/patches/270-crypto.patch
+++ b/target/linux/lantiq/patches/270-crypto.patch
@@ -5,7 +5,7 @@
want to use the OMAP module for SHA1/MD5 algorithms.
+config CRYPTO_DEV_LANTIQ
-+ bool "Support for Lantiq crypto engine"
++ tristate "Support for Lantiq crypto engine"
+ select CRYPTO_ALGAPI
+ default y
+ help
diff --git a/target/linux/lantiq/patches/400-mach-arv45xx.patch b/target/linux/lantiq/patches/400-mach-arv45xx.patch
index 98ff680..419c9ae 100644
--- a/target/linux/lantiq/patches/400-mach-arv45xx.patch
+++ b/target/linux/lantiq/patches/400-mach-arv45xx.patch
@@ -1,6 +1,6 @@
--- a/arch/mips/include/asm/mach-lantiq/machine.h
+++ b/arch/mips/include/asm/mach-lantiq/machine.h
-@@ -11,4 +11,13 @@
+@@ -11,4 +11,14 @@
LANTIQ_MACH_EASY4010, /* Twinpass evalkit */
LANTIQ_MACH_EASY50712, /* Danube evalkit */
LANTIQ_MACH_EASY50812, /* AR9 eval board */
@@ -11,7 +11,8 @@
+ LANTIQ_MACH_ARV4520PW, /* Airties WAV-281, Arcor EasyboxA800 */
+ LANTIQ_MACH_ARV452CPW, /* Arcor EasyboxA801 */
+ LANTIQ_MACH_ARV4525PW, /* Speedport W502V */
-+ LANTIQ_MACH_ARV752DPW, /* Arcor easybox a803 */
++ LANTIQ_MACH_ARV752DPW, /* Arcor easybox a802 */
++ LANTIQ_MACH_ARV752DPW22, /* Arcor easybox a803 */
+ LANTIQ_MACH_ARV7518PW, /* ASTORIA */
};
--- a/arch/mips/lantiq/xway/Kconfig
@@ -36,7 +37,7 @@
+obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
--- /dev/null
+++ b/arch/mips/lantiq/xway/mach-arv45xx.c
-@@ -0,0 +1,389 @@
+@@ -0,0 +1,465 @@
+/*
+ * 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
@@ -64,9 +65,6 @@
+#include "devices.h"
+#include "dev-dwc_otg.h"
+
-+#define ARV4520PW_LATCH_SWITCH (1 << 10)
-+#define ARV752DPW_LATCH_DEFAULT (2)
-+
+#ifdef CONFIG_MTD_PARTITIONS
+static struct mtd_partition arv45xx_partitions[] =
+{
@@ -209,7 +207,7 @@
+ { .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:yello:wps", .gpio = 7, .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 = 32, .active_low = 1, },
+ { .name = "soc:blue:fxs1", .gpio = 33, .active_low = 1, },
@@ -221,6 +219,25 @@
+};
+
+static struct gpio_led
++arv452cpw_leds_gpio[] __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 = 32, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:blue:fxs2", .gpio = 33, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:blue:wps", .gpio = 34, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:blue:fxo", .gpio = 35, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:blue:voice", .gpio = 36, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:blue:usb", .gpio = 37, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:blue:wlan", .gpio = 38, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:blue:internet", .gpio = 40, .active_low = 1, .default_trigger = "default-on" },
++ { .name = "soc:red:internet", .gpio = 41, .active_low = 1, .default_trigger = "default-on" },
++};
++
++static struct gpio_led
+arv4525pw_leds_gpio[] __initdata = {
+ { .name = "soc:green:festnetz", .gpio = 4, .active_low = 1, .default_trigger = "default-on" },
+ { .name = "soc:green:internet", .gpio = 5, .active_low = 1, .default_trigger = "default-on" },
@@ -230,7 +247,7 @@
+};
+
+static struct gpio_led
-+arv752dpw_leds_gpio[] __initdata = {
++arv752dpw22_leds_gpio[] __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" },
@@ -249,7 +266,7 @@
+};
+
+static struct gpio_button
-+arv752dpw_gpio_buttons[] __initdata = {
++arv752dpw22_gpio_buttons[] __initdata = {
+ { .desc = "btn0", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 12, .active_low = 1, },
+ { .desc = "btn1", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 13, .active_low = 1, },
+ { .desc = "btn2", .type = EV_KEY, .code = BTN_2, .threshold = 3, .gpio = 28, .active_low = 1, },
@@ -261,10 +278,16 @@
+ { .name = "soc:green:adsl", .gpio = 4, .active_low = 1, },
+ { .name = "soc:green:internet", .gpio = 5, .active_low = 1, },
+ { .name = "soc:green:wlan", .gpio = 6, .active_low = 1, },
-+ { .name = "sco:red:internet", .gpio = 8, .active_low = 1, },
++ { .name = "soc:red:internet", .gpio = 8, .active_low = 1, },
+ { .name = "soc:green:usb", .gpio = 19, .active_low = 1, },
+};
+
++static struct gpio_button
++arv7518pw_gpio_buttons[] __initdata = {
++ { .desc = "reset", .type = EV_KEY, .code = BTN_0, .threshold = 3, .gpio = 23, .active_low = 1, },
++ { .desc = "wlan", .type = EV_KEY, .code = BTN_1, .threshold = 3, .gpio = 25, .active_low = 1, },
++};
++
+static void
+arv45xx_register_ethernet(void)
+{
@@ -317,8 +340,12 @@
+static void __init
+arv4518pw_init(void)
+{
++#define ARV4518PW_EBU 0
++#define ARV4518PW_USB 14
++#define ARV4518PW_SWITCH_RESET 13
++
+ lq_register_gpio();
-+ lq_register_gpio_ebu(0);
++ lq_register_gpio_ebu(ARV4518PW_EBU);
+ lq_register_gpio_leds(arv4518pw_leds_gpio, ARRAY_SIZE(arv4518pw_leds_gpio));
+ lq_register_gpio_buttons(arv4518pw_gpio_buttons, ARRAY_SIZE(arv4518pw_gpio_buttons));
+ lq_register_asc(0);
@@ -328,10 +355,11 @@
+ lq_register_pci(&lq_pci_data);
+ lq_register_wdt();
+ arv45xx_register_ethernet();
-+ xway_register_dwc(14);
-+ gpio_request(13, "switch-reset");
-+ gpio_direction_output(13, 1);
-+ gpio_export(13, 0);
++ xway_register_dwc(ARV4518PW_USB);
++
++ gpio_request(ARV4518PW_SWITCH_RESET, "switch");
++ gpio_direction_output(ARV4518PW_SWITCH_RESET, 1);
++ gpio_export(ARV4518PW_SWITCH_RESET, 0);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV4518PW,
@@ -342,8 +370,11 @@
+static void __init
+arv4520pw_init(void)
+{
++#define ARV4520PW_EBU 0x400
++#define ARV4520PW_USB 28
++
+ lq_register_gpio();
-+ lq_register_gpio_ebu(ARV4520PW_LATCH_SWITCH);
++ lq_register_gpio_ebu(ARV4520PW_EBU);
+ lq_register_gpio_leds(arv4520pw_leds_gpio, ARRAY_SIZE(arv4520pw_leds_gpio));
+ lq_register_asc(0);
+ lq_register_asc(1);
@@ -351,7 +382,7 @@
+ lq_register_pci(&lq_pci_data);
+ lq_register_wdt();
+ arv45xx_register_ethernet();
-+ xway_register_dwc(28);
++ xway_register_dwc(ARV4520PW_USB);
+}
+
+MIPS_MACHINE(LANTIQ_MACH_ARV4520PW,
@@ -360,6 +391,44 @@
+ arv4520pw_init);
+
+static void __init
++arv452Cpw_init(void)
++{
++#define ARV452CPW_EBU 0x77f
++#define ARV452CPW_USB 28
++#define ARV452CPW_RELAY1 31
++#define ARV452CPW_RELAY2 39
++#define ARV452CPW_SWITCH_RESET 42
++
++ lq_register_gpio();
++ lq_register_gpio_ebu(ARV452CPW_EBU);
++ lq_register_gpio_leds(arv452cpw_leds_gpio, ARRAY_SIZE(arv452cpw_leds_gpio));
++ lq_register_asc(0);
++ lq_register_asc(1);
++ lq_register_nor(&arv4518_flash_data);
++ lq_register_pci(&lq_pci_data);
++ lq_register_wdt();
++ arv45xx_register_ethernet();
++ xway_register_dwc(ARV452CPW_USB);
++
++ 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)
+{
+ lq_register_gpio();
@@ -382,14 +451,19 @@
+static void __init
+arv7518pw_init(void)
+{
++#define ARV7518PW_EBU 0x2
++#define ARV7518PW_USB -1
++
+ lq_register_gpio();
-+ lq_register_gpio_ebu(ARV4520PW_LATCH_SWITCH);
++ lq_register_gpio_ebu(ARV7518PW_EBU);
+ lq_register_asc(0);
+ lq_register_asc(1);
+ lq_register_gpio_leds(arv7518pw_leds_gpio, ARRAY_SIZE(arv7518pw_leds_gpio));
++ lq_register_gpio_buttons(arv7518pw_gpio_buttons, ARRAY_SIZE(arv7518pw_gpio_buttons));
+ lq_register_nor(&arv75xx_flash_data);
+ lq_register_pci(&lq_pci_data);
+ lq_register_wdt();
++ xway_register_dwc(ARV7518PW_USB);
+ arv75xx_register_ethernet();
+ //arv7518_register_ath9k(mac);
+}
@@ -400,29 +474,32 @@
+ arv7518pw_init);
+
+static void __init
-+arv752dpw_init(void)
++arv752dpw22_init(void)
+{
++#define ARV752DPW22_EBU 0x2
++#define ARV752DPW22_USB 32
++#define ARV752DPW22_RELAY 33
++
+ lq_register_gpio();
-+ lq_register_gpio_ebu(ARV752DPW_LATCH_DEFAULT);
++ lq_register_gpio_ebu(ARV752DPW22_EBU);
+ lq_register_asc(0);
+ lq_register_asc(1);
-+ lq_register_gpio_leds(arv752dpw_leds_gpio, ARRAY_SIZE(arv752dpw_leds_gpio));
-+ lq_register_gpio_buttons(arv752dpw_gpio_buttons, ARRAY_SIZE(arv752dpw_gpio_buttons));
++ lq_register_gpio_leds(arv752dpw22_leds_gpio, ARRAY_SIZE(arv752dpw22_leds_gpio));
++ lq_register_gpio_buttons(arv752dpw22_gpio_buttons, ARRAY_SIZE(arv752dpw22_gpio_buttons));
+ lq_register_nor(&arv75xx_flash_data);
+ lq_pci_data.irq[15] = (INT_NUM_IM2_IRL0 + 31);
+ lq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2;
+ lq_register_pci(&lq_pci_data);
+ lq_register_wdt();
++ xway_register_dwc(ARV752DPW22_USB);
+ arv75xx_register_ethernet();
-+ gpio_request(32, "usb-power");
-+ gpio_direction_output(32, 0);
-+ mdelay(1);
-+ __gpio_set_value(32, 1);
-+ gpio_request(33, "relay");
-+ gpio_direction_output(33, 1);
++
++ gpio_request(ARV752DPW22_RELAY, "relay");
++ gpio_set_value(ARV752DPW22_RELAY, 1);
++ gpio_export(ARV752DPW22_RELAY, 0);
+}
+
-+MIPS_MACHINE(LANTIQ_MACH_ARV752DPW,
-+ "ARV752DPW",
-+ "ARV752DPW - Arcor A803",
-+ arv752dpw_init);
++MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22,
++ "ARV752DPW22",
++ "ARV752DPW22 - Arcor A803",
++ arv752dpw22_init);
diff --git a/target/linux/lantiq/patches/700-dwc_otg.patch b/target/linux/lantiq/patches/700-dwc_otg.patch
index ea2a5f7..819872c 100644
--- a/target/linux/lantiq/patches/700-dwc_otg.patch
+++ b/target/linux/lantiq/patches/700-dwc_otg.patch
@@ -5693,7 +5693,7 @@
+}
--- /dev/null
+++ b/drivers/usb/dwc_otg/dwc_otg_driver.c
-@@ -0,0 +1,1269 @@
+@@ -0,0 +1,1274 @@
+/* ==========================================================================
+ * $File: //dwh/usb_iip/dev/software/otg_ipmate/linux/drivers/dwc_otg_driver.c $
+ * $Revision: 1.1.1.1 $
@@ -6342,8 +6342,13 @@
+ gusbcfg_data_t usbcfg = {.d32 = 0};
+
+ // GPIOs
-+ gpio_request(_dev->dev.platform_data, "USB_POWER");
-+ gpio_direction_output(_dev->dev.platform_data, 1);
++ if(_dev->dev.platform_data >= 0)
++ {
++ gpio_request(_dev->dev.platform_data, "usb_power");
++ gpio_direction_output(_dev->dev.platform_data, 1);
++ gpio_set_value(_dev->dev.platform_data, 1);
++ gpio_export(_dev->dev.platform_data, 0);
++ }
+
+ dev_dbg(&_dev->dev, "dwc_otg_driver_probe (%p)\n", _dev);
+
diff --git a/target/linux/lantiq/xway/config-default b/target/linux/lantiq/xway/config-default
index 30d0e3f..31cc568 100644
--- a/target/linux/lantiq/xway/config-default
+++ b/target/linux/lantiq/xway/config-default
@@ -4,6 +4,10 @@ CONFIG_AR8216_PHY=y
CONFIG_HAVE_IDE=y
CONFIG_HW_HAS_PCI=y
CONFIG_IMAGE_CMDLINE_HACK=y
+CONFIG_INPUT=y
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_GPIO_BUTTONS is not set
+CONFIG_INPUT_POLLDEV=y
# CONFIG_ISDN is not set
CONFIG_LANTIQ_ETOP=y
CONFIG_LANTIQ_MACH_ARV45XX=y
diff --git a/target/linux/lantiq/xway/profiles/000-generic.mk b/target/linux/lantiq/xway/profiles/000-generic.mk
new file mode 100644
index 0000000..787a74f
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/000-generic.mk
@@ -0,0 +1,6 @@
+define Profile/Generic
+ NAME:=Generic - all boards
+ PACKAGES:=kmod-leds-gpio button-hotplug
+endef
+
+$(eval $(call Profile,Generic))
diff --git a/target/linux/lantiq/xway/profiles/001-lantiq.mk b/target/linux/lantiq/xway/profiles/001-lantiq.mk
new file mode 100644
index 0000000..cf1c559
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/001-lantiq.mk
@@ -0,0 +1,22 @@
+define Profile/EASY50712
+ NAME:=EASY50712
+ PACKAGES:= kmod-usb-core kmod-usb-dwc-otg kmod-leds-gpio
+endef
+
+define Profile/EASY50712/Description
+ Lantiq EASY50712 evalkit
+endef
+
+$(eval $(call Profile,EASY50712))
+
+define Profile/EASY50812
+ NAME:=EASY50812
+ PACKAGES:= kmod-usb-core kmod-usb-dwc-otg kmod-leds-gpio
+endef
+
+define Profile/EASY50812/Description
+ Lantiq EASY50812 evalkit
+endef
+
+$(eval $(call Profile,EASY50812))
+
diff --git a/target/linux/lantiq/xway/profiles/002-arcadyan.mk b/target/linux/lantiq/xway/profiles/002-arcadyan.mk
new file mode 100644
index 0000000..5575766
--- /dev/null
+++ b/target/linux/lantiq/xway/profiles/002-arcadyan.mk
@@ -0,0 +1,13 @@
+define Profile/ARV752DPW22
+ NAME:=ARV752DPW22 - Arcor Easybox 803
+ PACKAGES:= kmod-usb-core kmod-usb2 kmod-usb-uhci kmod-usb-dwc-otg \
+ kmod-ledtrig-netdev kmod-ledtrig-usbdev kmod-leds-gpio kmod-button-hotplug \
+ ltq-dsl-firmware-b
+endef
+
+define Profile/ARV752DPW22/Description
+ Package set optimized for the ARV752PW22
+endef
+
+$(eval $(call Profile,ARV752DPW22))
+
diff --git a/target/linux/lantiq/xway/target.mk b/target/linux/lantiq/xway/target.mk
index e2e2a6f..7cc0d25 100644
--- a/target/linux/lantiq/xway/target.mk
+++ b/target/linux/lantiq/xway/target.mk
@@ -3,9 +3,8 @@ SUBTARGET:=xway
BOARDNAME:=Xway
FEATURES:=squashfs jffs2 atm
-DEFAULT_PACKAGES+=uboot-lantiq-easy50712 kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl ifxmips-dsl-api ifxmips-dsl-control ifx-tapidemo
+DEFAULT_PACKAGES+=kmod-pppoa ppp-mod-pppoa linux-atm atm-tools br2684ctl kmod-ltq-dsl ltq-dsl-app
define Target/Description
- Lantiq XWAY (danube/twinpass/ar9)
+ Lantiq XWAY (danube/twinpass/ar9/ase)
endef
-