tools: fix GNU stat detection to prevent it from picking up other things named "gstat...
[openwrt.git] / target / linux / lantiq / files-3.1 / arch / mips / lantiq / xway / mach-netgear.c
1 /*
2  *  This program is free software; you can redistribute it and/or modify it
3  *  under the terms of the GNU General Public License version 2 as published
4  *  by the Free Software Foundation.
5  *
6  *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
7  */
8
9 #include <linux/init.h>
10 #include <linux/platform_device.h>
11 #include <linux/mtd/mtd.h>
12 #include <linux/mtd/partitions.h>
13 #include <linux/mtd/physmap.h>
14 #include <linux/input.h>
15 #include <linux/phy.h>
16 #include <linux/spi/spi.h>
17
18 #include <lantiq_soc.h>
19 #include <irq.h>
20
21 #include "../machtypes.h"
22 #include "devices.h"
23
24 static struct ltq_pci_data ltq_pci_data = {
25         .clock  = PCI_CLOCK_INT,
26         .gpio   = PCI_GNT1 | PCI_REQ1,
27         .irq    = {
28                 [14] = INT_NUM_IM0_IRL0 + 22,
29         },
30 };
31
32 static struct ltq_eth_data ltq_eth_data = {
33         .mii_mode = PHY_INTERFACE_MODE_MII,
34 };
35
36 struct spi_board_info spi_info = {
37         .bus_num        = 0,
38         .chip_select    = 3,
39         .max_speed_hz   = 25000000,
40         .modalias       = "mx25l12805d",
41 };
42
43 struct ltq_spi_platform_data ltq_spi_data = {
44         .num_chipselect = 4,
45 };
46
47 static void __init dgn3500_init(void)
48 {
49         ltq_register_pci(&ltq_pci_data);
50         ltq_register_etop(&ltq_eth_data);
51         ltq_register_spi(&ltq_spi_data, &spi_info, 1);
52 }
53
54 MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
55              "DGN3500B",
56              "Netgear DGN3500B",
57               dgn3500_init);