[lantiq]
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 12 Jun 2011 08:56:26 +0000 (08:56 +0000)
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 12 Jun 2011 08:56:26 +0000 (08:56 +0000)
* move patches around
* add basic support for gigaset sx76x

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27158 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/lantiq/Makefile
target/linux/lantiq/image/Makefile
target/linux/lantiq/patches-2.6.39/600-mach-dgn3500.patch [new file with mode: 0644]
target/linux/lantiq/patches-2.6.39/601-mach-gigasx76x.patch [new file with mode: 0644]
target/linux/lantiq/patches-2.6.39/999-dgn3500.patch [deleted file]
target/linux/lantiq/xway/config-default
target/linux/lantiq/xway/profiles/004-gigaset.mk [new file with mode: 0644]

index 29da8a3..b040e3f 100644 (file)
@@ -10,7 +10,7 @@ ARCH:=mips
 BOARD:=lantiq
 BOARDNAME:=Lantiq GPON/XWAY
 FEATURES:=squashfs jffs2
-SUBTARGETS:=falcon xway ase
+SUBTARGETS:=xway falcon ase
 
 LINUX_VERSION:=2.6.39.1
 
index 0e62ce5..81291cc 100644 (file)
@@ -144,6 +144,14 @@ define Image/Build/Profile/DGN3500B
        $(call Image/Build/$(1),$(1),DGN3500B)
 endef
 
+define Image/BuildKernel/Profile/GIGASX76X
+       $(call Image/BuildKernel/Template,GIGASX76X,$(xway_cmdline))
+endef
+
+define Image/Build/Profile/GIGASX76X
+       $(call Image/Build/$(1),$(1),GIGASX76X)
+endef
+
 define Image/BuildKernel/Profile/Generic
        $(call Image/BuildKernel/Template,EASY4010,$(xway_cmdline))
        $(call Image/BuildKernel/Template,EASY50712,$(xway_cmdline))
@@ -157,6 +165,7 @@ define Image/BuildKernel/Profile/Generic
        $(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,GIGASX76X,$(xway_cmdline))
        $(call Image/BuildKernel/Template,DGN3500B,$(xway_cmdline))
        $(call Image/BuildKernel/Template,NONE)
 endef
@@ -174,6 +183,7 @@ define Image/Build/Profile/Generic
        $(call Image/Build/$(1),$(1),ARV7518PW)
        $(call Image/Build/$(1),$(1),ARV752DPW)
        $(call Image/Build/$(1),$(1),ARV752DPW22)
+       $(call Image/Build/$(1),$(1),GIGASX76X)
        $(call Image/Build/$(1),$(1),DGN3500B)
        $(call Image/Build/$(1),$(1),NONE)
        $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).rootfs
diff --git a/target/linux/lantiq/patches-2.6.39/600-mach-dgn3500.patch b/target/linux/lantiq/patches-2.6.39/600-mach-dgn3500.patch
new file mode 100644 (file)
index 0000000..aa8db10
--- /dev/null
@@ -0,0 +1,111 @@
+--- a/arch/mips/lantiq/machtypes.h
++++ b/arch/mips/lantiq/machtypes.h
+@@ -32,6 +32,9 @@
+       LANTIQ_MACH_ARV752DPW,          /* Arcor easybox a802 */
+       LANTIQ_MACH_ARV752DPW22,        /* Arcor easybox a803 */
+       LANTIQ_MACH_ARV7518PW,          /* ASTORIA */
++
++      /* Netgear */
++      LANTIQ_MACH_DGN3500B,           /* Netgear DGN3500 */
+ };
+ #endif
+--- a/arch/mips/lantiq/xway/Kconfig
++++ b/arch/mips/lantiq/xway/Kconfig
+@@ -10,6 +10,10 @@
+       bool "ARV45XX"
+       default y
++config LANTIQ_MACH_NETGEAR
++      bool "Netgear"
++      default y
++
+ endmenu
+ endif
+--- a/arch/mips/lantiq/xway/Makefile
++++ b/arch/mips/lantiq/xway/Makefile
+@@ -6,4 +6,5 @@
+ obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
+ obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
+ obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
++obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o
+ obj-y += dev-dwc_otg.o
+--- a/arch/mips/lantiq/xway/devices.h
++++ b/arch/mips/lantiq/xway/devices.h
+@@ -12,6 +12,7 @@
+ #include "../devices.h"
+ #include <linux/phy.h>
+ #include <linux/gpio_buttons.h>
++#include <linux/spi/spi.h>
+ extern void ltq_register_gpio(void);
+ extern void ltq_register_gpio_stp(void);
+@@ -20,5 +21,7 @@
+ extern void ltq_register_gpio_ebu(unsigned int value);
+ extern void ltq_register_madwifi_eep(void);
+ extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt);
++extern void ltq_register_spi(struct ltq_spi_platform_data *pdata,
++              struct spi_board_info const *info, unsigned n);
+ #endif
+--- /dev/null
++++ b/arch/mips/lantiq/xway/mach-netgear.c
+@@ -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 <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/patches-2.6.39/601-mach-gigasx76x.patch b/target/linux/lantiq/patches-2.6.39/601-mach-gigasx76x.patch
new file mode 100644 (file)
index 0000000..ef667fb
--- /dev/null
@@ -0,0 +1,149 @@
+--- a/arch/mips/lantiq/xway/Kconfig
++++ b/arch/mips/lantiq/xway/Kconfig
+@@ -14,6 +14,10 @@
+       bool "Netgear"
+       default y
++config LANTIQ_MACH_GIGASX76X
++      bool "GIGASX76X"
++      default y
++
+ endmenu
+ endif
+--- a/arch/mips/lantiq/xway/Makefile
++++ b/arch/mips/lantiq/xway/Makefile
+@@ -7,4 +7,5 @@
+ obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
+ obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
+ obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o
++obj-$(CONFIG_LANTIQ_MACH_GIGASX76X) += mach-gigasx76x.o
+ obj-y += dev-dwc_otg.o
+--- /dev/null
++++ b/arch/mips/lantiq/xway/mach-gigasx76x.c
+@@ -0,0 +1,113 @@
++/*
++ *  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/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/ath5k_platform.h>
++#include <linux/pci.h>
++#include <linux/phy.h>
++
++#include <irq.h>
++
++#include <lantiq_soc.h>
++#include <lantiq_platform.h>
++
++#include "../machtypes.h"
++#include "devices.h"
++#include "dev-dwc_otg.h"
++#include "dev-leds-gpio.h"
++
++#ifdef CONFIG_MTD_PARTITIONS
++static struct mtd_partition gigasx76x_partitions[] =
++{
++      {
++              .name   = "secondary_env",
++              .offset = 0xe000,
++              .size   = 0x2000,
++      },
++      {
++              .name   = "secondary_boot",
++              .offset = 0x10000,
++              .size   = 0x10000,
++      },
++      {
++              .name   = "uboot",
++              .offset = 0x20000,
++              .size   = 0x30000,
++      },
++      {
++              .name   = "linux",
++              .offset = 0x50000,
++              .size   = 0x7a0000,
++      },
++      {
++              .name   = "board_config",
++              .offset = 0x7f0000,
++              .size   = 0x10000,
++      },
++};
++#endif
++
++static struct gpio_led
++gigasx76x_leds_gpio[] __initdata = {
++      { .name = "soc:green:usb", .gpio = 50, },
++      { .name = "soc:green:wlan", .gpio = 51, },
++      { .name = "soc:green:phone2", .gpio = 52, },
++      { .name = "soc:green:phone1", .gpio = 53, },
++      { .name = "soc:green:line", .gpio = 54, },
++      { .name = "soc:green:online", .gpio = 55, },
++};
++
++
++static struct physmap_flash_data gigasx76x_flash_data = {
++#ifdef CONFIG_MTD_PARTITIONS
++      .nr_parts       = ARRAY_SIZE(gigasx76x_partitions),
++      .parts          = gigasx76x_partitions,
++#endif
++};
++
++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_etop(&ltq_eth_data);
++      xway_register_dwc(GIGASX76X_USB);
++      ltq_register_tapi();
++      ltq_register_madwifi_eep();
++      ltq_add_device_leds_gpio(-1, ARRAY_SIZE(gigasx76x_leds_gpio), gigasx76x_leds_gpio);
++}
++
++MIPS_MACHINE(LANTIQ_MACH_GIGASX76X,
++                      "GIGASX76X",
++                      "GIGASX76X - Gigaset SX761,SX762,SX763",
++                      gigasx76x_init);
+--- a/arch/mips/lantiq/machtypes.h
++++ b/arch/mips/lantiq/machtypes.h
+@@ -35,6 +35,9 @@
+       /* Netgear */
+       LANTIQ_MACH_DGN3500B,           /* Netgear DGN3500 */
++
++      /* Gigaset */
++      LANTIQ_MACH_GIGASX76X,          /* Gigaset SX76x */
+ };
+ #endif
diff --git a/target/linux/lantiq/patches-2.6.39/999-dgn3500.patch b/target/linux/lantiq/patches-2.6.39/999-dgn3500.patch
deleted file mode 100644 (file)
index aa8db10..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
---- a/arch/mips/lantiq/machtypes.h
-+++ b/arch/mips/lantiq/machtypes.h
-@@ -32,6 +32,9 @@
-       LANTIQ_MACH_ARV752DPW,          /* Arcor easybox a802 */
-       LANTIQ_MACH_ARV752DPW22,        /* Arcor easybox a803 */
-       LANTIQ_MACH_ARV7518PW,          /* ASTORIA */
-+
-+      /* Netgear */
-+      LANTIQ_MACH_DGN3500B,           /* Netgear DGN3500 */
- };
- #endif
---- a/arch/mips/lantiq/xway/Kconfig
-+++ b/arch/mips/lantiq/xway/Kconfig
-@@ -10,6 +10,10 @@
-       bool "ARV45XX"
-       default y
-+config LANTIQ_MACH_NETGEAR
-+      bool "Netgear"
-+      default y
-+
- endmenu
- endif
---- a/arch/mips/lantiq/xway/Makefile
-+++ b/arch/mips/lantiq/xway/Makefile
-@@ -6,4 +6,5 @@
- obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
- obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
- obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
-+obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o
- obj-y += dev-dwc_otg.o
---- a/arch/mips/lantiq/xway/devices.h
-+++ b/arch/mips/lantiq/xway/devices.h
-@@ -12,6 +12,7 @@
- #include "../devices.h"
- #include <linux/phy.h>
- #include <linux/gpio_buttons.h>
-+#include <linux/spi/spi.h>
- extern void ltq_register_gpio(void);
- extern void ltq_register_gpio_stp(void);
-@@ -20,5 +21,7 @@
- extern void ltq_register_gpio_ebu(unsigned int value);
- extern void ltq_register_madwifi_eep(void);
- extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt);
-+extern void ltq_register_spi(struct ltq_spi_platform_data *pdata,
-+              struct spi_board_info const *info, unsigned n);
- #endif
---- /dev/null
-+++ b/arch/mips/lantiq/xway/mach-netgear.c
-@@ -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 <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);
index 5ef2fb3..a410a73 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_LANTIQ_ETOP=y
 CONFIG_LANTIQ_MACH_ARV45XX=y
 CONFIG_LANTIQ_MACH_EASY50712=y
 CONFIG_LANTIQ_MACH_NETGEAR=y
+CONFIG_LANTIQ_MACH_GIGASX76X=y
 CONFIG_MACH_NO_WESTBRIDGE=y
 # CONFIG_MINIX_FS_NATIVE_ENDIAN is not set
 CONFIG_NEED_DMA_MAP_STATE=y
diff --git a/target/linux/lantiq/xway/profiles/004-gigaset.mk b/target/linux/lantiq/xway/profiles/004-gigaset.mk
new file mode 100644 (file)
index 0000000..844b411
--- /dev/null
@@ -0,0 +1,11 @@
+define Profile/GIGASX76X
+  NAME:=GIGASX76X - Gigaset SX761,SX762,SX763
+  PACKAGES:= kmod-usb-core kmod-usb-dwc-otg kmod-leds-gpio \
+        kmod-ltq-dsl-firmware-b kmod-ledtrig-usbdev 
+endef
+
+define Profile/GIGASX76X/Description
+       Package set optimized for the Gigaset SX76X routers
+endef
+
+$(eval $(call Profile,GIGASX76X))
This page took 0.0333 seconds and 4 git commands to generate.