ubus: update to latest version, includes a small bugfix for object call replies
[openwrt.git] / target / linux / lantiq / patches-3.0 / 470-mach-gigasx76x.patch
1 --- a/arch/mips/lantiq/xway/Kconfig
2 +++ b/arch/mips/lantiq/xway/Kconfig
3 @@ -14,6 +14,10 @@ config LANTIQ_MACH_NETGEAR
4         bool "Netgear"
5         default y
6  
7 +config LANTIQ_MACH_GIGASX76X
8 +       bool "GIGASX76X"
9 +       default y
10 +
11  endmenu
12  
13  endif
14 --- a/arch/mips/lantiq/xway/Makefile
15 +++ b/arch/mips/lantiq/xway/Makefile
16 @@ -7,3 +7,4 @@ obj-$(CONFIG_LANTIQ_MACH_EASY50712) += m
17  obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
18  obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
19  obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o
20 +obj-$(CONFIG_LANTIQ_MACH_GIGASX76X) += mach-gigasx76x.o
21 --- /dev/null
22 +++ b/arch/mips/lantiq/xway/mach-gigasx76x.c
23 @@ -0,0 +1,109 @@
24 +/*
25 + *  This program is free software; you can redistribute it and/or modify it
26 + *  under the terms of the GNU General Public License version 2 as published
27 + *  by the Free Software Foundation.
28 + *
29 + *  Copyright (C) 2011 Andrej Vlašić
30 + *  Copyright (C) 2011 Luka Perkov
31 + *
32 + */
33 +
34 +#include <linux/init.h>
35 +#include <linux/platform_device.h>
36 +#include <linux/leds.h>
37 +#include <linux/gpio.h>
38 +#include <linux/gpio_buttons.h>
39 +#include <linux/mtd/mtd.h>
40 +#include <linux/mtd/partitions.h>
41 +#include <linux/mtd/physmap.h>
42 +#include <linux/input.h>
43 +#include <linux/ath5k_platform.h>
44 +#include <linux/pci.h>
45 +#include <linux/phy.h>
46 +
47 +#include <irq.h>
48 +
49 +#include <lantiq_soc.h>
50 +#include <lantiq_platform.h>
51 +
52 +#include "../machtypes.h"
53 +#include "devices.h"
54 +#include "dev-dwc_otg.h"
55 +#include "dev-leds-gpio.h"
56 +
57 +static struct mtd_partition gigasx76x_partitions[] =
58 +{
59 +       {
60 +               .name   = "secondary_env",
61 +               .offset = 0xe000,
62 +               .size   = 0x2000,
63 +       },
64 +       {
65 +               .name   = "secondary_boot",
66 +               .offset = 0x10000,
67 +               .size   = 0x10000,
68 +       },
69 +       {
70 +               .name   = "uboot",
71 +               .offset = 0x20000,
72 +               .size   = 0x30000,
73 +       },
74 +       {
75 +               .name   = "linux",
76 +               .offset = 0x50000,
77 +               .size   = 0x7a0000,
78 +       },
79 +       {
80 +               .name   = "board_config",
81 +               .offset = 0x7f0000,
82 +               .size   = 0x10000,
83 +       },
84 +};
85 +
86 +static struct gpio_led
87 +gigasx76x_leds_gpio[] __initdata = {
88 +       { .name = "soc:green:usb", .gpio = 50, },
89 +       { .name = "soc:green:wlan", .gpio = 51, },
90 +       { .name = "soc:green:phone2", .gpio = 52, },
91 +       { .name = "soc:green:phone1", .gpio = 53, },
92 +       { .name = "soc:green:line", .gpio = 54, },
93 +       { .name = "soc:green:online", .gpio = 55, },
94 +};
95 +
96 +
97 +static struct physmap_flash_data gigasx76x_flash_data = {
98 +       .nr_parts       = ARRAY_SIZE(gigasx76x_partitions),
99 +       .parts          = gigasx76x_partitions,
100 +};
101 +
102 +static struct ltq_pci_data ltq_pci_data = {
103 +       .clock      = PCI_CLOCK_INT,
104 +       .gpio   = PCI_GNT1 | PCI_REQ1,
105 +       .irq    = {
106 +               [14] = INT_NUM_IM0_IRL0 + 22,
107 +       },
108 +};
109 +
110 +static struct ltq_eth_data ltq_eth_data = {
111 +  .mii_mode = PHY_INTERFACE_MODE_MII,
112 +};
113 +
114 +static void __init
115 +gigasx76x_init(void)
116 +{
117 +#define GIGASX76X_USB                  29
118 +
119 +       ltq_register_gpio_stp();
120 +       ltq_register_nor(&gigasx76x_flash_data);
121 +       ltq_register_pci(&ltq_pci_data);
122 +       ltq_register_etop(&ltq_eth_data);
123 +       xway_register_dwc(GIGASX76X_USB);
124 +       ltq_register_tapi();
125 +       ltq_register_madwifi_eep();
126 +       ltq_add_device_leds_gpio(-1, ARRAY_SIZE(gigasx76x_leds_gpio), gigasx76x_leds_gpio);
127 +}
128 +
129 +MIPS_MACHINE(LANTIQ_MACH_GIGASX76X,
130 +                       "GIGASX76X",
131 +                       "GIGASX76X - Gigaset SX761,SX762,SX763",
132 +                       gigasx76x_init);
133 --- a/arch/mips/lantiq/machtypes.h
134 +++ b/arch/mips/lantiq/machtypes.h
135 @@ -36,6 +36,9 @@ enum lantiq_mach_type {
136  
137         /* Netgear */
138         LANTIQ_MACH_DGN3500B,           /* Netgear DGN3500 */
139 +
140 +       /* Gigaset */
141 +       LANTIQ_MACH_GIGASX76X,          /* Gigaset SX76x */
142  };
143  
144  #endif