2011-06-08 17:57:55 +00:00
|
|
|
--- a/arch/mips/lantiq/machtypes.h
|
|
|
|
+++ b/arch/mips/lantiq/machtypes.h
|
2011-07-17 19:27:44 +00:00
|
|
|
@@ -34,6 +34,9 @@ enum lantiq_mach_type {
|
2011-06-08 17:57:55 +00:00
|
|
|
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
|
2011-07-17 19:27:44 +00:00
|
|
|
@@ -10,6 +10,10 @@ config LANTIQ_MACH_ARV45XX
|
2011-06-08 17:57:55 +00:00
|
|
|
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
|
2011-07-17 19:27:44 +00:00
|
|
|
@@ -6,4 +6,5 @@ obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o
|
2011-06-08 17:57:55 +00:00
|
|
|
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
|
2011-07-17 19:27:44 +00:00
|
|
|
@@ -11,6 +11,7 @@
|
|
|
|
|
2011-06-08 17:57:55 +00:00
|
|
|
#include "../devices.h"
|
|
|
|
#include <linux/phy.h>
|
|
|
|
+#include <linux/spi/spi.h>
|
|
|
|
|
|
|
|
extern void ltq_register_gpio(void);
|
|
|
|
extern void ltq_register_gpio_stp(void);
|
2011-07-17 19:27:44 +00:00
|
|
|
@@ -18,5 +19,7 @@ extern void ltq_register_ase_asc(void);
|
|
|
|
extern void ltq_register_etop(struct ltq_eth_data *eth);
|
2011-06-08 17:57:55 +00:00
|
|
|
extern void ltq_register_gpio_ebu(unsigned int value);
|
2011-07-17 19:27:44 +00:00
|
|
|
extern void ltq_register_madwifi_eep(unsigned long long addr);
|
2011-06-08 17:57:55 +00:00
|
|
|
+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(<q_pci_data);
|
|
|
|
+ ltq_register_etop(<q_eth_data);
|
|
|
|
+ ltq_register_spi(<q_spi_data, &spi_info, 1);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
|
|
|
|
+ "DGN3500B",
|
|
|
|
+ "Netgear DGN3500B",
|
|
|
|
+ dgn3500_init);
|