generic: ar8216: allow to use more ports
[openwrt.git] / target / linux / lantiq / patches-2.6.32 / 600-mach-dgn3500.patch
1 --- a/arch/mips/lantiq/machtypes.h
2 +++ b/arch/mips/lantiq/machtypes.h
3 @@ -32,6 +32,9 @@
4 LANTIQ_MACH_ARV752DPW, /* Arcor easybox a802 */
5 LANTIQ_MACH_ARV752DPW22, /* Arcor easybox a803 */
6 LANTIQ_MACH_ARV7518PW, /* ASTORIA */
7 +
8 + /* Netgear */
9 + LANTIQ_MACH_DGN3500B, /* Netgear DGN3500 */
10 };
11
12 #endif
13 --- a/arch/mips/lantiq/xway/Kconfig
14 +++ b/arch/mips/lantiq/xway/Kconfig
15 @@ -10,6 +10,10 @@
16 bool "ARV45XX"
17 default y
18
19 +config LANTIQ_MACH_NETGEAR
20 + bool "Netgear"
21 + default y
22 +
23 endmenu
24
25 endif
26 --- a/arch/mips/lantiq/xway/Makefile
27 +++ b/arch/mips/lantiq/xway/Makefile
28 @@ -6,4 +6,5 @@
29 obj-$(CONFIG_LANTIQ_MACH_EASY50712) += mach-easy50712.o
30 obj-$(CONFIG_LANTIQ_MACH_EASY50601) += mach-easy50601.o
31 obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
32 +obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o
33 obj-y += dev-dwc_otg.o
34 --- a/arch/mips/lantiq/xway/devices.h
35 +++ b/arch/mips/lantiq/xway/devices.h
36 @@ -12,6 +12,7 @@
37 #include "../devices.h"
38 #include <linux/phy.h>
39 #include <linux/gpio_buttons.h>
40 +#include <linux/spi/spi.h>
41
42 extern void ltq_register_gpio(void);
43 extern void ltq_register_gpio_stp(void);
44 @@ -20,5 +21,7 @@
45 extern void ltq_register_gpio_ebu(unsigned int value);
46 extern void ltq_register_madwifi_eep(void);
47 extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt);
48 +extern void ltq_register_spi(struct ltq_spi_platform_data *pdata,
49 + struct spi_board_info const *info, unsigned n);
50
51 #endif
52 --- /dev/null
53 +++ b/arch/mips/lantiq/xway/mach-netgear.c
54 @@ -0,0 +1,57 @@
55 +/*
56 + * This program is free software; you can redistribute it and/or modify it
57 + * under the terms of the GNU General Public License version 2 as published
58 + * by the Free Software Foundation.
59 + *
60 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
61 + */
62 +
63 +#include <linux/init.h>
64 +#include <linux/platform_device.h>
65 +#include <linux/mtd/mtd.h>
66 +#include <linux/mtd/partitions.h>
67 +#include <linux/mtd/physmap.h>
68 +#include <linux/input.h>
69 +#include <linux/phy.h>
70 +#include <linux/spi/spi.h>
71 +
72 +#include <lantiq_soc.h>
73 +#include <irq.h>
74 +
75 +#include "../machtypes.h"
76 +#include "devices.h"
77 +
78 +static struct ltq_pci_data ltq_pci_data = {
79 + .clock = PCI_CLOCK_INT,
80 + .gpio = PCI_GNT1 | PCI_REQ1,
81 + .irq = {
82 + [14] = INT_NUM_IM0_IRL0 + 22,
83 + },
84 +};
85 +
86 +static struct ltq_eth_data ltq_eth_data = {
87 + .mii_mode = PHY_INTERFACE_MODE_MII,
88 +};
89 +
90 +struct spi_board_info spi_info = {
91 + .bus_num = 0,
92 + .chip_select = 3,
93 + .max_speed_hz = 25000000,
94 + .modalias = "mx25l12805d",
95 +};
96 +
97 +struct ltq_spi_platform_data ltq_spi_data = {
98 + .num_chipselect = 4,
99 +};
100 +
101 +static void __init dgn3500_init(void)
102 +{
103 + ltq_register_pci(&ltq_pci_data);
104 + ltq_register_etop(&ltq_eth_data);
105 + ltq_register_spi(&ltq_spi_data, &spi_info, 1);
106 +}
107 +
108 +MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
109 + "DGN3500B",
110 + "Netgear DGN3500B",
111 + dgn3500_init);
This page took 0.046003 seconds and 5 git commands to generate.